* lisp/emacs-lisp/ert-x.el (ert-with-display-current-buffer):
cl-defmacro instead of defmacro for consistency with the rest of
the file. Use `save-window-excursion' rather than the awkward
unwind-protect to restore window configuration.
* lisp/emacs-lisp/ert.el (ert-with-buffer-selected): Mention
`ert-play-keys' rather than `execute-kbd-macro' to simulate user
sending input events.
* lisp/emacs-lisp/ert.el (ert-play-keys): Make it a defun.
(ert-play-keys-in-string): Suppress definition.
* test/lisp/erc/erc-scenarios-spelling.el
(erc-scenarios-spelling--auto-correct): Use `ert-play-keys' rather
than `ert-play-keys-in-string'.
* test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo)
(undo-test-point-after-forward-kill):
* test/lisp/erc/erc-scenarios-spelling.el
(erc-scenarios-spelling--auto-correct): Use `ert-with-display-current-buffer'
rather than `pop-to-buffer-same-window'.
* lisp/emacs-lisp/ert.el (ert-with-display-current-buffer): New defmacro.
* lisp/emacs-lisp/ert.el (ert-play-keys)
(ert-play-keys-in-string): New macros.
* test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo)
(undo-test-point-after-forward-kill): Use new macro `ert-play-keys'
and `pop-to-buffer-same-window' rather than `switch-to-buffer'.
* test/lisp/erc/erc-scenarios-spelling.el
(erc-scenarios-spelling--auto-correct): Use new macros
`ert-play-keys-in-string' and `ert-play-keys' and
`pop-to-buffer-same-window' rather than `set-window-buffer'.
* lisp/international/characters.el (c0-acronyms): Fix #x1c "FS".
(c1-acronyms): Fix #x8d "RI", #x8f "SS3", and #x9a "SCI".
Leave #x99 alone because standards use both "SGCI" and "SGC".
This change updates gnus-icalendar.el to use the new iCalendar
library instead of obsolete functions from icalendar.el.
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event)
(gnus-icalendar-event:recurring-p)
(gnus-icalendar-event:recurring-interval)
(gnus-icalendar-event:recurring-days)
(gnus-icalendar-event--find-attendee)
(gnus-icalendar-event-from-ical)
(gnus-icalendar-event-from-buffer)
(gnus-icalendar-event--build-reply)
(gnus-icalendar-event-reply-from-buffer)
(gnus-icalendar-event:org-repeat): Reimplement using new iCalendar functions.
(gnus-icalendar-event--attendees-by-type): Rename from
`gnus-icalendar-event--get-attendee-names'.
(gnus-icalendar-event--build-reply): Rename from
`gnus-icalendar-event--build-reply-event-body'.
(gnus-icalendar--format-participant-list): Expect list of
`icalendar-attendee's. Add docstring.
(Bug#80426)
* test/lisp/gnus/gnus-icalendar-tests.el: Update tests.
* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Fix for
MS-Windows and MS-DOS.
* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2): Skip on MS-Windows/DOS.
Remove unused variable 'end'.
(dired-test-ls-error-message): Special testing for MS-Windows and
MS-DOS when they use 'ls-lisp'.
(Bug#80499)
* lisp/window.el (window--make-major-side-window): Protect the
sibling (the main-window group) from recombination. Without
this, deleting a side window can flatten the group into the
root, causing subsequent side windows on other sides to be
placed incorrectly (Bug#80665).
Copyright-paperwork-exempt: yes
The error messages are now displayed in a popped up buffer instead
of being output in the Dired buffer and signalling an error. The
file name bounds in Dired entries are now determined solely by the
offsets calculated by 'ls' with the --dired option and
consequently Dired now reliably recognizes file names that contain
a newline (bug#80499).
* etc/NEWS: Announce new Dired handling of errors from 'ls'.
* lisp/dired.el (dired-internal-noselect): Check Dired buffer for
file entries and if there are none kill the buffer to prevent
displaying a Dired buffer with no file entries.
(dired--ls-error-buffer): New variable.
(dired--display-ls-error): New function.
(dired, dired-other-window, dired-other-frame, dired-other-tab):
Use it to pop up buffer with error message emitted by 'ls'.
* lisp/files.el (insert-directory-clean): Remove the code that
treats lines beginning at column 0 in a Dired buffer as error
lines and consequently also remove the code using these lines to
adjust the offsets specifying the bounds of the file name in the
Dired entries. If the buffer contains a //DIRED-OPTIONS// line
output by --dired, delete this line even when it is at BOB.
(insert-directory): Remove the code that checks the return value
of 'ls' and signals an error based on that value. Write any error
message emitted by 'ls' to a temporary file and insert its content
into a buffer, which will be popped when invoking a Dired command
results in the 'ls' error. Adjust the comment above this function
to accommodate file names containing a newline in Dired entries.
(insert-directory-adj-pos): Remove this now unused function.
* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2)
(dired-test-ls-error-message): New tests.
* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Adjust test
to use of 'ls' error buffer instead of signaling an error.
This introduces the predicate frame-initial-p, which uses
struct frame.output_method or struct terminal.type to detect
initial_terminal without relying on its name (bug#80629).
For some prior discussion, see:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00480.htmlhttps://lists.gnu.org/r/emacs-devel/2020-01/msg00120.html
* doc/lispref/frames.texi (Frames): Document frame-initial-p.
(Finding All Frames): Fix grammar.
* etc/NEWS (Lisp Changes in Emacs 31.1): Announce frame-initial-p.
* lisp/desktop.el (desktop--check-dont-save):
* lisp/emacs-lisp/debug.el (debug):
* lisp/frameset.el (frameset-restore):
* lisp/menu-bar.el (menu-bar-update-buffers):
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal):
Use frame-initial-p instead of checking the "initial_terminal" name.
* lisp/emacs-lisp/byte-opt.el: Mark frame-initial-p as error-free.
* src/pgtkterm.c (pgtk_focus_changed): Use IS_DAEMON in place of
Fdaemonp, thus also accepting a named daemon session.
* src/terminal.c (decode_tty_terminal): Clarify commentary.
(Fframe_initial_p): New function.
(syms_of_terminal): Expose it.
(init_initial_terminal): Update commentary now that
menu-bar-update-buffers uses frame-initial-p (bug#53740).
* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Simulate the
lack of an initial terminal by overriding frame-initial-p now
that turn-on-xterm-mouse-tracking-on-terminal uses it.
* test/src/terminal-tests.el: New file.
* lisp/auth-source-pass.el (auth-source-pass-search): Remove
redundant expand-file-name.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass--with-store): Bind auth-source-pass-filename to an
existing directory to satisfy the new guard in
auth-source-pass-search (bug#76323).
* lisp/auth-source-pass.el (auth-source-pass-search):
If auth-source-pass-filename is not a directory, just do nothing to
avoid repeated errors raised by directory-files-recursively in
auth-source-pass-entries which is called for each search pattern.
(Bug#76323)
Copyright-paperwork-exempt: yes
Move shortdoc group definitions from shortdoc.el to a separate file
shortdoc-doc.el. Document shortdoc group format in a future-proof way
and guide package authors on how to use shortdoc groups across past
Emacs versions.
* lisp/emacs-lisp/shortdoc-doc.el: New file.
* lisp/emacs-lisp/shortdoc.el: Document shortdoc group format in a
future-proof way. Require 'shortdoc-doc'.
(shortdoc--keyword-plist-p): New function.
(shortdoc--check): Update to check the documented shortdoc group format.
(shortdoc--groups, define-short-documentation-group): Pull out of
autoloaded 'progn'.
(define-short-documentation-group): Report errors in terms of byte
compiler warnings.
(alist, map, string, file-name, file, hash-table, list, symbol)
(comparison, vector, regexp, sequence, buffer, overlay, process, number)
(text-properties, keymaps): Move group to shortdoc-doc.el.
(shortdoc): Move alias to after function.
(shortdoc-add-function): Add argument checks.
* doc/lispref/tips.texi (Documentation Group Tips): New section.
* doc/lispref/elisp.texi (Top):
* doc/lispref/tips.texi (Tips): Add references to it.
* doc/lispref/help.texi (Documentation Groups): Ditto, and add some
concept index entries. (bug#80297)
Ensure that Dired does not treat the sequence "\\n" within a file
name as a newline (bug#80608).
* lisp/dired.el (dired--filename-with-newline-p): Rewrite using
'directory-files' with match for regexp "\n".
* test/lisp/dired-tests.el
(dired-test--filename-with-backslash-n): New function.
(dired-test-filename-with-backslash-n): New test.
Like the commit of 2022-07-31
"Fix further package.el loaddefs byte-compile warnings"
this pacifies the warning that compile-command fails to specify
a containing group when byte-compiling loaddefs.el (bug#80648).
* lisp/progmodes/compile.el (compile-command): Restore explicit
custom :group on autoloaded user option.
* lisp/dired.el (dired-from-menubar): New function.
* lisp/menu-bar.el (menu-bar-file-menu): Use it in the "Open
Directory" menu item, instead of calling Dired directly. This
ensures we show the correct GUI dialog even if some package remaps
'dired' to something else (like 'ffap-bindings' does).
(Bug#80545)