commit 746507dc3b9f555ff6e8e6282ff03ac211752325 (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Sat Dec 16 04:57:44 2023 +0200 ruby-syntax-methods-before-regexp: Drop this whitelist * lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Match only based on keywords and operators. (ruby-syntax-methods-before-regexp): Delete. (ruby-syntax-propertize): Use the new heuristic based on spaces instead of checking for method names before (bug#67569). * test/lisp/progmodes/ruby-mode-tests.el (ruby-regexp-not-division-when-only-space-before): Use non-whitelisted method name. * test/lisp/progmodes/ruby-mode-resources/ruby.rb: Adjust two examples. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5fab2bf02c4..bca86a57c7d 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2106,12 +2106,6 @@ ruby-find-library-file "\\(%\\)[qQrswWxIi]?\\([[:punct:]]\\)" "Regexp to match the beginning of percent literal.") - (defconst ruby-syntax-methods-before-regexp - '("gsub" "gsub!" "sub" "sub!" "scan" "split" "split!" "index" "match" - "assert_match" "Given" "Then" "When") - "Methods that can take regexp as the first argument. -It will be properly highlighted even when the call omits parens.") - (defvar ruby-syntax-before-regexp-re (concat ;; Special tokens that can't be followed by a division operator. @@ -2123,11 +2117,9 @@ ruby-find-library-file "\\|\\(?:^\\|\\s \\)" (regexp-opt '("if" "elsif" "unless" "while" "until" "when" "and" "or" "not" "&&" "||")) - ;; Method name from the list. - "\\|\\_<" - (regexp-opt ruby-syntax-methods-before-regexp t) "\\)\\s *") - "Regexp to match text that can be followed by a regular expression.")) + "Regexp to match text that disambiguates a regular expression. +A slash character after any of these should begin a regexp.")) (defun ruby-syntax-propertize (start end) "Syntactic keywords for Ruby mode. See `syntax-propertize-function'." @@ -2183,20 +2175,18 @@ ruby-syntax-propertize (when (save-excursion (forward-char -1) (cl-evenp (skip-chars-backward "\\\\"))) - (let ((state (save-excursion (syntax-ppss (match-beginning 1)))) - division-like) + (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) (when (or ;; Beginning of a regexp. (and (null (nth 8 state)) - (save-excursion - (setq division-like - (or (eql (char-after) ?\s) - (not (eql (char-before (1- (point))) ?\s)))) - (forward-char -1) - (looking-back ruby-syntax-before-regexp-re - (line-beginning-position))) - (not (and division-like - (match-beginning 2)))) + (or (not + ;; Looks like division. + (or (eql (char-after) ?\s) + (not (eql (char-before (1- (point))) ?\s)))) + (save-excursion + (forward-char -1) + (looking-back ruby-syntax-before-regexp-re + (line-beginning-position))))) ;; End of regexp. We don't match the whole ;; regexp at once because it can have ;; string interpolation inside, or span diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby.rb b/test/lisp/progmodes/ruby-mode-resources/ruby.rb index 81d0dfd75c9..a411b39a8fc 100644 --- a/test/lisp/progmodes/ruby-mode-resources/ruby.rb +++ b/test/lisp/progmodes/ruby-mode-resources/ruby.rb @@ -34,11 +34,11 @@ def foo # Regexp after whitelisted method. "abc".sub /b/, 'd' -# Don't mismatch "sub" at the end of words. -a = asub / aslb + bsub / bslb; +# Don't mistake division for regexp. +a = sub / aslb + bsub / bslb; # Highlight the regexp after "if". -x = toto / foo if /do bar/ =~ "dobar" +x = toto / foo if / do bar/ =~ "dobar" # Regexp options are highlighted. diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index a931541ba35..fea5f58b92e 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -164,7 +164,7 @@ ruby-slash-not-regexp-when-no-spaces (ruby-assert-state "x = index/3" 3 nil)) (ert-deftest ruby-regexp-not-division-when-only-space-before () - (ruby-assert-state "x = index /3" 3 ?/)) + (ruby-assert-state "x = foo_index /3" 3 ?/)) (ert-deftest ruby-slash-not-regexp-when-only-space-after () (ruby-assert-state "x = index/ 3" 3 nil)) commit a2c2ec548bb7fc03e1f050c2c784b65e9725fea1 Author: Po Lu Date: Sat Dec 16 10:55:18 2023 +0800 Provide for Num Lock and Scroll Lock on Android * java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp): Retain META_NUM_LOCK_ON and META_SCROLL_LOCK_ON while filtering meta state. diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index 3c9e6eb215f..0dc4a274731 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java @@ -644,7 +644,7 @@ private static class Coordinate public void onKeyDown (int keyCode, KeyEvent event) { - int state, state_1; + int state, state_1, num_lock_flag; long serial; String characters; @@ -665,13 +665,23 @@ private static class Coordinate state = eventModifiers (event); + /* Num Lock and Scroll Lock aren't supported by systems older than + Android 3.0. */ + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) + num_lock_flag = (KeyEvent.META_NUM_LOCK_ON + | KeyEvent.META_SCROLL_LOCK_ON); + else + num_lock_flag = 0; + /* Ignore meta-state understood by Emacs for now, or key presses such as Ctrl+C and Meta+C will not be recognized as an ASCII key press event. */ state_1 = state & ~(KeyEvent.META_ALT_MASK | KeyEvent.META_CTRL_MASK - | KeyEvent.META_SYM_ON | KeyEvent.META_META_MASK); + | KeyEvent.META_SYM_ON | KeyEvent.META_META_MASK + | num_lock_flag); synchronized (eventStrings) { @@ -692,19 +702,29 @@ private static class Coordinate public void onKeyUp (int keyCode, KeyEvent event) { - int state, state_1, unicode_char; + int state, state_1, unicode_char, num_lock_flag; long time; /* Compute the event's modifier mask. */ state = eventModifiers (event); + /* Num Lock and Scroll Lock aren't supported by systems older than + Android 3.0. */ + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) + num_lock_flag = (KeyEvent.META_NUM_LOCK_ON + | KeyEvent.META_SCROLL_LOCK_ON); + else + num_lock_flag = 0; + /* Ignore meta-state understood by Emacs for now, or key presses such as Ctrl+C and Meta+C will not be recognized as an ASCII key press event. */ state_1 = state & ~(KeyEvent.META_ALT_MASK | KeyEvent.META_CTRL_MASK - | KeyEvent.META_SYM_ON | KeyEvent.META_META_MASK); + | KeyEvent.META_SYM_ON | KeyEvent.META_META_MASK + | num_lock_flag); unicode_char = getEventUnicodeChar (event, state_1); commit 4072e06a5f7d14b11799d8dd41d7c50082dca4e6 Author: Dmitry Gutov Date: Sat Dec 16 02:34:34 2023 +0200 ; vc-print-log-setup-buttons: Update a TODO comment diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 0f74449c92d..4e6581f7f27 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2736,8 +2736,9 @@ vc-print-log-setup-buttons relatives ", ")) " ") ;; TODO: Also print a different button somewhere in the - ;; created buffer to be able to go back easily. (There - ;; are different ways to do that.) + ;; created buffer to be able to go back easily. Might + ;; require some sort of stack/history because a file can + ;; be renamed multiple times. (insert-text-button "View log" 'action (lambda (&rest _ignore) commit 62d96473867dfa71a9719dd41710cd2a155d9055 Author: Dmitry Gutov Date: Sat Dec 16 01:48:29 2023 +0200 (vc-print-log-setup-buttons): Start "previous" history with specified revision * lisp/vc/vc-git.el (vc-git-file-name-changes-switches): Remove the comment above the option. Seems unnecessary now. * lisp/vc/vc.el (vc-print-log-setup-buttons): Start the "previous" change history buffer with the specified revision, rather than have the sentinel jump to it. Apparently in some cases the history of the old name can't be found. In others, the log just shows faster. But note the caveat described in the second new comment (bug#55871). diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index fa1f14b65bb..f6e8e1b7042 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -153,8 +153,6 @@ vc-git-shortlog-switches (repeat :tag "Argument List" :value ("") string)) :version "30.1") -;; XXX: (setq vc-git-log-switches '("--simplify-merges")) can also -;; create fuller history when using this feature. Not sure why. (defcustom vc-git-file-name-changes-switches '("-M" "-C") "String or list of string to pass to Git when finding previous names. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1234424a8d9..0f74449c92d 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2709,6 +2709,8 @@ vc-print-log-setup-buttons (if (< entries limit) ;; The log has been printed in full. Perhaps it started ;; with a copy or rename? + ;; FIXME: We'd probably still want this button even when + ;; vc-log-show-limit is customized to 0 (should be rare). (let* ((last-revision (log-view-current-tag (point-max))) ;; XXX: Could skip this when vc-git-print-log-follow = t. (name-changes @@ -2743,7 +2745,14 @@ vc-print-log-setup-buttons (with-current-buffer vc-parent-buffer ;; To set up parent buffer in the new viewer. (vc-print-log-internal backend old-names - last-revision nil limit)))) + last-revision t limit)))) + ;; XXX: Showing the full history for OLD-NAMES (with + ;; IS-START-REVISION=nil) can be better sometimes + ;; (e.g. when some edits still occurred after a rename + ;; -- multiple branches scenario), but it also can hurt + ;; in others because of Git's automatic history + ;; simplification: as a result, the logs for some + ;; use-package's files before merge could not be found. 'help-echo "Show the log for the file name(s) before the rename"))) ;; Perhaps there are more entries in the log. commit e154c81c0bfcd2159a3c86e53d7281dfd5797088 Author: Dmitry Gutov Date: Sat Dec 16 01:36:47 2023 +0200 Show buttons below vc-log even when REVISION is specified E.g. in the vc-print-branch-log which specifies start revision. * lisp/vc/vc.el (vc-print-log-internal): Remove outdated comment. (vc-print-log-setup-buttons): Only special-case non-nil IS-START-REVISION when LIMIT=1. We often do need buttons for logs that start with a particular revision, because those are still limited by vc-log-show-limit. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 3689dcb9b27..1234424a8d9 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2693,11 +2693,15 @@ log-view-message-re (defun vc-print-log-setup-buttons (working-revision is-start-revision limit pl-return) "Insert at the end of the current buffer buttons to show more log entries. In the new log, leave point at WORKING-REVISION (if non-nil). -LIMIT is the number of entries currently shown. -Does nothing if IS-START-REVISION is non-nil, or if LIMIT is nil, -or if PL-RETURN is `limit-unsupported'." +LIMIT is the current maximum number of entries shown. Does +nothing if IS-START-REVISION is non-nil and LIMIT is 1, or if +LIMIT is nil, or if PL-RETURN is `limit-unsupported'." + ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line + ;; or by vc-print-root-log with current-prefix-arg=1. + ;; In either case only one revision is wanted, no buttons. (when (and limit (not (eq 'limit-unsupported pl-return)) - (not is-start-revision)) + (not (and is-start-revision + (= limit 1)))) (let ((entries 0)) (goto-char (point-min)) (while (re-search-forward log-view-message-re nil t) @@ -2770,9 +2774,6 @@ vc-print-log-internal If IS-START-REVISION is non-nil, start the log from WORKING-REVISION \(not all backends support this); i.e., show only WORKING-REVISION and earlier revisions. Show up to LIMIT entries (non-nil means unlimited)." - ;; As of 2013/04 the only thing that passes IS-START-REVISION non-nil - ;; is vc-annotate-show-log-revision-at-line, which sets LIMIT = 1. - ;; Don't switch to the output buffer before running the command, ;; so that any buffer-local settings in the vc-controlled ;; buffer can be accessed by the command. commit 5b80894d0a7ff94496c37bad595579c29f5a925c Author: Dmitry Gutov Date: Fri Dec 15 22:26:59 2023 +0200 Support viewing VC change history across renames (Git, Hg) * lisp/vc/vc.el (vc-print-log-setup-buttons): When the log ends at a rename, add a button to jump to the previous names. Use the new backend action 'file-name-changes'. * lisp/vc/vc-git.el (vc-git-print-log-follow): New option. (vc-git-file-name-changes): Implementation (bug#55871, bug#39044). (vc-git-print-log-follow): Update docstring. * lisp/vc/log-view.el (log-view-find-revision) (log-view-annotate-version): Pass the log's VC backend explicitly. * lisp/vc/vc-hg.el (vc-hg-file-name-changes): Add Hg implementation (bug#13004). * etc/NEWS: Mention the changes. diff --git a/etc/NEWS b/etc/NEWS index 1ff2f8a149f..29b3d6676de 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -457,6 +457,16 @@ With this value only the revision number is displayed on the mode-line. *** Obsolete command 'vc-switch-backend' re-added as 'vc-change-backend'. The command was previously obsoleted and unbound in Emacs 28. +*** Support for viewing VC change history across renames. +When a fileset's VC change history ('C-x v l') ends at a rename, we +now print the old name(s) and a button which jumps to their history. +Git and Hg are supported. Naturally, 'vc-git-print-log-follow' should +be nil for this to work (or '--follow' should not be in +'vc-hg-print-log-switches', in Hg's case). + +*** New option 'vc-git-file-name-changes-switches'. +It allows tweaking the thresholds for rename and copy detection. + ** Diff mode +++ diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index af24fcfd398..6c3abd15d8d 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -516,7 +516,8 @@ log-view-find-revision (switch-to-buffer (vc-find-revision (if log-view-per-file-logs (log-view-current-file) (car log-view-vc-fileset)) - (log-view-current-tag))))) + (log-view-current-tag) + log-view-vc-backend)))) (defun log-view-extract-comment () @@ -562,7 +563,8 @@ log-view-annotate-version (vc-annotate (if log-view-per-file-logs (log-view-current-file) (car log-view-vc-fileset)) - (log-view-current-tag)))) + (log-view-current-tag) + nil nil nil log-view-vc-backend))) ;; ;; diff diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2e057ecfaa7..fa1f14b65bb 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -89,6 +89,7 @@ ;; - make-version-backups-p (file) NOT NEEDED ;; - previous-revision (file rev) OK ;; - next-revision (file rev) OK +;; - file-name-changes (rev) OK ;; - check-headers () COULD BE SUPPORTED ;; - delete-file (file) OK ;; - rename-file (old new) OK @@ -152,6 +153,20 @@ vc-git-shortlog-switches (repeat :tag "Argument List" :value ("") string)) :version "30.1") +;; XXX: (setq vc-git-log-switches '("--simplify-merges")) can also +;; create fuller history when using this feature. Not sure why. +(defcustom vc-git-file-name-changes-switches '("-M" "-C") + "String or list of string to pass to Git when finding previous names. + +This option should usually at least contain '-M'. You can adjust +the flags to change the similarity thresholds (default 50%). Or +add `--find-copies-harder' (slower in large projects, since it +uses a full scan)." + :type '(choice (const :tag "None" nil) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "30.1") + (defcustom vc-git-resolve-conflicts t "When non-nil, mark conflicted file as resolved upon saving. That is performed after all conflict markers in it have been @@ -1416,7 +1431,15 @@ vc-git-clone ;; Long explanation here: ;; https://stackoverflow.com/questions/46487476/git-log-follow-graph-skips-commits (defcustom vc-git-print-log-follow nil - "If true, follow renames in Git logs for a single file." + "If true, use the flag `--follow' when producing single file logs. + +It will make the printed log automatically follow the renames. +The downsides is that the log produced this way may omit +certain (merge) commits, and that `log-view-diff' fails on +commits that used the previous name, in that log buffer. + +When this variable is nil, and the log ends with a rename, we +print a button below that shows the log for the previous name." :type 'boolean :version "26.1") @@ -1866,6 +1889,31 @@ vc-git-next-revision (progn (forward-line 1) (1- (point))))))))) (or (vc-git-symbolic-commit next-rev) next-rev))) +(defun vc-git-file-name-changes (rev) + (with-temp-buffer + (let ((root (vc-git-root default-directory))) + (unless vc-git-print-log-follow + (apply #'vc-git-command (current-buffer) t nil + "diff" + "--name-status" + "--diff-filter=ADCR" + (concat rev "^") rev + (vc-switches 'git 'file-name-changes))) + (let (res) + (goto-char (point-min)) + (while (re-search-forward "^\\([ADCR]\\)[0-9]*\t\\([^\n\t]+\\)\\(?:\t\\([^\n\t]+\\)\\)?" nil t) + (pcase (match-string 1) + ("A" (push (cons nil (match-string 2)) res)) + ("D" (push (cons (match-string 2) nil) res)) + ((or "C" "R") (push (cons (match-string 2) (match-string 3)) res)) + ;; ("M" (push (cons (match-string 1) (match-string 1)) res)) + )) + (mapc (lambda (c) + (if (car c) (setcar c (expand-file-name (car c) root))) + (if (cdr c) (setcdr c (expand-file-name (cdr c) root)))) + res) + (nreverse res))))) + (defun vc-git-delete-file (file) (vc-git-command nil 0 file "rm" "-f" "--")) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 9df517ea847..d6dadb74469 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -77,6 +77,7 @@ ;; - make-version-backups-p (file) ?? ;; - previous-revision (file rev) OK ;; - next-revision (file rev) OK +;; - file-name-changes (rev) OK ;; - check-headers () ?? ;; - delete-file (file) TEST IT ;; - rename-file (old new) OK @@ -1203,6 +1204,22 @@ vc-hg-find-revision (vc-hg-command buffer 0 file "cat" "-r" rev) (vc-hg-command buffer 0 file "cat")))) +(defun vc-hg-file-name-changes (rev) + (unless (member "--follow" vc-hg-log-switches) + (with-temp-buffer + (let ((root (vc-hg-root default-directory))) + (vc-hg-command (current-buffer) t nil + "log" "-g" "-p" "-r" rev) + (let (res) + (goto-char (point-min)) + (while (re-search-forward "^diff --git a/\\([^ \n]+\\) b/\\([^ \n]+\\)" nil t) + (when (not (equal (match-string 1) (match-string 2))) + (push (cons + (expand-file-name (match-string 1) root) + (expand-file-name (match-string 2) root)) + res))) + (nreverse res)))))) + (defun vc-hg-find-ignore-file (file) "Return the root directory of the repository of FILE." (expand-file-name ".hgignore" diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 958929fe4c6..3689dcb9b27 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -517,6 +517,13 @@ ;; Return the revision number that precedes REV for FILE, or nil if no such ;; revision exists. ;; +;; - file-name-changes (rev) +;; +;; Return the list of pairs with changes in file names in REV. When +;; a file was added, it should be a cons with nil car. When +;; deleted, a cons with nil cdr. When copied or renamed, a cons +;; with the source name as car and destination name as cdr. +;; ;; - next-revision (file rev) ;; ;; Return the revision number that follows REV for FILE, or nil if no such @@ -2695,9 +2702,47 @@ vc-print-log-setup-buttons (goto-char (point-min)) (while (re-search-forward log-view-message-re nil t) (cl-incf entries)) - ;; If we got fewer entries than we asked for, then displaying - ;; the "more" buttons isn't useful. - (when (>= entries limit) + (if (< entries limit) + ;; The log has been printed in full. Perhaps it started + ;; with a copy or rename? + (let* ((last-revision (log-view-current-tag (point-max))) + ;; XXX: Could skip this when vc-git-print-log-follow = t. + (name-changes + (condition-case nil + (vc-call-backend log-view-vc-backend + 'file-name-changes last-revision) + (vc-not-supported nil))) + (matching-changes + (cl-delete-if-not (lambda (f) (member f log-view-vc-fileset)) + name-changes :key #'cdr)) + (old-names (delq nil (mapcar #'car matching-changes))) + (relatives (mapcar #'file-relative-name old-names))) + (when old-names + (goto-char (point-max)) + (unless (looking-back "\n\n" (- (point) 2)) + (insert "\n")) + (insert + (format + "Renamed from %s" + (mapconcat (lambda (s) + (propertize s 'font-lock-face + 'log-view-file)) + relatives ", ")) + " ") + ;; TODO: Also print a different button somewhere in the + ;; created buffer to be able to go back easily. (There + ;; are different ways to do that.) + (insert-text-button + "View log" + 'action (lambda (&rest _ignore) + (let ((backend log-view-vc-backend)) + (with-current-buffer vc-parent-buffer + ;; To set up parent buffer in the new viewer. + (vc-print-log-internal backend old-names + last-revision nil limit)))) + 'help-echo + "Show the log for the file name(s) before the rename"))) + ;; Perhaps there are more entries in the log. (goto-char (point-max)) (insert "\n") (insert-text-button commit 8e0882d17a38cb9d309df705e76a8e88529f30a9 Author: Eli Zaretskii Date: Fri Dec 15 15:32:22 2023 +0200 Support case-sensitive register names * lisp/register.el (register-read-with-preview): Make register names case-sensitive. (Bug#66394) diff --git a/lisp/register.el b/lisp/register.el index fa4bbcf483f..ef529cd67e5 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -383,7 +383,12 @@ register-read-with-preview (setq pat input)))) (if (setq win (get-buffer-window buffer)) (with-selected-window win - (let ((ov (make-overlay (point-min) (point-min)))) + (let ((ov (make-overlay + (point-min) (point-min))) + ;; Allow upper-case and + ;; lower-case letters to refer + ;; to different registers. + (case-fold-search nil)) (goto-char (point-min)) (remove-overlays) (unless (string= pat "") commit b4c8a88ac188c760d6b0916e3919eb17175813ad Author: Po Lu Date: Fri Dec 15 19:55:30 2023 +0800 ; * doc/emacs/android.texi (Android Environment): Wording fixes. diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 3cdeec6ba9e..a3485a0a574 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -411,7 +411,7 @@ Android Environment @cindex system language settings, Android The ``Languages & Input'' preferences which apply to the operating -system do not influence the C locale set for programs, but is taken +system do not influence the C locale set for programs, but are taken into account by Emacs during startup: a locale name is generated from the selected language and regional variant and a language environment (@pxref{Language Environment}) is selected on that basis, which does @@ -424,8 +424,8 @@ Android Environment Variables}) is set to @code{en_US.utf8} when Emacs starts on Android 5.0 or newer, which induces subprocesses linked against the Android C library to print output sensibly. Earlier versions of Android do not -implement locales at all, on account of which the variable is set to -@code{C} instead. +implement locales at all, and on that account, the variable is set to +@code{C}. @cindex running emacs in the background, android @cindex emacs killed, android commit a4feb79ad4c23fbe2a0741b2a6d931c9cd1dc263 Author: João Távora Date: Thu Dec 14 23:53:07 2023 +0000 Eglot: use new jsonrpc-autoport-bootstrap * lisp/progmodes/eglot.el (eglot-lsp-server): Delete slot inferior-process. (eglot--on-shutdown): Simplify. (eglot--inferior-bootstrap): Delete. (eglot--connect): Call jsonrpc-autoport-bootstrap. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 84c5e6639df..51d2dd74e2b 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1011,10 +1011,7 @@ eglot-lsp-server :accessor eglot--managed-buffers) (saved-initargs :documentation "Saved initargs for reconnection purposes." - :accessor eglot--saved-initargs) - (inferior-process - :documentation "Server subprocess started automatically." - :accessor eglot--inferior-process)) + :accessor eglot--saved-initargs)) :documentation "Represents a server. Wraps a process for LSP communication.") @@ -1151,9 +1148,6 @@ eglot--on-shutdown (maphash (lambda (_dir watch-and-ids) (file-notify-rm-watch (car watch-and-ids))) (eglot--file-watches server)) - ;; Kill any autostarted inferior processes - (when-let (proc (eglot--inferior-process server)) - (delete-process proc)) ;; Sever the project/server relationship for `server' (setf (gethash (eglot--project server) eglot--servers-by-project) (delq server @@ -1464,7 +1458,6 @@ eglot--connect (let* ((default-directory (project-root project)) (nickname (project-name project)) (readable-name (format "EGLOT (%s/%s)" nickname managed-modes)) - autostart-inferior-process server-info (contact (if (functionp contact) (funcall contact) contact)) (initargs @@ -1477,16 +1470,16 @@ eglot--connect readable-name nil (car contact) (cadr contact) (cddr contact))))) - ((and (stringp (car contact)) (memq :autoport contact)) + ((and (stringp (car contact)) + (cl-find-if (lambda (x) + (or (eq x :autoport) + (eq (car-safe x) :autoport))) + contact)) (setq server-info (list "")) - `(:process ,(lambda () - (pcase-let ((`(,connection . ,inferior) - (eglot--inferior-bootstrap + `(:process ,(jsonrpc-autoport-bootstrap readable-name contact - '(:noquery t)))) - (setq autostart-inferior-process inferior) - connection)))) + :connect-args '(:noquery t)))) ((stringp (car contact)) (let* ((probe (cl-position-if #'keywordp contact)) (more-initargs (and probe (cl-subseq contact probe))) @@ -1535,7 +1528,6 @@ eglot--connect (setf (eglot--languages server) (cl-loop for m in managed-modes for l in language-ids collect (cons m l))) - (setf (eglot--inferior-process server) autostart-inferior-process) (run-hook-with-args 'eglot-server-initialized-hook server) ;; Now start the handshake. To honor `eglot-sync-connect' ;; maybe-sync-maybe-async semantics we use `jsonrpc-async-request' @@ -1628,55 +1620,6 @@ eglot--connect (quit (jsonrpc-shutdown server) (setq canceled 'quit))) (setq tag nil)))) -(defun eglot--inferior-bootstrap (name contact &optional connect-args) - "Use CONTACT to start a server, then connect to it. -Return a cons of two process objects (CONNECTION . INFERIOR). -Name both based on NAME. -CONNECT-ARGS are passed as additional arguments to -`open-network-stream'." - (let* ((port-probe (make-network-process :name "eglot-port-probe-dummy" - :server t - :host "localhost" - :service 0)) - (port-number (unwind-protect - (process-contact port-probe :service) - (delete-process port-probe))) - inferior connection) - (unwind-protect - (progn - (setq inferior - (make-process - :name (format "autostart-inferior-%s" name) - :stderr (format "*%s stderr*" name) - :noquery t - :command (cl-subst - (format "%s" port-number) :autoport contact))) - (setq connection - (cl-loop - repeat 10 for i from 1 - do (accept-process-output nil 0.5) - while (process-live-p inferior) - do (eglot--message - "Trying to connect to localhost and port %s (attempt %s)" - port-number i) - thereis (ignore-errors - (apply #'open-network-stream - (format "autoconnect-%s" name) - nil - "localhost" port-number connect-args)))) - (cons connection inferior)) - (cond ((and (process-live-p connection) - (process-live-p inferior)) - (eglot--message "Done, connected to %s!" port-number)) - (t - (when inferior (delete-process inferior)) - (when connection (delete-process connection)) - (eglot--error "Could not start and connect to server%s" - (if inferior - (format " started with %s" - (process-command inferior)) - "!"))))))) - ;;; Helpers (move these to API?) ;;; commit 9e24cde227a1bf2e1f0c005ca16b2a70e704ff5c Author: João Távora Date: Thu Dec 14 22:56:33 2023 +0000 Jsonrpc: add new jsonrpc-autoport-bootstrap helper This will help Eglot and some other extensions connect to network servers that are started with a call to a local program. * lisp/jsonrpc.el (jsonrpc--process-sentinel): Also delete inferior. (jsonrpc-process-connection): Add -autoport-inferior slot. (initialize-instance jsonrpc-process-connection): Check process-creating function arity. Use jsonrpc-forwarding-buffer (jsonrpc-autoport-bootstrap): New helper. (Version): Bump to 1.0.20. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index dde1c880912..f5db3674366 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -4,7 +4,7 @@ ;; Author: João Távora ;; Keywords: processes, languages, extensions -;; Version: 1.0.19 +;; Version: 1.0.20 ;; Package-Requires: ((emacs "25.2")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -400,16 +400,20 @@ jsonrpc-process-connection :accessor jsonrpc--on-shutdown :initform #'ignore :initarg :on-shutdown - :documentation "Function run when the process dies.")) + :documentation "Function run when the process dies.") + (-autoport-inferior + :initform nil + :documentation "Used by `jsonrpc-autoport-bootstrap'.")) :documentation "A JSONRPC connection over an Emacs process. The following initargs are accepted: :PROCESS (mandatory), a live running Emacs process object or a -function of no arguments producing one such object. The process -represents either a pipe connection to locally running process or -a stream connection to a network host. The remote endpoint is -expected to understand JSONRPC messages with basic HTTP-style -enveloping headers such as \"Content-Length:\". +function producing one such object. If a function, it is passed +the `jsonrpc-process-connection' object. The process represents +either a pipe connection to locally running process or a stream +connection to a network host. The remote endpoint is expected to +understand JSONRPC messages with basic HTTP-style enveloping +headers such as \"Content-Length:\". :ON-SHUTDOWN (optional), a function of one argument, the connection object, called when the process dies.") @@ -424,37 +428,22 @@ initialize-instance ;; could use a pipe with a process filter instead of ;; `after-change-functions'. Alternatively, we need a new initarg ;; (but maybe not a slot). - (let ((calling-buffer (current-buffer))) - (with-current-buffer (get-buffer-create (format "*%s stderr*" name)) - (let ((inhibit-read-only t) - (hidden-name (concat " " (buffer-name)))) - (erase-buffer) - (buffer-disable-undo) - (add-hook - 'after-change-functions - (lambda (beg _end _pre-change-len) - (cl-loop initially (goto-char beg) - do (forward-line) - when (bolp) - for line = (buffer-substring - (line-beginning-position 0) - (line-end-position 0)) - do (with-current-buffer (jsonrpc-events-buffer conn) - (goto-char (point-max)) - (let ((inhibit-read-only t)) - (insert (format "[stderr] %s\n" line)))) - until (eobp))) - nil t) - ;; If we are correctly coupled to the client, the process - ;; now created should pick up the current stderr buffer, - ;; which we immediately rename - (setq proc (if (functionp proc) - (with-current-buffer calling-buffer (funcall proc)) - proc)) - (ignore-errors (kill-buffer hidden-name)) - (rename-buffer hidden-name) - (process-put proc 'jsonrpc-stderr (current-buffer)) - (setq buffer-read-only t)))) + (let* ((stderr-buffer-name (format "*%s stderr*" name)) + (stderr-buffer (jsonrpc--forwarding-buffer stderr-buffer-name "[stderr]" conn)) + (hidden-name (concat " " stderr-buffer-name))) + ;; If we are correctly coupled to the client, the process now + ;; created should pick up the `stderr-buffer' just created, which + ;; we immediately rename + (setq proc (if (functionp proc) + (if (zerop (cdr (func-arity proc))) + (funcall proc) + (funcall proc conn)) + proc)) + (with-current-buffer stderr-buffer + (ignore-errors (kill-buffer hidden-name)) + (rename-buffer hidden-name) + (setq buffer-read-only t)) + (process-put proc 'jsonrpc-stderr stderr-buffer)) (setf (jsonrpc--process conn) proc) (set-process-buffer proc (get-buffer-create (format " *%s output*" name))) (set-process-filter proc #'jsonrpc--process-filter) @@ -601,6 +590,7 @@ jsonrpc--process-sentinel (jsonrpc--request-continuations connection)) (jsonrpc--message "Server exited with status %s" (process-exit-status proc)) (delete-process proc) + (when-let (p (slot-value connection '-autoport-inferior)) (delete-process p)) (funcall (jsonrpc--on-shutdown connection) connection))))) (cl-defun jsonrpc--process-filter (proc string) @@ -811,5 +801,110 @@ jsonrpc--log-event (forward-line 2) (point))))))))))))) +(defun jsonrpc--forwarding-buffer (name prefix conn) + "Helper for `jsonrpc-process-connection' helpers. +Make a stderr buffer named NAME, forwarding lines prefixed by +PREFIX to CONN's events buffer." + (with-current-buffer (get-buffer-create name) + (let ((inhibit-read-only t)) + (fundamental-mode) + (erase-buffer) + (buffer-disable-undo) + (add-hook + 'after-change-functions + (lambda (beg _end _pre-change-len) + (cl-loop initially (goto-char beg) + do (forward-line) + when (bolp) + for line = (buffer-substring + (line-beginning-position 0) + (line-end-position 0)) + do (with-current-buffer (jsonrpc-events-buffer conn) + (goto-char (point-max)) + (let ((inhibit-read-only t)) + (insert (format "%s %s\n" prefix line)))) + until (eobp))) + nil t)) + (current-buffer))) + + +;;;; More convenience utils +(cl-defun jsonrpc-autoport-bootstrap (name contact + &key connect-args) + "Use CONTACT to start network server, then connect to it. + +Return function suitable for the :PROCESS initarg of +`jsonrpc-process-connection' (which see). + +CONTACT is a list where all the elements are strings except for +one, which is usuallky the keyword `:autoport'. + +When the returned function is called it will start a program +using a command based on CONTACT, where `:autoport' is +substituted by a locally free network port. Thereafter, a +network is made to this port. + +Instead of the keyword `:autoport', a cons cell (:autoport +FORMAT-FN) is also accepted. In that case FORMAT-FN is passed +the port number and should return a string used for the +substitution. + +The internal processes and control buffers are named after NAME. + +CONNECT-ARGS are passed as additional arguments to +`open-network-stream'." + (lambda (conn) + (let* ((port-probe (make-network-process :name "jsonrpc-port-probe-dummy" + :server t + :host "localhost" + :service 0)) + (port-number (unwind-protect + (process-contact port-probe :service) + (delete-process port-probe))) + (inferior-buffer (jsonrpc--forwarding-buffer + (format " *%s inferior output*" name) + "[inferior]" + conn)) + (cmd (cl-loop for e in contact + if (eq e :autoport) collect (format "%s" port-number) + else if (eq (car-safe e) :autoport) + collect (funcall (cdr e) port-number) + else collect e)) + inferior np) + (unwind-protect + (progn + (message "[jsonrpc] Attempting to start `%s'" + (string-join cmd " ")) + (setq inferior + (make-process + :name (format "inferior (%s)" name) + :buffer inferior-buffer + :noquery t + :command cmd)) + (setq np + (cl-loop + repeat 10 for i from 0 + do (accept-process-output nil 0.5) + while (process-live-p inferior) + do (message + "[jsonrpc] %sTrying to connect to localhost:%s (attempt %s)" + (if (zerop i) "Started. " "") + port-number (1+ i)) + thereis (ignore-errors + (apply #'open-network-stream + (format "autostart (%s)" name) + nil + "localhost" port-number connect-args)))) + (setf (slot-value conn '-autoport-inferior) inferior) + np) + (cond ((and (process-live-p np) + (process-live-p inferior)) + (message "[jsonrpc] Done, connected to %s!" port-number)) + (t + (when inferior (delete-process inferior)) + (when np (delete-process np)) + (error "[jsonrpc] Could not start and/or connect"))))))) + + (provide 'jsonrpc) ;;; jsonrpc.el ends here commit af1fe69f05d803a6958f9d8a045d1013e2ce785c Author: João Távora Date: Thu Dec 14 16:32:54 2023 +0000 Eglot: beware activation in fundamental-mode In the specific situation of visiting a buffer via M-. with eglot-extend-to-xref set to t, it was found that buffer was first visited in fundamental mode, running after-change-major-mode-hook, and then again in the proper major mode for the file. The call to eglot-current-server of the first visit returned non-nil which cause two didOpen notifications to be issued for the same file. Furthermore, in the first call, eglot--languageId to returned nil, prompting an error from servers such as rust-analyzer. See also: https://github.com/joaotavora/eglot/discussions/1330 * lisp/progmodes/eglot.el (eglot-current-server): Watch out for fundamental-mode. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 608389f1c05..84c5e6639df 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2034,13 +2034,15 @@ eglot-current-server "Return logical Eglot server for current buffer, nil if none." (setq eglot--cached-server (or eglot--cached-server - (cl-find-if #'eglot--languageId - (gethash (eglot--current-project) - eglot--servers-by-project)) - (and eglot-extend-to-xref - buffer-file-name - (gethash (expand-file-name buffer-file-name) - eglot--servers-by-xrefed-file))))) + (and (not (eq major-mode 'fundamental-mode)) ; gh#1330 + (or + (cl-find-if #'eglot--languageId + (gethash (eglot--current-project) + eglot--servers-by-project)) + (and eglot-extend-to-xref + buffer-file-name + (gethash (expand-file-name buffer-file-name) + eglot--servers-by-xrefed-file))))))) (defun eglot--current-server-or-lose () "Return current logical Eglot server connection or error." commit d9814efe0759ce916a1c470c5908d2ca3c80b29b Author: Po Lu Date: Thu Dec 14 13:57:59 2023 +0800 ; * src/androidfns.c (syms_of_androidfns_for_pdumper): Fix crash. diff --git a/src/androidfns.c b/src/androidfns.c index 60ace4fd453..e1fd772df9c 100644 --- a/src/androidfns.c +++ b/src/androidfns.c @@ -3278,31 +3278,36 @@ syms_of_androidfns_for_pdumper (void) /* Proceed to retrieve the script. */ - method = (*android_java_env)->GetMethodID (android_java_env, locale, - "getScript", - "()Ljava/lang/String;"); - if (!method) - emacs_abort (); - - string = (*android_java_env)->CallObjectMethod (android_java_env, object, - method); - android_exception_check_2 (object, locale); - - if (!string) + if (android_get_current_api_level () < 21) script = empty_unibyte_string; else { - data = (*android_java_env)->GetStringUTFChars (android_java_env, - string, NULL); - android_exception_check_3 (object, locale, string); + method = (*android_java_env)->GetMethodID (android_java_env, locale, + "getScript", + "()Ljava/lang/String;"); + if (!method) + emacs_abort (); - if (!data) + string = (*android_java_env)->CallObjectMethod (android_java_env, + object, method); + android_exception_check_2 (object, locale); + + if (!string) script = empty_unibyte_string; else { - script = build_unibyte_string (data); - (*android_java_env)->ReleaseStringUTFChars (android_java_env, - string, data); + data = (*android_java_env)->GetStringUTFChars (android_java_env, + string, NULL); + android_exception_check_3 (object, locale, string); + + if (!data) + script = empty_unibyte_string; + else + { + script = build_unibyte_string (data); + (*android_java_env)->ReleaseStringUTFChars (android_java_env, + string, data); + } } } commit f5a3b5e66a8fd5d397a4540bde6826ef56c5b8eb Merge: de25aaa11a8 ea29a48da13 Author: Po Lu Date: Thu Dec 14 13:25:40 2023 +0800 Merge remote-tracking branch 'savannah/master' into master-android-1 commit de25aaa11a8ef264c6f76841daa7e2a721c60937 Author: Po Lu Date: Thu Dec 14 13:24:42 2023 +0800 Respect Language & Input preferences under Android * doc/emacs/android.texi (Android Environment): * doc/emacs/cmdargs.texi (General Variables): Mention the manner in which the default language environment is selected on Android. * lisp/startup.el (normal-top-level): If android and initial-window-system, call android-locale-for-system-language for the default locale name. * lisp/term/android-win.el (android-locale-for-system-language): New function. * src/androidfns.c (syms_of_androidfns_for_pdumper): New function. (syms_of_androidfns) : New variable. Call syms_of_androidfns_for_pdumper both now and after loading the dump image. diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index fe73bc09d67..3cdeec6ba9e 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -409,15 +409,23 @@ Android Environment $ adb shell "settings put global settings_enable_monitor_phantom_procs false" @end example +@cindex system language settings, Android + The ``Languages & Input'' preferences which apply to the operating +system do not influence the C locale set for programs, but is taken +into account by Emacs during startup: a locale name is generated from +the selected language and regional variant and a language environment +(@pxref{Language Environment}) is selected on that basis, which does +not overwrite @code{LANG} or other locale-related environment +variables. The coding system for language environments set in this +fashion is @code{utf-8-unix} without exception. + @cindex C locale settings, Android - Emacs does not respect the locale configured for user applications -in the system, for the selection of locales available there does not -match that supplied by the C library. When Emacs starts on Android -5.0 or newer, the @code{LANG} environment variable is set to -@code{en_US.utf8}, which induces subprocesses linked against the -Android C library to print output sensibly. Earlier versions of -Android do not implement locales at all, on account of which the -variable is set to @code{C} instead. + Instead, the @code{LANG} environment variable (@pxref{General +Variables}) is set to @code{en_US.utf8} when Emacs starts on Android +5.0 or newer, which induces subprocesses linked against the Android C +library to print output sensibly. Earlier versions of Android do not +implement locales at all, on account of which the variable is set to +@code{C} instead. @cindex running emacs in the background, android @cindex emacs killed, android diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 38e683bd7f5..7cdc29ea30b 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -640,6 +640,11 @@ General Variables of MS-Windows, and in the ``Language and Region'' System Preference on macOS. +When running a GUI session on Android, @env{LANG} is set to a fixed +value, but the language and locale environment is derived from the +system's ``Languages & Input'' preferences. @xref{Android +Environment}. + The value of the @env{LC_CTYPE} category is matched against entries in @code{locale-language-names}, @code{locale-charset-language-names}, and diff --git a/lisp/startup.el b/lisp/startup.el index e40c316a8e8..09ec24c6c67 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -641,7 +641,23 @@ normal-top-level (setq eol-mnemonic-dos "(DOS)" eol-mnemonic-mac "(Mac)"))) - (set-locale-environment nil) + (if (and (featurep 'android) + (eq system-type 'android) + initial-window-system) + ;; If Android windowing is enabled, derive a proper locale + ;; from the system's language preferences. On Android, LANG + ;; and LC_* must be set to one of the two locales the C + ;; library supports, but, by contrast with other systems, the + ;; C library locale does not reflect the configured system + ;; language. + ;; + ;; For this reason, the locale from which Emacs derives a + ;; default language environment is computed from such + ;; preferences, rather than environment variables that the C + ;; library refers to. + (set-locale-environment + (funcall 'android-locale-for-system-language)) + (set-locale-environment nil)) ;; Decode all default-directory's (probably, only *scratch* exists ;; at this point). default-directory of *scratch* is the basis ;; for many other file-name variables and directory lists, so it diff --git a/lisp/term/android-win.el b/lisp/term/android-win.el index 3e759a37a71..b2cc7b5d040 100644 --- a/lisp/term/android-win.el +++ b/lisp/term/android-win.el @@ -424,6 +424,61 @@ android-after-splash-screen 'follow-link t) (newline)))) + +;;; Locale preferences. + +(defvar android-os-language) + +(defun android-locale-for-system-language () + "Return a locale representing the system language. +This locale reflects the system's language preferences in its +language name and country variant fields, and always specifies +the UTF-8 coding system." + ;; android-os-language is a list comprising four elements LANGUAGE, + ;; COUNTRY, SCRIPT, and VARIANT. + ;; + ;; LANGUAGE and COUNTRY are ISO language and country codes identical + ;; to those stored within POSIX locales. + ;; + ;; SCRIPT is an ISO 15924 script tag, representing the script used + ;; if available, or if required to disambiguate between distinct + ;; writing systems for the same combination of language and country. + ;; + ;; VARIANT is an arbitrary string representing the variant of the + ;; LANGUAGE or SCRIPT represented. + ;; + ;; Each of these fields might be empty, but the locale is invalid if + ;; LANGUAGE is empty, which if true "en_US.UTF-8" is returned as a + ;; placeholder. + (let ((language (or (nth 0 android-os-language) "")) + (country (or (nth 1 android-os-language) "")) + (script (or (nth 2 android-os-language) "")) + (variant (or (nth 3 android-os-language) "")) + locale-base locale-modifier) + (if (string-empty-p language) + (setq locale-base "en_US.UTF-8") + (if (string-empty-p country) + (setq locale-base (concat language ".UTF-8")) + (setq locale-base (concat language "_" country + ".UTF-8")))) + ;; No straightforward relation between Java script and variant + ;; combinations exist: Java permits both a script and a variant to + ;; be supplied at once, whereas POSIX's closest analog "modifiers" + ;; permit only either an alternative script or a variant to be + ;; supplied. + ;; + ;; Emacs disregards variants besides "EURO" and scripts besides + ;; "Cyrl", for these two never coexist in existing locales, and + ;; their POSIX equivalents are the sole modifiers recognized by + ;; Emacs. + (if (string-equal script "Cyrl") + (setq locale-modifier "@cyrillic") + (if (string-equal variant "EURO") + (setq locale-modifier "@euro") + (setq locale-modifier ""))) + ;; Return the concatenation of both these values. + (concat locale-base locale-modifier))) + (provide 'android-win) ;; android-win.el ends here. diff --git a/src/androidfns.c b/src/androidfns.c index 31a4924e34d..60ace4fd453 100644 --- a/src/androidfns.c +++ b/src/androidfns.c @@ -27,6 +27,7 @@ Copyright (C) 2023 Free Software Foundation, Inc. #include "keyboard.h" #include "buffer.h" #include "androidgui.h" +#include "pdumper.h" #ifndef ANDROID_STUBIFY @@ -3170,6 +3171,186 @@ android_set_preeditarea (struct window *w, int x, int y) +#ifndef ANDROID_STUBIFY + +static void +syms_of_androidfns_for_pdumper (void) +{ + jclass locale; + jmethodID method; + jobject object; + jstring string; + Lisp_Object language, country, script, variant; + const char *data; + + /* Find the Locale class. */ + + locale = (*android_java_env)->FindClass (android_java_env, + "java/util/Locale"); + if (!locale) + emacs_abort (); + + /* And the method from which the default locale can be + extracted. */ + + method = (*android_java_env)->GetStaticMethodID (android_java_env, + locale, + "getDefault", + "()Ljava/util/Locale;"); + if (!method) + emacs_abort (); + + /* Retrieve the default locale. */ + + object = (*android_java_env)->CallStaticObjectMethod (android_java_env, + locale, method); + android_exception_check_1 (locale); + + if (!object) + emacs_abort (); + + /* Retrieve its language field. Each of these methods is liable to + return the empty string, though if language is empty, the locale + is malformed. */ + + method = (*android_java_env)->GetMethodID (android_java_env, locale, + "getLanguage", + "()Ljava/lang/String;"); + if (!method) + emacs_abort (); + + string = (*android_java_env)->CallObjectMethod (android_java_env, object, + method); + android_exception_check_2 (object, locale); + + if (!string) + language = empty_unibyte_string; + else + { + data = (*android_java_env)->GetStringUTFChars (android_java_env, + string, NULL); + android_exception_check_3 (object, locale, string); + + if (!data) + language = empty_unibyte_string; + else + { + language = build_unibyte_string (data); + (*android_java_env)->ReleaseStringUTFChars (android_java_env, + string, data); + } + } + + /* Delete the reference to this string. */ + ANDROID_DELETE_LOCAL_REF (string); + + /* Proceed to retrieve the country code. */ + + method = (*android_java_env)->GetMethodID (android_java_env, locale, + "getCountry", + "()Ljava/lang/String;"); + if (!method) + emacs_abort (); + + string = (*android_java_env)->CallObjectMethod (android_java_env, object, + method); + android_exception_check_2 (object, locale); + + if (!string) + country = empty_unibyte_string; + else + { + data = (*android_java_env)->GetStringUTFChars (android_java_env, + string, NULL); + android_exception_check_3 (object, locale, string); + + if (!data) + country = empty_unibyte_string; + else + { + country = build_unibyte_string (data); + (*android_java_env)->ReleaseStringUTFChars (android_java_env, + string, data); + } + } + + ANDROID_DELETE_LOCAL_REF (string); + + /* Proceed to retrieve the script. */ + + method = (*android_java_env)->GetMethodID (android_java_env, locale, + "getScript", + "()Ljava/lang/String;"); + if (!method) + emacs_abort (); + + string = (*android_java_env)->CallObjectMethod (android_java_env, object, + method); + android_exception_check_2 (object, locale); + + if (!string) + script = empty_unibyte_string; + else + { + data = (*android_java_env)->GetStringUTFChars (android_java_env, + string, NULL); + android_exception_check_3 (object, locale, string); + + if (!data) + script = empty_unibyte_string; + else + { + script = build_unibyte_string (data); + (*android_java_env)->ReleaseStringUTFChars (android_java_env, + string, data); + } + } + + ANDROID_DELETE_LOCAL_REF (string); + + /* And variant. */ + + method = (*android_java_env)->GetMethodID (android_java_env, locale, + "getVariant", + "()Ljava/lang/String;"); + if (!method) + emacs_abort (); + + string = (*android_java_env)->CallObjectMethod (android_java_env, object, + method); + android_exception_check_2 (object, locale); + + if (!string) + variant = empty_unibyte_string; + else + { + data = (*android_java_env)->GetStringUTFChars (android_java_env, + string, NULL); + android_exception_check_3 (object, locale, string); + + if (!data) + variant = empty_unibyte_string; + else + { + variant = build_unibyte_string (data); + (*android_java_env)->ReleaseStringUTFChars (android_java_env, + string, data); + } + } + + /* Delete the reference to this string. */ + ANDROID_DELETE_LOCAL_REF (string); + + /* And other remaining local references. */ + ANDROID_DELETE_LOCAL_REF (object); + ANDROID_DELETE_LOCAL_REF (locale); + + /* Set Vandroid_os_language. */ + Vandroid_os_language = list4 (language, country, script, variant); +} + +#endif /* ANDROID_STUBIFY */ + void syms_of_androidfns (void) { @@ -3313,6 +3494,26 @@ syms_of_androidfns (void) bell being rung. */); android_keyboard_bell_duration = 50; + DEFVAR_LISP ("android-os-language", Vandroid_os_language, + doc: /* List representing the system language configured. +This list incorporates four elements LANGUAGE, COUNTRY, SCRIPT +and VARIANT, of which: + +LANGUAGE and COUNTRY are ISO language and country codes identical to +those stored within POSIX locales. + +SCRIPT is an ISO 15924 script tag, representing the script used +if available, or if required to disambiguate between distinct +writing systems for the same combination of language and country. + +VARIANT is an arbitrary string representing the variant of the +LANGUAGE or SCRIPT represented. + +Each of these fields might be empty or nil, but the locale is invalid +if LANGUAGE is empty. Users of this variable should consider the +language US English in this scenario. */); + Vandroid_os_language = Qnil; + /* Functions defined. */ defsubr (&Sx_create_frame); defsubr (&Sxw_color_defined_p); @@ -3363,5 +3564,7 @@ syms_of_androidfns (void) staticpro (&tip_dx); tip_dy = Qnil; staticpro (&tip_dy); + + pdumper_do_now_and_after_load (syms_of_androidfns_for_pdumper); #endif /* !ANDROID_STUBIFY */ } commit ea29a48da13d6e6b87a3b017bcf92689bc18ca54 Author: João Távora Date: Wed Nov 8 08:36:04 2023 -0600 Jsonrpc: support some JSONesque non-JSONRPC protocols, like DAP * lisp/jsonrpc.el (jsonrpc-convert-to-endpoint) (jsonrpc-convert-from-endpoint): New generics. (jsonrpc-connection-send): Call jsonrpc-convert-to-endpoint. Rework logging. (jsonrpc-connection-receive): Call jsonrpc-convert-from-endpoint. Rework logging. jsonrpc--reply with METHOD. (jsonrpc--log-event): Take subtype. (Version): Bump to 1.0.19 * test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Adapt to new protocol of jsonrpc--log-event. * doc/lispref/text.texi (JSONRPC Overview): Rework. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index b17eb087f42..e35d449ca6d 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5919,74 +5919,109 @@ JSONRPC Overview @cindex JSONRPC application interfaces @enumerate -@item A user interface for building JSONRPC applications +@item An API for building JSONRPC applications @findex :request-dispatcher @findex :notification-dispatcher @findex jsonrpc-notify @findex jsonrpc-request @findex jsonrpc-async-request -In this scenario, the JSONRPC application selects a concrete subclass -of @code{jsonrpc-connection}, and proceeds to create objects of that -subclass using @code{make-instance}. To initiate a contact to the -remote endpoint, the JSONRPC application passes this object to the -functions @code{jsonrpc-notify}, @code{jsonrpc-request}, and/or -@code{jsonrpc-async-request}. For handling remotely initiated -contacts, which generally come in asynchronously, the instantiation -should include @code{:request-dispatcher} and -@code{:notification-dispatcher} initargs, which are both functions of -3 arguments: the connection object; a symbol naming the JSONRPC method -invoked remotely; and a JSONRPC @code{params} object. +In this scenario, a new aspiring JSONRPC-based application selects a +concrete subclass of @code{jsonrpc-connection} that provides the +transport for the JSONRPC messages to be exchanged between endpoints. + +The application creates objects of that subclass using +@code{make-instance}. To initiate a contact to a remote endpoint, the +application passes this object to the functions such as +@code{jsonrpc-notify}, @code{jsonrpc-request}, or +@code{jsonrpc-async-request}. + +For handling remotely initiated contacts, which generally come in +asynchronously, the @code{make-instance} instantiation should +initialize it the @code{:request-dispatcher} and +@code{:notification-dispatcher} EIEIO keyword arguments. These are +both functions of 3 arguments: the connection object; a symbol naming +the JSONRPC method invoked remotely; and a JSONRPC @code{params} +object. @findex jsonrpc-error The function passed as @code{:request-dispatcher} is responsible for handling the remote endpoint's requests, which expect a reply from the -local endpoint (in this case, the program you're building). Inside -that function, you may either return locally (a normal return) or -non-locally (an error return). A local return value must be a Lisp -object that can be serialized as JSON (@pxref{Parsing JSON}). This -determines a success response, and the object is forwarded to the -server as the JSONRPC @code{result} object. A non-local return, -achieved by calling the function @code{jsonrpc-error}, causes an error -response to be sent to the server. The details of the accompanying -JSONRPC @code{error} are filled out with whatever was passed to +local endpoint (in this case, the application you're building). +Inside that function, you may either return locally (a regular return) +or non-locally (throw an error). Both exits from the request +dispatcher cause a reply to the remote endpoint's request to be sent +through the transport. + +A regular return determines a success response, and the return value +must be a Lisp object that can be serialized as JSON (@pxref{Parsing +JSON}). The result is forwarded to the server as the JSONRPC +@code{result} object. A non-local return, achieved by calling the +function @code{jsonrpc-error}, causes an error response to be sent to +the server. The details of the accompanying JSONRPC @code{error} +object are filled out with whatever was passed to @code{jsonrpc-error}. A non-local return triggered by an unexpected error of any other type also causes an error response to be sent (unless you have set @code{debug-on-error}, in which case this calls the Lisp debugger, @pxref{Error Debugging}). -@item A inheritance interface for building JSONRPC transport implementations - -In this scenario, @code{jsonrpc-connection} is subclassed to implement +@findex jsonrpc-convert-to-endpoint +@findex jsonrpc-convert-from-endpoint +It's possible to use the @code{jsonrpc} library to build applications +based on transport protocols that can be described as +``quasi-JSONRPC''. These are similar, but not quite identical to +JSONRPC, such as the @uref{https://www.jsonrpc.org/, DAP (Debug +Adapter Protocol)}. These protocols also define request, response and +notification messages but the format is not quite the same as JSONRPC. +The generic functions @code{jsonrpc-convert-to-endpoint} and +@code{jsonrpc-convert-from-endpoint} can be customized for converting +between the internal representation of JSONRPC and whatever the +endpoint accepts (@pxref{Generic Functions}). + +@item An API for building JSONRPC transports + +In this scenario, @code{jsonrpc-connection} is sub-classed to implement a different underlying transport strategy (for details on how to subclass, see @ref{Inheritance,Inheritance,,eieio}.). Users of the application-building interface can then instantiate objects of this concrete class (using the @code{make-instance} function) and connect -to JSONRPC endpoints using that strategy. +to JSONRPC endpoints using that strategy. See @ref{Process-based +JSONRPC connections} for a built-in transport implementation. This API has mandatory and optional parts. @findex jsonrpc-connection-send To allow its users to initiate JSONRPC contacts (notifications or -requests) or reply to endpoint requests, the subclass must have an -implementation of the @code{jsonrpc-connection-send} method. +requests) or reply to endpoint requests, the new transport +implementation must equip the @code{jsonrpc-connection-send} generic +function with a specialization for the the new subclass +(@pxref{Generic Functions}). This generic function is called +automatically by primitives such as @code{jsonrpc-request} and +@code{jsonrpc-notify}. The specialization should ensure that the +message described in the argument list is sent through whatever +underlying communication mechanism (a.k.a.@: ``wire'') is used by the +new transport to talk to endpoints. This ``wire'' may be a network +socket, a serial interface, an HTTP connection, etc. @findex jsonrpc-connection-receive Likewise, for handling the three types of remote contacts (requests, notifications, and responses to local requests), the transport implementation must arrange for the function -@code{jsonrpc-connection-receive} to be called after noticing a new -JSONRPC message on the wire (whatever that "wire" may be). +@code{jsonrpc-connection-receive} to be called from Elisp after +noticing some data on the ``wire'' that can be used to craft a JSONRPC +(or quasi-JSONRPC) message. @findex jsonrpc-shutdown @findex jsonrpc-running-p Finally, and optionally, the @code{jsonrpc-connection} subclass should -implement the @code{jsonrpc-shutdown} and @code{jsonrpc-running-p} -methods if these concepts apply to the transport. If they do, then -any system resources (e.g.@: processes, timers, etc.) used to listen for -messages on the wire should be released in @code{jsonrpc-shutdown}, -i.e.@: they should only be needed while @code{jsonrpc-running-p} is -non-@code{nil}. +add specializations to the @code{jsonrpc-shutdown} and +@code{jsonrpc-running-p} generic functions if these concepts apply to +the transport. The specialization of @code{jsonrpc-shutdown} should +ensure the release of any system resources (e.g.@: processes, timers, +etc.) used to listen for messages on the wire. The specialization of +@code{jsonrpc-running-p} should tell if these resources are still +active or have already been released (via @code{jsonrpc-shutdown} or +otherwise). @end enumerate diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 9cb6b90f733..dde1c880912 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -4,7 +4,7 @@ ;; Author: João Távora ;; Keywords: processes, languages, extensions -;; Version: 1.0.18 +;; Version: 1.0.19 ;; Package-Requires: ((emacs "25.2")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -133,6 +133,38 @@ jsonrpc-connection-ready-p (:method (_s _what) ;; by default all connections are ready t)) +;;; API optional +(cl-defgeneric jsonrpc-convert-to-endpoint (connection message subtype) + "Convert MESSAGE to JSONRPCesque message accepted by endpoint. +MESSAGE is a plist, jsonrpc.el's internal representation of a +JSONRPC message. SUBTYPE is one of `request', `reply' or +`notification'. + +Return a plist to be serialized to JSON with `json-serialize' and +transmitted to endpoint." + ;; TODO: describe representations and serialization in manual and + ;; link here. + (:method (_s message subtype) + `(:jsonrpc "2.0" + ,@(if (eq subtype 'reply) + ;; true JSONRPC doesn't have `method' + ;; fields in responses. + (cl-loop for (k v) on message by #'cddr + unless (eq k :method) + collect k and collect v) + message)))) + +;;; API optional +(cl-defgeneric jsonrpc-convert-from-endpoint (connection remote-message) + "Convert JSONRPC-esque REMOTE-MESSAGE to a plist. +REMOTE-MESSAGE is a plist read with `json-parse'. + +Return a plist of jsonrpc.el's internal representation of a +JSONRPC message." + ;; TODO: describe representations and serialization in manual and + ;; link here. + (:method (_s remote-message) remote-message)) + ;;; Convenience ;;; @@ -170,9 +202,12 @@ jsonrpc-connection-receive This function will destructure MESSAGE and call the appropriate dispatcher in CONNECTION." (cl-destructuring-bind (&key method id error params result _jsonrpc) - message + (jsonrpc-convert-from-endpoint connection message) + (jsonrpc--log-event connection message 'server + (cond ((and method id) 'request) + (method 'notification) + (id 'reply))) (let (continuations) - (jsonrpc--log-event connection message 'server) (setf (jsonrpc-last-error connection) error) (cond (;; A remote request @@ -193,7 +228,7 @@ jsonrpc-connection-receive "Internal error"))))) (error '(:error (:code -32603 :message "Internal error")))))) - (apply #'jsonrpc--reply connection id reply))) + (apply #'jsonrpc--reply connection id method reply))) (;; A remote notification method (funcall (jsonrpc--notification-dispatcher connection) @@ -435,11 +470,11 @@ initialize-instance (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connection) &rest args &key - _id + id method _params - _result - _error + (_result nil result-supplied-p) + error _partial) "Send MESSAGE, a JSON object, to CONNECTION." (when method @@ -448,18 +483,21 @@ jsonrpc-connection-send ((symbolp method) (symbol-name method)) ((stringp method) method) (t (error "[jsonrpc] invalid method %s" method))))) - (let* ( (message `(:jsonrpc "2.0" ,@args)) - (json (jsonrpc--json-encode message)) - (headers - `(("Content-Length" . ,(format "%d" (string-bytes json))) - ;; ("Content-Type" . "application/vscode-jsonrpc; charset=utf-8") - ))) + (let* ((subtype (cond ((or result-supplied-p error) 'reply) + (id 'request) + (method 'notification))) + (converted (jsonrpc-convert-to-endpoint connection args subtype)) + (json (jsonrpc--json-encode converted)) + (headers + `(("Content-Length" . ,(format "%d" (string-bytes json))) + ;; ("Content-Type" . "application/vscode-jsonrpc; charset=utf-8") + ))) (process-send-string (jsonrpc--process connection) (cl-loop for (header . value) in headers concat (concat header ": " value "\r\n") into header-section finally return (format "%s\r\n%s" header-section json))) - (jsonrpc--log-event connection message 'client))) + (jsonrpc--log-event connection converted 'client subtype))) (defun jsonrpc-process-type (conn) "Return the `process-type' of JSONRPC connection CONN." @@ -526,12 +564,13 @@ 'jsonrpc--json-encode "Encode OBJECT into a JSON string.") (cl-defun jsonrpc--reply - (connection id &key (result nil result-supplied-p) (error nil error-supplied-p)) + (connection id method &key (result nil result-supplied-p) (error nil error-supplied-p)) "Reply to CONNECTION's request ID with RESULT or ERROR." (apply #'jsonrpc-connection-send connection `(:id ,id ,@(and result-supplied-p `(:result ,result)) - ,@(and error-supplied-p `(:error ,error))))) + ,@(and error-supplied-p `(:error ,error)) + :method ,method))) (defun jsonrpc--call-deferred (connection) "Call CONNECTION's deferred actions, who may again defer themselves." @@ -738,24 +777,19 @@ jsonrpc--warn (apply #'format format args) :warning))) -(defun jsonrpc--log-event (connection message &optional type) +(defun jsonrpc--log-event (connection message &optional origin subtype) "Log a JSONRPC-related event. CONNECTION is the current connection. MESSAGE is a JSON-like -plist. TYPE is a symbol saying if this is a client or server -originated." +plist. ORIGIN is a symbol saying where event originated. +SUBTYPE tells more about the event." (let ((max (jsonrpc--events-buffer-scrollback-size connection))) (when (or (null max) (cl-plusp max)) (with-current-buffer (jsonrpc-events-buffer connection) - (cl-destructuring-bind (&key method id error &allow-other-keys) message + (cl-destructuring-bind (&key _method id error &allow-other-keys) message (let* ((inhibit-read-only t) - (subtype (cond ((and method id) 'request) - (method 'notification) - (id 'reply) - (t 'message))) (type - (concat (format "%s" (or type 'internal)) - (if type - (format "-%s" subtype))))) + (concat (format "%s" (or origin 'internal)) + (if origin (format "-%s" (or subtype 'message)))))) (goto-char (point-max)) (prog1 (let ((msg (format "[%s]%s%s %s:\n%s" diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el index 575a6ac8ef1..996ff276e68 100644 --- a/test/lisp/progmodes/eglot-tests.el +++ b/test/lisp/progmodes/eglot-tests.el @@ -209,27 +209,25 @@ eglot--sniffing client-replies)) (advice-add #'jsonrpc--log-event :before - (lambda (_proc message &optional type) - (cl-destructuring-bind (&key method id _error &allow-other-keys) - message - (let ((req-p (and method id)) - (notif-p method) - (reply-p id)) - (cond - ((eq type 'server) - (cond (req-p ,(when server-requests - `(push message ,server-requests))) - (notif-p ,(when server-notifications - `(push message ,server-notifications))) - (reply-p ,(when server-replies - `(push message ,server-replies))))) - ((eq type 'client) - (cond (req-p ,(when client-requests - `(push message ,client-requests))) - (notif-p ,(when client-notifications - `(push message ,client-notifications))) - (reply-p ,(when client-replies - `(push message ,client-replies))))))))) + (lambda (_proc message &optional origin subtype) + (let ((req-p (eq subtype 'request)) + (notif-p (eq subtype 'notification)) + (reply-p (eql subtype 'reply))) + (cond + ((eq origin 'server) + (cond (req-p ,(when server-requests + `(push message ,server-requests))) + (notif-p ,(when server-notifications + `(push message ,server-notifications))) + (reply-p ,(when server-replies + `(push message ,server-replies))))) + ((eq origin 'client) + (cond (req-p ,(when client-requests + `(push message ,client-requests))) + (notif-p ,(when client-notifications + `(push message ,client-notifications))) + (reply-p ,(when client-replies + `(push message ,client-replies)))))))) '((name . ,log-event-ad-sym))) ,@body) (advice-remove #'jsonrpc--log-event ',log-event-ad-sym)))) commit 60473c4d90a6cdce3f06e183809f5be440dd8797 Author: João Távora Date: Mon Dec 11 00:01:03 2023 +0000 Jsonrpc: rework fix for bug#60088 Try to decouple receiving text and processing messages in the event loop. This should allow for requests within requests in both Eglot and the Dape extension (https://github.com/svaante/dape). jsonrpc-connection-receive is now called from timers after the process filter finished. Because of this, a detail is that any serialization errors are now thrown from timers instead of the synchronous process filter, and there's no good way to test this in ert, so a test has been deleted. * lisp/jsonrpc.el (jsonrpc--process-filter): Rework. * test/lisp/jsonrpc-tests.el (json-el-cant-serialize-this): Delete test. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 67243fd49e3..9cb6b90f733 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -564,27 +564,12 @@ jsonrpc--process-sentinel (delete-process proc) (funcall (jsonrpc--on-shutdown connection) connection))))) -(defvar jsonrpc--in-process-filter nil - "Non-nil if inside `jsonrpc--process-filter'.") - (cl-defun jsonrpc--process-filter (proc string) "Called when new data STRING has arrived for PROC." - (when jsonrpc--in-process-filter - ;; Problematic recursive process filters may happen if - ;; `jsonrpc--connection-receive', called by us, eventually calls - ;; client code which calls `process-send-string' (which see) to, - ;; say send a follow-up message. If that happens to writes enough - ;; bytes for pending output to be received, we will lose JSONRPC - ;; messages. In that case, remove recursiveness by re-scheduling - ;; ourselves to run from within a timer as soon as possible - ;; (bug#60088) - (run-at-time 0 nil #'jsonrpc--process-filter proc string) - (cl-return-from jsonrpc--process-filter)) (when (buffer-live-p (process-buffer proc)) (with-current-buffer (process-buffer proc) - (let* ((jsonrpc--in-process-filter t) - (connection (process-get proc 'jsonrpc-connection)) - (expected-bytes (jsonrpc--expected-bytes connection))) + (let* ((conn (process-get proc 'jsonrpc-connection)) + (expected-bytes (jsonrpc--expected-bytes conn))) ;; Insert the text, advancing the process marker. ;; (save-excursion @@ -619,24 +604,24 @@ jsonrpc--process-filter expected-bytes) (let* ((message-end (byte-to-position (+ (position-bytes (point)) - expected-bytes)))) + expected-bytes))) + message + ) (unwind-protect (save-restriction (narrow-to-region (point) message-end) - (let* ((json-message - (condition-case-unless-debug oops - (jsonrpc--json-read) - (error - (jsonrpc--warn "Invalid JSON: %s %s" - (cdr oops) (buffer-string)) - nil)))) - (when json-message - ;; Process content in another - ;; buffer, shielding proc buffer from - ;; tamper - (with-temp-buffer - (jsonrpc-connection-receive connection - json-message))))) + (setq message + (condition-case-unless-debug oops + (jsonrpc--json-read) + (error + (jsonrpc--warn "Invalid JSON: %s %s" + (cdr oops) (buffer-string)) + nil))) + (when message + (process-put proc 'jsonrpc-mqueue + (nconc (process-get proc + 'jsonrpc-mqueue) + (list message))))) (goto-char message-end) (let ((inhibit-read-only t)) (delete-region (point-min) (point))) @@ -645,9 +630,21 @@ jsonrpc--process-filter ;; Message is still incomplete ;; (setq done :waiting-for-more-bytes-in-this-message)))))))) - ;; Saved parsing state for next visit to this filter + ;; Saved parsing state for next visit to this filter, which + ;; may well be a recursive one stemming from the tail call + ;; to `jsonrpc-connection-receive' below (bug#60088). ;; - (setf (jsonrpc--expected-bytes connection) expected-bytes)))))) + (setf (jsonrpc--expected-bytes conn) expected-bytes) + ;; Now, time to notify user code of one or more messages in + ;; order. Very often `jsonrpc-connection-receive' will exit + ;; non-locally (typically the reply to a request), so do + ;; this all this processing in top-level loops timer. + (cl-loop + for msg = (pop (process-get proc 'jsonrpc-mqueue)) while msg + do (run-at-time 0 nil + (lambda (m) (with-temp-buffer + (jsonrpc-connection-receive conn m))) + msg))))))) (cl-defun jsonrpc--async-request-1 (connection method diff --git a/test/lisp/jsonrpc-tests.el b/test/lisp/jsonrpc-tests.el index 85ac96a931c..5c3b694194f 100644 --- a/test/lisp/jsonrpc-tests.el +++ b/test/lisp/jsonrpc-tests.el @@ -103,6 +103,7 @@ jsonrpc--call-with-emacsrpc-fixture (process-get listen-server 'handlers)))))))) (cl-defmacro jsonrpc--with-emacsrpc-fixture ((endpoint-sym) &body body) + (declare (indent 1)) `(jsonrpc--call-with-emacsrpc-fixture (lambda (,endpoint-sym) ,@body))) (ert-deftest returns-3 () @@ -151,14 +152,6 @@ stretching-it-but-works [1 2 3 3 4 5] (jsonrpc-request conn 'vconcat [[1 2 3] [3 4 5]]))))) -(ert-deftest json-el-cant-serialize-this () - "Can't serialize a response that is half-vector/half-list." - (jsonrpc--with-emacsrpc-fixture (conn) - (should-error - ;; (append [1 2 3] [3 4 5]) => (1 2 3 . [3 4 5]), which can't be - ;; serialized - (jsonrpc-request conn 'append [[1 2 3] [3 4 5]])))) - (cl-defmethod jsonrpc-connection-ready-p ((conn jsonrpc--test-client) what) (and (cl-call-next-method) commit d2f95ea44c8ea408f5c11d89e40982376ae268cc Author: João Távora Date: Sat Dec 9 20:13:39 2023 +0000 Jsonrpc: better initforms in jsonrpc-connection * lisp/jsonrpc.el (jsonrpc-connection): Better initforms diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index f7ccc8d2745..67243fd49e3 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -51,6 +51,7 @@ (defclass jsonrpc-connection () ((name :accessor jsonrpc-name + :initform "anonymous" :initarg :name :documentation "A name for the connection") (-request-dispatcher @@ -76,6 +77,7 @@ jsonrpc-connection :accessor jsonrpc--events-buffer :documentation "A buffer pretty-printing the JSONRPC events") (-events-buffer-scrollback-size + :initform nil :initarg :events-buffer-scrollback-size :accessor jsonrpc--events-buffer-scrollback-size :documentation "Max size of events buffer. 0 disables, nil means infinite.") commit 8de749faa14f6a1566a5a92b84a6f834944eb22f Author: João Távora Date: Wed Nov 8 08:22:23 2023 -0600 Jsonrpc: allow method identifiers to be simply strings * lisp/jsonrpc.el (jsonrpc-connection-send): Support string methods. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 7726712d056..f7ccc8d2745 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -443,7 +443,9 @@ jsonrpc-connection-send (when method (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) - ((and method (symbolp method)) (symbol-name method))))) + ((symbolp method) (symbol-name method)) + ((stringp method) method) + (t (error "[jsonrpc] invalid method %s" method))))) (let* ( (message `(:jsonrpc "2.0" ,@args)) (json (jsonrpc--json-encode message)) (headers commit 33aa46fe94f5551d3158a6b2dcb3e81e908bdbd1 Author: Michael Albinus Date: Wed Dec 13 13:20:43 2023 +0100 Improve tramp-compat-connection-local-p * lisp/net/tramp-compat.el (tramp-compat-connection-local-p): Make it compatible with Emacs 27. diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 820d9f07883..e05f371f406 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -310,13 +310,11 @@ 'tramp-compat-auth-source-netrc-parse-all ;; Macro `connection-local-p' is new in Emacs 30.1. (if (macrop 'connection-local-p) (defalias 'tramp-compat-connection-local-p #'connection-local-p) - (defmacro tramp-compat-connection-local-p (variable &optional application) - "Non-nil if VARIABLE has a connection-local binding in `default-directory'. -If APPLICATION is nil, the value of -`connection-local-default-application' is used." + (defmacro tramp-compat-connection-local-p (variable) + "Non-nil if VARIABLE has a connection-local binding in `default-directory'." `(let (connection-local-variables-alist file-local-variables-alist) (hack-connection-local-variables - (connection-local-criteria-for-default-directory ,application)) + (connection-local-criteria-for-default-directory)) (and (assq ',variable connection-local-variables-alist) t)))) (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) commit 281a16d15fad5b05d88d03e2f4c9718c81657840 Author: Andrea Corallo Date: Wed Dec 13 12:22:39 2023 +0100 * configure.ac: Fix '--without-all' if libgccjit installed (bug#67799) diff --git a/configure.ac b/configure.ac index a279f78a0ea..0224c9c32eb 100644 --- a/configure.ac +++ b/configure.ac @@ -5149,6 +5149,11 @@ AC_DEFUN with_native_compilation=no]) +if test "$with_features" = "no" \ + && test "${with_native_compilation}" = "default"; then + with_native_compilation=no +fi + if test "${with_native_compilation}" = "default"; then # Check if libgccjit is available. AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], commit 75fd7550ed6cede6c9e8224f1f2d62637c43fdd4 Author: Eric Abrahamsen Date: Fri Dec 8 09:39:58 2023 -0800 Provide option to forward Gnus messages with all (most) headers Bug#67520 * lisp/gnus/gnus-msg.el (gnus-summary-mail-forward): Accept symbolic prefix to let-bind message-forward-included-headers to nil, which will include most original message headers in the forwarded copy. (gnus-summary-post-forward): Corresponding arglist update. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 586e4b94ba1..ead5954a96e 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -5868,15 +5868,23 @@ Summary Mail Commands @findex gnus-summary-mail-forward @c @icon{gnus-summary-mail-forward} Forward the current article to some other person -(@code{gnus-summary-mail-forward}). If no prefix is given, the message -is forwarded according to the value of (@code{message-forward-as-mime}) -and (@code{message-forward-show-mml}); if the prefix is 1, decode the -message and forward directly inline; if the prefix is 2, forward message -as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and -forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message -directly inline; otherwise, the message is forwarded as no prefix given -but use the flipped value of (@code{message-forward-as-mime}). By -default, the forwarded message is inlined into the mail. +(@code{gnus-summary-mail-forward}). If no prefix is given, the +message is forwarded according to the value of +(@code{message-forward-as-mime}) and +(@code{message-forward-show-mml}); if the prefix is 1, decode the +message and forward directly inline; if the prefix is 2, forward +message as an rfc822 @acronym{MIME} section; if the prefix is 3, +decode message and forward as an rfc822 @acronym{MIME} section; if the +prefix is 4, forward message directly inline; otherwise, the message +is forwarded as no prefix given but use the negated value of +(@code{message-forward-as-mime}). By default, the forwarded message +is inlined into the mail. + +Which headers from the original message are included in the forwarded +message is determined by options specific to @code{message-mode}, +@pxref{Forwarding,,, message}. In addition, this command can be given +the symbolic prefix @samp{a}, using @kbd{M-i a}, to include most original +headers. @item S m @itemx m diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index b065ae34851..e503ccae00f 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1209,7 +1209,7 @@ gnus-summary-very-wide-reply-with-original (gnus-summary-reply (gnus-summary-work-articles n) t (gnus-summary-work-articles n))) -(defun gnus-summary-mail-forward (&optional arg post) +(defun gnus-summary-mail-forward (&optional arg all-headers post) "Forward the current message(s) to another user. If process marks exist, forward all marked messages; if ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml'; @@ -1217,17 +1217,25 @@ gnus-summary-mail-forward if ARG is 2, forward message as an rfc822 MIME section; if ARG is 3, decode message and forward as an rfc822 MIME section; if ARG is 4, forward message directly inline; -otherwise, use flipped `message-forward-as-mime'. +otherwise, use negated `message-forward-as-mime'. If POST, post instead of mail. -For the \"inline\" alternatives, also see the variable -`message-forward-ignored-headers'." - (interactive "P" gnus-summary-mode) +If symbolic prefix ALL-HEADERS is the symbol `a', include all +original headers in the forwarded message, except those matching +`message-forward-ignored-headers'. Otherwise, include headers +based on the options `message-forward-included-headers', +`message-forward-ignored-headers', and potentially +`message-forward-included-mime-headers'." + (interactive (gnus-interactive "P\ny") gnus-summary-mode) (if (cdr (gnus-summary-work-articles nil)) ;; Process marks are given. (gnus-uu-digest-mail-forward nil post) ;; No process marks. (let ((message-forward-as-mime message-forward-as-mime) - (message-forward-show-mml message-forward-show-mml)) + (message-forward-show-mml message-forward-show-mml) + (message-forward-included-headers + (if (eq all-headers 'a) + nil + message-forward-included-headers))) (cond ((null arg)) ((eq arg 1) @@ -1380,11 +1388,11 @@ gnus-summary-resend-message-edit (forward-char 1)) (widen))))) -(defun gnus-summary-post-forward (&optional arg) +(defun gnus-summary-post-forward (&optional arg all-headers) "Forward the current article to a newsgroup. See `gnus-summary-mail-forward' for ARG." - (interactive "P" gnus-summary-mode) - (gnus-summary-mail-forward arg t)) + (interactive (gnus-interactive "P\ny") gnus-summary-mode) + (gnus-summary-mail-forward arg all-headers t)) (defun gnus-summary-mail-crosspost-complaint (n) "Send a complaint about crossposting to the current article(s)." commit 67654fe96577823e6fcbd3e88b9779653f8b6201 Author: Michael Albinus Date: Tue Dec 12 17:39:51 2023 +0100 New macro connection-local-p * doc/lispref/variables.texi (Applying Connection Local Variables): Add macro 'connection-local-p'. * etc/NEWS: Add macro `connection-local-p'. * lisp/files-x.el (connection-local-p): New macro. (connection-local-value): Add debug declaration. * lisp/net/tramp-compat.el (tramp-compat-connection-local-p): New macro. * lisp/net/tramp-crypt.el (tramp-crypt-cleanup-connection): Bind `tramp-crypt-enabled'. * test/lisp/files-x-tests.el (files-x-test-connection-local-value): * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes) (tramp-test35-remote-path): Adapt tests. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 36468bddffa..85a28c1d9c1 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -2487,7 +2487,7 @@ Applying Connection Local Variables @defvar connection-local-default-application The default application, a symbol, to be applied in -@code{with-connection-local-variables} and +@code{with-connection-local-variables}, @code{connection-local-p} and @code{connection-local-value}. It defaults to @code{tramp}, but you can let-bind it to change the application temporarily (@pxref{Local Variables}). @@ -2546,6 +2546,13 @@ Applying Connection Local Variables This variable must not be changed globally. @end defvar +@defmac connection-local-p symbol &optional application +This macro returns non-@code{nil} if @var{symbol} has a +connection-local binding for @var{application}. If @var{application} +is @code{nil}, the value of +@code{connection-local-default-application} is used. +@end defmac + @defmac connection-local-value symbol &optional application This macro returns the connection-local value of @var{symbol} for @var{application}. If @var{application} is @code{nil}, the value of diff --git a/etc/NEWS b/etc/NEWS index 33afb34b029..1ff2f8a149f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1655,9 +1655,10 @@ dir-locals file to modify. ** Connection local variables +++ -*** New macro 'connection-local-value'. -This macro returns the connection-local value of a variable if any, or -its current value. +*** New macros 'connection-local-p' and 'connection-local-value'. +The former macro returns non-nil if a variable has a connection-local +binding. The latter macro returns the connection-local value of a +variable if any, or its current value. * Changes in Emacs 30.1 on Non-Free Operating Systems diff --git a/lisp/files-x.el b/lisp/files-x.el index 282cc79f26e..41d9cd3bab8 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -926,6 +926,19 @@ setq-connection-local connection-local-criteria connection-local-profile-name-for-setq))))) +;;;###autoload +(defmacro connection-local-p (variable &optional application) + "Non-nil if VARIABLE has a connection-local binding in `default-directory'. +If APPLICATION is nil, the value of +`connection-local-default-application' is used." + (declare (debug (symbolp &optional form))) + (unless (symbolp variable) + (signal 'wrong-type-argument (list 'symbolp variable))) + `(let (connection-local-variables-alist file-local-variables-alist) + (hack-connection-local-variables + (connection-local-criteria-for-default-directory ,application)) + (and (assq ',variable connection-local-variables-alist) t))) + ;;;###autoload (defmacro connection-local-value (variable &optional application) "Return connection-local VARIABLE for APPLICATION in `default-directory'. @@ -933,6 +946,7 @@ connection-local-value `connection-local-default-application' is used. If VARIABLE does not have a connection-local binding, the return value is the default binding of the variable." + (declare (debug (symbolp &optional form))) (unless (symbolp variable) (signal 'wrong-type-argument (list 'symbolp variable))) `(let (connection-local-variables-alist file-local-variables-alist) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 22ee5b32717..820d9f07883 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -307,6 +307,18 @@ 'tramp-compat-auth-source-netrc-parse-all ?\N{KHMER SIGN CAMNUC PII KUUH}) "List of characters equivalent to trailing colon in \"password\" prompts.")) +;; Macro `connection-local-p' is new in Emacs 30.1. +(if (macrop 'connection-local-p) + (defalias 'tramp-compat-connection-local-p #'connection-local-p) + (defmacro tramp-compat-connection-local-p (variable &optional application) + "Non-nil if VARIABLE has a connection-local binding in `default-directory'. +If APPLICATION is nil, the value of +`connection-local-default-application' is used." + `(let (connection-local-variables-alist file-local-variables-alist) + (hack-connection-local-variables + (connection-local-criteria-for-default-directory ,application)) + (and (assq ',variable connection-local-variables-alist) t)))) + (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) (function-put (intern elt) 'tramp-suppress-trace t)) diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 0d79f88f10c..0680fcbe8c9 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -859,7 +859,8 @@ tramp-crypt-cleanup-connection "Cleanup crypt resources determined by VEC." (let ((tramp-cleanup-connection-hook (remove - #'tramp-crypt-cleanup-connection tramp-cleanup-connection-hook))) + #'tramp-crypt-cleanup-connection tramp-cleanup-connection-hook)) + (tramp-crypt-enabled t)) (dolist (dir tramp-crypt-directories) (when (tramp-file-name-equal-p vec (tramp-dissect-file-name dir)) (tramp-cleanup-connection (tramp-crypt-dissect-file-name dir)))))) diff --git a/test/lisp/files-x-tests.el b/test/lisp/files-x-tests.el index 795d03a071d..c7a56611497 100644 --- a/test/lisp/files-x-tests.el +++ b/test/lisp/files-x-tests.el @@ -39,6 +39,7 @@ files-x-test--variables4 (defconst files-x-test--variables5 '((remote-lazy-var . nil) (remote-null-device . "/dev/null"))) +(defvar remote-shell-file-name) (defvar remote-null-device) (defvar remote-lazy-var nil) (put 'remote-shell-file-name 'safe-local-variable #'identity) @@ -497,8 +498,10 @@ files-x-test-connection-local-value (connection-local-set-profiles nil 'remote-ksh 'remote-nullfile) + (connection-local-set-profile-variables + 'remote-lazy files-x-test--variables5) (connection-local-set-profiles - files-x-test--application 'remote-bash) + files-x-test--application 'remote-lazy 'remote-bash) (with-temp-buffer ;; We need a remote `default-directory'. @@ -512,24 +515,36 @@ files-x-test-connection-local-value (should (string-equal (symbol-value 'remote-null-device) "null")) ;; The proper variable values are set. + (should (connection-local-p remote-shell-file-name)) (should (string-equal (connection-local-value remote-shell-file-name) "/bin/ksh")) + (should (connection-local-p remote-null-device)) (should (string-equal (connection-local-value remote-null-device) "/dev/null")) + (should-not (connection-local-p remote-lazy-var)) ;; Run with a different application. + (should + (connection-local-p + remote-shell-file-name (cadr files-x-test--application))) (should (string-equal (connection-local-value remote-shell-file-name (cadr files-x-test--application)) "/bin/bash")) + (should + (connection-local-p + remote-null-device (cadr files-x-test--application))) (should (string-equal (connection-local-value remote-null-device (cadr files-x-test--application)) "/dev/null")) + (should + (connection-local-p + remote-lazy-var (cadr files-x-test--application))) ;; The previous bindings haven't changed. (should-not connection-local-variables-alist) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index d8932a28e4d..68bf928eb62 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3811,7 +3811,7 @@ tramp-test18-file-attributes (should (eq (file-attribute-type attr) t))) ;; Cleanup. - (ignore-errors (delete-directory tmp-name1)) + (ignore-errors (delete-directory tmp-name1 'recursive)) (ignore-errors (delete-file tmp-name1)) (ignore-errors (delete-file tmp-name2)))))) @@ -6360,6 +6360,8 @@ tramp-test35-remote-path (tramp-remote-path tramp-remote-path) (orig-tramp-remote-path tramp-remote-path) path) + ;; The "flatpak" method modifies `tramp-remote-path'. + (skip-unless (not (tramp-compat-connection-local-p tramp-remote-path))) (unwind-protect (progn ;; Non existing directories are removed. commit 6abea4d98d1d964c68a78cb9b5321071da851654 Author: Juri Linkov Date: Mon Dec 11 19:16:37 2023 +0200 Fix typo in commit 3c093148958d56e0ed8e12a8e00ced1ef052259a * lisp/minibuffer.el (minibuffer-completion-help): Set t to LOCAL arg of add-hook for after-change-functions. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a9814fb0bac..1af890968d0 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2551,7 +2551,7 @@ minibuffer-completion-help . ,#'(lambda (_window) (with-current-buffer mainbuf (when completion-auto-deselect - (add-hook 'after-change-functions #'completions--after-change t)) + (add-hook 'after-change-functions #'completions--after-change nil t)) ;; Remove the base-size tail because `sort' requires a properly ;; nil-terminated list. (when last (setcdr last nil)) commit 9434ad25ce2747864e0bcf5665f65eb65a079178 Author: Po Lu Date: Mon Dec 11 11:39:00 2023 +0800 Introduce menus beneath new chapters in the Transient menu * doc/misc/transient.texi (Usage) (Modifying Existing Transients): Insert menus from which Texinfo 4.13 can infer Prev and Next nodes. diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index ac330e09702..cba434d072e 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -203,6 +203,18 @@ Introduction @node Usage @chapter Usage +@menu +* Invoking Transients:: +* Aborting and Resuming Transients:: +* Common Suffix Commands:: +* Saving Values:: +* Using History:: +* Getting Help for Suffix Commands:: +* Enabling and Disabling Suffixes:: +* Other Commands:: +* Configuration:: +@end menu + @node Invoking Transients @section Invoking Transients @@ -926,6 +938,15 @@ Modifying Existing Transients @node Defining New Commands @chapter Defining New Commands +@menu +* Technical Introduction:: +* Defining Transients:: +* Binding Suffix and Infix Commands:: +* Defining Suffix and Infix Commands:: +* Using Infix Arguments:: +* Transient State:: +@end menu + @node Technical Introduction @section Technical Introduction commit 1ec8e76bcf9aa9ec31718c9a2bb80f89219383e4 Author: Po Lu Date: Mon Dec 11 11:28:34 2023 +0800 Correct implementation of UTP * src/sfnt.c (sfnt_interpret_utp): Derive which flags to reset from the freedom vector. diff --git a/src/sfnt.c b/src/sfnt.c index 44906b12ce9..f9ffc86da58 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -7450,6 +7450,8 @@ sfnt_scale_by_freedom_vector (struct sfnt_interpreter *interpreter, sfnt_interpret_utp (struct sfnt_interpreter *interpreter, uint32_t p) { + unsigned char mask; + if (!interpreter->state.zp0) { if (p >= interpreter->twilight_zone_size) @@ -7463,7 +7465,31 @@ sfnt_interpret_utp (struct sfnt_interpreter *interpreter, || p >= interpreter->glyph_zone->num_points) TRAP ("UTP[] p lies outside glyph zone"); - interpreter->glyph_zone->flags[p] &= ~SFNT_POINT_TOUCHED_X; + /* The flags unset by UTP are subject to which axes in the freedom + vector are significant, as stated in the TrueType reference + manual by this needless mouthful: + + A point may be touched in the x-direction, the y-direction, or + in both the x and y-directions. The position of the freedom + vector determines whether the point is untouched in the + x-direction, the y-direction, or both. If the vector is set to + the x-axis, the point will be untouched in the x-direction. If + the vector is set to the y-axis, the point will be untouched in + the y-direction. Otherwise the point will be untouched in both + directions. + + A points that is marked as untouched will be moved by an IUP[] + instruction even if the point was previously touched. */ + + mask = 0xff; + + if (interpreter->state.freedom_vector.x) + mask &= ~SFNT_POINT_TOUCHED_X; + + if (interpreter->state.freedom_vector.y) + mask &= ~SFNT_POINT_TOUCHED_Y; + + interpreter->glyph_zone->flags[p] &= mask; } /* Save the specified unit VECTOR into INTERPRETER's graphics state as commit 64cdcf7f51f1428c40d8c2a902c76b9877e2ff8d Author: Dmitry Gutov Date: Mon Dec 11 03:19:11 2023 +0200 project-any-command: Use 'project-aware' * lisp/progmodes/project.el (project-any-command): Change the symbol it's looking for to 'project-aware'. Seems to convey the semantics best. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index cc473a12baf..0fa623616b6 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1843,7 +1843,7 @@ project-any-command "Run the next command in the current project. If the command name starts with `project-', or its symbol has -property `project-related', it gets passed the project to use +property `project-aware', it gets passed the project to use with the variable `project-current-directory-override'. Otherwise, `default-directory' is temporarily set to the current project's root. @@ -1862,7 +1862,7 @@ project-any-command (when command (if (when (symbolp command) (or (string-prefix-p "project-" (symbol-name command)) - (get command 'project-related))) + (get command 'project-aware))) (let ((project-current-directory-override root)) (call-interactively command)) (let ((default-directory root)) commit 9ee911ce318ad701c024b151d8b625e9311bf945 Author: Stefan Kangas Date: Sun Dec 10 22:06:54 2023 +0100 Mark `;#@` as :safe for asm-comment-char * lisp/progmodes/asm-mode.el (asm--safe-comment-char-p): New function that returns true for characters #, @, and ;. (asm-comment-char): Use new function as :safe predicate. diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 0f5af9803a5..efe9982feab 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -1,6 +1,6 @@ ;;; asm-mode.el --- mode for editing assembler code -*- lexical-binding: t; -*- -;; Copyright (C) 1991, 2001-2023 Free Software Foundation, Inc. +;; Copyright (C) 1991-2023 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Maintainer: emacs-devel@gnu.org @@ -52,9 +52,13 @@ asm :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) :group 'languages) +(defun asm--safe-comment-char-p (char) + (memq char '(?\; ?# ?@))) + (defcustom asm-comment-char ?\; "The `comment-start' character assumed by Asm mode." - :type 'character) + :type 'character + :safe #'asm--safe-comment-char-p) (defvar asm-mode-syntax-table (let ((st (make-syntax-table))) commit c3b41c123ac496f51479c326da27e42c2afedfd7 Author: Stefan Kangas Date: Sun Dec 10 22:04:51 2023 +0100 ; Use ?c instead of integer in local variables * exec/loader-armeabi.s (timespec): * exec/loader-mips64el.s (__start): * exec/loader-mipsel.s (__start): Use ?c instead of integer in local variables. diff --git a/exec/loader-armeabi.s b/exec/loader-armeabi.s index 32b2a5268d6..bee81edb326 100644 --- a/exec/loader-armeabi.s +++ b/exec/loader-armeabi.s @@ -200,5 +200,5 @@ timespec: .long 10 @ Local Variables: -@ asm-comment-char: 64 +@ asm-comment-char: ?@ @ End: diff --git a/exec/loader-mips64el.s b/exec/loader-mips64el.s index f4a6f918497..c340824a6f0 100644 --- a/exec/loader-mips64el.s +++ b/exec/loader-mips64el.s @@ -230,5 +230,5 @@ dnl syscall # syscall .quad 10 # Local Variables: -# asm-comment-char: 35 +# asm-comment-char: ?# # End: diff --git a/exec/loader-mipsel.s b/exec/loader-mipsel.s index baba3f05a94..e1ae68af0ca 100644 --- a/exec/loader-mipsel.s +++ b/exec/loader-mipsel.s @@ -232,5 +232,5 @@ RESTORE() # restore sp .long 10 # Local Variables: -# asm-comment-char: 35 +# asm-comment-char: ?# # End: commit 0da2a4650cdac008ac9a50ec8a7729093632a6a8 Merge: fab48f1a543 2773cf9e013 Author: Eli Zaretskii Date: Sun Dec 10 10:35:54 2023 -0500 Merge from origin/emacs-29 2773cf9e013 ; Fix typos 020aff95fa3 ; Fix typos in ChangeLog files 5e03a621efc ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristi... f0734e1c0d1 Fix c-ts-mode indent heuristic (bug#67417) 08fc6bace20 Fix c-ts-mode indentation (bug#67357) 71bc2815ccd Add font-locking for hash-bang lines in typescript-ts-mode. db8347c8c87 Add font-locking for hash-bang lines in js-ts-mode 91f2ade57bb ruby-mode: Better detect regexp vs division (bug#67569) commit fab48f1a543bed74e031d2e2cebac4e1165d7b4b Author: Michael Albinus Date: Sun Dec 10 15:15:12 2023 +0100 ; Fix error in my last commit * lisp/files-x.el (hack-connection-local-variables): Autoload. (connection-local-value): Revert previous fix. diff --git a/lisp/files-x.el b/lisp/files-x.el index 96d49427c81..282cc79f26e 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -791,6 +791,7 @@ connection-local-update-profile-variables (setq variables (nreverse existing-variables))) (connection-local-set-profile-variables profile variables)) +;;;###autoload (defun hack-connection-local-variables (criteria) "Read connection-local variables according to CRITERIA. Store the connection-local variables in buffer local @@ -935,13 +936,8 @@ connection-local-value (unless (symbolp variable) (signal 'wrong-type-argument (list 'symbolp variable))) `(let (connection-local-variables-alist file-local-variables-alist) - ;; This is a macro, so whether it is autoloaded doesn't influence - ;; whether its callers will induce the loading of files-x.el. - ;; - ;; Verify that h-c-l-v is autoloaded before calling it. - (when (fboundp 'hack-connection-local-variables) - (hack-connection-local-variables - (connection-local-criteria-for-default-directory ,application))) + (hack-connection-local-variables + (connection-local-criteria-for-default-directory ,application)) (if-let ((result (assq ',variable connection-local-variables-alist))) (cdr result) ,variable))) commit 79aca35c1f0b77d1c109e3b5526400d92f42a2aa Author: Po Lu Date: Sun Dec 10 22:05:09 2023 +0800 * lisp/files-x.el (connection-local-value): Fix Dired crash. diff --git a/lisp/files-x.el b/lisp/files-x.el index 467981f3f8f..96d49427c81 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -935,8 +935,13 @@ connection-local-value (unless (symbolp variable) (signal 'wrong-type-argument (list 'symbolp variable))) `(let (connection-local-variables-alist file-local-variables-alist) - (hack-connection-local-variables - (connection-local-criteria-for-default-directory ,application)) + ;; This is a macro, so whether it is autoloaded doesn't influence + ;; whether its callers will induce the loading of files-x.el. + ;; + ;; Verify that h-c-l-v is autoloaded before calling it. + (when (fboundp 'hack-connection-local-variables) + (hack-connection-local-variables + (connection-local-criteria-for-default-directory ,application))) (if-let ((result (assq ',variable connection-local-variables-alist))) (cdr result) ,variable))) commit da8fd95cdb9432ba3badcfd3e4345f686e15d593 Author: Stefan Kangas Date: Sun Dec 10 14:44:41 2023 +0100 Update publicsuffix.txt from upstream * etc/publicsuffix.txt: Update from https://publicsuffix.org/list/public_suffix_list.dat dated 2023-12-06 20:17:45 UTC. diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt index 956110851a4..79248a73f04 100644 --- a/etc/publicsuffix.txt +++ b/etc/publicsuffix.txt @@ -6710,7 +6710,7 @@ org.zw // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2023-09-30T15:11:25Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2023-12-06T15:14:09Z // This list is auto-generated, don't edit it manually. // aaa : American Automobile Association, Inc. // https://www.iana.org/domains/root/db/aaa.html @@ -7400,10 +7400,6 @@ cbn // https://www.iana.org/domains/root/db/cbre.html cbre -// cbs : CBS Domains Inc. -// https://www.iana.org/domains/root/db/cbs.html -cbs - // center : Binky Moon, LLC // https://www.iana.org/domains/root/db/center.html center @@ -7492,10 +7488,6 @@ citic // https://www.iana.org/domains/root/db/city.html city -// cityeats : Lifestyle Domain Holdings, Inc. -// https://www.iana.org/domains/root/db/cityeats.html -cityeats - // claims : Binky Moon, LLC // https://www.iana.org/domains/root/db/claims.html claims @@ -7760,7 +7752,7 @@ dental // https://www.iana.org/domains/root/db/dentist.html dentist -// desi : Desi Networks LLC +// desi // https://www.iana.org/domains/root/db/desi.html desi @@ -7808,7 +7800,7 @@ discover // https://www.iana.org/domains/root/db/dish.html dish -// diy : Lifestyle Domain Holdings, Inc. +// diy : Internet Naming Company LLC // https://www.iana.org/domains/root/db/diy.html diy @@ -7940,10 +7932,6 @@ esq // https://www.iana.org/domains/root/db/estate.html estate -// etisalat : Emirates Telecommunications Corporation (trading as Etisalat) -// https://www.iana.org/domains/root/db/etisalat.html -etisalat - // eurovision : European Broadcasting Union (EBU) // https://www.iana.org/domains/root/db/eurovision.html eurovision @@ -8116,7 +8104,7 @@ fly // https://www.iana.org/domains/root/db/foo.html foo -// food : Lifestyle Domain Holdings, Inc. +// food : Internet Naming Company LLC // https://www.iana.org/domains/root/db/food.html food @@ -8164,10 +8152,6 @@ frl // https://www.iana.org/domains/root/db/frogans.html frogans -// frontdoor : Lifestyle Domain Holdings, Inc. -// https://www.iana.org/domains/root/db/frontdoor.html -frontdoor - // frontier : Frontier Communications Corporation // https://www.iana.org/domains/root/db/frontier.html frontier @@ -8328,7 +8312,7 @@ goldpoint // https://www.iana.org/domains/root/db/golf.html golf -// goo : NTT Resonant Inc. +// goo : NTT DOCOMO, INC. // https://www.iana.org/domains/root/db/goo.html goo @@ -8780,10 +8764,6 @@ kids // https://www.iana.org/domains/root/db/kim.html kim -// kinder : Ferrero Trading Lux S.A. -// https://www.iana.org/domains/root/db/kinder.html -kinder - // kindle : Amazon Registry Services, Inc. // https://www.iana.org/domains/root/db/kindle.html kindle @@ -8928,7 +8908,7 @@ life // https://www.iana.org/domains/root/db/lifeinsurance.html lifeinsurance -// lifestyle : Lifestyle Domain Holdings, Inc. +// lifestyle : Internet Naming Company LLC // https://www.iana.org/domains/root/db/lifestyle.html lifestyle @@ -8968,7 +8948,7 @@ lipsy // https://www.iana.org/domains/root/db/live.html live -// living : Lifestyle Domain Holdings, Inc. +// living : Internet Naming Company LLC // https://www.iana.org/domains/root/db/living.html living @@ -9672,7 +9652,7 @@ promo // https://www.iana.org/domains/root/db/properties.html properties -// property : Internet Naming Company LLC +// property : Digital Property Infrastructure Limited // https://www.iana.org/domains/root/db/property.html property @@ -9836,10 +9816,6 @@ rio // https://www.iana.org/domains/root/db/rip.html rip -// rocher : Ferrero Trading Lux S.A. -// https://www.iana.org/domains/root/db/rocher.html -rocher - // rocks : Dog Beach, LLC // https://www.iana.org/domains/root/db/rocks.html rocks @@ -10088,10 +10064,6 @@ shouji // https://www.iana.org/domains/root/db/show.html show -// showtime : CBS Domains Inc. -// https://www.iana.org/domains/root/db/showtime.html -showtime - // silk : Amazon Registry Services, Inc. // https://www.iana.org/domains/root/db/silk.html silk @@ -10552,7 +10524,7 @@ ups // https://www.iana.org/domains/root/db/vacations.html vacations -// vana : Lifestyle Domain Holdings, Inc. +// vana : Internet Naming Company LLC // https://www.iana.org/domains/root/db/vana.html vana @@ -10636,10 +10608,6 @@ vlaanderen // https://www.iana.org/domains/root/db/vodka.html vodka -// volkswagen : Volkswagen Group of America Inc. -// https://www.iana.org/domains/root/db/volkswagen.html -volkswagen - // volvo : Volvo Holding Sverige Aktiebolag // https://www.iana.org/domains/root/db/volvo.html volvo @@ -10708,6 +10676,10 @@ weber // https://www.iana.org/domains/root/db/website.html website +// wed +// https://www.iana.org/domains/root/db/wed.html +wed + // wedding : Registry Services, LLC // https://www.iana.org/domains/root/db/wedding.html wedding @@ -11040,10 +11012,6 @@ xin // https://www.iana.org/domains/root/db/xn--mgba7c0bbn0a.html العليان -// xn--mgbaakc7dvf : Emirates Telecommunications Corporation (trading as Etisalat) -// https://www.iana.org/domains/root/db/xn--mgbaakc7dvf.html -اتصالات - // xn--mgbab2bd : CORE Association // https://www.iana.org/domains/root/db/xn--mgbab2bd.html بازار @@ -11345,11 +11313,78 @@ myamaze.net // Submitted by AWS Security // Subsections of Amazon/subsidiaries will appear until "concludes" tag +// Amazon API Gateway +// Submitted by AWS Security +// Reference: 4d863337-ff98-4501-a6f2-361eba8445d6 +execute-api.cn-north-1.amazonaws.com.cn +execute-api.cn-northwest-1.amazonaws.com.cn +execute-api.af-south-1.amazonaws.com +execute-api.ap-east-1.amazonaws.com +execute-api.ap-northeast-1.amazonaws.com +execute-api.ap-northeast-2.amazonaws.com +execute-api.ap-northeast-3.amazonaws.com +execute-api.ap-south-1.amazonaws.com +execute-api.ap-south-2.amazonaws.com +execute-api.ap-southeast-1.amazonaws.com +execute-api.ap-southeast-2.amazonaws.com +execute-api.ap-southeast-3.amazonaws.com +execute-api.ap-southeast-4.amazonaws.com +execute-api.ca-central-1.amazonaws.com +execute-api.eu-central-1.amazonaws.com +execute-api.eu-central-2.amazonaws.com +execute-api.eu-north-1.amazonaws.com +execute-api.eu-south-1.amazonaws.com +execute-api.eu-south-2.amazonaws.com +execute-api.eu-west-1.amazonaws.com +execute-api.eu-west-2.amazonaws.com +execute-api.eu-west-3.amazonaws.com +execute-api.il-central-1.amazonaws.com +execute-api.me-central-1.amazonaws.com +execute-api.me-south-1.amazonaws.com +execute-api.sa-east-1.amazonaws.com +execute-api.us-east-1.amazonaws.com +execute-api.us-east-2.amazonaws.com +execute-api.us-gov-east-1.amazonaws.com +execute-api.us-gov-west-1.amazonaws.com +execute-api.us-west-1.amazonaws.com +execute-api.us-west-2.amazonaws.com + // Amazon CloudFront // Submitted by Donavan Miller // Reference: 54144616-fd49-4435-8535-19c6a601bdb3 cloudfront.net +// Amazon Cognito +// Submitted by AWS Security +// Reference: 7bee1013-f456-47df-bfe8-03c78d946d61 +auth.af-south-1.amazoncognito.com +auth.ap-northeast-1.amazoncognito.com +auth.ap-northeast-2.amazoncognito.com +auth.ap-northeast-3.amazoncognito.com +auth.ap-south-1.amazoncognito.com +auth.ap-southeast-1.amazoncognito.com +auth.ap-southeast-2.amazoncognito.com +auth.ap-southeast-3.amazoncognito.com +auth.ca-central-1.amazoncognito.com +auth.eu-central-1.amazoncognito.com +auth.eu-north-1.amazoncognito.com +auth.eu-south-1.amazoncognito.com +auth.eu-west-1.amazoncognito.com +auth.eu-west-2.amazoncognito.com +auth.eu-west-3.amazoncognito.com +auth.il-central-1.amazoncognito.com +auth.me-south-1.amazoncognito.com +auth.sa-east-1.amazoncognito.com +auth.us-east-1.amazoncognito.com +auth-fips.us-east-1.amazoncognito.com +auth.us-east-2.amazoncognito.com +auth-fips.us-east-2.amazoncognito.com +auth-fips.us-gov-west-1.amazoncognito.com +auth.us-west-1.amazoncognito.com +auth-fips.us-west-1.amazoncognito.com +auth.us-west-2.amazoncognito.com +auth-fips.us-west-2.amazoncognito.com + // Amazon EC2 // Submitted by Luke Wells // Reference: 4c38fa71-58ac-4768-99e5-689c1767e537 @@ -11358,47 +11393,307 @@ cloudfront.net *.compute.amazonaws.com.cn us-east-1.amazonaws.com +// Amazon EMR +// Submitted by AWS Security +// Reference: 597f3f8e-9283-4e48-8e32-7ee25a1ff6ab +emrappui-prod.cn-north-1.amazonaws.com.cn +emrnotebooks-prod.cn-north-1.amazonaws.com.cn +emrstudio-prod.cn-north-1.amazonaws.com.cn +emrappui-prod.cn-northwest-1.amazonaws.com.cn +emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn +emrstudio-prod.cn-northwest-1.amazonaws.com.cn +emrappui-prod.af-south-1.amazonaws.com +emrnotebooks-prod.af-south-1.amazonaws.com +emrstudio-prod.af-south-1.amazonaws.com +emrappui-prod.ap-east-1.amazonaws.com +emrnotebooks-prod.ap-east-1.amazonaws.com +emrstudio-prod.ap-east-1.amazonaws.com +emrappui-prod.ap-northeast-1.amazonaws.com +emrnotebooks-prod.ap-northeast-1.amazonaws.com +emrstudio-prod.ap-northeast-1.amazonaws.com +emrappui-prod.ap-northeast-2.amazonaws.com +emrnotebooks-prod.ap-northeast-2.amazonaws.com +emrstudio-prod.ap-northeast-2.amazonaws.com +emrappui-prod.ap-northeast-3.amazonaws.com +emrnotebooks-prod.ap-northeast-3.amazonaws.com +emrstudio-prod.ap-northeast-3.amazonaws.com +emrappui-prod.ap-south-1.amazonaws.com +emrnotebooks-prod.ap-south-1.amazonaws.com +emrstudio-prod.ap-south-1.amazonaws.com +emrappui-prod.ap-southeast-1.amazonaws.com +emrnotebooks-prod.ap-southeast-1.amazonaws.com +emrstudio-prod.ap-southeast-1.amazonaws.com +emrappui-prod.ap-southeast-2.amazonaws.com +emrnotebooks-prod.ap-southeast-2.amazonaws.com +emrstudio-prod.ap-southeast-2.amazonaws.com +emrappui-prod.ap-southeast-3.amazonaws.com +emrnotebooks-prod.ap-southeast-3.amazonaws.com +emrstudio-prod.ap-southeast-3.amazonaws.com +emrappui-prod.ca-central-1.amazonaws.com +emrnotebooks-prod.ca-central-1.amazonaws.com +emrstudio-prod.ca-central-1.amazonaws.com +emrappui-prod.eu-central-1.amazonaws.com +emrnotebooks-prod.eu-central-1.amazonaws.com +emrstudio-prod.eu-central-1.amazonaws.com +emrappui-prod.eu-north-1.amazonaws.com +emrnotebooks-prod.eu-north-1.amazonaws.com +emrstudio-prod.eu-north-1.amazonaws.com +emrappui-prod.eu-south-1.amazonaws.com +emrnotebooks-prod.eu-south-1.amazonaws.com +emrstudio-prod.eu-south-1.amazonaws.com +emrappui-prod.eu-west-1.amazonaws.com +emrnotebooks-prod.eu-west-1.amazonaws.com +emrstudio-prod.eu-west-1.amazonaws.com +emrappui-prod.eu-west-2.amazonaws.com +emrnotebooks-prod.eu-west-2.amazonaws.com +emrstudio-prod.eu-west-2.amazonaws.com +emrappui-prod.eu-west-3.amazonaws.com +emrnotebooks-prod.eu-west-3.amazonaws.com +emrstudio-prod.eu-west-3.amazonaws.com +emrappui-prod.me-central-1.amazonaws.com +emrnotebooks-prod.me-central-1.amazonaws.com +emrstudio-prod.me-central-1.amazonaws.com +emrappui-prod.me-south-1.amazonaws.com +emrnotebooks-prod.me-south-1.amazonaws.com +emrstudio-prod.me-south-1.amazonaws.com +emrappui-prod.sa-east-1.amazonaws.com +emrnotebooks-prod.sa-east-1.amazonaws.com +emrstudio-prod.sa-east-1.amazonaws.com +emrappui-prod.us-east-1.amazonaws.com +emrnotebooks-prod.us-east-1.amazonaws.com +emrstudio-prod.us-east-1.amazonaws.com +emrappui-prod.us-east-2.amazonaws.com +emrnotebooks-prod.us-east-2.amazonaws.com +emrstudio-prod.us-east-2.amazonaws.com +emrappui-prod.us-gov-east-1.amazonaws.com +emrnotebooks-prod.us-gov-east-1.amazonaws.com +emrstudio-prod.us-gov-east-1.amazonaws.com +emrappui-prod.us-gov-west-1.amazonaws.com +emrnotebooks-prod.us-gov-west-1.amazonaws.com +emrstudio-prod.us-gov-west-1.amazonaws.com +emrappui-prod.us-west-1.amazonaws.com +emrnotebooks-prod.us-west-1.amazonaws.com +emrstudio-prod.us-west-1.amazonaws.com +emrappui-prod.us-west-2.amazonaws.com +emrnotebooks-prod.us-west-2.amazonaws.com +emrstudio-prod.us-west-2.amazonaws.com + +// Amazon Managed Workflows for Apache Airflow +// Submitted by AWS Security +// Reference: 4ab55e6f-90c0-4a8d-b6a0-52ca5dbb1c2e +*.cn-north-1.airflow.amazonaws.com.cn +*.cn-northwest-1.airflow.amazonaws.com.cn +*.ap-northeast-1.airflow.amazonaws.com +*.ap-northeast-2.airflow.amazonaws.com +*.ap-south-1.airflow.amazonaws.com +*.ap-southeast-1.airflow.amazonaws.com +*.ap-southeast-2.airflow.amazonaws.com +*.ca-central-1.airflow.amazonaws.com +*.eu-central-1.airflow.amazonaws.com +*.eu-north-1.airflow.amazonaws.com +*.eu-west-1.airflow.amazonaws.com +*.eu-west-2.airflow.amazonaws.com +*.eu-west-3.airflow.amazonaws.com +*.sa-east-1.airflow.amazonaws.com +*.us-east-1.airflow.amazonaws.com +*.us-east-2.airflow.amazonaws.com +*.us-west-2.airflow.amazonaws.com + // Amazon S3 -// Submitted by Luke Wells -// Reference: d068bd97-f0a9-4838-a6d8-954b622ef4ae +// Submitted by AWS Security +// Reference: 0e801048-08f2-4064-9cb8-e7373e0b57f4 +s3.dualstack.cn-north-1.amazonaws.com.cn +s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn +s3-website.dualstack.cn-north-1.amazonaws.com.cn s3.cn-north-1.amazonaws.com.cn +s3-accesspoint.cn-north-1.amazonaws.com.cn +s3-deprecated.cn-north-1.amazonaws.com.cn +s3-object-lambda.cn-north-1.amazonaws.com.cn +s3-website.cn-north-1.amazonaws.com.cn +s3.dualstack.cn-northwest-1.amazonaws.com.cn +s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn +s3.cn-northwest-1.amazonaws.com.cn +s3-accesspoint.cn-northwest-1.amazonaws.com.cn +s3-object-lambda.cn-northwest-1.amazonaws.com.cn +s3-website.cn-northwest-1.amazonaws.com.cn +s3.dualstack.af-south-1.amazonaws.com +s3-accesspoint.dualstack.af-south-1.amazonaws.com +s3-website.dualstack.af-south-1.amazonaws.com +s3.af-south-1.amazonaws.com +s3-accesspoint.af-south-1.amazonaws.com +s3-object-lambda.af-south-1.amazonaws.com +s3-website.af-south-1.amazonaws.com +s3.dualstack.ap-east-1.amazonaws.com +s3-accesspoint.dualstack.ap-east-1.amazonaws.com +s3.ap-east-1.amazonaws.com +s3-accesspoint.ap-east-1.amazonaws.com +s3-object-lambda.ap-east-1.amazonaws.com +s3-website.ap-east-1.amazonaws.com s3.dualstack.ap-northeast-1.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com +s3-website.dualstack.ap-northeast-1.amazonaws.com +s3.ap-northeast-1.amazonaws.com +s3-accesspoint.ap-northeast-1.amazonaws.com +s3-object-lambda.ap-northeast-1.amazonaws.com +s3-website.ap-northeast-1.amazonaws.com s3.dualstack.ap-northeast-2.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com +s3-website.dualstack.ap-northeast-2.amazonaws.com s3.ap-northeast-2.amazonaws.com +s3-accesspoint.ap-northeast-2.amazonaws.com +s3-object-lambda.ap-northeast-2.amazonaws.com s3-website.ap-northeast-2.amazonaws.com +s3.dualstack.ap-northeast-3.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com +s3-website.dualstack.ap-northeast-3.amazonaws.com +s3.ap-northeast-3.amazonaws.com +s3-accesspoint.ap-northeast-3.amazonaws.com +s3-object-lambda.ap-northeast-3.amazonaws.com +s3-website.ap-northeast-3.amazonaws.com s3.dualstack.ap-south-1.amazonaws.com +s3-accesspoint.dualstack.ap-south-1.amazonaws.com +s3-website.dualstack.ap-south-1.amazonaws.com s3.ap-south-1.amazonaws.com +s3-accesspoint.ap-south-1.amazonaws.com +s3-object-lambda.ap-south-1.amazonaws.com s3-website.ap-south-1.amazonaws.com +s3.dualstack.ap-south-2.amazonaws.com +s3-accesspoint.dualstack.ap-south-2.amazonaws.com +s3.ap-south-2.amazonaws.com +s3-accesspoint.ap-south-2.amazonaws.com +s3-object-lambda.ap-south-2.amazonaws.com +s3-website.ap-south-2.amazonaws.com s3.dualstack.ap-southeast-1.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com +s3-website.dualstack.ap-southeast-1.amazonaws.com +s3.ap-southeast-1.amazonaws.com +s3-accesspoint.ap-southeast-1.amazonaws.com +s3-object-lambda.ap-southeast-1.amazonaws.com +s3-website.ap-southeast-1.amazonaws.com s3.dualstack.ap-southeast-2.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com +s3-website.dualstack.ap-southeast-2.amazonaws.com +s3.ap-southeast-2.amazonaws.com +s3-accesspoint.ap-southeast-2.amazonaws.com +s3-object-lambda.ap-southeast-2.amazonaws.com +s3-website.ap-southeast-2.amazonaws.com +s3.dualstack.ap-southeast-3.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com +s3.ap-southeast-3.amazonaws.com +s3-accesspoint.ap-southeast-3.amazonaws.com +s3-object-lambda.ap-southeast-3.amazonaws.com +s3-website.ap-southeast-3.amazonaws.com +s3.dualstack.ap-southeast-4.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com +s3.ap-southeast-4.amazonaws.com +s3-accesspoint.ap-southeast-4.amazonaws.com +s3-object-lambda.ap-southeast-4.amazonaws.com +s3-website.ap-southeast-4.amazonaws.com s3.dualstack.ca-central-1.amazonaws.com +s3-accesspoint.dualstack.ca-central-1.amazonaws.com +s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com +s3-fips.dualstack.ca-central-1.amazonaws.com +s3-website.dualstack.ca-central-1.amazonaws.com s3.ca-central-1.amazonaws.com +s3-accesspoint.ca-central-1.amazonaws.com +s3-accesspoint-fips.ca-central-1.amazonaws.com +s3-fips.ca-central-1.amazonaws.com +s3-object-lambda.ca-central-1.amazonaws.com s3-website.ca-central-1.amazonaws.com s3.dualstack.eu-central-1.amazonaws.com +s3-accesspoint.dualstack.eu-central-1.amazonaws.com +s3-website.dualstack.eu-central-1.amazonaws.com s3.eu-central-1.amazonaws.com +s3-accesspoint.eu-central-1.amazonaws.com +s3-object-lambda.eu-central-1.amazonaws.com s3-website.eu-central-1.amazonaws.com +s3.dualstack.eu-central-2.amazonaws.com +s3-accesspoint.dualstack.eu-central-2.amazonaws.com +s3.eu-central-2.amazonaws.com +s3-accesspoint.eu-central-2.amazonaws.com +s3-object-lambda.eu-central-2.amazonaws.com +s3-website.eu-central-2.amazonaws.com +s3.dualstack.eu-north-1.amazonaws.com +s3-accesspoint.dualstack.eu-north-1.amazonaws.com +s3.eu-north-1.amazonaws.com +s3-accesspoint.eu-north-1.amazonaws.com +s3-object-lambda.eu-north-1.amazonaws.com +s3-website.eu-north-1.amazonaws.com +s3.dualstack.eu-south-1.amazonaws.com +s3-accesspoint.dualstack.eu-south-1.amazonaws.com +s3-website.dualstack.eu-south-1.amazonaws.com +s3.eu-south-1.amazonaws.com +s3-accesspoint.eu-south-1.amazonaws.com +s3-object-lambda.eu-south-1.amazonaws.com +s3-website.eu-south-1.amazonaws.com +s3.dualstack.eu-south-2.amazonaws.com +s3-accesspoint.dualstack.eu-south-2.amazonaws.com +s3.eu-south-2.amazonaws.com +s3-accesspoint.eu-south-2.amazonaws.com +s3-object-lambda.eu-south-2.amazonaws.com +s3-website.eu-south-2.amazonaws.com s3.dualstack.eu-west-1.amazonaws.com +s3-accesspoint.dualstack.eu-west-1.amazonaws.com +s3-website.dualstack.eu-west-1.amazonaws.com +s3.eu-west-1.amazonaws.com +s3-accesspoint.eu-west-1.amazonaws.com +s3-deprecated.eu-west-1.amazonaws.com +s3-object-lambda.eu-west-1.amazonaws.com +s3-website.eu-west-1.amazonaws.com s3.dualstack.eu-west-2.amazonaws.com +s3-accesspoint.dualstack.eu-west-2.amazonaws.com s3.eu-west-2.amazonaws.com +s3-accesspoint.eu-west-2.amazonaws.com +s3-object-lambda.eu-west-2.amazonaws.com s3-website.eu-west-2.amazonaws.com s3.dualstack.eu-west-3.amazonaws.com +s3-accesspoint.dualstack.eu-west-3.amazonaws.com +s3-website.dualstack.eu-west-3.amazonaws.com s3.eu-west-3.amazonaws.com +s3-accesspoint.eu-west-3.amazonaws.com +s3-object-lambda.eu-west-3.amazonaws.com s3-website.eu-west-3.amazonaws.com +s3.dualstack.il-central-1.amazonaws.com +s3-accesspoint.dualstack.il-central-1.amazonaws.com +s3.il-central-1.amazonaws.com +s3-accesspoint.il-central-1.amazonaws.com +s3-object-lambda.il-central-1.amazonaws.com +s3-website.il-central-1.amazonaws.com +s3.dualstack.me-central-1.amazonaws.com +s3-accesspoint.dualstack.me-central-1.amazonaws.com +s3.me-central-1.amazonaws.com +s3-accesspoint.me-central-1.amazonaws.com +s3-object-lambda.me-central-1.amazonaws.com +s3-website.me-central-1.amazonaws.com +s3.dualstack.me-south-1.amazonaws.com +s3-accesspoint.dualstack.me-south-1.amazonaws.com +s3.me-south-1.amazonaws.com +s3-accesspoint.me-south-1.amazonaws.com +s3-object-lambda.me-south-1.amazonaws.com +s3-website.me-south-1.amazonaws.com s3.amazonaws.com +s3-1.amazonaws.com +s3-ap-east-1.amazonaws.com s3-ap-northeast-1.amazonaws.com s3-ap-northeast-2.amazonaws.com +s3-ap-northeast-3.amazonaws.com s3-ap-south-1.amazonaws.com s3-ap-southeast-1.amazonaws.com s3-ap-southeast-2.amazonaws.com s3-ca-central-1.amazonaws.com s3-eu-central-1.amazonaws.com +s3-eu-north-1.amazonaws.com s3-eu-west-1.amazonaws.com s3-eu-west-2.amazonaws.com s3-eu-west-3.amazonaws.com s3-external-1.amazonaws.com +s3-fips-us-gov-east-1.amazonaws.com s3-fips-us-gov-west-1.amazonaws.com +mrap.accesspoint.s3-global.amazonaws.com +s3-me-south-1.amazonaws.com s3-sa-east-1.amazonaws.com s3-us-east-2.amazonaws.com +s3-us-gov-east-1.amazonaws.com s3-us-gov-west-1.amazonaws.com s3-us-west-1.amazonaws.com s3-us-west-2.amazonaws.com @@ -11408,23 +11703,182 @@ s3-website-ap-southeast-2.amazonaws.com s3-website-eu-west-1.amazonaws.com s3-website-sa-east-1.amazonaws.com s3-website-us-east-1.amazonaws.com +s3-website-us-gov-west-1.amazonaws.com s3-website-us-west-1.amazonaws.com s3-website-us-west-2.amazonaws.com s3.dualstack.sa-east-1.amazonaws.com +s3-accesspoint.dualstack.sa-east-1.amazonaws.com +s3-website.dualstack.sa-east-1.amazonaws.com +s3.sa-east-1.amazonaws.com +s3-accesspoint.sa-east-1.amazonaws.com +s3-object-lambda.sa-east-1.amazonaws.com +s3-website.sa-east-1.amazonaws.com s3.dualstack.us-east-1.amazonaws.com +s3-accesspoint.dualstack.us-east-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com +s3-fips.dualstack.us-east-1.amazonaws.com +s3-website.dualstack.us-east-1.amazonaws.com +s3.us-east-1.amazonaws.com +s3-accesspoint.us-east-1.amazonaws.com +s3-accesspoint-fips.us-east-1.amazonaws.com +s3-deprecated.us-east-1.amazonaws.com +s3-fips.us-east-1.amazonaws.com +s3-object-lambda.us-east-1.amazonaws.com +s3-website.us-east-1.amazonaws.com s3.dualstack.us-east-2.amazonaws.com +s3-accesspoint.dualstack.us-east-2.amazonaws.com +s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com +s3-fips.dualstack.us-east-2.amazonaws.com s3.us-east-2.amazonaws.com +s3-accesspoint.us-east-2.amazonaws.com +s3-accesspoint-fips.us-east-2.amazonaws.com +s3-deprecated.us-east-2.amazonaws.com +s3-fips.us-east-2.amazonaws.com +s3-object-lambda.us-east-2.amazonaws.com s3-website.us-east-2.amazonaws.com +s3.dualstack.us-gov-east-1.amazonaws.com +s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com +s3-fips.dualstack.us-gov-east-1.amazonaws.com +s3.us-gov-east-1.amazonaws.com +s3-accesspoint.us-gov-east-1.amazonaws.com +s3-accesspoint-fips.us-gov-east-1.amazonaws.com +s3-fips.us-gov-east-1.amazonaws.com +s3-object-lambda.us-gov-east-1.amazonaws.com +s3-website.us-gov-east-1.amazonaws.com +s3.dualstack.us-gov-west-1.amazonaws.com +s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com +s3-fips.dualstack.us-gov-west-1.amazonaws.com +s3.us-gov-west-1.amazonaws.com +s3-accesspoint.us-gov-west-1.amazonaws.com +s3-accesspoint-fips.us-gov-west-1.amazonaws.com +s3-fips.us-gov-west-1.amazonaws.com +s3-object-lambda.us-gov-west-1.amazonaws.com +s3-website.us-gov-west-1.amazonaws.com +s3.dualstack.us-west-1.amazonaws.com +s3-accesspoint.dualstack.us-west-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com +s3-fips.dualstack.us-west-1.amazonaws.com +s3-website.dualstack.us-west-1.amazonaws.com +s3.us-west-1.amazonaws.com +s3-accesspoint.us-west-1.amazonaws.com +s3-accesspoint-fips.us-west-1.amazonaws.com +s3-fips.us-west-1.amazonaws.com +s3-object-lambda.us-west-1.amazonaws.com +s3-website.us-west-1.amazonaws.com +s3.dualstack.us-west-2.amazonaws.com +s3-accesspoint.dualstack.us-west-2.amazonaws.com +s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com +s3-fips.dualstack.us-west-2.amazonaws.com +s3-website.dualstack.us-west-2.amazonaws.com +s3.us-west-2.amazonaws.com +s3-accesspoint.us-west-2.amazonaws.com +s3-accesspoint-fips.us-west-2.amazonaws.com +s3-deprecated.us-west-2.amazonaws.com +s3-fips.us-west-2.amazonaws.com +s3-object-lambda.us-west-2.amazonaws.com +s3-website.us-west-2.amazonaws.com + +// Amazon SageMaker Notebook Instances +// Submitted by AWS Security +// Reference: fe8c9e94-5a22-486d-8750-991a3a9b13c6 +notebook.af-south-1.sagemaker.aws +notebook.ap-east-1.sagemaker.aws +notebook.ap-northeast-1.sagemaker.aws +notebook.ap-northeast-2.sagemaker.aws +notebook.ap-northeast-3.sagemaker.aws +notebook.ap-south-1.sagemaker.aws +notebook.ap-south-2.sagemaker.aws +notebook.ap-southeast-1.sagemaker.aws +notebook.ap-southeast-2.sagemaker.aws +notebook.ap-southeast-3.sagemaker.aws +notebook.ap-southeast-4.sagemaker.aws +notebook.ca-central-1.sagemaker.aws +notebook.eu-central-1.sagemaker.aws +notebook.eu-central-2.sagemaker.aws +notebook.eu-north-1.sagemaker.aws +notebook.eu-south-1.sagemaker.aws +notebook.eu-south-2.sagemaker.aws +notebook.eu-west-1.sagemaker.aws +notebook.eu-west-2.sagemaker.aws +notebook.eu-west-3.sagemaker.aws +notebook.il-central-1.sagemaker.aws +notebook.me-central-1.sagemaker.aws +notebook.me-south-1.sagemaker.aws +notebook.sa-east-1.sagemaker.aws +notebook.us-east-1.sagemaker.aws +notebook-fips.us-east-1.sagemaker.aws +notebook.us-east-2.sagemaker.aws +notebook-fips.us-east-2.sagemaker.aws +notebook.us-gov-east-1.sagemaker.aws +notebook-fips.us-gov-east-1.sagemaker.aws +notebook.us-gov-west-1.sagemaker.aws +notebook-fips.us-gov-west-1.sagemaker.aws +notebook.us-west-1.sagemaker.aws +notebook.us-west-2.sagemaker.aws +notebook-fips.us-west-2.sagemaker.aws +notebook.cn-north-1.sagemaker.com.cn +notebook.cn-northwest-1.sagemaker.com.cn + +// Amazon SageMaker Studio +// Submitted by AWS Security +// Reference: 057ee397-6bf8-4f20-b807-d7bc145ac980 +studio.af-south-1.sagemaker.aws +studio.ap-east-1.sagemaker.aws +studio.ap-northeast-1.sagemaker.aws +studio.ap-northeast-2.sagemaker.aws +studio.ap-northeast-3.sagemaker.aws +studio.ap-south-1.sagemaker.aws +studio.ap-southeast-1.sagemaker.aws +studio.ap-southeast-2.sagemaker.aws +studio.ap-southeast-3.sagemaker.aws +studio.ca-central-1.sagemaker.aws +studio.eu-central-1.sagemaker.aws +studio.eu-north-1.sagemaker.aws +studio.eu-south-1.sagemaker.aws +studio.eu-west-1.sagemaker.aws +studio.eu-west-2.sagemaker.aws +studio.eu-west-3.sagemaker.aws +studio.il-central-1.sagemaker.aws +studio.me-central-1.sagemaker.aws +studio.me-south-1.sagemaker.aws +studio.sa-east-1.sagemaker.aws +studio.us-east-1.sagemaker.aws +studio.us-east-2.sagemaker.aws +studio.us-gov-east-1.sagemaker.aws +studio-fips.us-gov-east-1.sagemaker.aws +studio.us-gov-west-1.sagemaker.aws +studio-fips.us-gov-west-1.sagemaker.aws +studio.us-west-1.sagemaker.aws +studio.us-west-2.sagemaker.aws +studio.cn-north-1.sagemaker.com.cn +studio.cn-northwest-1.sagemaker.com.cn // Analytics on AWS // Submitted by AWS Security -// Reference: c02c3a80-f8a0-4fd2-b719-48ea8b7c28de +// Reference: 955f9f40-a495-4e73-ae85-67b77ac9cadd analytics-gateway.ap-northeast-1.amazonaws.com +analytics-gateway.ap-northeast-2.amazonaws.com +analytics-gateway.ap-south-1.amazonaws.com +analytics-gateway.ap-southeast-1.amazonaws.com +analytics-gateway.ap-southeast-2.amazonaws.com +analytics-gateway.eu-central-1.amazonaws.com analytics-gateway.eu-west-1.amazonaws.com analytics-gateway.us-east-1.amazonaws.com analytics-gateway.us-east-2.amazonaws.com analytics-gateway.us-west-2.amazonaws.com +// AWS Amplify +// Submitted by AWS Security +// Reference: 5ecce854-c033-4fc4-a755-1a9916d9a9bb +*.amplifyapp.com + +// AWS App Runner +// Submitted by AWS Security +// Reference: 6828c008-ba5d-442f-ade5-48da4e7c2316 +*.awsapprunner.com + // AWS Cloud9 // Submitted by: AWS Security // Reference: 05c44955-977c-4b57-938a-f2af92733f9f @@ -11493,25 +11947,33 @@ vfs.cloud9.us-west-2.amazonaws.com webview-assets.cloud9.us-west-2.amazonaws.com // AWS Elastic Beanstalk -// Submitted by Luke Wells -// Reference: aa202394-43a0-4857-b245-8db04549137e +// Submitted by AWS Security +// Reference: bb5a965c-dec3-4967-aa22-e306ad064797 cn-north-1.eb.amazonaws.com.cn cn-northwest-1.eb.amazonaws.com.cn elasticbeanstalk.com +af-south-1.elasticbeanstalk.com +ap-east-1.elasticbeanstalk.com ap-northeast-1.elasticbeanstalk.com ap-northeast-2.elasticbeanstalk.com ap-northeast-3.elasticbeanstalk.com ap-south-1.elasticbeanstalk.com ap-southeast-1.elasticbeanstalk.com ap-southeast-2.elasticbeanstalk.com +ap-southeast-3.elasticbeanstalk.com ca-central-1.elasticbeanstalk.com eu-central-1.elasticbeanstalk.com +eu-north-1.elasticbeanstalk.com +eu-south-1.elasticbeanstalk.com eu-west-1.elasticbeanstalk.com eu-west-2.elasticbeanstalk.com eu-west-3.elasticbeanstalk.com +il-central-1.elasticbeanstalk.com +me-south-1.elasticbeanstalk.com sa-east-1.elasticbeanstalk.com us-east-1.elasticbeanstalk.com us-east-2.elasticbeanstalk.com +us-gov-east-1.elasticbeanstalk.com us-gov-west-1.elasticbeanstalk.com us-west-1.elasticbeanstalk.com us-west-2.elasticbeanstalk.com @@ -12727,7 +13189,7 @@ shw.io // Submitted by Jonathan Rudenberg flynnhosting.net -// Forgerock : https://www.forgerock.com +// Forgerock : https://www.forgerock.com // Submitted by Roderick Parr forgeblocks.com id.forgerock.io @@ -12774,7 +13236,7 @@ freemyip.com // Submitted by Daniel A. Maierhofer wien.funkfeuer.at -// Futureweb OG : http://www.futureweb.at +// Futureweb GmbH : https://www.futureweb.at // Submitted by Andreas Schnederle-Wagner *.futurecms.at *.ex.futurecms.at @@ -13619,6 +14081,10 @@ azurestaticapps.net 1.azurestaticapps.net 2.azurestaticapps.net 3.azurestaticapps.net +4.azurestaticapps.net +5.azurestaticapps.net +6.azurestaticapps.net +7.azurestaticapps.net centralus.azurestaticapps.net eastasia.azurestaticapps.net eastus2.azurestaticapps.net @@ -13699,6 +14165,9 @@ sa.ngrok.io us.ngrok.io ngrok.pizza +// Nicolaus Copernicus University in Torun - MSK TORMAN (https://www.man.torun.pl) +torun.pl + // Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/ // Submitted by Nicholas Ford nh-serv.co.uk commit 7d283ca1a32d1005ab3b7986692d91ee071ebde7 Author: Stefan Kangas Date: Sun Dec 10 14:05:34 2023 +0100 ; Fix a few more typos diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index f09ee0afbf4..f6f9e56e0c7 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -4514,7 +4514,7 @@ Other Selections Selections under such window systems as MS-Windows, Nextstep, Haiku and Android are not aligned with those under X@. Each of these window system improvises its own selection mechanism without employing the -``selection converter'' mechanism illustrated in the preceeding node. +``selection converter'' mechanism illustrated in the preceding node. Only the @code{PRIMARY}, @code{CLIPBOARD}, and @code{SECONDARY} selections are generally supported, with the @code{XdndSelection} selection that records drag-and-drop data also available under @@ -4852,7 +4852,7 @@ Drag and Drop sometimes distinct from those provided by the ICCCM and conforming clipboard or primary selection owners. Frequently, the name of a MIME type, such as @code{"text/plain;charset=utf-8"} (with discrepant -capitalization of the ``utf-8''), is substitued for a standard X +capitalization of the ``utf-8''), is substituted for a standard X selection name such as @code{UTF8_STRING}. @cindex XDS diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index 2c446913eba..3c9e6eb215f 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java @@ -428,7 +428,7 @@ private static class Coordinate manager = EmacsWindowAttachmentManager.MANAGER; /* If parent is the root window, notice that there are new - children available for interested activites to pick + children available for interested activities to pick up. */ manager.registerWindow (EmacsWindow.this); diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 616129bf780..62fdc0ad6e8 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2189,7 +2189,7 @@ erc-modules move-to-prompt) (const :tag "netsplit: Detect netsplits" netsplit) (const :tag "networks: Provide data about IRC networks" networks) - (const :tag "nickbar: Show nicknames in a dyamic side window" nickbar) + (const :tag "nickbar: Show nicknames in a dynamic side window" nickbar) (const :tag "nicks: Uniquely colorize nicknames in target buffers" nicks) (const :tag "noncommands: Deprecated. See module `command-indicator'." noncommands) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 509b2d31819..67e5bda021b 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -92,7 +92,7 @@ eshell-rm-removes-directories :group 'eshell-unix) (define-widget 'eshell-interactive-query 'radio - "When to interatively query the user about a particular operation. + "When to interactively query the user about a particular operation. If t, always query. If nil, never query. If `root', query when the user is logged in as root (including when `default-directory' is remote with a root user)." diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 660b5f53a5f..a7ead1f2997 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1239,7 +1239,7 @@ tramp-sh-handle-file-truename (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-min)) (tramp-set-file-property v localname "file-symlink-marker" (read (current-buffer))) - ;; We cannote call `read', the file name isn't quoted. + ;; We cannot call `read', the file name isn't quoted. (forward-line) (buffer-substring (point) (line-end-position)))) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 836db83c2f3..e913d37371a 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -1801,7 +1801,7 @@ hif-macro-supply-arguments actual-parms nil))) (t - (error "Interal error: impossible case.")))) + (error "Internal error: impossible case")))) (pop actual-parms) while actual-parms) ; end cl-loop diff --git a/lisp/transient.el b/lisp/transient.el index ebf6f23f6cd..93c68f8162b 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3566,7 +3566,7 @@ transient--separator-line (propertize "\n" 'face face 'line-height t)))) (defmacro transient-with-shadowed-buffer (&rest body) - "While in the transient buffer, temporarly make the shadowed buffer current." + "While in the transient buffer, temporarily make the shadowed buffer current." (declare (indent 0) (debug t)) `(with-current-buffer (or transient--shadowed-buffer (current-buffer)) ,@body)) diff --git a/src/sfnt.c b/src/sfnt.c index 238e7f48420..44906b12ce9 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -2783,7 +2783,7 @@ sfnt_decompose_compound_glyph (struct sfnt_glyph *glyph, else { /* The offset is determined by matching a point location in - a preceeding component with a point location in the + a preceding component with a point location in the current component. The index of the point in the previous component can be determined by adding component->argument1.a or component->argument1.c to @@ -11880,7 +11880,7 @@ sfnt_interpret_compound_glyph_1 (struct sfnt_glyph *glyph, else { /* The offset is determined by matching a point location in - a preceeding component with a point location in the + a preceding component with a point location in the current component. The index of the point in the previous component is established by adding component->argument1.a or component->argument1.c to diff --git a/src/treesit.c b/src/treesit.c index 912f4ed47cc..b8de95ec691 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -3286,7 +3286,7 @@ treesit_traverse_get_predicate (Lisp_Object thing, Lisp_Object language) there's an error, set SIGNAL_DATA to (ERR . DATA), where ERR is an error symbol, and DATA is something signal accepts, and return false, otherwise return true. This function also check for - recusion levels: we place a arbitrary 100 level limit on recursive + recursion levels: we place a arbitrary 100 level limit on recursive predicates. RECURSION_LEVEL is the current recursion level (that starts at 0), if it goes over 99, return false and set SIGNAL_DATA. LANGUAGE is a LANGUAGE symbol. */ commit 06a12b0cccbda419752f3388346be7d302ebcbeb Author: Stefan Kangas Date: Sun Dec 10 13:22:04 2023 +0100 ; Fix typos diff --git a/ChangeLog.android b/ChangeLog.android index 8cc66c4d7ea..96419ebe351 100644 --- a/ChangeLog.android +++ b/ChangeLog.android @@ -700,7 +700,7 @@ (build-counter.c): New target. Generate this file using makecounter.sh upon changes to lisp.mk or shortlisp. (lisp.mk): Make and load relative to abs_top_builddir. - (emacs$(EXEEXT)): Adjust acordingly. + (emacs$(EXEEXT)): Adjust accordingly. (mostlyclean): Remove build-counter.c. 2023-07-18 Po Lu @@ -735,7 +735,7 @@ prototypes. * java/org/gnu/emacs/EmacsWindow.java (motionEvent): Set - cancelation flag in events sent where appropriate. + cancellation flag in events sent where appropriate. * lisp/touch-screen.el (touch-screen-handle-point-update): Improve treatment of horizontal scrolling near window edges. @@ -749,7 +749,7 @@ (struct android_touch_event): New field `flags'. * src/androidterm.c (handle_one_android_event): Report - cancelation in TOUCHSCREEN_END_EVENTs. + cancellation in TOUCHSCREEN_END_EVENTs. * src/keyboard.c (make_lispy_event): Fix botched merge. @@ -1005,7 +1005,7 @@ * java/org/gnu/emacs/EmacsWindow.java (Coordinate): New fields `button' and `id'. - (): Add new arguments to the construtor. + (): Add new arguments to the constructor. (whatButtonWasIt): Return 0 if the button state has not changed. (buttonForEvent): New function. (figureChange): Return the Coordinate object associated to EVENT. @@ -2384,7 +2384,7 @@ (sfnt_read_avar_table): Fix sequencing problem. * src/sfntfont.c (sfntfont_setup_interpreter): Don't create - interpreter for blatently broken fonts. + interpreter for blatantly broken fonts. (sfntfont_open): Avoid specifying redundant blends. * src/sfnt.c (sfnt_validate_gs): Fix validation of projection @@ -3466,7 +3466,7 @@ (src/verbose.mk): Depend on verbose.mk.android in srcdir. (lib/Makefile): Edit srcdir and VPATH to LIB_SRCDIR. (src/Makefile): Edit -I$$(top_srcdir) to -I../$(srcdir)/lib, - instead of ommitting it. + instead of omitting it. (clean): Allow ndk-build clean to fail. * java/Makefile.in (builddir): New variable. @@ -3714,7 +3714,7 @@ module detection. * src/android.c (android_run_select_thread): Fix typos. - (android_run_select_thread): Lock select_mutex before signalling + (android_run_select_thread): Lock select_mutex before signaling condition variable. (android_select): Unlock event queue mutex prior to waiting for it. @@ -4663,7 +4663,7 @@ (ndk_CONFIG_FILES): Export NDK_BUILD_CFLAGS. * java/AndroidManifest.xml.in: Prevent the Emacs activity from - being overlayed by the emacsclient wrapper. + being overlaid by the emacsclient wrapper. * java/org/gnu/emacs/EmacsOpenActivity.java (run): Likewise. (onCreate): Set an appropriate theme on ICS and up. @@ -5151,7 +5151,7 @@ * m4/ndk-build.m4 (ndk_package_mape): Add package mapping for sqlite3. - * src/Makefile.in (SQLITE3_CFLAGS): New substition. + * src/Makefile.in (SQLITE3_CFLAGS): New substitution. (EMACS_CFLAGS): Add that variable. * src/android.c (android_api_level): New variable. @@ -5532,7 +5532,7 @@ (touch-screen-precision-scroll): New user option. (touch-screen-handle-scroll): Use traditional scrolling by default. - (touch-screen-handle-touch): Adust format of + (touch-screen-handle-touch): Adjust format of touch-screen-current-tool. (touch-screen-track-tap): Don't print waiting for events. (touch-screen-track-drag): Likewise. Also, don't call UPDATE @@ -5555,7 +5555,7 @@ * lisp/ls-lisp.el (ls-lisp-use-insert-directory-program): Default to off on Android. - * src/android.c (android_is_directory): New fucntion. + * src/android.c (android_is_directory): New function. (android_fstatat): Handle directories created by `android_opendir'. (android_open): Return meaningful file mode. @@ -5645,7 +5645,7 @@ * java/org/gnu/emacs/EmacsNative.java (EmacsNative): Make all event sending functions return long. - * java/org/gnu/emacs/EmacsPreferencesActivity.java: New fle. + * java/org/gnu/emacs/EmacsPreferencesActivity.java: New file. * java/org/gnu/emacs/EmacsService.java (EmacsService) (onStartCommand, onCreate, startEmacsService): Start as a @@ -6310,7 +6310,7 @@ and `detectMouse'. (struct android_event_queue, android_init_events) (android_next_event, android_write_event): Remove write limit. - (android_file_access_p): Handle directories correcty. + (android_file_access_p): Handle directories correctly. (android_close): Fix coding style. (android_fclose): New function. (android_init_emacs_service): Initialize new methods. diff --git a/admin/notes/java b/admin/notes/java index 125ac0aad67..6a66d1aa765 100644 --- a/admin/notes/java +++ b/admin/notes/java @@ -15,7 +15,7 @@ Java is required because the entire Android runtime is based around Java, and there is no way to write an Android program which runs without Java. -This text exists to prime other Emacs developers, already familar with +This text exists to prime other Emacs developers, already familiar with C, on the basic architecture of the Android port, and to teach them how to read and write the Java code found in this directory. @@ -570,7 +570,7 @@ Let us go back and review the definition of ``startEmacsService'': context.startService (new Intent (context, EmacsService.class)); else - /* Display the permanant notification and start Emacs as a + /* Display the permanent notification and start Emacs as a foreground service. */ context.startForegroundService (new Intent (context, EmacsService.class)); @@ -796,7 +796,7 @@ Next, `max_handle' is saved, and a new handle is allocated for if (!window) error ("Out of window handles!"); -An error is signalled if Emacs runs out of available handles. +An error is signaled if Emacs runs out of available handles. if (!class) { diff --git a/configure.ac b/configure.ac index 759dcd14d50..a279f78a0ea 100644 --- a/configure.ac +++ b/configure.ac @@ -306,7 +306,7 @@ AC_DEFUN dnl OPTION_DEFAULT_IFAVAILABLE(NAME, HELP-STRING) dnl Create a new --with option that defaults to 'ifavailable', -dnl unless it is overriden by $with_features being equal to 'no'. +dnl unless it is overridden by $with_features being equal to 'no'. dnl NAME is the base name of the option. The shell variable with_NAME dnl will be set to either the user's value (if the option is dnl specified; 'yes' for a plain --with-NAME) or to 'ifavailable' (if the diff --git a/cross/ndk-build/README b/cross/ndk-build/README index aca2e7230bf..d6cf2908014 100644 --- a/cross/ndk-build/README +++ b/cross/ndk-build/README @@ -86,7 +86,7 @@ $(ANDROID_MAKEFILE), the ``Android.mk'' file, for the first time. The purpose of this evaluation is to establish a list of packages (or modules) provided by the ``Android.mk'' file, and the corresponding Makefile targets and compiler and linker flags required to build and -link to those tagets. +link to those targets. Before doing so, build-aux/ndk-build-helper.mk will define several variables and functions required by all ``Android.mk'' files. The @@ -164,7 +164,7 @@ module_cxx_deps="" module_imports="" which is then evaluated by `configure'. Once the variable -`module_name' is set, configure apends the remaining +`module_name' is set, configure appends the remaining $(module_includes), $(module_cflags) and $(module_ldflags) to the module's CFLAGS and LIBS variables, and appends the list of Makefile targets specified to the variable NDK_BUILD_MODULES. diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 52912d045eb..fe73bc09d67 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -234,7 +234,7 @@ Android File System the (normally read-only) root directory named @file{content} or @file{assets}, you may want to access real files by these names if the Android installation in use has been customized. These files will -conflict with the aformentioned special directories, but can +conflict with the aforementioned special directories, but can nevertheless be accessed by writing their names relative to the ``parent'' directory of the root directory, as so illustrated: @file{/../content}, @file{/../assets}. @@ -258,7 +258,7 @@ Android File System traditional location within the parent of the app data directory. If Emacs is reinstalled and the location of the app library -directory consequentially changes, that symlink will also be updated +directory consequently changes, that symlink will also be updated to point to its new location the next time Emacs is started by the system. @@ -340,7 +340,7 @@ Android Environment System}.)@footnote{Except in cases where a ``shared user ID'' is specified and other applications signed using the same ``package signing key'' are installed, in which case Emacs runs as the same user -and has access to the same files as each of the aformentioned +and has access to the same files as each of the aforementioned applications.} Each application is also prohibited from accessing many system diff --git a/doc/emacs/haiku.texi b/doc/emacs/haiku.texi index 0bb216c14ae..e129fd6f33f 100644 --- a/doc/emacs/haiku.texi +++ b/doc/emacs/haiku.texi @@ -10,7 +10,7 @@ Haiku This appendix describes the peculiarities of using Emacs built with the Application Kit, the windowing system indigenous to Haiku. The -idiosyncracies illustrated here do not apply to Emacs on Haiku built +idiosyncrasies illustrated here do not apply to Emacs on Haiku built without windowing support, or configured with X11. @menu diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index f6462a9e50b..b4226a9ec6f 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2151,7 +2151,7 @@ Touchscreen Events translation if @code{down-mouse-1} is bound to a keymap, making it a prefix key. In lieu of simple translation, it translates the closing @code{touchscreen-end} to a @code{down-mouse-1} event with the -starting position of the touch sequence, consequentially displaying +starting position of the touch sequence, consequently displaying the mouse menu. @cindex @code{mouse-1-menu-command}, a symbol property @@ -2205,7 +2205,7 @@ Touchscreen Events @item (touchscreen-restart-drag @var{posn}) This event is sent upon the start of a touch sequence resulting in the continuation of a ``drag-to-select'' gesture (subject to the -aformentioned user option) with @var{posn} set to the position list of +aforementioned user option) with @var{posn} set to the position list of the initial @code{touchscreen-begin} event within that touch sequence. @cindex @code{touchscreen-pinch} event diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ec6f7fd9462..f09ee0afbf4 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -4160,7 +4160,7 @@ X Selections server, owner and requestor. @end itemize - The selection owner responds by tranferring to the requestor a + The selection owner responds by transferring to the requestor a series of bytes, 16 bit words, or 32 bit words, along with another atom identifying the type of those words. After requesting a selection, Emacs then applies its own interpretation of the data diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index ba7f1ca692e..03c221c6cf6 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1564,7 +1564,7 @@ High-Level Completion value is also displayed in the echo area. The optional arguments @var{foreground} and @var{face} control the -appearence of the completion candidates in the @file{*Completions*} +appearance of the completion candidates in the @file{*Completions*} buffer. The candidates are displayed in the specified @var{face} but with different colors: if @var{foreground} is non-@code{nil}, the foreground color is changed to be the color of the candidate, diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index cb269fcacc5..1a898828eb1 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -2990,7 +2990,7 @@ POSIX Regexps @section Emacs versus POSIX Regular Expressions @cindex POSIX regular expressions -Regular expression syntax varies signficantly among computer programs. +Regular expression syntax varies significantly among computer programs. When writing Elisp code that generates regular expressions for use by other programs, it is helpful to know how syntax variants differ. To give a feel for the variation, this section discusses how diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 5d05ef18d4f..b17eb087f42 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -6205,7 +6205,7 @@ Atomic Changes If @code{buffer-undo-list} no longer contains that cons, Emacs will lose track of any change groups, resulting in an error when the change -group is cancelled. To avoid this, do not call any functions which +group is canceled. To avoid this, do not call any functions which may edit the undo list in such a manner, when a change group is active: notably, ``amalgamating'' commands such as @code{delete-char}, which call @code{undo-auto-amalgamate}. diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 892ff4dd5e4..a0adb5fea2c 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -954,7 +954,7 @@ Syntax Highlighting Tests Test assertion parser extracts tests from comment-only lines. Every comment assertion line starts either with a caret (@samp{^}) or an -arrow (@samp{<-}). A caret/arrow should be followed immedately by the +arrow (@samp{<-}). A caret/arrow should be followed immediately by the name of a face to be checked. The test then checks if the first non-assertion column above the caret diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 7eedc97ab04..bdcb0793098 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -90,7 +90,7 @@ The Modus themes consist of eight themes, divided into four subgroups. are variants of the two main themes. They slightly tone down the intensity of the background and provide a bit more color variety. ~modus-operandi-tinted~ has a set of base tones that are shades of - light ochre (earthly colors), while ~modus-vivendi-tinted~ gives a + light ocher (earthly colors), while ~modus-vivendi-tinted~ gives a night sky impression. - Deuteranopia themes :: ~modus-operandi-deuteranopia~ and its @@ -2518,7 +2518,7 @@ manual, here is what Protesilaos uses: ;; Add a nuanced background as well. (bg-prompt bg-magenta-nuanced) (fg-prompt magenta-cooler) - ;; Tweak some more constructs for stylistic constistency. + ;; Tweak some more constructs for stylistic consistency. (name blue-warmer) (identifier magenta-faint) (keybind magenta-cooler) @@ -2717,7 +2717,7 @@ For a more elaborate design, it is better to inspect the source code of [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Use theme colors in code with modus-themes-with-colors]]. #+findex: modus-themes-get-color-value -The fuction ~modus-themes-get-color-value~ can be called from Lisp to +The function ~modus-themes-get-color-value~ can be called from Lisp to return the value of a color from the active Modus theme palette. It takea a =COLOR= argument and an optional =OVERRIDES=. @@ -2886,7 +2886,7 @@ above: The reason we no longer provide this option is because it depends on a non-~nil~ value for ~x-underline-at-descent-line~. That variable affects ALL underlines, including those of links. The effect is -intrusive and looks awkard in prose. +intrusive and looks awkward in prose. As such, the Modus themes no longer provide that option but instead offer this piece of documentation to make the user fully aware of the @@ -3229,7 +3229,7 @@ specification of that variable looks like this: With the exception of ~org-verbatim~ and ~org-code~ faces, everything else uses the corresponding type of emphasis: a bold typographic weight, or -italicised, underlined, and struck through text. +italicized, underlined, and struck through text. The best way for users to add some extra attributes, such as a foreground color, is to define their own faces and assign them to the @@ -5132,7 +5132,7 @@ it is already understood that one must follow the indicator or headline to view its contents and (ii) underlining everything would make the interface virtually unusable. -Again, one must exercise judgement in order to avoid discrimination, +Again, one must exercise judgment in order to avoid discrimination, where "discrimination" refers to: + The treatment of substantially different magnitudes as if they were of @@ -5206,7 +5206,7 @@ the themes, which is partially fleshed out in this manual. With regard to the artistic aspect (where "art" qua skill may amount to an imprecise science), there is no hard-and-fast rule in effect as it -requires one to exercize discretion and make decisions based on +requires one to exercise discretion and make decisions based on context-dependent information or constraints. As is true with most things in life, when in doubt, do not cling on to the letter of the law but try to understand its spirit. diff --git a/etc/DEBUG b/etc/DEBUG index 5aeb38c6460..86bff45e7d9 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -1142,7 +1142,7 @@ one to upload, like so: ../java/debug.sh --gdbserver /path/to/gdbserver This Gdbserver should be statically linked or compiled using the -Android NDK, and must target the same architecture as the debugee +Android NDK, and must target the same architecture as the debugged Emacs binary. Older versions of the Android NDK (such as r24) distribute suitable Gdbserver binaries, usually located within diff --git a/etc/NEWS b/etc/NEWS index fbfe1084b8f..33afb34b029 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1224,7 +1224,7 @@ This user option has been obsoleted in Emacs 27, use --- ** User options 'eshell-NAME-unload-hook' are now obsolete. These hooks were named incorrectly, and so they never actually ran -when unloading the correspending feature. Instead, you should use +when unloading the corresponding feature. Instead, you should use hooks named after the feature name, like 'esh-mode-unload-hook'. +++ diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 7159fe32c1c..e42e3c4d87a 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3539,7 +3539,7 @@ The Microsoft scaler and FreeType promptly disregard such points. Nothing in the TrueType specifications implies that points "hidden" in this fashion should be afforded any special treatment, and thus Emacs -eschews doing so. Consequentially, black streaks are displayed as +eschews doing so. Consequently, black streaks are displayed as Emacs interpolates glyph edges between points within the glyph and points the test font attempts to hide. diff --git a/etc/themes/modus-operandi-tinted-theme.el b/etc/themes/modus-operandi-tinted-theme.el index e66a030650c..1ef7af8f165 100644 --- a/etc/themes/modus-operandi-tinted-theme.el +++ b/etc/themes/modus-operandi-tinted-theme.el @@ -1,4 +1,4 @@ -;;; modus-operandi-tinted-theme.el --- Elegant, highly legible theme with a light ochre background -*- lexical-binding:t -*- +;;; modus-operandi-tinted-theme.el --- Elegant, highly legible theme with a light ocher background -*- lexical-binding:t -*- ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. @@ -44,7 +44,7 @@ ;;;###theme-autoload (deftheme modus-operandi-tinted - "Elegant, highly legible theme with a light ochre background. + "Elegant, highly legible theme with a light ocher background. Conforms with the highest legibility standard for color contrast between background and foreground in any given piece of text, which corresponds to a minimum contrast in relative luminance of diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el index 34130a05515..0f7bc025b72 100644 --- a/etc/themes/modus-themes.el +++ b/etc/themes/modus-themes.el @@ -1535,7 +1535,7 @@ modus-themes--prompt :foreground fg :weight ;; If we have `bold' specifically, we inherit the face of - ;; the same name. This allows the user to customise that + ;; the same name. This allows the user to customize that ;; face, such as to change its font family. (if (and weight (not (eq weight 'bold))) weight diff --git a/exec/exec1.c b/exec/exec1.c index d77ca8adf54..6ec4b3ecaae 100644 --- a/exec/exec1.c +++ b/exec/exec1.c @@ -53,7 +53,7 @@ main (int argc, char **argv) tracing_execve (argv[2], argv + 2, environ); - /* An error occured. Exit with failure. */ + /* An error occurred. Exit with failure. */ exit (127); } else diff --git a/exec/trace.c b/exec/trace.c index f9deef8eb2d..ccf498f39fe 100644 --- a/exec/trace.c +++ b/exec/trace.c @@ -1028,7 +1028,7 @@ process_system_call (struct exec_tracee *tracee) break; case 1: - /* An error has occured; errno is set to the error. */ + /* An error has occurred; errno is set to the error. */ goto report_syscall_error; } diff --git a/java/INSTALL b/java/INSTALL index fb221c5e2b4..60171ada57c 100644 --- a/java/INSTALL +++ b/java/INSTALL @@ -167,7 +167,7 @@ than a compressed package for a newer version of Android. BUILDING C++ DEPENDENCIES With a new version of the NDK, dependencies containing C++ code should -build without any futher configuration. However, older versions +build without any further configuration. However, older versions require that you use the ``make_standalone_toolchain.py'' script in the NDK distribution to create a ``standalone toolchain'', and use that instead, in order for C++ headers to be found. @@ -309,7 +309,7 @@ work, along with what has to be patched to make them work: Many of these dependencies have been migrated over to the ``Android.bp'' build system now used to build Android itself. However, the old ``Android.mk'' Makefiles are still present in older -branches, and can be easily adapte to newer versions. +branches, and can be easily adapted to newer versions. In addition, some Emacs dependencies provide `ndk-build' support themselves: diff --git a/java/org/gnu/emacs/EmacsContextMenu.java b/java/org/gnu/emacs/EmacsContextMenu.java index c415ba59c79..2652f35b545 100644 --- a/java/org/gnu/emacs/EmacsContextMenu.java +++ b/java/org/gnu/emacs/EmacsContextMenu.java @@ -36,7 +36,7 @@ import android.util.Log; /* Context menu implementation. This object is built from JNI and - describes a menu hiearchy. Then, `inflate' can turn it into an + describes a menu hierarchy. Then, `inflate' can turn it into an Android menu, which can be turned into a popup (or other kind of) menu. */ diff --git a/java/org/gnu/emacs/EmacsInputConnection.java b/java/org/gnu/emacs/EmacsInputConnection.java index 7f6331205cb..4b493dcc456 100644 --- a/java/org/gnu/emacs/EmacsInputConnection.java +++ b/java/org/gnu/emacs/EmacsInputConnection.java @@ -60,7 +60,7 @@ public final class EmacsInputConnection implements InputConnection This helps with on screen keyboard programs found in some vendor versions of Android, which rely on immediate updates to the point - position after text is commited in order to place the cursor + position after text is committed in order to place the cursor within that text. */ private static boolean syncAfterCommit; diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java b/java/org/gnu/emacs/EmacsOpenActivity.java index 32a79d1a797..b4fd68146be 100644 --- a/java/org/gnu/emacs/EmacsOpenActivity.java +++ b/java/org/gnu/emacs/EmacsOpenActivity.java @@ -636,7 +636,7 @@ private class EmacsClientThread extends Thread { /* This means Emacs lacks the rights to open this file. Display the error message and exit. */ - displayFailureDialog ("Error openining file", + displayFailureDialog ("Error opening file", exception.toString ()); return; } diff --git a/java/org/gnu/emacs/EmacsSafThread.java b/java/org/gnu/emacs/EmacsSafThread.java index 7917e2d4880..8bb84126b07 100644 --- a/java/org/gnu/emacs/EmacsSafThread.java +++ b/java/org/gnu/emacs/EmacsSafThread.java @@ -767,7 +767,7 @@ Call this when the contents of a file (i.e. the constituents of a private abstract class SafIntFunction { - /* The ``throws Throwable'' here is a Java idiosyncracy that tells + /* The ``throws Throwable'' here is a Java idiosyncrasy that tells the compiler to allow arbitrary error objects to be signaled from within this function. @@ -782,7 +782,7 @@ public abstract int runInt (CancellationSignal signal) private abstract class SafObjectFunction { - /* The ``throws Throwable'' here is a Java idiosyncracy that tells + /* The ``throws Throwable'' here is a Java idiosyncrasy that tells the compiler to allow arbitrary error objects to be signaled from within this function. @@ -1216,7 +1216,7 @@ type is either NULL (in which case id should also be NULL) or }); } - /* The bulk of `statDocument'. SIGNAL should be a cancelation + /* The bulk of `statDocument'. SIGNAL should be a cancellation signal. */ private long[] diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 33832505333..c71670b3e47 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -612,7 +612,7 @@ invocation of app_process (through android-emacs) can context.startService (new Intent (context, EmacsService.class)); else - /* Display the permanant notification and start Emacs as a + /* Display the permanent notification and start Emacs as a foreground service. */ context.startForegroundService (new Intent (context, EmacsService.class)); @@ -679,7 +679,7 @@ invocation of app_process (through android-emacs) can /* Display a list of programs able to send this URL. */ intent = Intent.createChooser (intent, "Send"); - /* Apparently flags need to be set after a choser is + /* Apparently flags need to be set after a chooser is created. */ intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK); } @@ -927,7 +927,7 @@ invocation of app_process (through android-emacs) can if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) /* Since the system predates drag and drop, return this resolver - to avoid any unforseen difficulties. */ + to avoid any unforeseen difficulties. */ return resolver; activity = EmacsActivity.lastFocusedActivity; @@ -947,7 +947,7 @@ invocation of app_process (through android-emacs) can if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) /* Since the system predates drag and drop, return this resolver - to avoid any unforseen difficulties. */ + to avoid any unforeseen difficulties. */ return this; activity = EmacsActivity.lastFocusedActivity; diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java index 2d53231fbf9..5795f476f63 100644 --- a/java/org/gnu/emacs/EmacsView.java +++ b/java/org/gnu/emacs/EmacsView.java @@ -388,7 +388,7 @@ else if (MeasureSpec.getMode (heightMeasureSpec) == MeasureSpec.AT_MOST && !rootWindowInsets.isVisible (WindowInsets.Type.ime ()) /* N.B. that the keyboard is dismissed during gesture navigation under Android 30, but the system is - quite tempermental regarding whether the window is + quite temperamental regarding whether the window is focused at that point. Ideally isCurrentlyTextEditor shouldn't be reset in that case, but detecting that situation appears to be diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index 7d161fdcf88..2c446913eba 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java @@ -1399,7 +1399,7 @@ else if (EmacsWindow.this.isMapped) } /* Effect the same adjustment upon the view - hiearchy. */ + hierarchy. */ EmacsService.SERVICE.runOnUiThread (new Runnable () { @Override diff --git a/lisp/button.el b/lisp/button.el index ed11c9583d8..4d66fc57d87 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -494,7 +494,7 @@ push-button (button-activate str t) (if (eq (car-safe pos) 'touchscreen-down) ;; If touch-screen-track tap returns nil, then the - ;; tap was cancelled. + ;; tap was canceled. (when (touch-screen-track-tap pos nil nil t) (push-button (posn-point posn) t)) (push-button (posn-point posn) t)))))) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 7a61a8fce7e..5a72011c609 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -440,7 +440,7 @@ byte-optimize-form-code-walker (`(unwind-protect ,protected-expr :fun-body ,unwind-fun) ;; FIXME: The return value of UNWIND-FUN is never used so we - ;; could potentially optimise it for-effect, but we don't do + ;; could potentially optimize it for-effect, but we don't do ;; that right no. `(,fn ,(byte-optimize-form protected-expr for-effect) :fun-body ,(byte-optimize-form unwind-fun))) @@ -973,7 +973,7 @@ byte-optimize-binary-predicate (list (car form) (nth 2 form) (nth 1 form))))) (defun byte-opt--nary-comparison (form) - "Optimise n-ary comparisons such as `=', `<' etc." + "Optimize n-ary comparisons such as `=', `<' etc." (let ((nargs (length (cdr form)))) (cond ((= nargs 1) @@ -988,7 +988,7 @@ byte-opt--nary-comparison (if (memq nil (mapcar #'macroexp-copyable-p (cddr form))) ;; At least one arg beyond the first is non-constant non-variable: ;; create temporaries for all args to guard against side-effects. - ;; The optimiser will eliminate trivial bindings later. + ;; The optimizer will eliminate trivial bindings later. (let ((i 1)) (dolist (arg (cdr form)) (let ((var (make-symbol (format "arg%d" i)))) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 64fd4f6b3f3..950ae77803c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3566,7 +3566,7 @@ byte-compile-form (cond ((and sef (or (eq sef 'error-free) byte-compile-delete-errors)) - ;; This transform is normally done in the Lisp optimiser, + ;; This transform is normally done in the Lisp optimizer, ;; so maybe we don't need to bother about it here? (setq form (cons 'progn (cdr form))) (setq handler #'byte-compile-progn)) @@ -3603,7 +3603,7 @@ byte-compile-form (let ((important-return-value-fns '( ;; These functions are side-effect-free except for the - ;; behaviour of functions passed as argument. + ;; behavior of functions passed as argument. mapcar mapcan mapconcat assoc plist-get plist-member @@ -4148,7 +4148,7 @@ byte-compile-cmp (byte-compile-two-args (if (macroexp-const-p (nth 1 form)) ;; First argument is constant: flip it so that the constant - ;; is last, which may allow more lapcode optimisations. + ;; is last, which may allow more lapcode optimizations. (let* ((op (car form)) (flipped-op (cdr (assq op '((< . >) (<= . >=) (> . <) (>= . <=) (= . =)))))) @@ -4312,7 +4312,7 @@ byte-compile-variadic-numeric (arg2 (nth 2 form))) (when (and (memq (car form) '(+ *)) (macroexp-const-p arg1)) - ;; Put constant argument last for better LAP optimisation. + ;; Put constant argument last for better LAP optimization. (cl-rotatef arg1 arg2)) (byte-compile-form arg1) (byte-compile-form arg2) @@ -5326,7 +5326,7 @@ bytecomp--check-cus-type "Warn about common mistakes in the `defcustom' type TYPE." (let ((invalid-types '( - ;; Lisp type predicates, often confused with customisation types: + ;; Lisp type predicates, often confused with customization types: functionp numberp integerp fixnump natnump floatp booleanp characterp listp stringp consp vectorp symbolp keywordp hash-table-p facep diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 2431e658368..7b69404cfac 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3739,7 +3739,7 @@ cl--compiler-macro-get (mapc (lambda (x) (function-put x 'important-return-value t)) '( ;; Functions that are side-effect-free except for the - ;; behaviour of functions passed as argument. + ;; behavior of functions passed as argument. cl-mapcar cl-mapcan cl-maplist cl-map cl-mapcon cl-reduce cl-assoc cl-assoc-if cl-assoc-if-not diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index e28d73c3555..4ee825136c9 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -607,7 +607,7 @@ eldoc--echo-area-prefer-doc-buffer-p (defun eldoc-display-in-echo-area (docs interactive) "Display DOCS in echo area. -INTERACTIVE is non-nil if user explictly invoked ElDoc. Honor +INTERACTIVE is non-nil if user explicitly invoked ElDoc. Honor `eldoc-echo-area-use-multiline-p' and `eldoc-echo-area-prefer-doc-buffer'." (cond @@ -933,7 +933,7 @@ eldoc--invoke-strategy (let* ((eldoc--make-callback #'make-callback) (res (funcall eldoc-documentation-strategy))) ;; Observe the old and the new protocol: - (cond (;; Old protocol: got string, e-d-strategy is iself the + (cond (;; Old protocol: got string, e-d-strategy is itself the ;; origin function, and we output immediately; (stringp res) (register-doc 0 res nil eldoc-documentation-strategy) diff --git a/lisp/emacs-lisp/ert-font-lock.el b/lisp/emacs-lisp/ert-font-lock.el index 6a02cf7acc4..8bde83bf278 100644 --- a/lisp/emacs-lisp/ert-font-lock.el +++ b/lisp/emacs-lisp/ert-font-lock.el @@ -28,7 +28,7 @@ ;; ;; ert-font-lock entry points are functions ;; `ert-font-lock-test-string' and `ert-font-lock-test-file' and -;; covenience macros: `ert-font-lock-deftest' and +;; convenience macros: `ert-font-lock-deftest' and ;; `ert-font-lock-deftest-file'. ;; ;; See unit tests in ert-font-lock-tests.el for usage examples. diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 5d31253fe2d..9f40c1f3c93 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -638,7 +638,7 @@ gv-deref ;;; Generalized variables. -;; You'd think noone would write `(setf (error ...) ..)' but it +;; You'd think no one would write `(setf (error ...) ..)' but it ;; appears naturally as the result of macroexpansion of things like ;; (setf (pcase-exhaustive ...)). ;; We could generalize this to `throw' and `signal', but it seems diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index bc36762cb2d..bef498f997c 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -863,7 +863,7 @@ package-vc-install name, otherwise NAME is the package name as a symbol. PACKAGE can also be a cons cell (PNAME . SPEC) where PNAME is the -package name as a symbol, and SPEC is a plist that specifes how +package name as a symbol, and SPEC is a plist that specifies how to fetch and build the package. For possible values, see the subsection \"Specifying Package Sources\" in the Info node `(emacs)Fetching Package Sources'. diff --git a/lisp/erc/erc-status-sidebar.el b/lisp/erc/erc-status-sidebar.el index d2ecce94bcd..98d5a321385 100644 --- a/lisp/erc/erc-status-sidebar.el +++ b/lisp/erc/erc-status-sidebar.el @@ -130,7 +130,7 @@ erc-status-sidebar-style `erc-status-sidebar-pad-hierarchy' for the above-mentioned purposes. ERC also accepts a list of -functions to preform these roles a la carte. Since the members +functions to perform these roles a la carte. Since the members of the above sets aren't really interoperable, we don't offer them here as customization choices, but you can still specify them manually. See doc strings for a description of their diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 79336204847..9b1bc009079 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -399,7 +399,7 @@ eshell-add-input-to-history ('nil t) ; Always add to history ('erase ; Add, removing any old occurrences (when-let ((old-index (ring-member eshell-history-ring input))) - ;; Remove the old occurence of this input so we can + ;; Remove the old occurrence of this input so we can ;; add it to the end. FIXME: Should we try to ;; remove multiple old occurrences, e.g. if the user ;; recently changed to using `erase'? diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 849a8d8eaee..7726712d056 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -158,7 +158,7 @@ jsonrpc-forget-pending-continuations (defvar jsonrpc-inhibit-debug-on-error nil "Inhibit `debug-on-error' when answering requests. Some extensions, notably ert.el, set `debug-on-error' to non-nil, -which makes it hard to test the behaviour of catching the Elisp +which makes it hard to test the behavior of catching the Elisp error and replying to the endpoint with an JSONRPC-error. This variable can be set around calls like `jsonrpc-request' to circumvent that.") diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e5c5fd62f8c..a9814fb0bac 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1685,7 +1685,7 @@ minibuffer-sort-by-history "Sort COMPLETIONS by their position in `minibuffer-history-variable'. COMPLETIONS are sorted first by `minibuffer-sort-alphbetically', -then any elements occuring in the minibuffer history list are +then any elements occurring in the minibuffer history list are moved to the front based on the chronological order they occur in the history. If a history variable hasn't been specified for this call of `completing-read', COMPLETIONS are sorted only by @@ -4942,7 +4942,7 @@ minibuffer-setup-on-screen-keyboard (defun minibuffer-exit-on-screen-keyboard () "Hide the on-screen keyboard if it was displayed. Hide the on-screen keyboard in a timer set to run in 0.1 seconds. -It will be cancelled if the minibuffer is displayed again within +It will be canceled if the minibuffer is displayed again within that timeframe. Do not hide the on screen keyboard inside a recursive edit. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 9f030b4c743..e0888c61496 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -200,7 +200,7 @@ shr-max-inline-image-size HEIGHT can be also be an integer or a floating point number. If it is an integer and the pixel height of an image exceeds it, the image image is -displyed on a separate line. If it is a float number , the limit is +displayed on a separate line. If it is a float number , the limit is interpreted as a multiple of the height of default font." :version "30.1" :type '(choice (const nil) (cons number number))) diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 379b8b70656..0d79f88f10c 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -856,7 +856,7 @@ tramp-crypt-handle-unlock-file 'unlock-file (tramp-crypt-encrypt-file-name filename)))) (defun tramp-crypt-cleanup-connection (vec) - "Cleanup crypt ressources determined by VEC." + "Cleanup crypt resources determined by VEC." (let ((tramp-cleanup-connection-hook (remove #'tramp-crypt-cleanup-connection tramp-cleanup-connection-hook))) diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 8afc8d5fd87..e05357f1f4f 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -515,7 +515,7 @@ tramp-debug-message-fnh-function Bound in `tramp-*-file-name-handler' functions.") (defun tramp-debug-message-buttonize (position) - "Buttonize function in current buffer, at next line starting after POSTION." + "Buttonize function in current buffer, at next line starting after POSITION." (declare (tramp-suppress-trace t)) (save-excursion (goto-char position) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 018a194ac14..6154253e6b3 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -7554,7 +7554,7 @@ c-ml-string-opener-around-point (defun c-ml-string-opener-intersects-region (&optional start finish) ;; If any part of the region [START FINISH] is inside an ml-string opener, ;; return a dotted list of the start, end and double-quote position of the - ;; first such opener. That list wlll not include any "context characters" + ;; first such opener. That list will not include any "context characters" ;; before or after the opener. If an opener is found, the match-data will ;; indicate it, with (match-string 1) being the entire delimiter, and ;; (match-string 2) the "main" double-quote. Otherwise, the match-data is @@ -9891,7 +9891,7 @@ c-forward-primary-expression ;; Note that this function is incomplete, handling only those cases expected ;; to be common in a C++20 requires clause. ;; - ;; Note also that (...) is not recognised as a primary expression if the + ;; Note also that (...) is not recognized as a primary expression if the ;; next token is an open brace. (let ((here (point)) (c-restricted-<>-arglists t) @@ -13021,7 +13021,7 @@ c-laomib-cache (defun c-laomib-get-cache (containing-sexp start) ;; Get an element from `c-laomib-cache' matching CONTAINING-SEXP, and which - ;; is suitable for start postiion START. + ;; is suitable for start position START. ;; Return that element or nil if one wasn't found. (let ((ptr c-laomib-cache) elt) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 02185972bfe..58cf2728f61 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -4206,7 +4206,7 @@ cperl-find-pods-heres (setq tmpend tb)) (put-text-property b (point) 'syntax-type 'format)) ;; quotelike operator or regexp: capture groups 10 or 11 - ;; matches some false postives, to be eliminated here + ;; matches some false positives, to be eliminated here ((or (match-beginning 10) (match-beginning 11)) (setq b1 (if (match-beginning 10) 10 11) argument (buffer-substring @@ -5877,7 +5877,7 @@ cperl-init-faces (eval cperl--ws*-rx)) ;; ... or the start of a "sloppy" signature (sequence (eval cperl--sloppy-signature-rx) - ;; arbtrarily continue "a few lines" + ;; arbitrarily continue "a few lines" (repeat 0 200 (not (in "{")))) ;; make sure we have a reasonably ;; short match for an incomplete sub diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index eb35287cabe..0f0bb73ae77 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3974,11 +3974,11 @@ gud--lldb-python-init-string print(f'\"{string_list.GetStringAtIndex(i)}\" ') print(')##') " - "Python code sent to LLDB for gud-specific initialisation.") + "Python code sent to LLDB for gud-specific initialization.") (defun gud-lldb-fetch-completions (context command) "Return the data to complete the LLDB command before point. -This is what the Python function we installed at initialzation +This is what the Python function we installed at initialization time returns, as a Lisp list. Maximum number of completions requested from LLDB is controlled by `gud-lldb-max-completions', which see." diff --git a/lisp/simple.el b/lisp/simple.el index d60acf5477a..cee1ddac52f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11178,7 +11178,7 @@ analyze-text-conversion enabled. - Look for the deletion of a single electric pair character, - and delete the adjascent pair if + and delete the adjacent pair if `electric-pair-delete-adjacent-pairs'. - Run `post-self-insert-hook' for the last character of diff --git a/lisp/term/android-win.el b/lisp/term/android-win.el index 36470097b40..3e759a37a71 100644 --- a/lisp/term/android-win.el +++ b/lisp/term/android-win.el @@ -340,7 +340,7 @@ android-deactivate-mark-command ;; Splash screen notice. Users are frequently left scratching their -;; heads when they overlook the Android appendex in the Emacs manual +;; heads when they overlook the Android appendix in the Emacs manual ;; and discover that external storage is not accessible; worse yet, ;; Android 11 and later veil the settings panel controlling such ;; permissions behind layer upon layer of largely immaterial settings diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index bae0e097688..a10bdea8994 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el @@ -57,7 +57,7 @@ touch-screen-aux-tool cons holding the initial position of the touch point, and the last known position of the touch point, all in the same format as in `touch-screen-current-tool', the distance in pixels between -the current tool and the aformentioned initial position, the +the current tool and the aforementioned initial position, the center of the line formed between those two points, the ratio between the present distance between both tools and the aforesaid initial distance when a pinch gesture was last sent, and three @@ -1927,7 +1927,7 @@ touch-screen-track-tap If THRESHOLD is non-nil, enforce a threshold of movement that is either itself or 10 pixels when it is not a number. If the -aformentioned touch point moves beyond that threshold on any +aforementioned touch point moves beyond that threshold on any axis, return nil immediately, and further resume mouse event translation for the touch point at hand. diff --git a/lisp/transient.el b/lisp/transient.el index 94f7700ddaf..ebf6f23f6cd 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1514,7 +1514,7 @@ transient-prefix-object Regular suffix commands, which are not prefixes, do not have to concern themselves with this distinction, so they can use this function instead. In the context of a plain suffix, it always -returns the value of the appropiate variable." +returns the value of the appropriate variable." (or transient--prefix transient-current-prefix)) (defun transient-suffix-object (&optional command) diff --git a/lisp/treesit.el b/lisp/treesit.el index da8226f7d8a..9f885985f3b 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -690,7 +690,7 @@ treesit-local-parsers-on (defun treesit--update-ranges-local (query embedded-lang &optional beg end) - "Update range for local parsers betwwen BEG and END. + "Update range for local parsers between BEG and END. Use QUERY to get the ranges, and make sure each range has a local parser for EMBEDDED-LANG." ;; Clean up. diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 34c45b7aec3..2897b60b2f9 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1619,7 +1619,7 @@ use-package-handler/:vc the `use-package-normalize/:vc' function. REST is a plist of other (following) keywords and their -arguments, each having already been normalised by the respective +arguments, each having already been normalized by the respective function. STATE is a plist of any state that keywords processed before @@ -1690,7 +1690,7 @@ use-package-normalize/:vc (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name (pred stringp))) (use-package-normalize--vc-arg arg)) - (_ (use-package-error "Unrecognised argument to :vc.\ + (_ (use-package-error "Unrecognized argument to :vc.\ The keyword wants an argument of nil, t, a name of a package,\ or a cons-cell as accepted by `package-vc-selected-packages', where \ the accepted plist is augmented by a `:rev' keyword."))))) diff --git a/src/android.c b/src/android.c index 51622f16230..7a393f8f56d 100644 --- a/src/android.c +++ b/src/android.c @@ -2779,7 +2779,7 @@ android_destroy_handle (android_handle handle) /* Just clear any exception thrown. If destroying the handle fails from an out-of-memory error, then Emacs loses some - resources, but that is not as big deal as signalling. */ + resources, but that is not as big deal as signaling. */ (*android_java_env)->ExceptionClear (android_java_env); /* Delete the global reference regardless of any error. */ @@ -5797,7 +5797,7 @@ android_check_string (Lisp_Object text) better represent the UCS-16 based Java String format, and to let strings contain NULL characters while remaining valid C strings: NULL bytes are encoded as two-byte sequences, and Unicode surrogate - pairs encoded as two-byte sequences are prefered to four-byte + pairs encoded as two-byte sequences are preferred to four-byte sequences when encoding characters above the BMP. */ int diff --git a/src/androidselect.c b/src/androidselect.c index f7988db0520..e7a6ee258a8 100644 --- a/src/androidselect.c +++ b/src/androidselect.c @@ -299,7 +299,7 @@ DEFUN ("android-get-clipboard-targets", Fandroid_get_clipboard_targets, bytes_array); for (i = 0; i < length; ++i) { - /* Retireve the MIME type. */ + /* Retrieve the MIME type. */ bytes = (*android_java_env)->GetObjectArrayElement (android_java_env, bytes_array, i); diff --git a/src/androidterm.c b/src/androidterm.c index cfb64cd69a0..c3a04fd3cfb 100644 --- a/src/androidterm.c +++ b/src/androidterm.c @@ -6101,7 +6101,7 @@ android_update_selection (struct frame *f, struct window *w) else start = -1, end = -1; - /* Now constrain START and END to the maximium size of a Java + /* Now constrain START and END to the maximum size of a Java integer. */ start = min (start, TYPE_MAXIMUM (jint)); end = min (end, TYPE_MAXIMUM (jint)); @@ -6238,7 +6238,7 @@ android_reset_conversion (struct frame *f) android_reset_ic (FRAME_ANDROID_WINDOW (f), mode); - /* Clear extracted text flags. Since the IM has been reinitialised, + /* Clear extracted text flags. Since the IM has been reinitialized, it should no longer be displaying extracted text. */ FRAME_ANDROID_OUTPUT (f)->extracted_text_flags = 0; diff --git a/src/androidterm.h b/src/androidterm.h index e75d46b1dfb..9830cc4364d 100644 --- a/src/androidterm.h +++ b/src/androidterm.h @@ -262,7 +262,7 @@ #define _ANDROID_TERM_H_ text''. */ int extracted_text_flags; - /* Token asssociated with that request. */ + /* Token associated with that request. */ int extracted_text_token; /* The number of characters of extracted text wanted by the IM. */ diff --git a/src/androidvfs.c b/src/androidvfs.c index 51558d2a375..3b7fb731e86 100644 --- a/src/androidvfs.c +++ b/src/androidvfs.c @@ -407,7 +407,7 @@ #define FIND_METHOD(c_name, name, signature) \ values are prohibitively slow, but smaller values can't face up to some long file names within several nested layers of directories. - Buffers holding components or other similar file name constitutents + Buffers holding components or other similar file name constituents which don't represent SAF files must continue to use PATH_MAX, for that is the restriction imposed by the Unix file system. */ @@ -4179,7 +4179,7 @@ android_saf_stat (const char *uri_name, const char *id_name, } /* Detect if Emacs has access to the document designated by the the - documen ID ID_NAME within the tree URI_NAME. If ID_NAME is NULL, + document ID ID_NAME within the tree URI_NAME. If ID_NAME is NULL, use the document ID in URI_NAME itself. If WRITABLE, also check that the file is writable, which is true @@ -6427,7 +6427,7 @@ android_root_name (struct android_vnode *vnode, char *name, if (!component_end) component_end = name + length; else - /* Move past the spearator character. */ + /* Move past the separator character. */ component_end++; /* Now, find out if the first component is a special vnode; if so, @@ -7172,7 +7172,7 @@ android_readlinkat (int dirfd, const char *restrict pathname, while file streams also require ownership over file descriptors they are created on behalf of. - Detaching the parcel file descriptor linked to FD consequentially + Detaching the parcel file descriptor linked to FD consequently prevents the owner from being notified when it is eventually closed, but for now that hasn't been demonstrated to be problematic yet, as Emacs doesn't write to file streams. */ diff --git a/src/fileio.c b/src/fileio.c index 51937e6d765..64f255a355b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -203,7 +203,7 @@ check_vfs_filename (Lisp_Object encoded, const char *reason) #ifdef HAVE_LIBSELINUX /* Return whether SELinux is enabled and pertinent to FILE. Provide - for cases where FILE is or is a constitutent of a special + for cases where FILE is or is a constituent of a special directory, such as /assets or /content on Android. */ static bool diff --git a/src/image.c b/src/image.c index 29ec6d5381b..38744fc1cce 100644 --- a/src/image.c +++ b/src/image.c @@ -11785,7 +11785,7 @@ svg_css_length_to_pixels (RsvgLength length, double dpi, int font_size) If we do set explicit width and height values in the image spec, this will work out correctly as librsvg will still - honour the percentage sizes in its final rendering no matter + honor the percentage sizes in its final rendering no matter what size we make the image. */ value = 0; break; diff --git a/src/process.c b/src/process.c index bde87b78701..8bc922ab509 100644 --- a/src/process.c +++ b/src/process.c @@ -7520,7 +7520,7 @@ handle_child_signal (int sig) emacs_unlink is not async signal safe because deleting files from content providers must proceed - through Java code. Consequentially, if XCDR (head) + through Java code. Consequently, if XCDR (head) lies on a content provider it will not be removed, which is a bug. */ unlink (SSDATA (XCDR (head))); diff --git a/src/regex-emacs.c b/src/regex-emacs.c index cb4fbd58faa..19bec537130 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c @@ -2824,7 +2824,7 @@ group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum) /* Iterate through all the char-matching operations directly reachable from P. This is the inner loop of `forall_firstchar`, which see. - LOOP_BEG..LOOP_END delimit the currentl "block" of code (we assume + LOOP_BEG..LOOP_END delimit the currently "block" of code (we assume the code is made of syntactically nested loops). LOOP_END is blindly assumed to be "safe". To guarantee termination, at each iteration, either LOOP_BEG should diff --git a/src/sfnt.c b/src/sfnt.c index bc2ffdea9dc..238e7f48420 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -4762,7 +4762,7 @@ sfnt_get_scale (struct sfnt_head_table *head, int ppem) /* Figure out how to convert from font unit-space to pixel space. To turn one unit to its corresponding pixel size given a ppem of 1, the unit must be divided by head->units_per_em. Then, it must - be multipled by the ppem. So, + be multiplied by the ppem. So, PIXEL = UNIT / UPEM * PPEM @@ -4902,7 +4902,7 @@ sfnt_read_name_table (int fd, struct sfnt_offset_subtable *subtable) return NULL; } - /* Read REQURIED bytes into the string data. */ + /* Read REQUIRED bytes into the string data. */ name->data = (unsigned char *) (name->name_records + name->count); rc = read (fd, name->data, required); @@ -14256,7 +14256,7 @@ sfnt_infer_deltas_1 (struct sfnt_glyph *glyph, size_t start, } else { - /* ... otheriwse, move point j by the delta of the + /* ... otherwise, move point j by the delta of the nearest touched point. */ if (x[j] >= max_pos) @@ -14320,7 +14320,7 @@ sfnt_infer_deltas_1 (struct sfnt_glyph *glyph, size_t start, } else { - /* ... otheriwse, move point j by the delta of the + /* ... otherwise, move point j by the delta of the nearest touched point. */ if (y[j] >= max_pos) @@ -14404,7 +14404,7 @@ sfnt_infer_deltas_1 (struct sfnt_glyph *glyph, size_t start, } else { - /* ... otheriwse, move point j by the delta of the + /* ... otherwise, move point j by the delta of the nearest touched point. */ if (x[j] >= max_pos) @@ -14468,7 +14468,7 @@ sfnt_infer_deltas_1 (struct sfnt_glyph *glyph, size_t start, } else { - /* ... otheriwse, move point j by the delta of the + /* ... otherwise, move point j by the delta of the nearest touched point. */ if (y[j] >= max_pos) @@ -14557,7 +14557,7 @@ sfnt_infer_deltas (struct sfnt_glyph *glyph, bool *touched, of one or two coordinates for each axis. Each such list is referred to as a ``tuple''. - The deltas, one for each point, are multipled by the normalized + The deltas, one for each point, are multiplied by the normalized value of each axis and applied to those points for each tuple that is found to be applicable. diff --git a/src/sfnt.h b/src/sfnt.h index f6ab6a6eebd..42ae64c362b 100644 --- a/src/sfnt.h +++ b/src/sfnt.h @@ -1283,7 +1283,7 @@ #define sfnt_coerce_fixed(fixed) ((sfnt_fixed) (fixed) / 65535.0) unsigned char *glyph_variation_data; }; -/* Structure repesenting a set of axis coordinates and their +/* Structure representing a set of axis coordinates and their normalized equivalents. To use this structure, call diff --git a/src/sfntfont.c b/src/sfntfont.c index 68e850779fc..f002712dc10 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -1348,7 +1348,7 @@ sfntfont_charset_for_cmap (struct sfnt_cmap_encoding_subtable subtable) subtable in *SUBTABLE upon success, NULL otherwise. If FORMAT14 is non-NULL, return any associated format 14 variation - selection context in *FORMAT14 should the selected charcter map be + selection context in *FORMAT14 should the selected character map be a Unicode character map. */ static struct sfnt_cmap_encoding_subtable_data * @@ -1371,7 +1371,7 @@ sfntfont_select_cmap (struct sfnt_cmap_table *cmap, if (!format14) return data[i]; - /* Search for a correspoinding format 14 character map. + /* Search for a corresponding format 14 character map. This is used in conjunction with the selected character map to map variation sequences. */ @@ -1400,7 +1400,7 @@ sfntfont_select_cmap (struct sfnt_cmap_table *cmap, if (!format14) return data[i]; - /* Search for a correspoinding format 14 character map. + /* Search for a corresponding format 14 character map. This is used in conjunction with the selected character map to map variation sequences. */ diff --git a/src/textconv.c b/src/textconv.c index bd72562317f..fb1c66bb2c2 100644 --- a/src/textconv.c +++ b/src/textconv.c @@ -23,7 +23,7 @@ Copyright (C) 2023 Free Software Foundation, Inc. They may then request that the text editor remove or substitute that text for something else, for example when providing the ability to ``undo'' or ``edit'' previously composed text. This is - most commonly seen in input methods for CJK laguages for X Windows, + most commonly seen in input methods for CJK languages for X Windows, and is extensively used throughout Android by input methods for all kinds of scripts. @@ -1311,7 +1311,7 @@ complete_edit (void *token) /* Convert PTR to CONTEXT. If CONTEXT->check is false, then update CONTEXT->w's ephemeral last point and give it to the input method, - the assumption being that an editing operation signalled. */ + the assumption being that an editing operation signaled. */ static void complete_edit_check (void *ptr) @@ -1379,7 +1379,7 @@ handle_pending_conversion_events_1 (struct frame *f, or not the editing operation completed successfully. */ context.check = false; - /* Make sure completion is signalled. */ + /* Make sure completion is signaled. */ count = SPECPDL_INDEX (); record_unwind_protect_ptr (complete_edit, &token); w = NULL; diff --git a/src/treesit.c b/src/treesit.c index 69b59fca111..912f4ed47cc 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -3335,7 +3335,7 @@ treesit_traverse_validate_predicate (Lisp_Object pred, if (!CONSP (cdr)) { *signal_data = list3 (Qtreesit_invalid_predicate, - build_string ("Invalide `not' " + build_string ("Invalid `not' " "predicate"), pred); return false; diff --git a/src/window.h b/src/window.h index 9ef8434af18..346dc70ea98 100644 --- a/src/window.h +++ b/src/window.h @@ -292,7 +292,7 @@ #define WINDOW_H_INCLUDED `last_point' is normally used during redisplay to indicate the position of point as seem by the input method. However, it is - not updated if consequtive conversions are processed at the + not updated if consecutive conversions are processed at the same time. This `ephemeral_last_point' field is either the last point as diff --git a/src/xselect.c b/src/xselect.c index c38a1f8b6a9..5ffa0fd24fc 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -897,7 +897,7 @@ x_start_selection_transfer (struct x_display_info *dpyinfo, Window requestor, /* Find a valid (non-zero) serial for the selection transfer. Any asynchronously trapped errors will then cause the - selection transfer to be cancelled. */ + selection transfer to be canceled. */ transfer->serial = (++selection_serial ? selection_serial : ++selection_serial); diff --git a/src/xterm.c b/src/xterm.c index 75ac8d0d555..79648a6d6e5 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -616,9 +616,9 @@ Copyright (C) 1989, 1993-2023 Free Software Foundation, Inc. - x_clear_errors Callers using this set should consult the comment(s) on top of the - aformentioned functions. They should not be used when the requests + aforementioned functions. They should not be used when the requests being made do not require roundtrips to the X server, and obtaining - the details of any error generated is unecessary, as + the details of any error generated is unnecessary, as `x_uncatch_errors' will always synchronize with the X server, which is a potentially slow operation. */ @@ -5173,7 +5173,7 @@ record_event (char *locus, int type) -/* Miscelaneous event handling functions. */ +/* Miscellaneous event handling functions. */ static void x_toolkit_position (struct frame *f, int x, int y, @@ -11296,7 +11296,7 @@ x_clear_frame (struct frame *f) /* Send a message to frame F telling the event loop to track whether or not an hourglass is being displayed. This is required to ignore - the right events when the hourglass is mapped without callig XSync + the right events when the hourglass is mapped without calling XSync after displaying or hiding the hourglass. */ static void @@ -32094,7 +32094,7 @@ x_initialize (void) #ifdef HAVE_X_I18N -/* Notice that a change has occured on F that requires its input +/* Notice that a change has occurred on F that requires its input method state to be reset. */ static void diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 27056c99a50..8fbe48bbb9a 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -717,7 +717,7 @@ bytecomp-tests--test-cases (set (make-local-variable 'bytecomp-tests--xx) 2) bytecomp-tests--xx) - ;; Check for-effect optimisation of `condition-case' body form. + ;; Check for-effect optimization of `condition-case' body form. ;; With `condition-case' in for-effect context: (let ((x (bytecomp-test-identity ?A)) (r nil)) @@ -797,7 +797,7 @@ bytecomp-tests--test-cases (let ((x 0)) (list (= (setq x 1)) x)) - ;; Aristotelian identity optimisation + ;; Aristotelian identity optimization (let ((x (bytecomp-test-identity 1))) (list (eq x x) (eql x x) (equal x x))) ) @@ -2120,7 +2120,7 @@ bytecomp-tests--byte-op-error-cases )) (ert-deftest bytecomp--byte-op-error-backtrace () - "Check that signalling byte ops show up in the backtrace." + "Check that signaling byte ops show up in the backtrace." (dolist (case bytecomp-tests--byte-op-error-cases) (ert-info ((prin1-to-string case) :prefix "case: ") (let* ((call (nth 0 case)) @@ -2151,7 +2151,7 @@ bytecomp--byte-op-error-backtrace call)))))))))) (ert-deftest bytecomp--eq-symbols-with-pos-enabled () - ;; Verify that we don't optimise away a binding of + ;; Verify that we don't optimize away a binding of ;; `symbols-with-pos-enabled' around an application of `eq' (bug#65017). (let* ((sym-with-pos1 (read-positioning-symbols "sym")) (sym-with-pos2 (read-positioning-symbols " sym")) ; <- space! diff --git a/test/lisp/erc/erc-scenarios-base-attach.el b/test/lisp/erc/erc-scenarios-base-attach.el index ccf5d1f9582..29f5bd2ddd8 100644 --- a/test/lisp/erc/erc-scenarios-base-attach.el +++ b/test/lisp/erc/erc-scenarios-base-attach.el @@ -47,11 +47,11 @@ ;; Author: Mario Lang ;; AuthorDate: Mon Nov 26 18:33:19 2001 +0000 ;; -;; * new function erc-BBDB-NICK to handle nickname anotation ... +;; * new function erc-BBDB-NICK to handle nickname annotation ... ;; * Applied antifuchs/mhp patches, the latest on erc-help, unmodified ;; * New variable: erc-reuse-buffers default to t. ;; * Modified erc-generate-new-buffer-name to use it. it checks if -;; server and port are the same, then one can assume thats the same +;; server and port are the same, then one can assume that's the same ;; channel/query target again. ;;; Code: diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el index 912a85ad5e0..e9bca2a3ac3 100644 --- a/test/lisp/erc/erc-tests.el +++ b/test/lisp/erc/erc-tests.el @@ -657,7 +657,7 @@ erc--parsed-prefix (setq erc--isupport-params (make-hash-table)) ;; Uses fallback values when no PREFIX parameter yet received, thus - ;; ensuring caller can use slot accessors immediately intead of + ;; ensuring caller can use slot accessors immediately instead of ;; checking if null beforehand. (should-not erc--parsed-prefix) (should (equal (erc--parsed-prefix) @@ -2918,7 +2918,7 @@ erc-tests--assert-printed-in-subprocess (while (accept-process-output proc 10)) (goto-char (point-min)) (unless (equal (read (current-buffer)) expected) - (message "Exepcted: %S\nGot: %s" expected (buffer-string)) + (message "Expected: %S\nGot: %s" expected (buffer-string)) (ert-fail "Mismatch")))) ;; Worrying about which library a module comes from is mostly not diff --git a/test/lisp/eshell/em-hist-tests.el b/test/lisp/eshell/em-hist-tests.el index 466d19cc6f7..078bcb490e5 100644 --- a/test/lisp/eshell/em-hist-tests.el +++ b/test/lisp/eshell/em-hist-tests.el @@ -35,7 +35,7 @@ (cl-defun em-hist-test/check-history-file (file-name expected &optional (expected-ring t)) "Check that the contents of FILE-NAME match the EXPECTED history entries. -Additonally, check that after loading the file, the history ring +Additionally, check that after loading the file, the history ring matches too. If EXPECTED-RING is a list, compare the ring elements against that; if t (the default), check against EXPECTED." (when (eq expected-ring t) (setq expected-ring expected)) diff --git a/test/lisp/eshell/esh-io-tests.el b/test/lisp/eshell/esh-io-tests.el index 0201b6ab650..bc3d9c6e5d5 100644 --- a/test/lisp/eshell/esh-io-tests.el +++ b/test/lisp/eshell/esh-io-tests.el @@ -328,7 +328,7 @@ esh-io-test/pipeline/all "tuodts\nrredts\n")) (ert-deftest esh-io-test/pipeline/subcommands () - "Chek that all commands in a subcommand are properly piped." + "Check that all commands in a subcommand are properly piped." (skip-unless (executable-find "rev")) (with-temp-eshell (eshell-match-command-output "{echo foo; echo bar} | rev" diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el index 44596f92490..58d97f46c4f 100644 --- a/test/lisp/proced-tests.el +++ b/test/lisp/proced-tests.el @@ -46,7 +46,7 @@ proced--move-to-column (move-to-column (string-match attribute proced-header-line))) (defun proced--assert-process-valid-pid-refinement (pid) - "Fail unless the process at point could be present after a refinment using PID." + "Fail unless the process at point could be present after a refinement using PID." (proced--move-to-column "PID") (let ((pid-equal (string= pid (word-at-point)))) (should diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el index 7cf41d2817b..98ebf771717 100644 --- a/test/lisp/thingatpt-tests.el +++ b/test/lisp/thingatpt-tests.el @@ -85,16 +85,16 @@ thing-at-point-test-data ("" 5 email "") ("" 16 email "") ("" 17 email "") - ;; email adresses containing numbers + ;; email addresses containing numbers ("foo1@example.com" 1 email "foo1@example.com") ("1foo@example.com" 1 email "1foo@example.com") ("11@example.com" 1 email "11@example.com") ("1@example.com" 1 email "1@example.com") - ;; email adresses user portion containing dots + ;; email addresses user portion containing dots ("foo.bar@example.com" 1 email "foo.bar@example.com") (".foobar@example.com" 1 email nil) (".foobar@example.com" 2 email "foobar@example.com") - ;; email adresses domain portion containing dots and dashes + ;; email addresses domain portion containing dots and dashes ("foobar@.example.com" 1 email nil) ("foobar@-example.com" 1 email "foobar@-example.com") ;; These are illegal, but thingatpt doesn't yet handle them diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el index 615d905e140..2912ce8a571 100644 --- a/test/src/regex-emacs-tests.el +++ b/test/src/regex-emacs-tests.el @@ -912,7 +912,7 @@ regexp-tests-backtrack-optimization )) (ert-deftest regexp-tests-zero-width-assertion-repetition () - ;; Check compatibility behaviour with repetition operators after + ;; Check compatibility behavior with repetition operators after ;; certain zero-width assertions (bug#64128). ;; This function is just to hide ugly regexps from relint so that it commit 2773cf9e013a989df99a689317de941bde2cbf29 Author: Stefan Kangas Date: Sun Dec 10 12:39:54 2023 +0100 ; Fix typos diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index db7655e692c..d71316a3ba7 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -5824,7 +5824,7 @@ each of the three channels of light (red, green, blue). For example: : xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68 Typography is another variable. Some font families are blurry at small -point sizes. Others may have a regular weight that is lighter (thiner) +point sizes. Others may have a regular weight that is lighter (thinner) than that of their peers which may, under certain circumstances, cause a halo effect around each glyph. diff --git a/src/pgtkterm.c b/src/pgtkterm.c index e767e15cc07..b010b486e30 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6256,7 +6256,7 @@ symbol_to_drag_action (Lisp_Object act) if (NILP (act)) return GDK_ACTION_DEFAULT; - signal_error ("Invalid drag acction", act); + signal_error ("Invalid drag action", act); } static Lisp_Object commit 020aff95fa3e503387a7f9b240e0f7e9f2f054ae Author: Stefan Kangas Date: Sun Dec 10 12:38:19 2023 +0100 ; Fix typos in ChangeLog files diff --git a/ChangeLog.2 b/ChangeLog.2 index d40401093c5..ee816281427 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -8956,10 +8956,10 @@ 2016-02-04 Carlos Pita (tiny change) - Make complection in erc use consistent casing + Make completion in erc use consistent casing * lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make - case in the complection consistent (bug#18509). + case in the completion consistent (bug#18509). 2016-02-04 Francis Litterio @@ -17094,11 +17094,11 @@ * lisp/json.el (json-encoding-object-sort-predicate): New variable for specifying a sorting predicate for JSON objects during encoding. (json--plist-to-alist): New utility function. - (json-encode-hash-table): Re-use `json-encode-alist' when object keys + (json-encode-hash-table): Reuse `json-encode-alist' when object keys are to be sorted. (json-encode-alist): Sort output by `json-encoding-object-sort-predicate, when set. - (json-encode-plist): Re-use `json-encode-alist' when object keys are + (json-encode-plist): Reuse `json-encode-alist' when object keys are to be sorted. (json-pretty-print-buffer-ordered): New command to pretty print the buffer with object keys sorted alphabetically. @@ -19542,7 +19542,7 @@ calling low-level functions. * test/automated/file-notify-tests.el (file-notify--test-timeout): - Decrase to 6 seconds for remote directories. + Decrease to 6 seconds for remote directories. (file-notify-test02-events): Expect different number of `attribute-changed' events for the local and remote cases. Apply short delays between the operations, in order to receive all @@ -32624,7 +32624,7 @@ (verilog-set-auto-endcomments): Fix end comments for functions of type void, etc. Reported by Alex Reed. (verilog-do-indent): Fix electric tab deleting form-feeds. Note - caused by indent-line-to deleting tabls pre 24.5. + caused by indent-line-to deleting tables pre 24.5. (verilog-nameable-item-re): Fix nameable items that can have an end-identifier to include endchecker, endgroup, endprogram, endproperty, and endsequence. Reported by Alex Reed. diff --git a/ChangeLog.3 b/ChangeLog.3 index 4401dd10920..9bc5232ba46 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -146,7 +146,7 @@ 2022-10-04 Andreas Schwab - * src/emacs.c (load_pdump): Propery handle case when executable + * src/emacs.c (load_pdump): Properly handle case when executable wasn't found. 2022-10-04 Eli Zaretskii @@ -6570,7 +6570,7 @@ 2021-10-04 Lars Ingebrigtsen - Mention ffap-file-name-with-spaces in the ffap doc strin + Mention ffap-file-name-with-spaces in the ffap doc string * lisp/ffap.el (find-file-at-point): Mention ffap-file-name-with-spaces in the doc string. @@ -7174,7 +7174,7 @@ (ess-eval-visibly-p): Declare. (org-babel-julia-assign-elisp): Remove unused vars `header` and - `row-names` and corespondingly remove now unused args `colnames-p` and + `row-names` and correspondingly remove now unused args `colnames-p` and `rownames-p`. (org-babel-variable-assignments:julia): Adjust call to `org-babel-julia-assign-elisp` accordingly. @@ -10203,7 +10203,7 @@ 2021-09-17 Lars Ingebrigtsen - Mention that the garbage collection is convervative + Mention that the garbage collection is conservative * doc/lispref/internals.texi (Garbage Collection): Mention that we're using a conservative gc (bug#42013). @@ -21832,7 +21832,7 @@ * src/doprnt.c (exprintf, evxprintf): * src/lisp.h (exprintf, evxprintf): Don't use a pointer-to-const type for the `nonheapbuf` argument: although it is never dereferenced, GCC - will warn when passing a pointer to uninitialised memory otherwise. + will warn when passing a pointer to uninitialized memory otherwise. * src/fns.c (sort_vector_copy, realize_face, realize_gui_face) (realize_tty_face): Use the same signatures in the prototypes as in the actual function definitions. @@ -23755,7 +23755,7 @@ 2021-05-29 Lars Ingebrigtsen - Improve the file-accessible-directory-p doc strin + Improve the file-accessible-directory-p doc string * src/fileio.c (Ffile_accessible_directory_p): Don't use the phrase "directory name spec", which isn't defined (bug#18201). @@ -44752,7 +44752,7 @@ (nxml-prefer-utf-16-little-to-big-endian-flag) (nxml-default-buffer-file-coding-system) (nxml-auto-insert-xml-declaration-flag): Add :safe to allow easier - cusomization (bug#45969). + customization (bug#45969). 2021-01-19 Lars Ingebrigtsen @@ -47582,10 +47582,10 @@ 2020-12-30 Andrea Corallo - Order function types in aphabetical order + Order function types in alphabetical order * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Reorder in - aphabetical order and comment. + alphabetical order and comment. 2020-12-30 Andrea Corallo @@ -55395,7 +55395,7 @@ 2020-11-18 Andrea Corallo - Fix eln file hasing for symlink paths (bug#44701) + Fix eln file hashing for symlink paths (bug#44701) * src/comp.c (Fcomp_el_to_eln_filename): Call `file-truename' in place of `expand-file-name' when available. @@ -55928,7 +55928,7 @@ Fix debug symbol emission * src/comp.c (Fcomp__compile_ctxt_to_file): Now that we do not - rely anymore on globlal variables move logic in from + rely anymore on global variables move logic in from 'Fcomp__init_ctxt' so comp.debug is already set correctly. 2020-11-14 Andrea Corallo @@ -59251,7 +59251,7 @@ 2020-10-26 Andrea Corallo - Make native compiler tollerant to redefined primitives (bug#44221). + Make native compiler tolerant to redefined primitives (bug#44221). * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Rework based on the fact that the subr can now be redefined. @@ -59833,7 +59833,7 @@ Fix error in tramp-sh-handle-make-process * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't use heredoc - script whent the argument contains a string. + script when the argument contains a string. 2020-10-23 Stefan Kangas @@ -64846,7 +64846,7 @@ 2020-09-24 Andrea Corallo - Add a test for primitive advicing effectiveness + Add a test for primitive advising effectiveness * test/src/comp-test-funcs.el (comp-test-primitive-advice-f): New function. @@ -64903,7 +64903,7 @@ install a subr trampoline into the function relocation table. Once this is done any call from native compiled Lisp to the related primitive will go through the `funcall' trampoline - making advicing effective. + making advising effective. 2020-09-23 Andrea Corallo @@ -70385,7 +70385,7 @@ (MD5_BLOCKSIZE): New macro. (accumulate_and_process_md5, final_process_md5, md5_gz_stream) (comp_hash_source_file): New functions. - (Fcomp_el_to_eln_filename): Rework for hasing using also source + (Fcomp_el_to_eln_filename): Rework for hashing using also source file content. * src/lread.c (maybe_swap_for_eln): Rename el_name -> src_name as @@ -73450,7 +73450,7 @@ 2020-08-11 Paul Eggert - pdumper speed tweeks for hash tables + pdumper speed tweaks for hash tables * src/pdumper.c (dump_queue_empty_p): Avoid unnecessary call to Fhash_table_count on a known hash table. @@ -77752,7 +77752,7 @@ 2020-06-22 Andrea Corallo - Handle correctly pure delaration specifier. + Handle correctly pure declaration specifier. * lisp/emacs-lisp/comp.el (comp-func): New slot 'pure'. (comp-spill-decl-spec): New function. @@ -81415,7 +81415,7 @@ 2020-05-14 Andrea Corallo - Dump log and intemediate GCC IRs only at comp-debug 3 + Dump log and intermediate GCC IRs only at comp-debug 3 * src/comp.c (Fcomp__init_ctxt): Increase threshold for dumping really everything to 'comp-debug' 3. @@ -84459,7 +84459,7 @@ either be encoding a string without NL, or decoding without CR. * src/coding.c (string_ascii_p): Revert to a pure predicate. - (code_convert_string): Fix logic. Don't use uninitialised + (code_convert_string): Fix logic. Don't use uninitialized ascii_p (removed). Use memchr to detect CR or LF in string when needed. * test/src/coding-tests.el (coding-nocopy-ascii): Update tests to include encodings with explicit EOL conversions. @@ -86579,7 +86579,7 @@ Merge remote-tracking branch 'savannah/master' into HEAD - * Fix regexp instroduced by f055f52321 + * Fix regexp introduced by f055f52321 2020-03-09 Paul Eggert @@ -86613,7 +86613,7 @@ * lisp/term/rxvt.el: Enable backeted paste and window title - rxvt-unicode uses the same escape sequences as xterm so just re-use + rxvt-unicode uses the same escape sequences as xterm so just reuse the xterm functions to enable them. The `xterm-rxvt-function-map` keymap already has @@ -94009,7 +94009,7 @@ Fix an error in tramp-sh-handle-make-process. Don't merge with master * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't use heredoc - script whent the argument contains a string. + script when the argument contains a string. 2021-02-03 Stefan Kangas @@ -97511,7 +97511,7 @@ * lisp/subr.el (cancel-change-group): Fix bug#39680 - Don't re-use an existing `pending-undo-list` even if (eq last-command 'undo) + Don't reuse an existing `pending-undo-list` even if (eq last-command 'undo) since there might have been changes to the buffer since that `undo` command and the `pending-undo-list` can hence be invalid for the current buffer contents. @@ -110510,7 +110510,7 @@ 2019-10-01 Lars Ingebrigtsen - Make the help page mention the customizeable global mode variable + Make the help page mention the customizable global mode variable * lisp/help-fns.el (help-fns--customize-variable): Factor out into own function for reuse. @@ -117135,7 +117135,7 @@ Use timer-convert with t rather than doing it by hand. * src/timefns.c (time_hz_ticks, time_form_stamp, lisp_time_form_stamp): Remove; no longer needed. - (decode_lisp_time): Rturn the form instead of having a *PFORM arg. + (decode_lisp_time): Return the form instead of having a *PFORM arg. All uses changed. (time_arith): Just return TICKS if HZ is 1. (Fencode_time): Remove argument FORM. All callers changed. @@ -131090,7 +131090,7 @@ Make shr-rescale-image respect get-buffer-window again * lisp/net/shr.el (shr-rescale-image): Partially revert previous - change -- ressurrect the check for `get-buffer-window'. + change -- resurrect the check for `get-buffer-window'. 2019-05-16 Ivan Shmakov @@ -135103,7 +135103,7 @@ (help-fns--var-ignored-local, help-fns--var-file-local) (help-fns--var-watchpoints, help-fns--var-obsolete) (help-fns--var-alias, help-fns--var-bufferlocal): New functions, - extacted from describe-variable. + extracted from describe-variable. (describe-variable): Run help-fns-describe-variable-functions instead. 2019-04-12 Glenn Morris @@ -163190,7 +163190,7 @@ Quieten eshell compilation * lisp/eshell/em-tramp.el: Require esh-cmd. - * lisp/eshell/esh-ext.el: Requie esh-io at runtime too. + * lisp/eshell/esh-ext.el: Require esh-io at runtime too. 2018-02-28 Glenn Morris @@ -164098,7 +164098,7 @@ (server-socket-dir): Compute socket dir from `get-external-sockname'. (server-start): Don't check for existing server when an - uninitialised external socket has been passed to Emacs. + uninitialized external socket has been passed to Emacs. * src/emacs.c: (main): Obtain socket name via getsockname and pass to `init_process_emacs'. * src/lisp.h: (init_process_emacs): Add second parameter. @@ -165010,7 +165010,7 @@ Merge from origin/emacs-26 - 6415b2d Allow read-passwd to hide characters inserted by C-y. (Secur... + 6415b2d Allow read-passwd to hide characters inserted by C-y. (Secure... 8cb4ffb * etc/PROBLEMS: Document issues with double-buffering. (Bug#... fd10070 * lisp/window.el (window-largest-empty-rectangle): Fix grammar. e1a4403 Minor changes in the Emacs manual @@ -165500,7 +165500,7 @@ 1fc98ed073 ; Spelling fix bb396a369c Update Org to v9.1.6 fa582153f7 Use text-pixels values only when saving framesets (Bug#30141) - 6b01b9475d Minor improvement in section "Pages" of the usere manual + 6b01b9475d Minor improvement in section "Pages" of the user manual e8c8bd3de2 Minor improvements in user manual 26b8b92e63 Improve the "Mark" chapter of the user manual 759569fe40 Improve the "Buffers" chapter of the user manual @@ -167643,7 +167643,7 @@ 2017-12-12 Glenn Morris - Fix gitmerge handling of automatic conflict reslution + Fix gitmerge handling of automatic conflict resolution * admin/gitmerge.el (gitmerge-resolve): Reenable NEWS handling. (gitmerge-resolve-unmerged): Commit after successful resolution. @@ -172441,11 +172441,11 @@ * src/window.c (Fset_window_margins, Fset_window_fringes) (Fset_window_scroll_bars): In doc-strings tell that a window - must be large enough to accommodate fringes, sroll bars and + must be large enough to accommodate fringes, scroll bars and margins of the desired size. * doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars) (Display Margins): Tell that windows must be large enough to - accommodate fringes, sroll bars and margins of the desired + accommodate fringes, scroll bars and margins of the desired size. 2019-03-10 Eli Zaretskii @@ -175963,7 +175963,7 @@ Save the server alias on reconnect (Bug#29657) rcirc does not retain the server alias on reconnect. As a result, rcirc - fails to re-use server and channel buffers when an alias is used. Further + fails to reuse server and channel buffers when an alias is used. Further problems may ensue when aliases are used to differentiate multiple connections to the same host, for example when using a single IRC bouncer or proxy to connect to multiple IRC networks. @@ -180914,7 +180914,7 @@ 2018-01-21 Eli Zaretskii - Minor improvement in section "Pages" of the usere manual + Minor improvement in section "Pages" of the user manual * doc/emacs/text.texi (Pages): Improve wording. Suggested by Will Korteland in emacs-manual-bugs@gnu.org. @@ -184512,7 +184512,7 @@ * src/lisp.h (GCALIGNMENT): Change it back to a macro that expands to a literal integer constant, for older GCC. I had mistakenly thought that only MSVC had the problem. - Problem repored by Eli Zaretskii (Bug#29040#69). + Problem reported by Eli Zaretskii (Bug#29040#69). 2017-11-03 Paul Eggert @@ -186856,7 +186856,7 @@ * doc/misc/flymake.texi (Overview of Flymake): Rewrite a bit. (Installing Flymake): Mostly scratch. Flymake comes with Emacs. (Running the syntax check): Simplify. - (Viewing error messages): Dekete, + (Viewing error messages): Delete. (Syntax check statuses): Rewrite. (Troubleshooting): Simplify. (Customizable variables): Rewrite. @@ -188461,7 +188461,7 @@ Loosen strict parsing requirement for desktop files There are other desktop-looking files, for instance those having to do - with MIME typess, that would benefit from being able to be read by this + with MIME types, that would benefit from being able to be read by this function. It helps to have some flexibility. * lisp/xdg.el (xdg-desktop-read-file): Remove an error condition. * test/lisp/xdg-tests.el: Remove a test. @@ -219622,7 +219622,7 @@ for 0x80 ⪬ c < 0x100. In other words, the loop never executes for c ≥ 0x80 and RE_CHAR_TO_MULTIBYTE call is unnecessary for c < 0x80. - * src/regex.c (regex_compile): Simplyfy a for loop by eliminating + * src/regex.c (regex_compile): Simplify a for loop by eliminating dead iterations and unnecessary macro calls. 2016-09-08 Michal Nazarewicz @@ -229115,7 +229115,7 @@ 6da3a6d Port to strict C99 offsetof de7601f Port to GTK with strict C11 compiler 658aa2d Port to GTK with strict C99 compiler - 1df7173 Avoid screen artifacts with new OS X visible bell after scrol... + 1df7173 Avoid screen artifacts with new OS X visible bell after scroll... 7a2edd3 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into... dca240a Suppress some Tramp tests for OSX, do not merge with master 9094304 * lisp/progmodes/xref.el (xref-buffer-name, xref--window): Mo... @@ -233746,7 +233746,7 @@ ee73997 Make erc work better when encountering unknown prefix chars b99141d Make erc completion case-insensitive again - 66c4620 Make complection in erc use consistent casing + 66c4620 Make completion in erc use consistent casing 8c562b2 Make /QUIT in erc more robust d93d2c5 Make tracking faces in Emacs work more reliably af6ab7e Make shr not bug out on images on non-graphical displays @@ -234944,7 +234944,7 @@ (rng-complete-attribute-value): Don't perform completion, but return completion data instead. (rng-complete-qname-function, rng-generate-qname-list): Add a few - arguments, previously passed via dynamic coping. + arguments, previously passed via dynamic copying. (rng-strings-to-completion-table): Rename from rng-strings-to-completion-alist. Don't return an alist. Don't both sorting and uniquifying. @@ -235280,7 +235280,7 @@ d400753 * src/buffer.c: Stick with ASCII in doc string. 221240c Reword transient-mark-mode doc string 977d3ea Update doc string of 'selective-display' - 229c3fa Make C++ buffers writeable when writing their initial text + 229c3fa Make C++ buffers writable when writing their initial text properties. f5c762c Additional changes for "make check-expensive" 1729cf3 ; * admin/MAINTAINERS: Remove myself. diff --git a/ChangeLog.4 b/ChangeLog.4 index 64f7f87f9ad..9e22f2a6c33 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -374,7 +374,7 @@ Ensure ucs-names is consistent with Unicode names * lisp/international/mule-cmds.el (ucs-names): Skip adding an old-name - if it conflicts with the offical name of a codepoint. Adjust the + if it conflicts with the official name of a codepoint. Adjust the ranges iterated over to account for new Unicode codepoints. * test/lisp/international/mule-tests.el (mule-cmds-tests--ucs-names-old-name-override, @@ -1705,7 +1705,7 @@ (tramp-archive-test47-auto-load): Adapt test. * test/lisp/net/tramp-tests.el (tramp-display-escape-sequence-regexp): - Dont't declare. + Don't declare. (tramp-action-yesno): Suppress run in tests. (tramp-test02-file-name-dissect): (tramp-test02-file-name-dissect-simplified) @@ -2155,7 +2155,7 @@ selection from hanging owner, we will proceed to take ownership of the selection as normal, resolving the problem. - (One example of a selction owner that might not be responding to + (One example of a selection owner that might not be responding to selection requests is another instance of Emacs itself; while Emacs is blocked in call-process or Lisp execution, it currently does not respond to selection requests.) @@ -3050,7 +3050,7 @@ Revert changes to the order in which package descs are loaded * lisp/emacs-lisp/package.el (package-load-all-descriptors): Remove - NOSORT argument to 'directory-files', reverting back to the behaviour + NOSORT argument to 'directory-files', reverting back to the behavior as of Emacs 28. (Bug#63757) 2023-06-04 Spencer Baugh @@ -3233,7 +3233,7 @@ (plstore-save, plstore--encode, plstore--decode) (plstore--write-contents-functions, plstore-mode-decoded) (plstore-mode): Brush up doc strings and documentation in general. - Fix terminology, in particular spurious occurences of all uppercase + Fix terminology, in particular spurious occurrences of all uppercase "PLSTORE". (Bug#63627) 2023-05-31 Jens Schmidt @@ -4198,7 +4198,7 @@ Prevent generating empty autoload files * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Remove - optimisation that would mistakenly discard old loaddefs in case a file + optimization that would mistakenly discard old loaddefs in case a file was not modified by EXTRA-DATA is non-nil. (Bug#62734) 2023-04-30 Stefan Monnier @@ -5415,7 +5415,7 @@ 2023-03-29 Andrea Corallo - Comp fix calls to redefined primtives with op-bytecode (bug#61917) + Comp fix calls to redefined primitives with op-bytecode (bug#61917) * test/src/comp-tests.el (61917-1): New test. * src/comp.c (syms_of_comp): New variable. @@ -5453,7 +5453,7 @@ 2023-03-28 Andrea Corallo - Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)" + Revert "Comp fix calls to redefined primitives with op-bytecode (bug#61917)" This reverts commit 263d6c38539691c954f4c3057cbe8d5468499b91. @@ -5791,10 +5791,10 @@ 2023-03-20 Andrea Corallo - Comp fix calls to redefined primtives with op-bytecode (bug#61917) + Comp fix calls to redefined primitives with op-bytecode (bug#61917) * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation - of calls to redefined primtives with dedicated op-bytecode. + of calls to redefined primitives with dedicated op-bytecode. * test/src/comp-tests.el (61917-1): New test. 2023-03-20 Robert Pluim @@ -5914,7 +5914,7 @@ CC Mode: Eliminate duplicate function c-list-of-strings Replace it with the existing c-string-list-p. Also put an autoload cookie in - front of c-string-list-p so that it will not be signalled as undefined by + front of c-string-list-p so that it will not be signaled as undefined by loaddefs.el. lisp/progmodes/cc-vars.el (c-string-list-p): Make this autoload. @@ -5932,7 +5932,7 @@ (c-font-lock-extra-types, c++-font-lock-extra-types) (objc-font-lock-extra-types, java-font-lock-extra-types) (idl-font-lock-extra-types, pike-font-lock-extra-types): Add a :safe entry - into each of thes defcustoms for c-list-of-string. + into each of these defcustoms for c-list-of-string. (Top level): Add an autoload entry for each of the above. 2023-03-18 Robert Pluim @@ -5955,7 +5955,7 @@ Enhance section about troubleshooting in Eglot manual. - * doc/misc/eglot.texi (Troubleshooting Eglot): Parially rewrite. + * doc/misc/eglot.texi (Troubleshooting Eglot): Partially rewrite. 2023-03-17 João Távora @@ -5965,8 +5965,8 @@ Before this change, it would only work if the user happened to have manually activated it before with 'yas-global-mode' or somesuch. - This makes Eglot's Yasnippet-activating behaviour similar to its - Flymake-activating behaviour. + This makes Eglot's Yasnippet-activating behavior similar to its + Flymake-activating behavior. * lisp/progmodes/eglot.el (eglot-client-capabilities): Consult eglot--stay-out-of. @@ -6405,7 +6405,7 @@ 2023-03-09 João Távora - Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri + Autoload Eglot helper function eglot--debbugs-or-github-bug-uri This isn't a typical autoload: the progn block is plced in the autoloads file, but the eglot.el file itself isn't loaded as a result @@ -6619,7 +6619,7 @@ For example, in the 'buffer' category, the default value has the styles list '(basic substring)'. This means that if a pattern matches - accoring to the 'basic' style, 'substring' will not be tried. And + according to the 'basic' style, 'substring' will not be tried. And neither will 'completion-styles' which in Fido mode's case happens to be 'flex'. @@ -6635,7 +6635,7 @@ * Fix `emacs-lisp-native-compile-and-load' for (bug#61917) * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load): - Don't load if no compialtion happened. + Don't load if no compilation happened. 2023-03-06 Andrea Corallo @@ -6750,7 +6750,7 @@ "unspoffing" HOME just for the invocations of LSP server but it stopped working a while back. So make it more robust. - Eventually, we'll want to decide wether these local servers should be + Eventually, we'll want to decide whether these local servers should be considered in 'make check' runs at all, or whether there is a way to use them with a spoofed HOME. @@ -6835,7 +6835,7 @@ Fix go-ts-mode multi-line string indentation (bug#61923) * lisp/progmodes/go-ts-mode.el: - (go-ts-mode--indent-rules): Add indent rule for multi-line sting. + (go-ts-mode--indent-rules): Add indent rule for multi-line string. 2023-03-03 João Távora @@ -6935,7 +6935,7 @@ Originally our c-ts-mode--anchor-prev-sibling only specially handled labeled_statements, now we add special case for preproc in the similar - fasion: instead of using the preproc directive as anchor, use the last + fashion: instead of using the preproc directive as anchor, use the last statement in that preproc as the anchor. Thus effectively ignore the preproc. @@ -6988,7 +6988,7 @@ ([XwWebView initWithFrame:configuration:xwidget:]) (nsxwidget_init): Fixed memory leaks: when sending an alloc message to an object, send an autorelease message to any objects - we won't explictly release. + we won't explicitly release. ([XwWebView webView:didFinishNavigation:]): Second string to store in 'store_xwidget_event_string' is "load finished" rather than empty string. @@ -7658,7 +7658,7 @@ Eglot doesn't always show the LSP :label property of a CompletionItem in the completion candidates. That is because label is sometimes not what should be inserted in the buffer in the end, the :insertText - property supercedes it. + property supersedes it. But the label is usually more suitable for display nevertheless and if the LSP CompletionItem contains either a snippet or a textEdit, it's @@ -7720,7 +7720,7 @@ occurs. This is a much simpler mode of operation which may avoid problems, but is also likely much slower in large buffers. - Also, because the inlay feature is probably visually suprising to + Also, because the inlay feature is probably visually surprising to some, it is turned OFF by default, which is not the usual practice of Eglot (at least not when the necessary infrastructure is present). This decision may be changed soon. Here's a good one-liner for @@ -7731,7 +7731,7 @@ I haven't tested inlay hints extensively across many LSP servers, so I would appreciate any testing, both for functional edge cases and regarding performance. There are possibly more optimization - oportunities in the "lazy" mode of operation, like more aggressively + opportunities in the "lazy" mode of operation, like more aggressively deleting buffer overlays that are not in visible parts of the buffer. Though I ended up writing this one from scratch, I want to thank @@ -7803,9 +7803,9 @@ In that commit, I did what many longstanding issues and users were suggesting and removed Eglot's override of two Eldoc user - configuration varibles. + configuration variables. - I verified that Eglot's behaviour would stay mostly unaltered but my + I verified that Eglot's behavior would stay mostly unaltered but my tests were very incomplete. In short there is no way that Eglot can work acceptably with the default setting of 'eldoc-documentation-strategy', which is @@ -8208,7 +8208,7 @@ Fix 'display-buffer-use-least-recent-window' * src/window.c (Fwindow_use_time): Doc fix. - (Fwindow_bump_use_time): Bump use time of the seleceted window as + (Fwindow_bump_use_time): Bump use time of the selected window as well. Doc fix. * lisp/window.el (display-buffer-avoid-small-windows): Remove. @@ -8478,7 +8478,7 @@ 2023-02-16 Philip Kaludercic - Attempt to recognise if a VC package has no Elisp files + Attempt to recognize if a VC package has no Elisp files * lisp/emacs-lisp/package-vc.el (package-vc-non-code-file-names): Add new variable used to avoid false-positives. @@ -8792,7 +8792,7 @@ package specifications have been having issues with package-vc, when toggle-on-error is enabled. In their case, package-vc would raise an error in its first invocation, but it would go on working normally - afterwards. As this behaviour is confusing and the user can't do much + afterwards. As this behavior is confusing and the user can't do much about a missing elpa-packages.eld to begin with, we satisfy ourselves with printing out a message and continuing on. @@ -10316,7 +10316,7 @@ Fix typo in c-ts-mode (bug#60932) * lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-block-type-regexp): - enumerator, not enumeratior. + enumerator, not enumerator. 2023-01-20 Mike Kupfer @@ -11160,7 +11160,7 @@ (treesit_load_language): (Ftreesit_pattern_expand): (Ftreesit_query_expand): - (treesit_eval_predicates): Use new varaibles. + (treesit_eval_predicates): Use new variables. (treesit_check_buffer_size): (treesit_compose_query_signal_data): @@ -11899,7 +11899,7 @@ * lisp/progmodes/ruby-ts-mode.el (ruby-ts-add-log-current-function): Fix the case when point is - between two methods. 'treesit-node-at' returs the 'def' node of + between two methods. 'treesit-node-at' returns the 'def' node of the method after point in such case, so it behaved like point was inside the method below. @@ -12575,7 +12575,7 @@ * doc/lispref/modes.texi (Imenu): Add manual. * doc/lispref/parsing.texi (Tree-sitter major modes): Update manual. - * lisp/treesit.el (treesit-simple-imenu-settings): New varaible. + * lisp/treesit.el (treesit-simple-imenu-settings): New variable. (treesit--simple-imenu-1) (treesit-simple-imenu): New functions. (treesit-major-mode-setup): Setup Imenu. @@ -12840,7 +12840,7 @@ (treesit--top-level-defun): Generalize into treesit--top-level-thing. (treesit--navigate-defun): Generalize into treesit--navigate-thing. (treesit-thing-at-point): Generalized from treesit-defun-at-point. - (treesit-defun-at-point): Use treesit-thing-at-point to do tht work. + (treesit-defun-at-point): Use treesit-thing-at-point to do the work. 2022-12-25 Philip Kaludercic @@ -13035,7 +13035,7 @@ One way to solve it is to go back up the tree if we are at a leaf node and still haven't matched the target node. That's too ugly and finicky so I resorted to recursion. Now one more functions will - return give up (treesit_node_parent) if we are in a werid parse tree + return give up (treesit_node_parent) if we are in a weird parse tree that is super deep. But since we already kind of give up on this kind of parse trees (bug#59426), it doesn't really hurt. @@ -13287,7 +13287,7 @@ 2022-12-21 Andrea Corallo - * Invoke spawed Emacs processes with '-Q' when native compiling (bug#60208) + * Invoke spawned Emacs processes with '-Q' when native compiling (bug#60208) * lisp/emacs-lisp/comp.el (comp-final): Invoke spawned Emacs with '-Q'. (comp-run-async-workers): Likewise. @@ -13455,7 +13455,7 @@ Repair setopt test after error demotion to warning * test/lisp/cus-edit-tests.el (test-setopt): - Check for a warrning instead of an error in attempt to call `setopt` + Check for a warning instead of an error in attempt to call `setopt` with a value that does not match the declared type (bug#60162). 2022-12-18 Dmitry Gutov @@ -13523,13 +13523,13 @@ 2022-12-18 Philip Kaludercic - * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error + * lisp/cus-edit.el (setopt--set): Warn instead of raising an error (Bug#60162) 2022-12-18 Philip Kaludercic - Allow customising windmove user options with an empty prefix + Allow customizing windmove user options with an empty prefix * lisp/windmove.el (windmove--default-keybindings-type): Handle nil as a prefix value. (Bug#60161) @@ -13676,7 +13676,7 @@ Add treesit_assume_true and treesit_cursor_helper This is part 1 of the change to change node API to cursor API. See - the second part for more detail. (I splitted the change to make the + the second part for more detail. (I split the change to make the diff more sane.) * src/treesit.c (treesit_assume_true) @@ -13860,7 +13860,7 @@ 2022-12-16 Eli Zaretskii - Revert "Elide broken but unnecessary `if` optimisations" + Revert "Elide broken but unnecessary `if` optimizations" This reverts commit 13aa376e93564a8cf2ddbbcf0968c6666620db89. @@ -13874,7 +13874,7 @@ This reverts commit f4b430140f0866f98bbf18b7094348dc64032813. Please don't install anything on the release branch that is not - strictly necessary fro Emacs 29. + strictly necessary for Emacs 29. 2022-12-16 Mattias Engdegård @@ -13896,7 +13896,7 @@ 2022-12-16 Mattias Engdegård - Elide broken but unnecessary `if` optimisations + Elide broken but unnecessary `if` optimizations * lisp/emacs-lisp/byte-opt.el (byte-optimize-if): Remove explicit clauses purposing to simplify @@ -14026,7 +14026,7 @@ 1. the client code invoked by its jsonrpc--connection-receive inside the process filter callee immediately sends follow-up input to process within the same Lisp stack. This is a common scenario, - especially during LSP initialiation sequence used by Eglot, a + especially during LSP initialization sequence used by Eglot, a jsonrpc.el client. 2. that follow-up message is large enough for process-send-string to @@ -14442,7 +14442,7 @@ * lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): If the parameter of :eval is a string then read, evaluate and print - the result. This was always the intention and is documented behaviour. + the result. This was always the intention and is documented behavior. 2022-12-14 Michael Albinus @@ -14560,7 +14560,7 @@ This new set of functions (and tests) should eliminate defun-navigation bugs and limitations we currently have. This commit - doesn't change any existing bahavior: treesit-beginning/end-of-defun + doesn't change any existing behavior: treesit-beginning/end-of-defun and friends are unchanged. The plan is to later switch gear and replace the current functions with the new ones introduced in this change. @@ -14777,7 +14777,7 @@ Eglot: allow skipping compile-time warnings about LSP interfaces * lisp/progmodes/eglot.el (eglot-strict-mode): Add 'no-unknown-interfaces'. - (eglot--check-object): Honour new eglot-strict-mode value. + (eglot--check-object): Honor new eglot-strict-mode value. 2022-12-11 Yuan Fu @@ -15023,7 +15023,7 @@ Bring back the project--value-in-dir logic - Essentialy revert commit 2389158a31b4a12, restoring the changes + Essentially revert commit 2389158a31b4a12, restoring the changes and fixing the conflicts. Motivated by the problem brought up in bug#59722 (behavior of project-find-files/regexp when switching projects). We should find other ways to improve performance. @@ -15400,10 +15400,10 @@ table. When the 'external' is in use, the usual styles configured by the user - or other in 'completion-styles' are completely overriden. This + or other in 'completion-styles' are completely overridden. This relatively minor inconvenience is the price to pay for responsive completion where the full set of completion candidates doesn't need to - be transfered into Emacs's address space. + be transferred into Emacs's address space. * lisp/external-completion.el: New file. @@ -15521,7 +15521,7 @@ 2022-12-06 Mattias Engdegård - Lisp reader undefined behaviour excision + Lisp reader undefined behavior excision * src/lread.c (read_bool_vector, skip_lazy_string): Replace `|` with `||` to explicitly introduce sequence points since @@ -15668,7 +15668,7 @@ 2022-12-03 Mattias Engdegård - Speed up Unicode normalisation tests by a factor of 5 + Speed up Unicode normalization tests by a factor of 5 After this change, ucs-normalize-tests are still very slow but somewhat less disastrously so (from 100 to 20 min on this machine). @@ -15828,10 +15828,10 @@ be as correct as possible we enable using both. * lisp/progmodes/typescript-ts-mode.el - (typescript-ts-mode--indent-rules): Change to a function to accomodate + (typescript-ts-mode--indent-rules): Change to a function to accommodate the two languages. (typescript-ts-mode--font-lock-settings): Change to a function to - accomodate the two languages. + accommodate the two languages. (typescript-ts-base-mode): Parent mode for typescript-ts-mode and tsx-ts-mode. (typescript-ts-mode): Derive from typescript-ts-base-mode and @@ -16842,7 +16842,7 @@ reverting the current buffer. It made working in remote buffers with enable-remote-dir-locals non-nil slower, which doesn't seem worth it for a minor improvement of an infrequent operation. Also less - compexity overall. + complexity overall. * lisp/progmodes/project.el (project-try-vc, project-files) (project--vc-list-files, project-ignores, project-buffers): @@ -16929,7 +16929,7 @@ This fixes bug #59427. We now handle correctly the case when a parenthesis follows the * which is ambiguously a multiplication or indirection operator. - Also, we don't recognise a type thus found as a found type - the evidence is + Also, we don't recognize a type thus found as a found type - the evidence is too weak. * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as @@ -17846,7 +17846,7 @@ Previously applied heuristic 2 sometimes invalidates heuristic 1, add a guard so it doesn't. - The new function is just for clearity of the code and has nothing to + The new function is just for clarity of the code and has nothing to do with the change itself. * lisp/treesit.el (treesit--node-length): New function @@ -18380,7 +18380,7 @@ * test/lisp/simple-tests.el (simple-execute-extended-command--describe-binding-msg): - Bind text-quoting-style explicitly to ensure consistent behaviour + Bind text-quoting-style explicitly to ensure consistent behavior whether or not the test is run interactively. 2022-11-18 Stefan Kangas @@ -18531,7 +18531,7 @@ 2022-11-17 Philip Kaludercic - Fix the behaviour of 'byte-compile-ignore-files' + Fix the behavior of 'byte-compile-ignore-files' * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Negate the 'string-match-p' check. (Bug#59139) @@ -18694,7 +18694,7 @@ * lisp/emacs-lisp/package-vc.el (package-vc-repository-store): Unmention 'package-vc--unpack'. - (package-vc-install): Unmention 'package-vc--guess-backend' in favour + (package-vc-install): Unmention 'package-vc--guess-backend' in favor of 'package-vc-heuristic-alist'. 2022-11-17 Philip Kaludercic @@ -18736,7 +18736,7 @@ Mark 'package-vc-update' as interactive * lisp/emacs-lisp/package-vc.el (package-vc--sourced-packages-list): - Remove function in favour of 'package-vc--read-package-name'. + Remove function in favor of 'package-vc--read-package-name'. (package-vc--read-package-name): Extract out common functionality. (package-vc--read-package-desc): Add auxiliary function based on @@ -18745,7 +18745,7 @@ 'package-vc--read-package-desc'. (package-vc-install): Use 'package-vc--read-package-desc'. (package-vc-checkout): Use 'package-vc--read-package-desc'. - (package-vc--read-pkg): Remove in favour of 'package-vc--read-package-desc'. + (package-vc--read-pkg): Remove in favor of 'package-vc--read-package-desc'. (package-vc-refresh): Use 'package-vc--read-package-desc'. (package-vc-prepare-patch): Use 'package-vc--read-package-desc'. @@ -18779,7 +18779,7 @@ Handle strings as keys in 'package-vc-ensure-packages' * lisp/emacs-lisp/package-vc.el (package-vc-ensure-packages): Inter - sting keys while processing 'package-vc-selected-packages'. + string keys while processing 'package-vc-selected-packages'. As requested by Rudolf Adamkovič. @@ -20734,10 +20734,10 @@ * doc/lispref/modes.texi (Parser-based Indentation): Update manual. * lisp/progmodes/js.el (js--treesit-indent-rules): Change all - occurance of ,js-indent-level to js-indent-level. + occurrence of ,js-indent-level to js-indent-level. * lisp/progmodes/ts-mode.el (ts-mode--indent-rules): Change all - occurance of ,ts-mode-indent-offset to ts-mode-indent-offset. + occurrence of ,ts-mode-indent-offset to ts-mode-indent-offset. * lisp/treesit.el (treesit-simple-indent-rules): Change docstring. (treesit-simple-indent): Allow offset to be a variable. @@ -21031,7 +21031,7 @@ Print "decrypted" rot13 text is buffer is read-only * lisp/rot13.el (rot13-region): Add fallback if buffer is read-only - * doc/emacs/rmail.texi (Rmail Rot13): Document new behaviour. + * doc/emacs/rmail.texi (Rmail Rot13): Document new behavior. 2022-11-04 Philip Kaludercic @@ -21315,7 +21315,7 @@ * lisp/progmodes/js.el (js--treesit-font-lock-settings) * lisp/progmodes/ts-mode.el (ts-mode--font-lock-settings): Capture - commend and strings. Add empty lines. + comment and strings. Add empty lines. 2022-11-03 Jim Porter @@ -21739,7 +21739,7 @@ 2022-11-01 Gerd Möllmann - Preven a buffer-overflow (bug#58850) + Prevent a buffer-overflow (bug#58850) * src/print.c (print_vectorlike): Don't use sprintf. @@ -21831,7 +21831,7 @@ * doc/lispref/modes.texi (Parser-based Font Lock): Reflect the change in manual. * lisp/font-lock.el (font-lock-fontify-syntactically-function): New - varaible. + variable. (font-lock-default-fontify-region): Call font-lock-fontify-syntactically-function rather. (font-lock-fontify-syntactically-region): Rename to @@ -21984,7 +21984,7 @@ Unmention :release-rev (package-vc-desc->spec): Fall back on other archives if a specification is missing. - (package-vc-main-file): Add new function, copying the behaviour of + (package-vc-main-file): Add new function, copying the behavior of elpa-admin.el. (package-vc-generate-description-file): Use 'package-vc-main-file'. (package-vc-unpack): Handle special value ':last-release'. @@ -21996,7 +21996,7 @@ * lisp/vc/vc.el (vc-default-last-change): Add default 'last-change' implementation. - This attempts to replicate the behaviour of elpa-admin.el's + This attempts to replicate the behavior of elpa-admin.el's "elpaa--get-last-release-commit". 2022-10-30 Damien Cassou @@ -23428,10 +23428,10 @@ 2022-10-24 Mattias Engdegård - Fix regexp matching with atomic strings and optimised backtracking + Fix regexp matching with atomic strings and optimized backtracking This bug occurs when an atomic pattern is matched at the end of - a string and the on-failure-keep-string-jump optimisation is + a string and the on-failure-keep-string-jump optimization is in effect, as in: (string-match "\\'\\(?:ab\\)*\\'" "a") @@ -23533,7 +23533,7 @@ 2022-10-23 Yuan Fu - Change function signiture of treesit search functions + Change function signature of treesit search functions Justification: We want to make the SIDE argument in treesit-search-forward-goto optional, so I changed it to START. @@ -23549,7 +23549,7 @@ will probably be used more frequently than ALL anyway. * doc/lispref/parsing.texi (Retrieving Node): Resolve FIXME and update - function signitures. + function signatures. * lisp/treesit.el (treesit-search-forward-goto): Change SIDE to START, swap BACKWARD and ALL. (treesit-beginning-of-defun) @@ -23581,7 +23581,7 @@ 2022-10-23 Philip Kaludercic - ;Fix typo "pacakge" -> "package" + ; Fix typo for "package" 2022-10-23 Philip Kaludercic @@ -23595,7 +23595,7 @@ 2022-10-23 Philip Kaludercic - ;Fix typo "heusitic" -> "heuristic" + ; Fix typo for "heuristic" 2022-10-23 Philip Kaludercic @@ -24301,7 +24301,7 @@ from an identifier before passing it to c-add-type. (c-forward-decl-or-cast-1): CASE 3: Do not recognize two consecutive identifiers as type + variable/function unless certain conditions are met. - CASE 10: Do not recognize the "type" as a found type unless certain condtions + CASE 10: Do not recognize the "type" as a found type unless certain conditions are met. (Near end): Do not recognize the identifier in a cast as a type unless certain conditions are met. @@ -24919,9 +24919,9 @@ Delete the itree_null sentinel node, use NULL everywhere. - This effort caught a few (already commited) places that were + This effort caught a few (already committed) places that were dereferencing through ITREE_NULL in a confusing way. It makes some - functions have to check for NULL in more places, but in my experinece + functions have to check for NULL in more places, but in my experience this is worth it from a code clarity point of view. In doing this I rewrote `interval_tree_remove` completely. There @@ -25979,7 +25979,7 @@ * src/itree.c (itree_null): Statically initialize itree_null.parent to NULL. It is never accessed. (null_is_sane): Assert parent == NULL. - (interval_tree_remove_fix): Remove unecessary assignments to parent + (interval_tree_remove_fix): Remove unnecessary assignments to parent from node->parent. These were the last places itree_null.parent were read. (interval_tree_remove): Avoid an assignment to itree_null.parent @@ -26142,7 +26142,7 @@ 2022-10-10 Yuan Fu - Improve treesit-search-forward-goto so it doens't stuck at EOF + Improve treesit-search-forward-goto so it doesn't stuck at EOF * lisp/treesit.el (treesit-search-forward-goto): Handle the edge case. @@ -26198,7 +26198,7 @@ Fix tree-sitter build script in admin/notes - * admin/notes/tree-sitter/build-module/README: Add explaination. + * admin/notes/tree-sitter/build-module/README: Add explanation. * admin/notes/tree-sitter/build-module/build.sh: change typescript to tsx. @@ -26304,14 +26304,14 @@ Remove redundant check of the `limit` value. (interval_node_init): Remove `begin` and `end` args. (interval_tree_insert): Mark it as static. - Assert that the new node's `otick` should already be uptodate and its + Assert that the new node's `otick` should already be up-to-date and its new parent as well. (itree_insert_node): New function. (interval_tree_insert_gap): Assert the otick of the removed+added nodes - were uptodate and mark them as uptodate again after adjusting + were up-to-date and mark them as up-to-date again after adjusting their positions. (interval_tree_inherit_offset): Check that the parent is at least as - uptodate as the child. + up-to-date as the child. * src/lisp.h (build_overlay): Move to `buffer.h`. @@ -26336,7 +26336,7 @@ * lisp/simple.el (execute-extended-command--shorter): Compute a complete list of `commandp' symbols once. This significantly speeds up complicated cases while the slowdown of simple cases is still - accetable. + acceptable. 2022-10-09 समीर सिंह Sameer Singh @@ -26419,7 +26419,7 @@ 2022-10-08 Mattias Engdegård - Restrict string-lessp vectorisation to safe architectures + Restrict string-lessp vectorization to safe architectures * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): New. (Fstring_lessp): Only use word operations where safe, because string @@ -27109,7 +27109,7 @@ (interval_tree_propagate_limit): Use it. (null_is_sane): Remove `inline` annotation; it's not needed. (interval_tree_inherit_offset): Sanity check that `offset` is 0 when - `otick` is uptodate. Skip the unneeded increments when the offset is 0. + `otick` is up-to-date. Skip the unneeded increments when the offset is 0. (interval_tree_insert_fix): Add sanity check that we indeed have 2 reds. 2022-10-05 Po Lu @@ -27258,7 +27258,7 @@ Fix bug in "macintization" of x_draw_glyph_string * src/nsterm.m (ns_draw_stretch_glyph_string): Restore text decoration - drawing code ommitted during "macintization" to convert the X function + drawing code omitted during "macintization" to convert the X function into NS code. Reported by Qiantan Hong . 2022-10-04 Filipp Gunbin @@ -27393,7 +27393,7 @@ Merge from origin/emacs-28 - a78af3018e * src/emacs.c (load_pdump): Propery handle case when execu... + a78af3018e * src/emacs.c (load_pdump): Properly handle case when execu... # Conflicts: # src/emacs.c @@ -27429,7 +27429,7 @@ 2022-10-04 Andreas Schwab - * src/emacs.c (load_pdump): Propery handle case when executable + * src/emacs.c (load_pdump): Properly handle case when executable wasn't found. 2022-10-04 Alan Mackenzie @@ -27626,7 +27626,7 @@ * src/xterm.c (x_handle_wm_state): New function. (handle_one_xevent): Handle window state changes in WM_STATE - messages, and use them for signalling deiconification. + messages, and use them for signaling deiconification. (bug#58164) 2022-10-03 Stefan Kangas @@ -28386,7 +28386,7 @@ Rectify string= documentation * doc/lispref/strings.texi (Text Comparison): Describe the current - behaviour since about 20 years back. + behavior since about 20 years back. 2022-09-30 Mattias Engdegård @@ -28400,7 +28400,7 @@ Speed up string-lessp further * src/fns.c (Fstring_lessp): Use the memcmp fast path for ASCII-only - multibyte strings as well. Specialise loops on argument + multibyte strings as well. Specialize loops on argument multibyteness. 2022-09-30 Lars Ingebrigtsen @@ -28470,7 +28470,7 @@ Remove the per-tree null node - "make check" shows 0 unexpcted. + "make check" shows 0 unexpected. * src/itree.h (itree_null): Declare extern. (ITREE_NULL): New macro @@ -29344,7 +29344,7 @@ "c++-or-c-but-not-both-at-once" server, this commit now breaks that person's configuration. - After analysing the entries of this variable, an educated guess was + After analyzing the entries of this variable, an educated guess was made that this situation is rare. If it's not rare, then some change to the syntax of eglot-server-programs will have to ensue. @@ -29902,7 +29902,7 @@ variable. (c-after-change-mark-abnormal-strings): Set c-open-string-opener when an unbalanced string is detected. - (c-before-change): Initilize c-open-string-opener to nil, each buffer change. + (c-before-change): Initialize c-open-string-opener to nil, each buffer change. (c-electric-pair-inhibit-predicate): Use the value of c-open-string-opener to flag an unbalaced string rather than trying to calculate it again. @@ -30203,7 +30203,7 @@ Make bounding box of 'image-crop' more noticeable * lisp/image/image-crop.el (image-crop--crop-image-1): Darken the - selected region to make the bounding-box more noticable in images + selected region to make the bounding-box more noticeable in images which are mostly white (bug#58004). 2022-09-23 Lars Ingebrigtsen @@ -30445,7 +30445,7 @@ Work around rare crash when turning scroll wheel * src/xterm.c (handle_one_xevent): Don't allow devices to be - added twice handling hierarcy events. + added twice handling hierarchy events. 2022-09-21 Sean Whitton @@ -31133,7 +31133,7 @@ 2022-09-19 Po Lu - * Makefile.in: Readd warnings about "git clean -fdx" + * Makefile.in: Re-add warnings about "git clean -fdx" 2022-09-19 Po Lu @@ -34162,7 +34162,7 @@ Fix (mostly multibyte) issues in sieve-manage.el (Bug#54154) - The managesieve protocol (s. RFC5804) requires support for (a sightly + The managesieve protocol (s. RFC5804) requires support for (a slightly restricted variant of) UTF-8 in script content and script names. This commit fixes/improves the handling of multibyte characters. @@ -34210,7 +34210,7 @@ 2022-09-06 Kai Tetzlaff - Improve robustnes of `sieve-manage-quit' in case of errors + Improve robustness of `sieve-manage-quit' in case of errors * lisp/net/sieve.el (sieve-manage-quit): Avoid killing buffers it's not supposed to touch (bug#54154). @@ -34304,7 +34304,7 @@ * lisp/ffap.el (find-file-at-point): Allow people to set ffap-file-finder again (bug#50279). - * lisp/ido.el (ido-everywhere): Add an interstitial to fulfil + * lisp/ido.el (ido-everywhere): Add an interstitial to fulfill ffap-file-handler semantics. 2022-09-06 Stefan Kangas @@ -35482,7 +35482,7 @@ * lisp/t-mouse.el (gpm-mouse-tty-setup): New function. (gpm-mouse-mode): Use it as well as `tty-setup-hook`. * lisp/term/linux.el (terminal-init-linux): Remove gpm-specific code, - not neded any more. + not needed any more. 2022-08-30 Gregory Heytings @@ -36843,7 +36843,7 @@ 2022-08-21 Mattias Engdegård - Fix eshell-pipe-broken signalling + Fix eshell-pipe-broken signaling * lisp/eshell/esh-io.el (eshell-output-object-to-target): Second argument to `signal` should be a list. @@ -36927,12 +36927,12 @@ 2022-08-21 Mattias Engdegård - Update function properties and optimisations + Update function properties and optimizations * lisp/emacs-lisp/byte-opt.el (byte-opt--bool-value-form): - Recognise boolean identity in aset, put, function-put and puthash. + Recognize boolean identity in aset, put, function-put and puthash. * lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp): - Mark more functins as non-nil-returning, including the new + Mark more functions as non-nil-returning, including the new pos-bol and pos-eol. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark pos-bol and pos-eol as side-effect-free. @@ -37065,7 +37065,7 @@ 2022-08-19 Mattias Engdegård - Move `while` syntax check from optimiser to macroexpand + Move `while` syntax check from optimizer to macroexpand * lisp/emacs-lisp/byte-opt.el (byte-optimize-while): Move check... * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): ...here. @@ -37226,7 +37226,7 @@ python.el: Adjustments to Flymake backend * lisp/progmodes/python.el (python-flymake-command): Advertise - possiblity to use pylint. + possibility to use pylint. (python-flymake-command-output-pattern): Make compatible with recent versions of pyflakes. (Bug#53913) @@ -37477,7 +37477,7 @@ 2022-08-18 Mattias Engdegård - More non-nil-returning functions in source optimisation + More non-nil-returning functions in source optimization This change was partially generated and mechanically cross-validated with function type information from comp-known-type-specifiers in @@ -37785,7 +37785,7 @@ 2022-08-16 Mattias Engdegård - Improved `null` (alias `not`) optimisation + Improved `null` (alias `not`) optimization Take static boolean information of the argument into account. @@ -37793,7 +37793,7 @@ 2022-08-16 Mattias Engdegård - Improved `and` and `or` optimisation + Improved `and` and `or` optimization * lisp/emacs-lisp/byte-opt.el (byte-optimize-and, byte-optimize-or): Rewrite. Avoid branching on arguments statically known to be true or @@ -37801,9 +37801,9 @@ 2022-08-16 Mattias Engdegård - Improved `if` and `while` optimisation + Improved `if` and `while` optimization - Recognise some more special cases: + Recognize some more special cases: (if X nil t) -> (not X) (if X t) -> (not (not X)) @@ -38519,7 +38519,7 @@ Make htmlfontify-version variable obsolete - * lisp/htmlfontify.el (htmlfontify-version): Make obolete. + * lisp/htmlfontify.el (htmlfontify-version): Make obsolete. (hfy-meta-tags): Don't use above obsolete variable. 2022-08-13 Stefan Kangas @@ -38545,7 +38545,7 @@ 2022-08-13 Po Lu - Prevent selection converter from signalling if buffer is narrowed + Prevent selection converter from signaling if buffer is narrowed * lisp/select.el (xselect-convert-to-string): If positions are outside the accessible portion of the buffer, don't return @@ -38980,7 +38980,7 @@ Add "send patches" note to package-vc TODO section - * package.el (describe-package-1): Add news if avaliable + * package.el (describe-package-1): Add news if available * package.el (package--get-activatable-pkg): Prefer source packages @@ -39101,14 +39101,14 @@ 2022-08-10 Mattias Engdegård - Extend LAP optimisations to more operations + Extend LAP optimizations to more operations Extend the set of eligible opcodes for certain peephole - transformations, which then provide further optimisation + transformations, which then provide further optimization opportunities. * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): - Optimise empty save-current-buffer in the same way as we already + Optimize empty save-current-buffer in the same way as we already do for save-excursion and save-restriction. This is safe because (save-current-buffer) is a no-op. (byte-compile-side-effect-and-error-free-ops): Add list3, list4 and @@ -40884,7 +40884,7 @@ * lisp/auth-source.el (auth-source-netrc-parse-all): New function (bug#56976). - (auth-source-netrc-parse): Partially revert behaviour in previous + (auth-source-netrc-parse): Partially revert behavior in previous change -- require :allow-null to match. 2022-08-04 Lars Ingebrigtsen @@ -40900,7 +40900,7 @@ * lisp/emacs-lisp/package.el (package-autoload-ensure-default-file): Don't warn about - soon-to-be obsolete functon. + soon-to-be obsolete function. 2022-08-04 Lars Ingebrigtsen @@ -41190,7 +41190,7 @@ Adjust src/Makefile.in comments about make-docfile - * src/Makefile.in ($(etc)/DOC): Remove comment aboout make-docfile + * src/Makefile.in ($(etc)/DOC): Remove comment about make-docfile being run twice (because it no longer is). 2022-08-04 Po Lu @@ -41244,7 +41244,7 @@ Avoid redundant calls to XFlush in x_make_frame_visible * src/xterm.c (x_make_frame_visible): Keep track of whether or - not the output buffer was implictly flushed before issuing + not the output buffer was implicitly flushed before issuing XFlush. 2022-08-03 Stefan Monnier @@ -41787,7 +41787,7 @@ same key is specified twice. (Bug#56873) * doc/lispref/keymaps.texi (Creating Keymaps): Document error - signaling behaviour. + signaling behavior. * test/src/keymap-tests.el (keymap-test-duplicate-definitions): Test duplicate definition detection. @@ -42498,7 +42498,7 @@ Remove loaddefs debug code * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): - Remove code inadvertantly checked in. + Remove code inadvertently checked in. 2022-07-31 Lars Ingebrigtsen @@ -42829,7 +42829,7 @@ Minor improvements to precision scroll interpolation * lisp/pixel-scroll.el (pixel-scroll-start-momentum): Bump GC - cons threshold temporarily. This leads to a very noticable + cons threshold temporarily. This leads to a very noticeable improvement to animation speed. 2022-07-29 Po Lu @@ -42954,7 +42954,7 @@ (XTframe_up_to_date): Set FRAME_X_WAITING_FOR_DRAW if bumped. (handle_one_xevent): Handle frame drawn events. - * src/xterm.h (struct x_output): New fields for frame dirtyness + * src/xterm.h (struct x_output): New fields for frame dirtiness and vsync. 2022-07-29 Gregory Heytings @@ -43774,7 +43774,7 @@ 2022-07-25 Robert Pluim - Make package-archives URL treatment slighty laxer + Make package-archives URL treatment slightly laxer 'package-archives' URLs are expected to end in '/', but we can cater for people typoing that by using 'url-expand-file-name'. @@ -44540,7 +44540,7 @@ Merge from origin/emacs-28 - ea44d7ddfc ; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain wit... + ea44d7ddfc ; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain with... 2022-07-20 Po Lu @@ -45294,7 +45294,7 @@ 2022-07-16 Mattias Engdegård - Optimise `append` calls + Optimize `append` calls Add the transforms @@ -45317,7 +45317,7 @@ 2022-07-16 Mattias Engdegård - Improved cons optimisation + Improved cons optimization * lisp/emacs-lisp/byte-opt.el (byte-optimize-cons): Add the transform @@ -45326,10 +45326,10 @@ 2022-07-16 Mattias Engdegård - Transform (list) -> nil in source optimiser + Transform (list) -> nil in source optimizer - This optimisation is already done in the code generator but performing - it at this earlier stage is a useful normalising step that uncovers + This optimization is already done in the code generator but performing + it at this earlier stage is a useful normalizing step that uncovers more opportunities. * lisp/emacs-lisp/byte-opt.el (byte-optimize-list): New. @@ -45702,7 +45702,7 @@ (xref-backend-definitions): Complicate. (completion-category-overrides): Register a category and a style here. (completion-styles-alist): Add eglot--lsp-backend-style style - (eglot--lsp-backend-style-call): New funtion. + (eglot--lsp-backend-style-call): New function. (eglot--lsp-backend-style-all-completions): New function. (eglot--lsp-backend-style-try-completion): New function. @@ -46131,7 +46131,7 @@ 2022-07-12 Mattias Engdegård - Better gomoku X colour with bright background + Better gomoku X color with bright background * lisp/play/gomoku.el (gomoku-X): Use blue rather than green for crosses on bright background for better legibility. @@ -46155,7 +46155,7 @@ * src/pgtkmenu.c (set_frame_menubar) * src/xdisp.c (update_menu_bar) * src/xmenu.c (set_frame_menubar): Remove calls to Qrecompute_lucid_menubar - contitional on Vlucid_menu_bar_dirty_flag. + conditional on Vlucid_menu_bar_dirty_flag. 2022-07-12 Po Lu @@ -46929,7 +46929,7 @@ * src/dispextern.h (WITH_NARROWED_BEGV): New macro. * src/xdisp.c (get_narrowed_begv): New function. - (init_iterator): Initilize the 'narrowed_begv' field. + (init_iterator): Initialize the 'narrowed_begv' field. (back_to_previous_line_start, get_visually_first_element, move_it_vertically_backward): Use the new macro. @@ -47342,7 +47342,7 @@ * src/fns.c (concat_strings): Rename to... (concat_to_string): ...this. (concat): Split into concat_to_list and concat_to_vector. - (concat_to_list, concat_to_vector): New, specialised and + (concat_to_list, concat_to_vector): New, specialized and streamlined from earlier combined code. (concat2, concat3, Fappend, Fconcat, Fvconcat): Adjust calls. @@ -48036,7 +48036,7 @@ 2022-07-05 Lars Ingebrigtsen - Documnt left/right mwheel events + Document left/right mwheel events * doc/lispref/commands.texi (Misc Events): Document left/right mwheel events (bug#41722). @@ -48727,7 +48727,7 @@ 2022-07-03 Eli Zaretskii - Implement pseudo-value 'reset' of face attrributes + Implement pseudo-value 'reset' of face attributes * doc/lispref/display.texi (Face Attributes): * etc/NEWS: Document the new pseudo-value 'reset'. @@ -49171,7 +49171,7 @@ 2022-07-01 Lars Ingebrigtsen - Make time-stamp-tests.el work in a Norwegian language enviroment + Make time-stamp-tests.el work in a Norwegian language environment The short version of names for days/month is not necessary the same as limiting the string with a #n operator. For instance: @@ -50159,7 +50159,7 @@ 2022-06-30 Lars Ingebrigtsen - Restore temp-buffer-resize-mode behaviour wrt. [back] buttons + Restore temp-buffer-resize-mode behavior wrt. [back] buttons * lisp/help.el (help--window-setup): If temp-buffer-resize-mode, do the window setup after adding [back] buttons (bug#56306). @@ -50962,7 +50962,7 @@ 2022-06-26 Mattias Engdegård - Optimise away functions in for-effect context + Optimize away functions in for-effect context * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Turn functions into nil when compiled for-effect since they have no @@ -50970,7 +50970,7 @@ as the elimination of variable bindings. `unwind-protect` forms can be treated as plain function call at this point. In particular, their unwind function argument should be - not optimised for effect since it's a function. + not optimized for effect since it's a function. 2022-06-26 Stefan Monnier @@ -51141,7 +51141,7 @@ * lisp/files.el (locate-user-emacs-file): Don't create HOME if it doesn't exist (bug#47298). This returns us to Emacs 26.3 - behaviour here. + behavior here. 2022-06-26 Michael Albinus @@ -51524,7 +51524,7 @@ Bytecode opcode comments update - This is a cosmetic change only; there is no change in behaviour. + This is a cosmetic change only; there is no change in behavior. * lisp/emacs-lisp/bytecomp.el: * src/bytecode.c (BYTE_CODES, exec_byte_code): @@ -51999,7 +51999,7 @@ A trivial optimization and a formatting fix - * lisp/subr.el (internal--compiler-macro-cXXr): Re-use `head' for `n'. + * lisp/subr.el (internal--compiler-macro-cXXr): Reuse `head' for `n'. Fix indentation and line length. 2022-06-21 Tassilo Horn @@ -53548,7 +53548,7 @@ 2022-06-16 Mattias Engdegård - * src/fns.c (mapcar1): Test types in rough order of likelyhood. + * src/fns.c (mapcar1): Test types in rough order of likelihood. 2022-06-16 Mattias Engdegård @@ -53786,7 +53786,7 @@ Improve drag atom computation - * src/xterm.c (xm_get_drag_window): Avoid leak if error occured + * src/xterm.c (xm_get_drag_window): Avoid leak if error occurred creating drag window. Also use StructureNotifyMask instead of ButtonPressMask. (xm_get_drag_atom_1): Update. Make EMACS_DRAG_ATOM a list of @@ -54110,7 +54110,7 @@ (Ftreesit_query_compile): New function. (Ftreesit_query_capture): Remove code that creates a query object and instead either use make_ts_query or use the give compiled query. Free - the query object conditonally. + the query object conditionally. (syms_of_treesit): New symbol. 2022-06-14 Yuan Fu @@ -54121,7 +54121,7 @@ Add new type treesit-compiled-query - No intergration/interaction with the new type, just adding it. + No integration/interaction with the new type, just adding it. * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add new type. * src/alloc.c (cleanup_vector): Add gc for the new type. @@ -54142,8 +54142,8 @@ * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker) (byte-optimize-let-form, byte-optimize-letX): * lisp/emacs-lisp/bytecomp.el (byte-compile-unwind-protect): - Simplify source optimisation and codegen code that can now rely on - normalised let/let* and unwind-protect forms. + Simplify source optimization and codegen code that can now rely on + normalized let/let* and unwind-protect forms. 2022-06-14 Mattias Engdegård @@ -54161,14 +54161,14 @@ 2022-06-14 Mattias Engdegård - Normalise setq during macro-expansion + Normalize setq during macro-expansion - Early normalisation of setq during macroexpand-all allows later + Early normalization of setq during macroexpand-all allows later stages, cconv, byte-opt and codegen, to be simplified and duplicated checks to be eliminated. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): - Normalise all setq forms to a sequence of (setq VAR EXPR). + Normalize all setq forms to a sequence of (setq VAR EXPR). Emit warnings if necessary. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): @@ -55015,7 +55015,7 @@ 2022-06-10 Po Lu - Fix cancelling DND upon a regular X error + Fix canceling DND upon a regular X error * src/xterm.c (x_connection_closed): The display isn't dead upon a non-IO error, so don't avoid sending messages to clean stuff @@ -55553,7 +55553,7 @@ Add more super and subscript characters to latin input methods * lisp/leim/quail/latin-post.el ("latin-postfix", "latin-prefix"): Add - mssing super and subscript characters. (Bug#55722) + missing super and subscript characters. (Bug#55722) 2022-06-08 Robert Pluim @@ -55887,7 +55887,7 @@ * src/xterm.c (x_defer_selection_requests) (x_release_selection_requests): New functions. (x_dnd_begin_drag_and_drop): Use those functions to defer - selections instead. Fix error signalled when ownership of + selections instead. Fix error signaled when ownership of XdndSelection is lost. (handle_one_xevent): Likewise. @@ -56712,7 +56712,7 @@ (dnd-remove-last-dragged-remote-file): Handle list values. (dnd-begin-file-drag): Fix file name expansion. (dnd-begin-drag-files): New function. - * lisp/select.el (xselect-convert-to-filename): Handle mutiple + * lisp/select.el (xselect-convert-to-filename): Handle multiple files (a vector of file names):. @@ -56750,7 +56750,7 @@ Use a space since that is clearly what was meant. ?\ at the end of a line (ie, ?\LF) never was well-defined and produced -1 most of the time, but will soon raise an error (bug#55738). - This doesn't matter much becaue this variable is unused. + This doesn't matter much because this variable is unused. 2022-06-03 Po Lu @@ -56813,7 +56813,7 @@ 2022-06-02 Po Lu - Don't call XSelectInput on a dying display when cancelling drag-and-drop + Don't call XSelectInput on a dying display when canceling drag-and-drop * src/xterm.c (x_dnd_free_toplevels): New argument `display_alive'. @@ -56841,7 +56841,7 @@ Make ?\LF generate 10, not -1 (bug#55738) - The old -1 value was an artefact of the reader implementation. + The old -1 value was an artifact of the reader implementation. * src/lread.c (read_escape): Remove the `stringp` argument; assume character literal syntax. Never return -1. @@ -56851,7 +56851,7 @@ 2022-06-02 Mattias Engdegård - * src/lread.c (skip_lazy_string): Fix uninitialised variable. + * src/lread.c (skip_lazy_string): Fix uninitialized variable. 2022-06-02 Stefan Kangas @@ -58114,7 +58114,7 @@ This fixes bug#55684. There, with a minibuffer-only frame at start up, Emacs tried to switch to this frame, whose selected window was the mini-window. There is no other active window in this frame, so the - attempt to swith to another window failed. + attempt to switch to another window failed. * src/frame.c (do_switch_frame): On switching to a frame whose selected window is as above, before selecting the most recently used window, check @@ -58617,7 +58617,7 @@ * lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos) (byte-compile--warning-source-offset): - Remove recursion for cdr-traversal of lists, and optimise (bug#55414). + Remove recursion for cdr-traversal of lists, and optimize (bug#55414). 2022-05-26 Po Lu @@ -59668,7 +59668,7 @@ * src/haiku_support.cc (movement_locker, class EmacsWindow) (MouseMoved): Delete `movement_locker' and associated hack, - since it's superseeded by some code in haiku_read_socket. + since it's superseded by some code in haiku_read_socket. (key_map, key_chars, dpy_color_space, popup_track_message) (alert_popup_value, grab_view, grab_view_locker) (drag_and_drop_in_progress): Write comments and fix @@ -60302,7 +60302,7 @@ Also per https://github.com/joaotavora/eglot/issues/957. - Only actually and eagerly report LSP diagnotics if the user has + Only actually and eagerly report LSP diagnostics if the user has Flymake starting automatically on a timer (flymake-no-changes-timeout is a number). @@ -60659,7 +60659,7 @@ decorator dimensions. Update prototypes. * src/haikufns.c (haiku_update_after_decoration_change): Ask for - a move frame event and don't do anything if configury is not yet + a move frame event and don't do anything if configurable is not yet complete. * src/haikuterm.c (haiku_read_socket): Adjust accordingly. @@ -61050,7 +61050,7 @@ 2022-05-15 Lars Ingebrigtsen - Don't freeze Emacs on colour codes in sccs-mode + Don't freeze Emacs on color codes in sccs-mode * lisp/textmodes/css-mode.el (css--font-lock-keywords): Don't freeze Emacs on #ffffff #ffffff, and be more strict in parsing @@ -62208,7 +62208,7 @@ 2022-05-11 Yoav Marco (tiny change) - (sqlite-mode--column-names): Suppport nested parens + (sqlite-mode--column-names): Support nested parens * lisp/sqlite-mode.el (sqlite-mode--column-names): Make parsing more resilient (bug#55363). @@ -62404,7 +62404,7 @@ 2022-05-10 Lars Ingebrigtsen - Use fields on log-edit headers (which changes `C-a' behaviour) + Use fields on log-edit headers (which changes `C-a' behavior) * lisp/vc/log-edit.el (log-edit-insert-message-template): Fieldify headers so that `C-a' takes us to the start of the string, not the @@ -63316,7 +63316,7 @@ 2022-05-07 Lars Ingebrigtsen - Improve inferior-python-mode scroll behaviour + Improve inferior-python-mode scroll behavior * lisp/progmodes/python.el (inferior-python-mode): Use scroll-convervatively instead of trying to do this with a comint @@ -63381,7 +63381,7 @@ 2022-05-07 Yuan Fu - Add tree-sitter intergration + Add tree-sitter integration * configure.ac (HAVE_TREE_SITTER, TREE_SITTER_OBJ): New variables. (DYNAMIC_LIB_SUFFIX): new variable, I copied code from MODULES_SUFFIX @@ -66795,7 +66795,7 @@ * doc/misc/info.texi (Search Index): Mention it. - * lisp/info.el (Info-find-node): Allow not signalling errors. + * lisp/info.el (Info-find-node): Allow not signaling errors. (Info-apropos-matches): Allow taking a regexp. (info-apropos): Prefix now means looking for a regexp. @@ -66803,7 +66803,7 @@ Fix indentation in copy-region-as-kill - * lisp/simple.el (copy-region-as-kill): Fix indendation. + * lisp/simple.el (copy-region-as-kill): Fix indentation. 2022-04-21 Lars Ingebrigtsen @@ -67303,11 +67303,11 @@ 2022-04-18 Nacho Barrientos (tiny change) - Unify local variable initialisation in url-http + Unify local variable initialization in url-http * lisp/url/url-http.el (url-http-chunked-last-crlf-missing): Treat url-http-chunked-last-crlf-missing as any other buffer variable by - declaring and initialising it the same way as the other related + declaring and initializing it the same way as the other related ones (bug#54989). 2022-04-18 Lars Ingebrigtsen @@ -67848,7 +67848,7 @@ Make sure the ftcr font driver is used on Haiku when Cairo is enabled * src/haikufont.c (syms_of_haikufont): [USE_BE_CAIRO]: Make sure - `ftcr' superseeds `haiku'. + `ftcr' supersedes `haiku'. 2022-04-16 Paul Eggert @@ -68453,7 +68453,7 @@ 2022-04-15 Philip Kaludercic - Generalise buffer matching from project.el + Generalize buffer matching from project.el * subr.el (buffer-match): Add function to check if a buffer satisfies a condition. @@ -68622,7 +68622,7 @@ * lisp/net/ldap.el (ldap-ldapsearch-args): Change -LL to -LLL to suppress ldif version output. (ldap-search-internal): Remove skipping of version output. Remove - redundand ws skipping. + redundant ws skipping. 2022-04-14 Filipp Gunbin @@ -68938,7 +68938,7 @@ This reverts commit 78f76fe16e2737b40694f82af28d17a90a21ed7b. The commit made calls to cl-concatenate bug out, since - autoloading defalises doesn't work very well (bug#54901). + autoloading defaliases doesn't work very well (bug#54901). 2022-04-12 Po Lu @@ -69158,10 +69158,10 @@ 2022-04-12 Olaf Trygve Berglihn (tiny change) - Add biblatex alias entry types for compability with bibtex + Add biblatex alias entry types for compatibility with bibtex * lisp/textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add - biblatex alias entry types for compability with bibtex (bug#54877). + biblatex alias entry types for compatibility with bibtex (bug#54877). 2022-04-12 Lars Ingebrigtsen @@ -69178,7 +69178,7 @@ * src/xterm.c (x_dnd_cleanup_drag_and_drop): Always free DND targets even if waiting for finish. (x_dnd_begin_drag_and_drop): Free targets correctly when - signalling error and prevent activating drag-and-drop inside a + signaling error and prevent activating drag-and-drop inside a menu or popup. (It doesn't work.) 2022-04-12 Michael Albinus @@ -69301,10 +69301,10 @@ 2022-04-11 Mattias Engdegård - Recognise hybrid IPv6/IPv4 addresses in textsec (bug#54624) + Recognize hybrid IPv6/IPv4 addresses in textsec (bug#54624) * lisp/international/textsec.el (textsec--ipvx-address-p): - Recognise hybrid addresses like "::ffff:129.55.2.201". + Recognize hybrid addresses like "::ffff:129.55.2.201". Combine to a single regexp and translate to rx. Remove some regexp ambiguity (relint complaint). * test/lisp/international/textsec-tests.el (test-suspiction-domain): @@ -69628,7 +69628,7 @@ Fix DND leave events not being sent to toplevel after returning frame * src/xterm.c (x_dnd_update_state, handle_one_xevent): Make sure - to send leave events to the previous toplevel when cancelling to + to send leave events to the previous toplevel when canceling to return a frame. 2022-04-08 Po Lu @@ -70147,7 +70147,7 @@ * src/xterm.c (x_dnd_begin_drag_and_drop): Verify x_dnd_movement_x and x_dnd_movement_y are wholenums before - caling posn-at-x-y. + calling posn-at-x-y. 2022-04-07 Po Lu @@ -70240,7 +70240,7 @@ like server latency), then Flymake sometimes doesn't request any diagnostics at all. - The reason for the Flymake behaviour wasn't investigated, but that + The reason for the Flymake behavior wasn't investigated, but that wasn't a very good solution either Rather this change makes it so that when such a Flymake request comes @@ -70735,7 +70735,7 @@ Reduce GC mark-phase recursion by using explicit stack (bug#54698) - An explict stack of objects to be traversed for marking replaces + An explicit stack of objects to be traversed for marking replaces recursion for most common object types: conses, vectors, records, hash tables, symbols, functions etc. Recursion is still used for other types but those are less common and thus not as likely to cause a @@ -70859,7 +70859,7 @@ Rework eglot's mode-line Mimic flymake by replacing the old menus of the mode-line with - "context menus". List all usefull commands under the main menu + "context menus". List all useful commands under the main menu (eglot-menu-map), and commands related to LSP debugging under the project menu (eglot-debug-map). @@ -70903,7 +70903,7 @@ Since <, <=, > and >= have their own byte-ops, the corresponding functions are mostly used as arguments to higher-order functions. - This optimisation is particularly beneficial for sorting, where the + This optimization is particularly beneficial for sorting, where the comparison function is time-critical. * src/data.c (Flss, Fgtr, Fleq, Fgeq): @@ -70926,7 +70926,7 @@ Faster `string-lessp` for unibyte arguments Since this function is commonly used as a sorting predicate - where it is time-critical, this is a useful optimisation. + where it is time-critical, this is a useful optimization. * src/fns.c (Fstring_lessp): Add fast path for the common case when both arguments are unibyte. @@ -71030,7 +71030,7 @@ echo "\\" * lisp/eshell/esh-util.el (eshell-find-delimiter): Correct docstring - and treat '\' as an escapeable character when using backslash escapes. + and treat '\' as an escapable character when using backslash escapes. * test/lisp/eshell/eshell-tests.el (eshell-test/escape-special-quoted): Adapt test. @@ -71158,7 +71158,7 @@ Fix incorrect usage of XM_DRAG_SIDE_EFFECT * src/xterm.c (xm_send_top_level_leave_message) - (handle_one_xevent): Pass corret alt side effects and flags to + (handle_one_xevent): Pass correct alt side effects and flags to XM_DRAG_SIDE_EFFECT. 2022-04-02 Lars Ingebrigtsen @@ -71441,10 +71441,10 @@ * etc/themes/modus-operandi-theme.el: * etc/themes/modus-vivendi-theme.el: Ensure that the theme is reified - as expected both at compiletime and runtime. + as expected both at compile time and runtime. * etc/themes/modus-themes.el (require): Require 'cl-lib' and 'subr-x' - at compiletime. + at compile time. (seq): Require the 'seq' library. (modus-themes-completion-standard-first-match) (modus-themes-completion-standard-selected) @@ -71683,7 +71683,7 @@ * src/pdumper.c (dump_get_max_page_size): Rename from 'dump_get_page_size'. - * src/pdumper.c: Remove getpagesize.h dependecy. + * src/pdumper.c: Remove getpagesize.h dependency. 2022-03-30 Michael Albinus @@ -72118,7 +72118,7 @@ Make sure that the value added to the `read_objects_completed` set is the one we actually return; previously this wasn't the case for conses - because of an optimisation (bug#54501). + because of an optimization (bug#54501). Also add a check for vacuous self-references such as #1=#1# instead of returning a nonsense value from thin air. @@ -72848,7 +72848,7 @@ by RFC 5322. When eudc-inline-expansion-format remains set to a list as previously, - the old behaviour is fully retained. + the old behavior is fully retained. 2022-03-22 Lars Ingebrigtsen @@ -73369,7 +73369,7 @@ 2022-03-19 Po Lu - Improve behaviour of drag-n-drop during window manager operations + Improve behavior of drag-n-drop during window manager operations * src/xterm.c (x_dnd_begin_drag_and_drop): Select for some events on the root window. @@ -74070,7 +74070,7 @@ generation of random bignums without using Frem etc. * src/fns.c (get_random_fixnum): New function. (Frandom): Use it, and get_random_bignum. - Be consistent about signalling nonpositive integer arguments; + Be consistent about signaling nonpositive integer arguments; since zero is invalid, Qnatnump is not quite right here. * src/sysdep.c (get_random_ulong): New function. @@ -74684,7 +74684,7 @@ This results in better performance, and bytecode recursion is no longer limited by the size of the C stack. The bytecode stack is currently of fixed size but overflow is handled gracefully by - signalling a Lisp error instead of the hard crash that we get now. + signaling a Lisp error instead of the hard crash that we get now. In addition, GC marking of the stack is now faster and more precise. Full precision could be attained if desired. @@ -74911,7 +74911,7 @@ Return the same file from locate-file in nativecomp and non * lisp/files.el (locate-file): Return the .elc file (if it exists) - in nativecomp, too, to mimic the behaviour from non-nativecomp + in nativecomp, too, to mimic the behavior from non-nativecomp builds (bug#51308). 2022-03-12 Lars Ingebrigtsen @@ -74931,7 +74931,7 @@ 2022-03-12 Alexander Adolf - Facilitate Customisation of Message-Mode Header Completion Behaviour + Facilitate Customization of Message-Mode Header Completion Behavior * lisp/gnus/message.el (message-email-recipient-header-regexp): New user option. @@ -74966,7 +74966,7 @@ * src/bytecode.c (FETCH2): Use `|` instead of `+` to combine the bytes forming a 16-bit immediate - argument so that GCC (prior to version 12) recognises the idiom and + argument so that GCC (prior to version 12) recognizes the idiom and generates a 16-bit load. This applies for little-endian machines with cheap unaligned accesses such as x86[-64], arm64 and power64le. @@ -74974,7 +74974,7 @@ kinds of Lisp code, as 16-bit immediates are used by all jump instructions. - Clang performs this optimisation for both `+` and `|` from version 10. + Clang performs this optimization for both `+` and `|` from version 10. 2022-03-12 Mattias Engdegård @@ -75284,7 +75284,7 @@ Support remote home directories via connection property * doc/misc/tramp.texi (Home directories): New section. - (Top, Usage): Add it to the menue. + (Top, Usage): Add it to the menu. (Predefined connection information): Mention "~". (Multi-hops, File name syntax): Fix typos. @@ -75704,7 +75704,7 @@ Merge from origin/emacs-28 73f28fbde8 Add a comment for previous browse-url-of-dired-file change - 9b74e84857 Restore documented Emacs 27.2 behaviour of browse-url-of-d... + 9b74e84857 Restore documented Emacs 27.2 behavior of browse-url-of-d... cd77fd3b85 Update to Org 9.5.2-24-g668205 2022-03-07 Manuel Giraud @@ -75867,7 +75867,7 @@ 2022-03-06 Mattias Engdegård - Don't accept whitespace or hex floats in rgbi: colour specs + Don't accept whitespace or hex floats in rgbi: color specs `color-values-from-color-spec` (new in Emacs 28) erroneously accepted leading whitespace and hex floats in rgbi: components. @@ -78381,7 +78381,7 @@ Fix SIGFPE on some fonts when calculating their average width on Haiku - * src/haiku_font_support.cc (estimate_font_ascii): Avoid divison + * src/haiku_font_support.cc (estimate_font_ascii): Avoid division by zero. 2022-02-16 Po Lu @@ -78466,7 +78466,7 @@ * src/character.c (count_size_as_multibyte): Move the overflow test outside the loop, which makes it much faster. Standard compilers - will even vectorise it if asked to (-O2 in Clang, -O3 in GCC). + will even vectorize it if asked to (-O2 in Clang, -O3 in GCC). 2022-02-16 Mattias Engdegård @@ -78694,7 +78694,7 @@ (vc-clone): Declare function for package-unpack. (package-unpack): Handle source packages. (package-generate-description-file): Handle source packages by - ommiting a version number. + omitting a version number. (package-install-from-archive): Check if a package is a source package. (package-fetch): Add new command @@ -78791,7 +78791,7 @@ 2022-02-14 Po Lu - * etc/TODO: Update some entires related to macOS and NS. + * etc/TODO: Update some entries related to macOS and NS. Xwidgets have worked on NS for a long time, "smooth scrolling" is now available as `pixel-scroll-precision-mode' for all GUI @@ -78821,7 +78821,7 @@ 2022-02-13 Po Lu - Improve efficency of handling DeviceChanged events + Improve efficiency of handling DeviceChanged events * src/xterm.c (handle_one_xevent): Just update the device that was changed on DeviceChanged and only do hierarchy recalculation @@ -78974,7 +78974,7 @@ 2022-02-12 Po Lu - Stop quering for Xinerama inside x_get_monitor_attributes + Stop querying for Xinerama inside x_get_monitor_attributes * src/xfns.c (x_get_monitor_attributes): Remove Xinerama check and use xinerama_supported_p instead. @@ -79096,7 +79096,7 @@ specpdl refs has been converted. We only do this on 64-bit platforms, since those tend to have modern - ABIs where small structs are optimised as scalars. In other words, + ABIs where small structs are optimized as scalars. In other words, this change should not affect the compiled code. * src/lisp.h (specpdl_ref): Now a struct on 64-bit platforms. @@ -79332,7 +79332,7 @@ 2022-02-11 Mattias Engdegård - Modernise byte-compilation chapters in manual + Modernize byte-compilation chapters in manual * doc/lispref/compile.texi (Speed of Byte-Code): More representative numbers for byte code; the difference is much greater today. @@ -79484,7 +79484,7 @@ Restore command-line--load-script messaging * lisp/startup.el (command-line--load-script): Restore previous - non-messaging behaviour. + non-messaging behavior. 2022-02-10 Michael Albinus @@ -79681,14 +79681,14 @@ 2022-02-09 Po Lu - Explictly specify whether or not to respect alpha-background on Cairo + Explicitly specify whether or not to respect alpha-background on Cairo * src/ftcrfont.c (ftcrfont_draw): Don't respect `alpha-background' if drawing cursor. (bug#53890) * src/xterm.c (x_set_cr_source_with_gc_foreground): (x_set_cr_source_with_gc_background): New parameters `respect_alpha_background'. All callers changed. - * src/xterm.h: Update protoypes. + * src/xterm.h: Update prototypes. 2022-02-09 Tassilo Horn @@ -79945,7 +79945,7 @@ * src/widget.c (update_wm_hints): Accept frame separately from the shell widget. - (widget_update_wm_size_hints): Require WM shell to be explictly + (widget_update_wm_size_hints): Require WM shell to be explicitly specified. (EmacsFrameRealize): (EmacsFrameResize): Update callers to `update_wm_hints'. @@ -80411,7 +80411,7 @@ Add a :distant-foreground to the lazy-highlight face * lisp/isearch.el (lazy-highlight): Add a :distant-foreground - colour so that the text is always legible (bug#16969). + color so that the text is always legible (bug#16969). 2022-02-05 Lars Ingebrigtsen @@ -80841,7 +80841,7 @@ error will occur in x_composite_image as libXpm will load pixmaps of depth 16 instead of depth 32. - * src/image.c (x_create_x_image_and_pixmap): Explictly specify + * src/image.c (x_create_x_image_and_pixmap): Explicitly specify display depth. (x_create_xrender_picture): (xpm_load): @@ -81097,7 +81097,7 @@ of not being in dumping or bootstrap, since it is no longer needed. Test that 'debug-early's symbol-function is bound. Ensure there is enough working space in specpdl and eval_depth. - (syms_of_eval): New DEFSYM for Qdebug_early. Initialise Vdebugger to + (syms_of_eval): New DEFSYM for Qdebug_early. Initialize Vdebugger to Qdebug_early rather than Qnil. 2022-02-02 Juri Linkov @@ -81169,7 +81169,7 @@ 2022-02-02 Po Lu - Make behaviour of `mouse-autoselect-window' consistent with X on NS + Make behavior of `mouse-autoselect-window' consistent with X on NS * src/nsterm.m ([EmacsView mouseMoved:]): Ignore if `selected_window' is a minibuffer window. @@ -81185,7 +81185,7 @@ 2022-02-01 Po Lu - Improve behaviour of `mouse-autoselect-window' on Haiku + Improve behavior of `mouse-autoselect-window' on Haiku * src/haikuterm.c (haiku_read_socket): Don't select windows if the selected window is a minibuffer window or a popup is @@ -81445,7 +81445,7 @@ We used to store in `load-history` when an autoload is redefined as a non-autoload and in the `autoload` symbol property we used to store - the autoload data that used to be used before it got overriden. + the autoload data that used to be used before it got overridden. Instead, store the history of the function definition of a symbol in its `function-history` symbol property. @@ -81839,7 +81839,7 @@ 2022-01-29 Lars Ingebrigtsen - Modernise the security section in the efaq a bit + Modernize the security section in the efaq a bit * doc/misc/efaq.texi (Security risks with Emacs): Remove the X bit, and add a bit about browsing the web (bug#24489). @@ -82477,7 +82477,7 @@ Minor `concat` tweaks * src/fns.c (concat): Do things in the right order for speed. - (concat_strings): Initialise variable. + (concat_strings): Initialize variable. 2022-01-26 Lars Ingebrigtsen @@ -82648,7 +82648,7 @@ (Fappend, Fvconcat): Adapt to changed signature of concat. (Fcopy_sequence): Faster implementation for lists, strings, and vectors. (concat_strings): New. - (concat): Strip code for string target, simplify, optimise. + (concat): Strip code for string target, simplify, optimize. (Fcopy_alist): Use Fcopy_sequence. 2022-01-25 Lars Ingebrigtsen @@ -83912,7 +83912,7 @@ Make diff--iterate-hunks more resilient * lisp/vc/diff-mode.el (diff--iterate-hunks): Ignore malformed - hunks instead of signalling errors (bug#53343). + hunks instead of signaling errors (bug#53343). 2022-01-21 Shuguang Sun @@ -83936,7 +83936,7 @@ than before, for example when a subcommand is concatenated in an argument. - * lisp/eshell/esh-cmd.el (eshell--find-subcommands): New fuction. + * lisp/eshell/esh-cmd.el (eshell--find-subcommands): New function. (eshell--invoke-command-directly): Use 'eshell-find-subcommands'. * test/lisp/eshell/eshell-tests.el @@ -84662,7 +84662,7 @@ Fix event timestamp generation on Haiku - * src/haikuterm.c (haiku_read_socket): Use miliseconds for event + * src/haikuterm.c (haiku_read_socket): Use milliseconds for event time. 2022-01-18 Stefan Monnier @@ -84849,7 +84849,7 @@ This fixes several issues: tooltips having no right internal border, reusing tooltips occasionally freezing Emacs, and - inconsistent behaviour when compared to X. + inconsistent behavior when compared to X. * src/haiku_support.cc (BWindow_resize): Revert a recent change. (BView_move_frame): @@ -85295,7 +85295,7 @@ * src/haiku_support.c (be_popup_file_dialog): Reduce idle processor load by increasing timeout. The timeout is still too - low to be noticable by the user. + low to be noticeable by the user. 2022-01-16 Po Lu @@ -85419,7 +85419,7 @@ mechanism. (byte-compile-function-warn): Replace byte-compile-last-position by a symbol-with-pos-pos call. - (compile-defun): Use local variable start-read-position to fulfil purpose of + (compile-defun): Use local variable start-read-position to fulfill purpose of old byte-compile-read-position. Push the just read FORM onto byte-compile-form-stack. @@ -85640,7 +85640,7 @@ No longer strip positions from symbols before each use of a form, instead relying on the low level C routines to do the right thing. Instead strip them - from miscellaneous places where this is needed. Stip them alson in + from miscellaneous places where this is needed. Strip them also in `function-put'. Push forms onto byte-compile-form-stack and pop them "by hand" rather than by @@ -85816,7 +85816,7 @@ * lisp/battery.el (battery-status-function): In Termux, neither /sys/ or /proc/ are readable on phones that are not rooted. This - patch makes Emacs verify if they are readable before it attemps + patch makes Emacs verify if they are readable before it attempts reading them (bug#53026). 2022-01-14 Robert Pluim @@ -85875,7 +85875,7 @@ * lisp/progmodes/python.el (python-shell-send-string-no-output): Don't let-bind comint-preoutput-filter-functions globally for all comint - processes. Modify the behaviour of only the current python + processes. Modify the behavior of only the current python process (bug#53219). 2022-01-14 Robert Pluim @@ -85904,7 +85904,7 @@ Merge from origin/emacs-28 34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068). - 3c06c37a8b Remove mention of removed `gnus-treat-play-sounds' variabl... + 3c06c37a8b Remove mention of removed `gnus-treat-play-sounds' variable... 2022-01-13 Po Lu @@ -86777,7 +86777,7 @@ This was found during the investigation surrounding bug#53136, but is not directly related. - * src/filelock.c (lock_if_free): Explictly test err against -1 + * src/filelock.c (lock_if_free): Explicitly test err against -1 or -2, and reverse sign of system errors on Haiku. (No Haiku error occupies -1 or -2.) @@ -87231,7 +87231,7 @@ 2022-01-07 Po Lu - Disable new input method behaviour by default on X + Disable new input method behavior by default on X * src/xfns.c (supported_xim_styles): Default to STYLE_NONE. @@ -87818,7 +87818,7 @@ here. * src/haikufns.c (haiku_visualize_frame): - (haiku_unvisualize_frame): Sychronize after visibility changes. + (haiku_unvisualize_frame): Synchronize after visibility changes. 2022-01-03 Po Lu @@ -88558,9 +88558,9 @@ (emit_ctxt_code): Export the global F_SYMBOLS_WITH_POS_ENABLED_RELOC_SYM. (define_lisp_symbol_with_position, define_GET_SYMBOL_WITH_POSITION): New functions. - (Fcomp__init_ctxt): Initialise comp.bool_ptr_type, call the two new + (Fcomp__init_ctxt): Initialize comp.bool_ptr_type, call the two new define_.... functions. - (load_comp_unit): Initialise **f_symbols_with_pos_enabled_reloc. + (load_comp_unit): Initialize **f_symbols_with_pos_enabled_reloc. * src/fns.c (Fput): Strip positions from symbols in PROPNAME and VALUE. @@ -89045,7 +89045,7 @@ 2021-12-27 Michael Albinus - The temprary "session" collection might not exist in Secret Service + The temporary "session" collection might not exist in Secret Service * doc/misc/auth.texi (Secret Service API): * test/lisp/net/secrets-tests.el (secrets--test-delete-all-session-items) @@ -89600,7 +89600,7 @@ Changes: - structure the result of mm-dissect-buffer of application/pkcs7-mime - like a multipart mail so there is no loosing of information of + like a multipart mail so there is no losing of information of verification and decryption results which can now be displayed by gnus-mime-display-security @@ -89616,7 +89616,7 @@ to print "Encrypted" or "Signed" accordingly in the security button - adjust mm-possibly-verify-or-decrypt to check for smime-type to ask - wether to verify or decrypt the part and not to always ask to decrypt + whether to verify or decrypt the part and not to always ask to decrypt - adjust mm-view-pkcs7-decrypt and verify to call mm-sec-status so success information can be displayed by gnus-mime-display-security @@ -89992,7 +89992,7 @@ * src/xfns.c (Fx_set_mouse_absolute_pixel_position): * src/xterm.c (frame_set_mouse_pixel_position): Replace calls to XWarpPointer with calls to XIWarpPointer with - the client pointer explictly specified. This avoids the + the client pointer explicitly specified. This avoids the odd situation where the client pointer of the root window is not the client pointer of the frame. @@ -90655,7 +90655,7 @@ Remove incorrect byte-hunk-handler for `eval` - This optimisation is of very limited utility and miscompiles top-level + This optimization is of very limited utility and miscompiles top-level code having the form (eval 'CODE t) by replacing it with CODE which will then, as things currently stand, be evaluated with dynamic binding. @@ -92005,7 +92005,7 @@ be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328) 35a96139df Clarify a comment in xdisp.c 6ba2f028cf Revert "Grep alias `all' shall not match parent directory" - eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul... + eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the default... 538fc1d0e0 Fix mode-line display in Calendar mode # Conflicts: @@ -93530,14 +93530,14 @@ Remove separators at the beginning and end of the context menu * lisp/mouse.el (context-menu-map): Remove beginning/end - seperators (bug#52237). + separators (bug#52237). 2021-12-03 Lars Ingebrigtsen Improve how dired-mark-sexp interprets file sizes in non-C locales * lisp/dired-x.el (dired-x--string-to-number): Try to understand - localised numbers (with "." separators or the like) (bug#23373). + localized numbers (with "." separators or the like) (bug#23373). 2021-12-03 Stefan Kangas @@ -93572,7 +93572,7 @@ 2021-12-03 Stefan Kangas - image-mode: Advertize viewing as text less eagerly + image-mode: Advertise viewing as text less eagerly * lisp/image-mode.el (image-text-based-formats): New defcustom. (image-mode--setup-mode): Don't show message to show image as text @@ -93716,7 +93716,7 @@ 2be090d5d3 ; * ChangeLog.3: Minor fixes. 9963b11bf7 ; * admin/authors.el (authors-aliases): Further updates. 50b40e1d4f ; * lisp/org/ob-julia.el: Fix Author header for authors.el. - 84166ea2e6 CC Mode: Recognise "struct foo {" as introducing a type de... + 84166ea2e6 CC Mode: Recognize "struct foo {" as introducing a type de... 2021-12-02 Lars Ingebrigtsen @@ -93943,7 +93943,7 @@ * lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down) (pixel-scroll-precision-scroll-up): Take scroll margin into - accout. + account. 2021-12-01 Po Lu @@ -94360,7 +94360,7 @@ 2021-11-30 Andrea Corallo - Improve native compiler startup circular dependecy prevention mechanism + Improve native compiler startup circular dependency prevention mechanism * src/comp.c (maybe_defer_native_compilation): Update to accumulate delayed objects in `comp--delayed-sources'. @@ -94382,7 +94382,7 @@ 2021-11-30 Mattias Engdegård - Generalise CPS-conversion let optimisation + Generalize CPS-conversion let optimization * lisp/emacs-lisp/generator.el (cps--transform-1): Eliminate a temporary for the last of any `let` form, not just for @@ -94452,7 +94452,7 @@ 30553d889d Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e... ecf3bf66ba Remove problematic characters from modus-themes.org (bug#5... - de9d27f679 Avoid undefined behaviour when copying part of structure + de9d27f679 Avoid undefined behavior when copying part of structure # Conflicts: # doc/misc/modus-themes.org @@ -94925,7 +94925,7 @@ 2021-11-29 Andreas Schwab - Avoid undefined behaviour when copying part of structure + Avoid undefined behavior when copying part of structure * src/dispnew.c (copy_row_except_pointers): Don't use address of subobject as starting point. @@ -97333,7 +97333,7 @@ * lisp/emacs-lisp/ert.el (ert-batch-backtrace-line-length): Fix docstring. - (ert-run-tests-batch): Remove redundand let-binding. + (ert-run-tests-batch): Remove redundant let-binding. (ert-run-tests-interactively): Fix interactive spec. 2021-11-18 Mattias Engdegård @@ -98175,7 +98175,7 @@ Merge from origin/emacs-28 5dbad52 gnus-summary-line-format doc string clarification - d4536ff Fix follow-scroll-down in a small buffer which starts slightl... + d4536ff Fix follow-scroll-down in a small buffer which starts slightly... 2021-11-14 Eli Zaretskii @@ -98335,7 +98335,7 @@ 2021-11-13 Michael Albinus - Revert accidential commit in icomplete.el + Revert accidental commit in icomplete.el 2021-11-13 Michael Albinus @@ -98401,7 +98401,7 @@ Where c-record-found-types gets "bound" to itself, we postpone the calling of c-fontify-new-type on possible new found types until these are confirmed by - the return from the function tentatively finding these types, for exmaple + the return from the function tentatively finding these types, for example c-forward-<>-arglist. We check this "binding" by testing the value of c-record-found-types. @@ -100934,7 +100934,7 @@ 5e9b4e70ab Fix dbus-test04-register-method on CentOS (Bug#51369) d96de23510 * lisp/transient.el: Update to package version v0.3.7-11-g... 7343b0d0e4 ; * etc/NEWS: Native compilation is more picky about missi... - 0d6b2b0b9d ; * etc/PROBLEMS: Move entry about LLVM plugin to the righ... + 0d6b2b0b9d ; * etc/PROBLEMS: Move entry about LLVM plugin to the right... # Conflicts: # etc/NEWS @@ -100991,7 +100991,7 @@ (ns_glyph_metrics): Stop escaping names. (ns_spec_to_descriptor): Fix font descriptor creation for symbolic - font spec entires. + font spec entries. (ns_descriptor_to_entity): Create entries with the correct symbolic styles. @@ -101763,11 +101763,11 @@ 2021-11-02 Mattias Engdegård - Optimise (cond) => nil at source level + Optimize (cond) => nil at source level * lisp/emacs-lisp/byte-opt.el (byte-optimize-cond): - Optimise clause-free `cond`, which can arise from earlier - transformations. This enables further optimisations. + Optimize clause-free `cond`, which can arise from earlier + transformations. This enables further optimizations. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases. @@ -102644,10 +102644,10 @@ 2021-10-26 Stefan Kangas - image-dired: Improve mouse behaviour + image-dired: Improve mouse behavior * lisp/image-dired.el (image-dired-thumbnail-mode-map): Improve mouse - behaviour: ignore dragging, as it currently doesn't do anything + behavior: ignore dragging, as it currently doesn't do anything useful, and make all clicks just select the thumbnail. (image-dired-mouse-display-image) (image-dired-mouse-select-thumbnail): Move point to closest image @@ -102758,7 +102758,7 @@ strings. The code originally set that charset for any server with literal+ capability, borking all searches on an Exchange server. This code only sets utf-8 for multibyte search strings in particular, which - would be borken for Exchange anyway. + would be broken for Exchange anyway. * lisp/gnus/gnus-search.el (gnus-search-imap-search-command): Ensure we're only doing the literal+ dance for multibyte strings (multibyte @@ -102933,7 +102933,7 @@ 2021-10-24 Lars Ingebrigtsen - Display a message if HMTL rendering takes a long time + Display a message if HTML rendering takes a long time * lisp/net/eww.el (eww-display-html): Display a message if HTML rendering takes a long time (bug#19776). @@ -102956,7 +102956,7 @@ This aims to fix the scenario where on jit-lock's first scan of a type, it is not recognized as such, and only later does this happen. The fontification of such found types is now done by background scanning in short time slices - immediately after initialising the mode. + immediately after initializing the mode. * lisp/progmodes/cc-engine.el (c-add-type-1): New function. (c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for @@ -103172,7 +103172,7 @@ Make dired-x-guess-file-name-at-point obsolete * lisp/dired-x.el (dired-x-guess-file-name-at-point): Make - obsolete in favour of 'thing-at-point'. + obsolete in favor of 'thing-at-point'. (dired-x-read-filename-at-point): Use 'thing-at-point' instead of above obsolete function. @@ -103209,7 +103209,7 @@ * lisp/image-dired.el (exif): Require. (image-dired-cmd-read-exif-data-program) (image-dired-cmd-read-exif-data-options) - (image-dired-get-exif-data): Make obsolete in favour of using + (image-dired-get-exif-data): Make obsolete in favor of using exif.el. This removes a dependency on external exiftool for some operations. (image-dired-get-exif-file-name) @@ -103254,7 +103254,7 @@ This aims to fix the scenario where on jit-lock's first scan of a type, it is not recognized as such, and only later does this happen. The fontification of such found types is now done by background scanning in short time slices - immediately after initialising the mode. + immediately after initializing the mode. * lisp/progmodes/cc-engine.el (c-add-type-1): New function. (c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for @@ -104586,7 +104586,7 @@ Merge from origin/emacs-28 - 47e09d1855 Copy parent face attributes to tab-line-tab-current instea... + 47e09d1855 Copy parent face attributes to tab-line-tab-current instead... d96f8b22c0 Another fix for 'ibuffer-shrink-to-fit' (Bug#7218, Bug#51029) 2021-10-12 Glenn Morris @@ -104918,7 +104918,7 @@ 315fe20086 ; * src/Makefile.in (../native-lisp): Add comment. 47cbd103f5 * lisp/bindings.el (mode-line-position): Improve tooltip. 35a752863a * lisp/progmodes/xref.el: Bump the version. - bbcd8cc1a9 Slight simplificaiton + bbcd8cc1a9 Slight simplification e139dd1b1e Fix doc strings of 2 categories 59782839cb (xref--collect-matches-1): Remove some intermediate alloca... 1c7d056f4d ; Fix two typos where em dash was written as en dash @@ -105585,7 +105585,7 @@ (term-ansi-face-already-done): Make obsolete (term--maybe-brighten-color): Remove (term--color-as-hex): New function - (term-handle-colors-array): Make obsolete in favour of the new + (term-handle-colors-array): Make obsolete in favor of the new function 'term--handle-colors-list'. (term--handle-colors-list): New function, that can also handle ANSI codes 38 and 48. @@ -106426,7 +106426,7 @@ Use project-files to know which directory watchers to skip The directory-finding logic is probably a bit slower than using - eglot--directories-recursively, but since it honours `.gitignores` and + eglot--directories-recursively, but since it honors `.gitignores` and ignores more directories it's much faster overall. And guaranteed to create less watchers. @@ -106438,7 +106438,7 @@ 2021-05-26 João Távora - Hard code an exception to "node_modules" directores + Hard code an exception to "node_modules" directories * eglot.el (eglot--directories-recursively): Fix. @@ -106833,7 +106833,7 @@ tremendeously slow down the process. But this is only a suspicion. This commit tries some simple optimizations: if a directory is known - to be watch-worthy becasue one of its files matched a single glob, no + to be watch-worthy because one of its files matched a single glob, no more files under that directory are tried. This should help somewhat. Also fixed a bug in 'eglot--files-recursively', though I suspect that @@ -107246,7 +107246,7 @@ Simplify dir-watching strategy of w/didchangewatchedfiles Instead of massaging the globPattern to match directories instead of - files, which is fragile, gather the list of directoris to watch by + files, which is fragile, gather the list of directories to watch by matching the globPattern against every file recursively (except hidden files and dirs). @@ -107783,7 +107783,7 @@ Only makes two changes: a deletion of the "// " and a replacement of a newline with a space character. The second change fooled Eglot's fix for https://github.com/joaotavora/eglot/issues/259, by making a change similar to the one it is made to detect - and correct. That fix should taget things that happen on the same + and correct. That fix should target things that happen on the same line, this not being one of those things. * eglot.el (eglot--after-change): Only apply fix to https://github.com/joaotavora/eglot/issues/259 if @@ -107897,7 +107897,7 @@ * src/pgtkselect.c: * src/pgtkselect.h: * src/pgtkterm.c: - * src/pgtkterm.h: Update copyright dates - No Funtional Changes + * src/pgtkterm.h: Update copyright dates - No Functional Changes 2020-11-23 Yuuki Harano @@ -108296,7 +108296,7 @@ minimize gtkutil.c differences. - * src/pgtkterm.h: remove compiletime ifdefs + * src/pgtkterm.h: remove compile time ifdefs * src/gtkutil.h: block out unused decl @@ -108345,7 +108345,7 @@ * src/gtkutil.c (xg_create_frame_widgets): - hacky GTK offsets taht will need better calculations + hacky GTK offsets that will need better calculations Get parent frame's editor widget allocation for the offset @@ -108511,7 +108511,7 @@ 2020-11-21 Yuuki Harano - Make multipdisplay work by limiting selection while enabed + Make multipdisplay work by limiting selection while enabled * src/pgtkterm.c (pgtk_mouse_position): @@ -108528,12 +108528,12 @@ 2020-11-21 Yuuki Harano - Improve drawing efficency by refactoring code + Improve drawing efficiency by refactoring code * ../src/pgtkterm.c (fill_background, fill_background_by_face) (x_draw_glyph_string_background, x_draw_glyph_string_bg_rect) (x_draw_image_glyph_string, x_draw_stretch_glyph_string) - (pgtk_clear_under_internal_border): Refator duplcate code + (pgtk_clear_under_internal_border): Refator duplicate code 更に効率化。 @@ -108849,7 +108849,7 @@ 2020-11-21 Yuuki Harano - Simplify compilaiton condtion + Simplify compilation condition * ../src/menu.c (single_menu_item): @@ -109221,7 +109221,7 @@ Uses Eldoc's eldoc-documentation-functions variable. In Eldoc v1.0.0 that variable was already available as a way of handling/composing multiple docstrings from different sources, but it didn't work - practically with mutiple concurrent async sources. This was fixed in + practically with multiple concurrent async sources. This was fixed in 1.1.0, which Eglot now requires. This fixes the synchronization problems reported in https://github.com/joaotavora/eglot/issues/494 and also @@ -109467,7 +109467,7 @@ use-package--foo--post-config-hook This should make config customisations more predictable (for example, spacemacs - uses these hooks extensively to allow 'layers' to be customised). + uses these hooks extensively to allow 'layers' to be customized). I got rid of the "special" default value for :config, because it doesn't seem to be treated any differently than nil. @@ -109565,14 +109565,14 @@ 2020-05-02 João Távora - Kind of honour eldoc-echo-area-use-multiline-p + Kind of honor eldoc-echo-area-use-multiline-p A reworking of an idea and original implementation by Andrii Kolomoiets . It doesn't honor it completely because the semantics for a non-t, non-nil value are tricky. And we don't always exactly know what the symbol prefix reliably. - * eglot.el (eglot--update-doc): Kind of honour + * eglot.el (eglot--update-doc): Kind of honor eldoc-echo-area-use-multiline-p. GitHub-reference: close https://github.com/joaotavora/eglot/issues/443 @@ -110204,7 +110204,7 @@ Support markdown for textdocument/hover () - * eglot.el (eglot-client-capabilities): annouce markdown support for hover. + * eglot.el (eglot-client-capabilities): announce markdown support for hover. (eglot--format-markup): Format hover info with Markdown. Fixes: https://github.com/joaotavora/eglot/issues/328 @@ -110401,7 +110401,7 @@ completion. When the completion is close to done, the :exit-function is called, to potentially rework the inserted text so that the final result might be quite different from the proxy (it might be a snippet, - or even a suprising text edit). + or even a surprising text edit). The most important change in this commit reworks the way the completion "bounds" are calculated in the buffer. This is the region @@ -110418,7 +110418,7 @@ https://github.com/microsoft/language-server-protocol/issues/651, we have no choice but to play along with that inneficient and grotesque strategy to implement flex-style matching. Like ever in LSP, we do so - while being backward-compatible to all previously supported behaviour. + while being backward-compatible to all previously supported behavior. * eglot.el (eglot-completion-at-point): rework. @@ -110429,8 +110429,8 @@ Always filter completions client-side by prefix Prefix completion is all we get in LSP because there are some servers - that send *all* completions everytime. This is horrible, but it's the - currently defined behaviour. See + that send *all* completions every time. This is horrible, but it's the + currently defined behavior. See https://github.com/microsoft/language-server-protocol/issues/651. * eglot.el (eglot-completion-at-point): Use all-completions. @@ -110584,7 +110584,7 @@ Unbreak elm language server which does use :triggercharacters Only query completionProvider -> triggerCharacter information if the - server has provided it. Elm's, and probaly other's, do not provide + server has provided it. Elm's, and probably other's, do not provide it, which doesn't mean they don't support completion. * eglot.el (eglot-completion-at-point): Check that completion @@ -111371,7 +111371,7 @@ Use eglot--dbind and eglot--lambda throughout - The default behaviour of these macros is to be lenient towards servers + The default behavior of these macros is to be lenient towards servers sending unknown keys, which should fix the issue. * eglot.el (eglot--lsp-interface-alist): Add a bunch of new interfaces. @@ -111456,7 +111456,7 @@ Support completioncontext to help servers like ccls - * eglot.el (eglot-client-capabilities): Annouce + * eglot.el (eglot-client-capabilities): Announce textDocument/completion/contextSupport. (eglot--CompletionParams): New helper. (eglot-completion-at-point): Use it. @@ -112024,7 +112024,7 @@ :ensure-system-package was installing packages by running system-packages-get-command via async-shell-command. This meant that - system-packages-use-sudo wasn't being honoured. + system-packages-use-sudo wasn't being honored. This patch makes :ensure-system-package use system-packages-install for all cases, except where a custom install command is supplied, in @@ -112032,7 +112032,7 @@ This issue was introduced in 9f034a0bcfdd8c4 [https://github.com/jwiegley/use-package/issues/673], as a fix for [https://github.com/jwiegley/use-package/issues/661]. Prior to that commit, system-packages-use-sudo was being - honoured. + honored. This patch also fixes a bug where a cons containing a lone symbol in a list of conses causes nil to used as the package to install. @@ -112117,7 +112117,7 @@ Ignore extra keys in textdocument/publishdiagnostics () - Accoding to the "discussion" in https://reviews.llvm.org/D50571, it + According to the "discussion" in https://reviews.llvm.org/D50571, it was deemed sufficient that VSCode is fine with the non-standard extension -- jt @@ -112277,7 +112277,7 @@ * eglot.el (eglot-sync-connect): New defcustom. (eglot-ensure, eglot): Simplify. - (eglot--connect): Honour eglot-sync-connect. Complicate + (eglot--connect): Honor eglot-sync-connect. Complicate considerably. (eglot-connect-timeout): New defcustom. (Package-requires): Require jsonrpc 1.0.6 @@ -112364,7 +112364,7 @@ requiring command-line invocations that depend on the specific momentary environment. - * eglot.el (eglot-server-programs): CONTACT can be a fucntion of no + * eglot.el (eglot-server-programs): CONTACT can be a function of no arguments. (eglot--guess-contact, eglot--connect): Accept function CONTACTs. @@ -112565,7 +112565,7 @@ 2018-07-09 João Távora - Jsonrpc.el is now a gnu elpa depedency + Jsonrpc.el is now a gnu elpa dependency * Makefile (ELFILES): Don't include jsonrpc. (jsonrpc-check): Remove target. @@ -113035,7 +113035,7 @@ Fix indentation f@#$%^ by previous commit - Courtesy of aggressive-indent-mode... Agressive it is... + Courtesy of aggressive-indent-mode... Aggressive it is... 2018-06-09 João Távora @@ -113175,7 +113175,7 @@ 2018-06-04 João Távora - Support purposedly ignoring a server capability + Support purposely ignoring a server capability * eglot.el (eglot-ignored-server-capabilites): New defcustom. (eglot--server-capable): Use it. @@ -113472,7 +113472,7 @@ 2018-05-26 João Távora - Simpify eglot--server-receive + Simplify eglot--server-receive * eglot.el (eglot--obj): Cleanup whitespace. (eglot--server-receive): Simplify. @@ -113854,16 +113854,16 @@ Robustify timer handling for eglot--async-request - This basically cherry-picks an ealier commit for the jsonrpc-refactor + This basically cherry-picks an earlier commit for the jsonrpc-refactor branch: a2aa1ed..: João Távora 2018-05-18 Robustify timer handling for jrpc-async-request * jrpc.el (jrpc--async-request): Improve timeout handling. Return a list (ID TIMER) - (jrpc--request): Protect against user-quits, cancelling timer + (jrpc--request): Protect against user-quits, canceling timer 2018-05-19 João Távora - Simplify some infrastructure fucntions + Simplify some infrastructure functions * eglot.el (eglot--contact): Simplify docstring. (eglot--make-process): Simplify. @@ -113974,7 +113974,7 @@ Instead of introspecting the :params or :result object to discover if an object is present, and changing the Elisp function call type - (funcall vs apply) accordingly, alway funcall. It's up to the + (funcall vs apply) accordingly, always funcall. It's up to the application to destructure if it wishes. jrpc-lambda can help with that and keep the application code simple. @@ -114273,7 +114273,7 @@ 2018-05-10 João Távora - Prepare to sumbit to gnu elpa + Prepare to submit to gnu elpa * eglot.el: Update headers. @@ -114314,7 +114314,7 @@ (eglot--TextDocumentIdentifier) (eglot--VersionedTextDocumentIdentifier) (eglot--TextDocumentPositionParams, eglot--TextDocumentItem): - Renamed from the more verbose eglot--current-buffer-* variante. + Renamed from the more verbose eglot--current-buffer-* variant. (eglot-rename, eglot-imenu, eglot-eldoc-function) (eglot-completion-at-point, xref-backend-definitions) (xref-backend-identifier-at-point) @@ -114407,7 +114407,7 @@ Adjust flymake integration - When opening a new file (signalling textDocument/didOpen) it makes + When opening a new file (signaling textDocument/didOpen) it makes sense to call the flymake callback (if it exists) with no diagnostics, just to get rid of that "Wait", since we don't know if later in this callback cycle the server will ever report new diagnostics. @@ -114822,9 +114822,9 @@ 2018-05-04 João Távora - Honour textdocumentsync + Honor textdocumentsync - * eglot.el (eglot--signal-textDocument/didChange): Honour textDocumentSync + * eglot.el (eglot--signal-textDocument/didChange): Honor textDocumentSync 2018-05-04 João Távora @@ -115224,7 +115224,7 @@ 2018-05-02 João Távora - Change status to error everytime an error is found + Change status to error every time an error is found * eglot.el (eglot--process-receive): Also set error status. (eglot--request): Fix a compilation warning. @@ -116556,7 +116556,7 @@ (next-overlay-change, previous-overlay-change, overlay-put) (overlay-get, report_overlay_modification, evaporate_overlays) (init_buffer_once): Adapt to changes and tree data-structure. - (overlay-lists, overlay-recenter): Funtions are now obsolete, but + (overlay-lists, overlay-recenter): Functions are now obsolete, but kept anyway. (set_buffer_overlays_before, set_buffer_overlays_after) (recenter_overlay_lists,fix_start_end_in_overlays,fix_overlays_before) @@ -117210,7 +117210,7 @@ This means (use-package foopkg :mode (".foo")) will add (".foo" . foopkg) into auto-mode-alist instead of the broken (".foo" . nil), - this is more consistent with the behaviour of (use-package foopkg + this is more consistent with the behavior of (use-package foopkg :mode (".foo" ".bar")). 2016-10-31 Noam Postavsky @@ -117678,12 +117678,12 @@ Merge pull request from waymondo/extend-bind-handler - Pass in symbol of bind macro, for more extensible re-use of same handler + Pass in symbol of bind macro, for more extensible reuse of same handler GitHub-reference: https://github.com/jwiegley/use-package/issues/259 2015-09-23 Justin Talbott - pass in symbol of bind macro, for more extensible re-use of same handler + pass in symbol of bind macro, for more extensible reuse of same handler related to https://github.com/jwiegley/use-package/issues/258 @@ -118474,7 +118474,7 @@ Lower-priority idle functions are run first. Idle functions with no specified priority default to 5 and all functions with the same priority - are run in the order in which they are evaluated, meaning the behaviour + are run in the order in which they are evaluated, meaning the behavior is backwards compatible. Updated documentation as well. @@ -118606,7 +118606,7 @@ Merge pull request from aspiers/docs - Synchronise docs and then remove one copy to prevent future issues. + Synchronize docs and then remove one copy to prevent future issues. GitHub-reference: https://github.com/jwiegley/use-package/issues/78 2014-01-06 Adam Spiers diff --git a/doc/emacs/ChangeLog.1 b/doc/emacs/ChangeLog.1 index 16afa073169..bca543036d5 100644 --- a/doc/emacs/ChangeLog.1 +++ b/doc/emacs/ChangeLog.1 @@ -1294,7 +1294,7 @@ * display.texi (Visual Line Mode): Fix index entry. - * buffers.texi (Several Buffers): List Buffer Menu command anmes, + * buffers.texi (Several Buffers): List Buffer Menu command names, and index the keybindings. Document tabulated-list-sort. (Kill Buffer): Capitalize Buffer Menu. @@ -6443,7 +6443,7 @@ 2007-01-01 Richard Stallman - * commands.texi (User Input): Document keys stolen by window mangers. + * commands.texi (User Input): Document keys stolen by window managers. 2006-12-31 Richard Stallman diff --git a/doc/misc/ChangeLog.1 b/doc/misc/ChangeLog.1 index 2cd3c3f6b54..1157aaab01b 100644 --- a/doc/misc/ChangeLog.1 +++ b/doc/misc/ChangeLog.1 @@ -6011,7 +6011,7 @@ (RSS Feeds): New section. (Built-in table editor): Document M-e and M-a navigate inside table field. - (Stuck projects): Docment that projects identified as + (Stuck projects): Document that projects identified as un-stuck will still be searched for stuck sub-projects. (Paragraphs): Document centering. (Creating timestamps, Agenda commands): Document new diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 88d3a41461c..9de45ef0605 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -10678,7 +10678,7 @@ for root variables. * progmodes/gdb-ui.el (gdb-pc-address): Rename from gdb-frame-address. - (gdb-frame-address): Re-use to identify frame for watch expression. + (gdb-frame-address): Reuse to identify frame for watch expression. (gdb-var-list, gdb-var-create-handler): Add frame address for root variables. (gdb-init-1, gdb-source, gdb-post-prompt) diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13 index 820110e2fba..8c3eaa38b10 100644 --- a/lisp/ChangeLog.13 +++ b/lisp/ChangeLog.13 @@ -12592,7 +12592,7 @@ * textmodes/org.el (org-agenda-skip): Allow a form for `org-agenda-skip-function'. - (org-agenda-redo): Re-use local settings. + (org-agenda-redo): Reuse local settings. (org-agenda): Store local settings. (org-agenda-deadline-faces): New option. (org-agenda-deadline-face): New function. diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index bdf5948e748..d6e2a87056d 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -16505,7 +16505,7 @@ (diary-list-entries-2): Simplify finding start of date. (diary-show-all-entries, make-diary-entry): Respect non-nil values of pop-up-frames. - (diary-mark-entries-1): Re-use offset in abbreviated-year case. + (diary-mark-entries-1): Reuse offset in abbreviated-year case. (mark-sexp-diary-entries): Remove superfluous call to diary-pull-attrs. 2008-03-27 Dan Nicolaescu @@ -17072,14 +17072,14 @@ * calendar/cal-bahai.el (calendar-bahai-leap-year-p) (calendar-bahai-leap-base, calendar-bahai-from-absolute): Doc fixes. (calendar-absolute-from-bahai): Fix the leap-year case. - (calendar-bahai-from-absolute): Re-use the Gregorian month. + (calendar-bahai-from-absolute): Reuse the Gregorian month. (calendar-bahai-date-string, calendar-bahai-print-date): Handle pre-Bahai dates. * calendar/cal-china.el (chinese-calendar-celestial-stem) (chinese-calendar-terrestrial-branch): Make defcustoms. - * calendar/cal-menu.el (calendar-mouse-holidays): Re-use the title. + * calendar/cal-menu.el (calendar-mouse-holidays): Reuse the title. (calendar-mouse-view-diary-entries): Use or. (calendar-mouse-chinese-date): Remove unused command. (cal-menu-load-hook): Mark as obsolete. diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15 index 3c75ab8ce88..6e346504e08 100644 --- a/lisp/ChangeLog.15 +++ b/lisp/ChangeLog.15 @@ -7702,7 +7702,7 @@ * finder.el: Load finder-inf using `require'. (finder-list-matches): Sorting by status is now the default. - (finder-compile-keywords): Simpify printing. + (finder-compile-keywords): Simplify printing. 2010-08-30 Stefan Monnier diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16 index c898eb61d47..88dcbc77b87 100644 --- a/lisp/ChangeLog.16 +++ b/lisp/ChangeLog.16 @@ -1770,7 +1770,7 @@ (jit-lock--debug-fontifying): New var. (jit-lock--debug-fontify): New function. * subr.el (condition-case-unless-debug): Don't prevent catching the - error, just let the debbugger run. + error, just let the debugger run. * emacs-lisp/timer.el (timer-event-handler): Don't prevent debugging timer code and don't drop errors silently. @@ -4784,7 +4784,7 @@ Convert to defcustom. (gdb-get-source-file): Don't bind pop-up-windows. - * progmodes/gud.el (gud-display-line): Don't specially re-use + * progmodes/gud.el (gud-display-line): Don't specially reuse other frames for the gdb-mi case (Bug#12648). 2012-10-18 Stefan Monnier diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 5036eabf0fd..46f1b973c1e 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -4339,7 +4339,7 @@ (verilog-beg-of-statement-1, verilog-at-constraint-p): Fix hanging with many curly-bracket pairs, bug663. (verilog-do-indent): Fix electric tab deleting form-feeds. - Note caused by indent-line-to deleting tabls pre 24.5. + Note caused by indent-line-to deleting tables pre 24.5. (verilog-auto-output, verilog-auto-input, verilog-auto-inout) (verilog-auto-inout-module, verilog-auto-inout-in): Doc fixes. (verilog-read-always-signals, verilog-auto-sense-sigs) diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index 667cd5e850a..fcf3e53fe04 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -5232,7 +5232,7 @@ 1998-03-29 Ralph Schleicher - * battery.el (battery-linux-proc-apm): Re-use the temporary + * battery.el (battery-linux-proc-apm): Reuse the temporary buffer. * battery.el (battery-insert-file-contents): Disable code diff --git a/lisp/cedet/ChangeLog.1 b/lisp/cedet/ChangeLog.1 index 5242c73062b..ce6544dcc88 100644 --- a/lisp/cedet/ChangeLog.1 +++ b/lisp/cedet/ChangeLog.1 @@ -1515,7 +1515,7 @@ * semantic/complete.el (semantic-complete-post-command-hook): Exit completion when user has deleted all characters from the prefix. (semantic-displayor-focus-request): Return to previous window when - focussing tags. + focusing tags. * semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete. (semanticdb-elisp-sym->tag): Use help-function-arglist instead. diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1 index 2ce954cca99..d4d5a819c9f 100644 --- a/lisp/gnus/ChangeLog.1 +++ b/lisp/gnus/ChangeLog.1 @@ -663,7 +663,7 @@ 1998-08-07 Gareth Jones * gnus-score.el (gnus-summary-increase-score): Don't downcase - before lookin in char-to-header. + before looking in char-to-header. 1998-08-07 Lars Magne Ingebrigtsen @@ -2745,7 +2745,7 @@ 1997-12-05 Dave Love - * gnus-nocem.el (gnus-nocem-message-wanted-p): Fix paren typpo. + * gnus-nocem.el (gnus-nocem-message-wanted-p): Fix paren typo. (gnus-nocem-issuers): Allow sexp alternative in :type for alists. 1997-12-05 Dave Love diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 2d7aeabd8cf..ffa94b739fa 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -6215,7 +6215,7 @@ * pop3.el (pop3-retr): Wait 500 msecs. (pop3-read-response): Ditto. - * gnus-msg.el (gnus-setup-message): Get the evaliation order + * gnus-msg.el (gnus-setup-message): Get the evaluation order right. (gnus-inews-make-draft): New function. (gnus-setup-message): Use it. @@ -9474,7 +9474,7 @@ 2002-03-01 Paul Jarc * message.el (message-get-reply-headers): Downcase email addresses - for comaparisons for duplicate removal. + for comparisons for duplicate removal. 2002-03-01 ShengHuo ZHU diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3 index 0fc5c093371..5005e56f5e9 100644 --- a/lisp/gnus/ChangeLog.3 +++ b/lisp/gnus/ChangeLog.3 @@ -13,7 +13,7 @@ 2015-04-01 Eric Abrahamsen - * registry.el (registry-prune): Re-use `registry-full' in + * registry.el (registry-prune): Reuse `registry-full' in `registry-prune'. It's a bit of redundant work, but safer. Also ensure that target-size is an integer. @@ -78,7 +78,7 @@ * gnus-notifications.el (gnus-notifications-action): Raise window frame. (gnus-notifications-action): Allow mark as read. - (gnus-notifications-notify): Show uption to mark as read. + (gnus-notifications-notify): Show option to mark as read. 2015-03-08 Adam Sjøgren diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1 index f918ab8fe74..011ed123986 100644 --- a/lisp/mh-e/ChangeLog.1 +++ b/lisp/mh-e/ChangeLog.1 @@ -7534,7 +7534,7 @@ (mh-yank-cur-msg): Add a space between sexprs. * mh-utils.el (mh-mark-active-p): New macro which papers over - diffences between GNU Emacs and XEmacs. The variables mark-active + differences between GNU Emacs and XEmacs. The variables mark-active and transient-mark-mode are used in GNU Emacs while zmacs-regions and region-active-p are used in XEmacs. diff --git a/lisp/mh-e/ChangeLog.2 b/lisp/mh-e/ChangeLog.2 index f0032e9db19..d4f650be5f4 100644 --- a/lisp/mh-e/ChangeLog.2 +++ b/lisp/mh-e/ChangeLog.2 @@ -2576,7 +2576,7 @@ use function mh-variants instead. (mh-variant-info, mh-variant-mh-info, mh-variant-mu-mh-info) (mh-variant-nmh-info): Co-locate next to mh-variants, which uses - them. Updated to use mh-file-command-p which is more accurrate + them. Updated to use mh-file-command-p which is more accurate than file-executable-p which returns t for directories. (mh-file-command-p): Move here from mh-utils, since mh-variant-*-info are the only functions to use it. diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1 index 82b1c832c40..ea3a0424c3c 100644 --- a/lisp/org/ChangeLog.1 +++ b/lisp/org/ChangeLog.1 @@ -12523,7 +12523,7 @@ 2012-01-03 Carsten Dominik (tiny change) * org-clock.el (org-clock-in, org-clock-find-position): - Remove erraneous space in regexp. + Remove erroneous space in regexp. 2012-01-03 Eric Schulte @@ -12700,7 +12700,7 @@ 2012-01-03 Carsten Dominik (tiny change) * org-clock.el (org-clock-in, org-clock-find-position): - Remove erraneous space in regexp. + Remove erroneous space in regexp. 2012-01-03 Jambunathan K @@ -14573,7 +14573,7 @@ 2012-01-03 Nicolas Goaziou - * org-footnote.el (org-footnote-at-definition-p): Re-use + * org-footnote.el (org-footnote-at-definition-p): Reuse `org-footnote-definition-re'. 2012-01-03 Nicolas Goaziou @@ -18471,7 +18471,7 @@ * org-list.el (org-in-item-p): When point was just after org-list-end-re, check wouldn't be done for starting line. So, if - the first line was an item, it wouln't be noticed and function + the first line was an item, it wouldn't be noticed and function would return nil. Simplify and comment code. 2011-07-28 Nicolas Goaziou @@ -19554,7 +19554,7 @@ 2011-07-28 Julien Danjou - * org-agenda.el (org-format-agenda-item): Simplify time comuting. + * org-agenda.el (org-format-agenda-item): Simplify time computing. 2011-07-28 Nicolas Goaziou @@ -22539,7 +22539,7 @@ 2010-11-11 Dan Davison - * org-src.el (org-src-font-lock-fontify-block): Re-use hidden + * org-src.el (org-src-font-lock-fontify-block): Reuse hidden language major mode buffers during fontification. 2010-11-11 Dan Davison @@ -26729,7 +26729,7 @@ 2009-11-20 Eric Schulte * org-exp-blocks.el (org-export-blocks-format-ditaa): Use sha1 - hash keys to cache and re-use images generated by the + hash keys to cache and reuse images generated by the org-exp-blocks interface to ditaa and dot. * org.el (org-format-latex): Latex images are now saved to files @@ -29300,7 +29300,7 @@ statistics. (org-hierarchical-checkbox-statistics): New option. - * org.el (org-cycle): Remove erraneous space character. + * org.el (org-cycle): Remove erroneous space character. * org-icalendar.el (org-icalendar-timezone): Initialize from environment. diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index b2b776d491f..5d05094dff2 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 @@ -2029,7 +2029,7 @@ (update_frame_tool_bar): Calculate tool-bar style once per call. Instead of hiding text labels, omit them. Don't use xg_show_toolbar_item; create new GtkToolItems from scratch if - necessary, instead of trying to re-use them. This avoids an + necessary, instead of trying to reuse them. This avoids an annoying animation when changing tool-bars. 2010-12-31 Jan Djärv @@ -2048,7 +2048,7 @@ (ns_set_name): Call ns_set_name_internal. (x_explicitly_set_name): Remove call to ns_set_name_iconic. (x_implicitly_set_name): Ditto. - (x_set_title): Remove commet about EXPLICIT. Call ns_set_name_internal. + (x_set_title): Remove comment about EXPLICIT. Call ns_set_name_internal. (ns_set_name_as_filename): Encode name with ENCODE_UTF_8 (Bug#7517). 2010-12-29 Štěpán Němec (tiny change) @@ -9435,7 +9435,7 @@ continuation line, and start looking for a suitable row from there. - * term.c (append_glyph): Reverse glyphs by pre-pending them, + * term.c (append_glyph): Reverse glyphs by prepending them, rather than appending, if the glyph_row's reversed_p flag is set. Set the resolved_level and bidi_type members of each glyph. diff --git a/src/ChangeLog.13 b/src/ChangeLog.13 index d9736479a04..2f44ba02d98 100644 --- a/src/ChangeLog.13 +++ b/src/ChangeLog.13 @@ -5464,7 +5464,7 @@ (set_horizontal_scroll_bar): New function. (redisplay_window): Set ignore_mouse_drag_p when tool bar has more than one line. Handle horizontal scroll bars. - (note_mouse_highlight): Handle horizontal scrol bars. + (note_mouse_highlight): Handle horizontal scroll bars. (expose_frame): Set dimensions of XRectangle from frame's text sizes. (Vvoid_text_area_pointer): Update doc-string. @@ -8437,7 +8437,7 @@ * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657). - * keyboard.c (Frecursive_edit): Say more precicely how throwing + * keyboard.c (Frecursive_edit): Say more precisely how throwing `exit' works (bug#15865). 2014-02-07 Martin Rudalics @@ -16678,7 +16678,7 @@ 2013-05-27 Eli Zaretskii - * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a + * xdisp.c (pos_visible_p): When CHARPOS is displayed from a display vector, and we backtrack, handle the case that the previous character position is also displayed from a display vector or covered by a display string or image. (Bug#14476) diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 1f479a89ed8..f50b8d134c3 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 @@ -10802,7 +10802,7 @@ (display_mode_element): Ditto. (echo_area_display): Don't display if frame has no pools yet. (echo_area_display): Work with window matrix for mini window. - (redisplay_window): Use window marix for mini window. + (redisplay_window): Use window matrix for mini window. (display_text_line): Assume HPOS and VPOS are window relative and use that for DISPLAY_STRING. diff --git a/src/ChangeLog.9 b/src/ChangeLog.9 index d005b51604b..09210f8eea9 100644 --- a/src/ChangeLog.9 +++ b/src/ChangeLog.9 @@ -11622,7 +11622,7 @@ (set_font_frame_param): If `font' is specified in lface, use it. (Finternal_get_lisp_face_attribute): Handle `font' slot in lface. (lface_same_font_attributes_p): Likewise. - (make_realized_face): Arguent changed. Caller changed. Set + (make_realized_face): Argument changed. Caller changed. Set face->ascii_face to face itself. (free_realized_face): Free face->fontset if face is for ASCII. (face_suitable_for_iso8859_1_p, face_suitable_for_charset_p) commit 1d5028ad0414cad458aac1102d3612e4956068c5 Author: Michael Albinus Date: Sun Dec 10 12:26:38 2023 +0100 dired-listing-switches handles connection-local values if exist * doc/emacs/dired.texi (Dired Enter): * doc/misc/tramp.texi (Frequently Asked Questions): * etc/NEWS: 'dired-listing-switches' handles connection-local values if exist. * doc/lispref/variables.texi (Applying Connection Local Variables): Fix decription of connection-local-default-application. * lisp/dired.el (dired-listing-switches): Adapt docstring. (dired-internal-noselect, dired-mode): * lisp/dired-x.el (dired-virtual): * lisp/files.el (recover-file, recover-session): * lisp/net/ange-ftp.el (ange-ftp-get-files): Use connection-local value of `dired-listing-switches'. * lisp/files-x.el (connection-local-value): Adapt docstring. * lisp/man.el (Man-shell-file-name): Use `connection-local-value'. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 87124e962ca..6089cfe833d 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -142,6 +142,10 @@ Dired Enter special characters and allow Dired to handle them better. (You can also use the @kbd{C-u C-x d} command to add @samp{-b} temporarily.) +@code{dired-listing-switches} can be declared as connection-local +variable to adjust it to match what a remote system expects +(@pxref{Connection Variables}). + @vindex dired-switches-in-mode-line Dired displays in the mode line an indication of what were the switches used to invoke @command{ls}. By default, Dired will try to diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index bf5fbe84407..36468bddffa 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -2487,9 +2487,10 @@ Applying Connection Local Variables @defvar connection-local-default-application The default application, a symbol, to be applied in -@code{with-connection-local-variables}. It defaults to @code{tramp}, -but you can let-bind it to change the application temporarily -(@pxref{Local Variables}). +@code{with-connection-local-variables} and +@code{connection-local-value}. It defaults to @code{tramp}, but you +can let-bind it to change the application temporarily (@pxref{Local +Variables}). This variable must not be changed globally. @end defvar @@ -2547,7 +2548,10 @@ Applying Connection Local Variables @defmac connection-local-value symbol &optional application This macro returns the connection-local value of @var{symbol} for -@var{application}. If @var{symbol} does not have a connection-local +@var{application}. If @var{application} is @code{nil}, the value of +@code{connection-local-default-application} is used. + +If @var{symbol} does not have a connection-local binding, the value is the default binding of the variable. @end defmac diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5f79c195e42..7a95a6dbc98 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5322,17 +5322,39 @@ Frequently Asked Questions @item Remote host does not understand default options for directory listing -Emacs computes the @command{dired} options based on the local host but -if the remote host cannot understand the same @command{ls} command, -then set them with a hook as follows: +@vindex dired-listing-switches +Emacs computes the @command{dired} options based on the local host. +Since @w{Emacs 30}, these options can be set connection-local. +@ifinfo +@xref{Connection Variables, , , emacs}. +@end ifinfo + +@lisp +@group +(connection-local-set-profile-variables + 'my-dired-profile + '((dired-listing-switches . "-ahl"))) +@end group + +@group +(connection-local-set-profiles + '(:application tramp :machine "remotehost") + 'my-dired-profile) +@end group +@end lisp + +@vindex dired-actual-switches +In older Emacsen, you can set the @command{dired} options with a hook +as follows: @lisp @group (add-hook 'dired-before-readin-hook (lambda () - (when (file-remote-p default-directory) - (setq dired-actual-switches "-al")))) + (when (string-equal + (file-remote-p default-directory 'host) "remotehost") + (setq dired-actual-switches "-ahl")))) @end group @end lisp diff --git a/etc/NEWS b/etc/NEWS index 60391cfb22e..fbfe1084b8f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -517,6 +517,10 @@ marked or clicked on files according to the OS conventions. For example, on systems supporting XDG, this runs 'xdg-open' on the files. ++++ +*** 'dired-listing-switches' handles connection-local values if exist. +This allows to customize different switches for different remote machines. + ** Ediff --- diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 04b3c783084..e094c0b4ca7 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -613,7 +613,8 @@ dired-virtual (insert " " (directory-file-name (file-name-directory default-directory)) ":\n")) - (dired-mode dirname (or switches dired-listing-switches)) + (dired-mode + dirname (or switches (connection-local-value dired-listing-switches))) (setq mode-name "Virtual Dired" revert-buffer-function 'dired-virtual-revert dired-subdir-alist nil) diff --git a/lisp/dired.el b/lisp/dired.el index 36ca54efc37..33e38ed2c1c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -75,7 +75,9 @@ dired-listing-switches On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp, some of the `ls' switches are not supported; see the doc string of -`insert-directory' in `ls-lisp.el' for more details." +`insert-directory' in `ls-lisp.el' for more details. + +For remote Dired buffers, this option supports connection-local values." :type 'string :group 'dired) @@ -1383,7 +1385,8 @@ dired-internal-noselect ;; is passed in directory name syntax ;; if it was the name of a directory at all. (file-name-directory dirname))) - (or switches (setq switches dired-listing-switches)) + (or switches + (setq switches (connection-local-value dired-listing-switches))) (if mode (funcall mode) (dired-mode dir-or-list switches)) ;; default-directory and dired-actual-switches are set now @@ -2714,7 +2717,8 @@ dired-mode (expand-file-name (if (listp dired-directory) (car dired-directory) dired-directory))) - (setq-local dired-actual-switches (or switches dired-listing-switches)) + (setq-local dired-actual-switches + (or switches (connection-local-value dired-listing-switches))) (setq-local font-lock-defaults '(dired-font-lock-keywords t nil nil beginning-of-line)) (setq-local desktop-save-buffer 'dired-desktop-buffer-misc-data) diff --git a/lisp/files-x.el b/lisp/files-x.el index b2a9cf9bc5e..467981f3f8f 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -928,8 +928,10 @@ setq-connection-local ;;;###autoload (defmacro connection-local-value (variable &optional application) "Return connection-local VARIABLE for APPLICATION in `default-directory'. -If VARIABLE does not have a connection-local binding, the value -is the default binding of the variable." +If APPLICATION is nil, the value of +`connection-local-default-application' is used. +If VARIABLE does not have a connection-local binding, the return +value is the default binding of the variable." (unless (symbolp variable) (signal 'wrong-type-argument (list 'symbolp variable))) `(let (connection-local-variables-alist file-local-variables-alist) diff --git a/lisp/files.el b/lisp/files.el index 1cdcec23b11..f87e7807301 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7087,7 +7087,7 @@ recover-file (when (window-live-p window) (quit-restore-window window 'kill))))) (with-current-buffer standard-output - (let ((switches dired-listing-switches)) + (let ((switches (connection-local-value dired-listing-switches))) (if (file-symlink-p file) (setq switches (concat switches " -L"))) ;; Use insert-directory-safely, not insert-directory, @@ -7139,7 +7139,7 @@ recover-session ;; hook. (dired-mode-hook (delete 'dired-omit-mode dired-mode-hook))) (dired (concat auto-save-list-file-prefix "*") - (concat dired-listing-switches " -t"))) + (concat (connection-local-value dired-listing-switches) " -t"))) (use-local-map (nconc (make-sparse-keymap) (current-local-map))) (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish) (save-excursion diff --git a/lisp/man.el b/lisp/man.el index 3efa29d7aad..1a5512c74f4 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -579,7 +579,7 @@ Man-default-directory (defun Man-shell-file-name () "Return a proper shell file name, respecting remote directories." (or ; This works also in the local case. - (with-connection-local-variables shell-file-name) + (connection-local-value shell-file-name) "/bin/sh")) (defun Man-header-file-path () diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 3d64b7976b3..4e4db34a78d 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2850,7 +2850,8 @@ ange-ftp-get-files (ange-ftp-switches-ok dired-actual-switches)) (and (boundp 'dired-listing-switches) (ange-ftp-switches-ok - dired-listing-switches)) + (connection-local-value + dired-listing-switches))) "-al") t no-error) (gethash directory ange-ftp-files-hashtable))))) commit 5e03a621efc00b3cfe52442670175dd3564c4e1e Author: Eli Zaretskii Date: Sun Dec 10 11:41:35 2023 +0200 ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristic): Doc fix. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 05758d48f52..e708420148a 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -357,8 +357,8 @@ c-ts-mode--standalone-grandparent parent (treesit-node-parent parent) bol args)) (defun c-ts-mode--else-heuristic (node parent bol &rest _) - "Heuristic matcher for when else is followed by a closing bracket. -NODE, PARENT, BOL are the same as other matchers." + "Heuristic matcher for when \"else\" is followed by a closing bracket. +NODE, PARENT, and BOL are the same as in other matchers." (and (null node) (save-excursion (forward-line -1) commit f0734e1c0d19d9f244b7ab60dcd98f8d031e3d38 Author: Yuan Fu Date: Sun Dec 10 01:24:25 2023 -0800 Fix c-ts-mode indent heuristic (bug#67417) This is a continuation of the first two patches for bug#67417. The c-ts-mode--prev-line-match heuristic we added is too broad, so for now we are just adding a very specific heuristic for the else case. * lisp/progmodes/c-ts-mode.el: (c-ts-mode--prev-line-match): Remove function. (c-ts-mode--else-heuristic): New function. (c-ts-mode--indent-styles): Use c-ts-mode--else-heuristic. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 677273afaac..05758d48f52 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -356,14 +356,15 @@ c-ts-mode--standalone-grandparent (apply (alist-get 'standalone-parent treesit-simple-indent-presets) parent (treesit-node-parent parent) bol args)) -(defun c-ts-mode--prev-line-match (regexp) - "An indentation matcher that matches if previous line matches REGEXP." - (lambda (_n _p bol &rest _) - (save-excursion - (goto-char bol) - (forward-line -1) - (back-to-indentation) - (looking-at-p regexp)))) +(defun c-ts-mode--else-heuristic (node parent bol &rest _) + "Heuristic matcher for when else is followed by a closing bracket. +NODE, PARENT, BOL are the same as other matchers." + (and (null node) + (save-excursion + (forward-line -1) + (looking-at (rx (* whitespace) "else" (* whitespace) eol))) + (let ((next-node (treesit-node-first-child-for-pos parent bol))) + (equal (treesit-node-type next-node) "}")))) (defun c-ts-mode--first-sibling (node parent &rest _) "Matches when NODE is the \"first sibling\". @@ -383,13 +384,12 @@ c-ts-mode--indent-styles MODE is either `c' or `cpp'." (let ((common `((c-ts-mode--for-each-tail-body-matcher prev-line c-ts-mode-indent-offset) - ;; If the user types "if (...)" and hits RET, they expect - ;; point on the empty line to be indented; this rule - ;; does that. - ((and no-node - (c-ts-mode--prev-line-match - ,(rx (or "if" "else" "while" "do" "for")))) - prev-line c-ts-mode-indent-offset) + ;; If the user types "else" and hits RET, they expect point + ;; on the empty line to be indented; this rule does that. + ;; This heuristic is intentionally very specific because + ;; more general heuristic is very error-prone, see + ;; discussion in bug#67417. + (c-ts-mode--else-heuristic prev-line c-ts-mode-indent-offset) ((parent-is "translation_unit") column-0 0) ((query "(ERROR (ERROR)) @indent") column-0 0) commit 08fc6bace202a13d93fc76943c41f19acaab9c73 Author: nverno Date: Tue Nov 21 16:33:04 2023 -0800 Fix c-ts-mode indentation (bug#67357) 1. In a compund_statement, we indent the first sibling against the parent, and the rest siblings against their previous sibling. But this strategy falls apart when the first sibling is not on its own line. We should regard the first sibling that is on its own line as the "first sibling"", and indent it against the parent. 2. In linux style, in a do-while statement, if the do-body is bracket-less, the "while" keyword is indented to the same level as the do-body. It should be indented to align with the "do" keyword instead. * lisp/progmodes/c-ts-mode.el: (c-ts-mode--no-prev-standalone-sibling): New function. (c-ts-mode--indent-styles): Use c-ts-mode--no-prev-standalone-sibling. Add while keyword indent rule. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 21fb0ca9e53..677273afaac 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -321,7 +321,8 @@ c-ts-mode--anchor-prev-sibling (treesit-node-parent prev-sibling) t))) ;; If the start of the previous sibling isn't at the ;; beginning of a line, something's probably not quite - ;; right, go a step further. + ;; right, go a step further. (E.g., comment after a + ;; statement.) (_ (goto-char (treesit-node-start prev-sibling)) (if (looking-back (rx bol (* whitespace)) (line-beginning-position)) @@ -364,6 +365,19 @@ c-ts-mode--prev-line-match (back-to-indentation) (looking-at-p regexp)))) +(defun c-ts-mode--first-sibling (node parent &rest _) + "Matches when NODE is the \"first sibling\". +\"First sibling\" is defined as: the first child node of PARENT +such that it's on its own line. NODE is the node to match and +PARENT is its parent." + (let ((prev-sibling (treesit-node-prev-sibling node t))) + (or (null prev-sibling) + (save-excursion + (goto-char (treesit-node-start prev-sibling)) + (<= (line-beginning-position) + (treesit-node-start parent) + (line-end-position)))))) + (defun c-ts-mode--indent-styles (mode) "Indent rules supported by `c-ts-mode'. MODE is either `c' or `cpp'." @@ -457,7 +471,11 @@ c-ts-mode--indent-styles ((parent-is "field_declaration_list") c-ts-mode--anchor-prev-sibling 0) ;; Statement in {} blocks. - ((or (match nil "compound_statement" nil 1 1) + ((or (and (parent-is "compound_statement") + ;; If the previous sibling(s) are not on their + ;; own line, indent as if this node is the first + ;; sibling (Bug#67357) + c-ts-mode--first-sibling) (match null "compound_statement")) standalone-parent c-ts-mode-indent-offset) ((parent-is "compound_statement") c-ts-mode--anchor-prev-sibling 0) @@ -470,6 +488,7 @@ c-ts-mode--indent-styles ((parent-is "if_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "else_clause") standalone-parent c-ts-mode-indent-offset) ((parent-is "for_statement") standalone-parent c-ts-mode-indent-offset) + ((match "while" "do_statement") parent-bol 0) ; (do_statement "while") ((parent-is "while_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "do_statement") standalone-parent c-ts-mode-indent-offset) diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index bac76fb7378..2fd26d75844 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -330,7 +330,7 @@ label: Name: Bracket-less Block-Statement (Linux Style) (bug#61026) -=-=-= +=-= int main() { while (true) if (true) { @@ -351,6 +351,8 @@ int main() { if (true) { puts ("Hello"); } + else + puts("Hello"); } =-=-= @@ -399,6 +401,34 @@ void foo( } =-=-= +Name: Block-Statement where first siblings are comments (Linux Style) + +=-= +int main() { + while (true) { /* foo */ + if (true) { // bar + puts ("Hello"); + } + } + for (;;) { // 1. fooo + /* 2. baaa */ + /* 3. rrr */ + if (true) + // 2. baaa + puts ("Hello"); + } + if (1) { // 1 + /* + * 2 + */ + if (1) /*3*/ { + /* 4 */ + puts("Hello"); + } + } +} +=-=-= + Name: Initializer List (Linux Style) (Bug#61398) =-= @@ -498,3 +528,19 @@ main (void) { | =-=-= + +Code: + (lambda () + (c-ts-mode) + (setq-local indent-tabs-mode nil) + (goto-line 3) + (indent-for-tab-command)) + +Name: Block-Statement where previous sibling is comment + +=-= +int main() { + puts ("Hello"); // unusual indent and has trailing comment. + return true; // Should align with previous non-comment sibling (rather than one level up against parent). +} +=-=-= commit 71bc2815ccdf443d49865ea913048658a6634823 Author: nverno Date: Sat Dec 9 11:35:44 2023 -0800 Add font-locking for hash-bang lines in typescript-ts-mode. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Add font-lock for hash bang line. diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 0fbac709c63..bcc08511337 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -205,7 +205,7 @@ typescript-ts-mode--font-lock-settings (treesit-font-lock-rules :language language :feature 'comment - `((comment) @font-lock-comment-face) + `([(comment) (hash_bang_line)] @font-lock-comment-face) :language language :feature 'constant commit db8347c8c87c774f2d60ee9fce65b20ef5743a44 Author: nverno Date: Sat Dec 9 11:28:15 2023 -0800 Add font-locking for hash-bang lines in js-ts-mode * lisp/progmodes/js.el (js--treesit-font-lock-settings): Add font-lock for hash bang line. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 07d12cb7b4b..71aa5cbea68 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3506,7 +3506,7 @@ js--treesit-font-lock-settings :language 'javascript :feature 'comment - '((comment) @font-lock-comment-face) + '([(comment) (hash_bang_line)] @font-lock-comment-face) :language 'javascript :feature 'constant commit 213d30b3eaad4ffbe9685005ecc92201ab8cb806 Author: Stefan Monnier Date: Sat Dec 9 18:03:48 2023 -0500 Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook` * lisp/simple.el (analyze-text-conversion): Fix typo. * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about `post-text-conversion-hook`. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 227a6af2a6b..4842de15164 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -256,6 +256,9 @@ c-initialize-cc-mode (put 'c-initialize-cc-mode initprop c-initialization-ok)))) ;; Set up text conversion, for Emacs >= 30.0 + ;; This is needed here because CC-mode's implementation of + ;; electricity does not rely on `post-self-insert-hook' (which is + ;; already handled adequately by `analyze-text-conversion'). (when (boundp 'post-text-conversion-hook) (add-hook 'post-text-conversion-hook #'c-post-text-conversion nil t)) diff --git a/lisp/simple.el b/lisp/simple.el index fab6b279189..d60acf5477a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11181,7 +11181,7 @@ analyze-text-conversion and delete the adjascent pair if `electric-pair-delete-adjacent-pairs'. - - Run `post-self-insert-functions' for the last character of + - Run `post-self-insert-hook' for the last character of any inserted text so that modes such as `electric-pair-mode' can work. commit 91f2ade57bb72e9bb4a44da44e5dc69adb3c7584 Author: Dmitry Gutov Date: Sat Dec 9 19:04:55 2023 +0200 ruby-mode: Better detect regexp vs division (bug#67569) * lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Add grouping around methods from the whitelist. (ruby-syntax-propertize): Also look for spaces around the slash. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index b252826680c..0ecb3579278 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2124,7 +2124,7 @@ ruby-find-library-file "or" "not" "&&" "||")) ;; Method name from the list. "\\|\\_<" - (regexp-opt ruby-syntax-methods-before-regexp) + (regexp-opt ruby-syntax-methods-before-regexp t) "\\)\\s *") "Regexp to match text that can be followed by a regular expression.")) @@ -2182,14 +2182,20 @@ ruby-syntax-propertize (when (save-excursion (forward-char -1) (cl-evenp (skip-chars-backward "\\\\"))) - (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) + (let ((state (save-excursion (syntax-ppss (match-beginning 1)))) + division-like) (when (or ;; Beginning of a regexp. (and (null (nth 8 state)) (save-excursion + (setq division-like + (or (eql (char-after) ?\s) + (not (eql (char-before (1- (point))) ?\s)))) (forward-char -1) (looking-back ruby-syntax-before-regexp-re - (line-beginning-position)))) + (line-beginning-position))) + (not (and division-like + (match-beginning 2)))) ;; End of regexp. We don't match the whole ;; regexp at once because it can have ;; string interpolation inside, or span diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 117385ea3e8..a931541ba35 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -157,6 +157,18 @@ ruby-slash-char-literal-is-not-mistaken-for-regexp (ert-deftest ruby-regexp-is-not-mistaken-for-slash-symbol () (ruby-assert-state "x = /foo:/" 3 nil)) +(ert-deftest ruby-slash-not-regexp-when-surrounded-by-spaces () + (ruby-assert-state "x = index / 3" 3 nil)) + +(ert-deftest ruby-slash-not-regexp-when-no-spaces () + (ruby-assert-state "x = index/3" 3 nil)) + +(ert-deftest ruby-regexp-not-division-when-only-space-before () + (ruby-assert-state "x = index /3" 3 ?/)) + +(ert-deftest ruby-slash-not-regexp-when-only-space-after () + (ruby-assert-state "x = index/ 3" 3 nil)) + (ert-deftest ruby-indent-simple () (ruby-should-indent-buffer "if foo commit 127de202b83f841b9f73ed6142c9e369addb18f3 Author: Manuel Giraud Date: Sat Dec 9 13:02:19 2023 +0100 Fix desktop-save for dired buffers (bug#66697) * lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on when 'desktop-files-not-to-save' is nil. (dired-desktop-buffer-misc-data): Use it. diff --git a/lisp/dired.el b/lisp/dired.el index 7f4b96353ee..36ca54efc37 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4989,14 +4989,15 @@ dired-dnd-handle-file (defun dired-desktop-save-p () "Should `dired-directory' be desktop saved?" - (if (consp dired-directory) - (not (string-match-p desktop-files-not-to-save (car dired-directory))) - (not (string-match-p desktop-files-not-to-save dired-directory)))) + (or (null desktop-files-not-to-save) + (and (stringp desktop-files-not-to-save) + (if (consp dired-directory) + (not (string-match-p desktop-files-not-to-save (car dired-directory))) + (not (string-match-p desktop-files-not-to-save dired-directory)))))) (defun dired-desktop-buffer-misc-data (dirname) "Auxiliary information to be saved in desktop file." - (when (and (stringp desktop-files-not-to-save) - (dired-desktop-save-p)) + (when (dired-desktop-save-p) (cons ;; Value of `dired-directory'. (if (consp dired-directory) commit 20be8ed61fa07d73b356e74a7986aa05e091faa3 Author: Eli Zaretskii Date: Sat Dec 9 07:59:08 2023 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index f062f3bf8de..814507b3d04 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -302,7 +302,7 @@ ad-default-compilation-action (fn FUNCTION ARGS &rest BODY)" nil t) (function-put 'defadvice 'doc-string-elt 3) (function-put 'defadvice 'lisp-indent-function 2) -(make-obsolete 'defadvice '"use advice-add or define-advice" "30.1") +(make-obsolete 'defadvice '"use `advice-add' or `define-advice'" "30.1") (register-definition-prefixes "advice" '("ad-")) @@ -1946,7 +1946,7 @@ "bibtex" (register-definition-prefixes "bibtex-style" '("bibtex-style-")) -;;; Generated autoloads from use-package/bind-key.el +;;; Generated autoloads from bind-key.el (push (purecopy '(bind-key 2 4 1)) package--builtin-versions) (autoload 'bind-key "bind-key" "\ @@ -2608,7 +2608,7 @@ browse-url-default-handlers (fn URL &optional NEW-WINDOW)" t) (make-obsolete 'browse-url-w3 'nil "29.1") (autoload 'browse-url-w3-gnudoit "browse-url" "\ -Ask another Emacs running gnuserv to load the URL using the W3 browser. +Ask another Emacs running emacsclient to load the URL using the W3 browser. The `browse-url-gnudoit-program' program is used with options given by `browse-url-gnudoit-args'. Default to the URL around or before point. @@ -4668,14 +4668,14 @@ "cl-macs" (autoload 'cl-print-to-string-with-limit "cl-print" "\ Return a string containing a printed representation of VALUE. Attempt to get the length of the returned string under LIMIT -characters with appropriate settings of `print-level' and -`print-length.' Use PRINT-FUNCTION to print, which should take -the arguments VALUE and STREAM and which should respect -`print-length' and `print-level'. LIMIT may be nil or zero in -which case PRINT-FUNCTION will be called with `print-level' and -`print-length' bound to nil, and it can also be t in which case -PRINT-FUNCTION will be called with the current values of `print-level' -and `print-length'. +characters with appropriate settings of `print-level', +`print-length', and `cl-print-string-length'. Use +PRINT-FUNCTION to print, which should take the arguments VALUE +and STREAM and which should respect `print-length', +`print-level', and `cl-print-string-length'. LIMIT may be nil or +zero in which case PRINT-FUNCTION will be called with these +settings bound to nil, and it can also be t in which case +PRINT-FUNCTION will be called with their current values. Use this function with `cl-prin1' to print an object, abbreviating it with ellipses to fit within a size limit. @@ -4857,10 +4857,6 @@ "comint" ;;; Generated autoloads from emacs-lisp/comp.el (put 'no-native-compile 'safe-local-variable 'booleanp) -(autoload 'comp-subr-trampoline-install "comp" "\ -Make SUBR-NAME effectively advice-able when called from native code. - -(fn SUBR-NAME)") (autoload 'comp-c-func-name "comp" "\ Given NAME, return a name suitable for the native code. Add PREFIX in front of it. If FIRST is not nil, pick the first @@ -4868,42 +4864,16 @@ "comint" clashes. (fn NAME PREFIX &optional FIRST)") +(autoload 'comp-trampoline-compile "comp" "\ +Synthesize compile and return a trampoline for SUBR-NAME. + +(fn SUBR-NAME)") (autoload 'comp-clean-up-stale-eln "comp" "\ Remove all FILE*.eln* files found in `native-comp-eln-load-path'. The files to be removed are those produced from the original source filename (including FILE). (fn FILE)") -(autoload 'native--compile-async "comp" "\ -Compile FILES asynchronously. -FILES is one filename or a list of filenames or directories. - -If optional argument RECURSIVELY is non-nil, recurse into -subdirectories of given directories. - -If optional argument LOAD is non-nil, request to load the file -after compiling. - -The optional argument SELECTOR has the following valid values: - -nil -- Select all files. -a string -- A regular expression selecting files with matching names. -a function -- A function selecting files with matching names. - -The variable `native-comp-async-jobs-number' specifies the number -of (commands) to run simultaneously. - -LOAD can also be the symbol `late'. This is used internally if -the byte code has already been loaded when this function is -called. It means that we request the special kind of load -necessary in that situation, called \"late\" loading. - -During a \"late\" load, instead of executing all top-level forms -of the original files, only function definitions are -loaded (paying attention to have these effective only if the -bytecode definition was not changed in the meantime). - -(fn FILES &optional RECURSIVELY LOAD SELECTOR)") (autoload 'comp-lookup-eln "comp" "\ Given a Lisp source FILENAME return the corresponding .eln file if found. Search happens in `native-comp-eln-load-path'. @@ -4940,9 +4910,43 @@ "comint" directory (the last entry in `native-comp-eln-load-path') unless `native-compile-target-directory' is non-nil. If the environment variable \"NATIVE_DISABLED\" is set, only byte compile.") -(autoload 'native-compile-async "comp" "\ +(register-definition-prefixes "comp" '("comp-" "native-comp" "no-native-compile")) + + +;;; Generated autoloads from cedet/semantic/wisent/comp.el + +(register-definition-prefixes "semantic/wisent/comp" '("wisent-")) + + +;;; Generated autoloads from emacs-lisp/comp-common.el + +(autoload 'comp-function-type-spec "comp-common" "\ +Return the type specifier of FUNCTION. + +This function returns a cons cell whose car is the function +specifier, and cdr is a symbol, either `inferred' or `know'. +If the symbol is `inferred', the type specifier is automatically +inferred from the code itself by the native compiler; if it is +`know', the type specifier comes from `comp-known-type-specifiers'. + +(fn FUNCTION)") +(register-definition-prefixes "comp-common" '("comp-" "native-comp-")) + + +;;; Generated autoloads from emacs-lisp/comp-cstr.el + +(register-definition-prefixes "comp-cstr" '("comp-" "with-comp-cstr-accessors")) + + +;;; Generated autoloads from emacs-lisp/comp-run.el + +(autoload 'comp-subr-trampoline-install "comp-run" "\ +Make SUBR-NAME effectively advice-able when called from native code. + +(fn SUBR-NAME)") +(autoload 'native--compile-async "comp-run" "\ Compile FILES asynchronously. -FILES is one file or a list of filenames or directories. +FILES is one filename or a list of filenames or directories. If optional argument RECURSIVELY is non-nil, recurse into subdirectories of given directories. @@ -4959,28 +4963,38 @@ "comint" The variable `native-comp-async-jobs-number' specifies the number of (commands) to run simultaneously. +LOAD can also be the symbol `late'. This is used internally if +the byte code has already been loaded when this function is +called. It means that we request the special kind of load +necessary in that situation, called \"late\" loading. + +During a \"late\" load, instead of executing all top-level forms +of the original files, only function definitions are +loaded (paying attention to have these effective only if the +bytecode definition was not changed in the meantime). + (fn FILES &optional RECURSIVELY LOAD SELECTOR)") -(autoload 'comp-function-type-spec "comp" "\ -Return the type specifier of FUNCTION. +(autoload 'native-compile-async "comp-run" "\ +Compile FILES asynchronously. +FILES is one file or a list of filenames or directories. -This function returns a cons cell whose car is the function -specifier, and cdr is a symbol, either `inferred' or `know'. -If the symbol is `inferred', the type specifier is automatically -inferred from the code itself by the native compiler; if it is -`know', the type specifier comes from `comp-known-type-specifiers'. +If optional argument RECURSIVELY is non-nil, recurse into +subdirectories of given directories. -(fn FUNCTION)") -(register-definition-prefixes "comp" '("comp-" "make-comp-edge" "native-comp" "no-native-compile")) +If optional argument LOAD is non-nil, request to load the file +after compiling. - -;;; Generated autoloads from cedet/semantic/wisent/comp.el +The optional argument SELECTOR has the following valid values: -(register-definition-prefixes "semantic/wisent/comp" '("wisent-")) +nil -- Select all files. +a string -- A regular expression selecting files with matching names. +a function -- A function selecting files with matching names. - -;;; Generated autoloads from emacs-lisp/comp-cstr.el +The variable `native-comp-async-jobs-number' specifies the number +of (commands) to run simultaneously. -(register-definition-prefixes "comp-cstr" '("comp-" "with-comp-cstr-accessors")) +(fn FILES &optional RECURSIVELY LOAD SELECTOR)") +(register-definition-prefixes "comp-run" '("comp-" "native-comp")) ;;; Generated autoloads from vc/compare-w.el @@ -5239,6 +5253,24 @@ dynamic-completion-mode (autoload 'dynamic-completion-mode "completion" "\ Toggle dynamic word-completion on or off. +When this minor mode is turned on, typing \\`M-RET' or \\`C-RET' +invokes the command `complete', which completes the word or +symbol at point using the record of words/symbols you used +previously and the previously-inserted completions. Typing +a word or moving point across it constitutes \"using\" the +word. + +By default, the database of all the dynamic completions that +were inserted by \\[complete] is saved on the file specified +by `save-completions-file-name' when you exit Emacs, and will +be loaded from that file when this mode is enabled in a future +Emacs session. + +The following important options control the various aspects of +this mode: `enable-completion', `save-completions-flag', and +`save-completions-retention-time'. Few other less important +options can be found in the `completion' group. + This is a global minor mode. If called interactively, toggle the `Dynamic-Completion mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable @@ -5257,6 +5289,38 @@ dynamic-completion-mode (fn &optional ARG)" t) (register-definition-prefixes "completion" '("*c-def-regexp*" "*lisp-def-regexp*" "accept-completion" "add-" "cdabbrev-" "check-completion-length" "clear-all-completions" "cmpl-" "complet" "current-completion-source" "delete-completion" "enable-completion" "find-" "inside-locate-completion-entry" "interactive-completion-string-reader" "kill-" "list-all-completions" "load-completions-from-file" "make-c" "next-cdabbrev" "num-cmpl-sources" "reset-cdabbrev" "save" "set-c" "symbol-" "use-completion-")) + +;;; Generated autoloads from completion-preview.el + +(autoload 'completion-preview-mode "completion-preview" "\ +Show in-buffer completion suggestions in a preview as you type. + +This mode automatically shows and updates the completion preview +according to the text around point. +\\When the preview is visible, \\[completion-preview-insert] +accepts the completion suggestion, +\\[completion-preview-next-candidate] cycles forward to the next +completion suggestion, and \\[completion-preview-prev-candidate] +cycles backward. + +This is a minor mode. If called interactively, toggle the +`Completion-Preview mode' mode. If the prefix argument is +positive, enable the mode, and if it is zero or negative, disable +the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `completion-preview-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + +(fn &optional ARG)" t) +(register-definition-prefixes "completion-preview" '("completion-preview-")) + ;;; Generated autoloads from textmodes/conf-mode.el @@ -5569,16 +5633,8 @@ "copyright" whitespace inserted by semis and braces in `auto-newline'-mode by consequent \\[cperl-electric-backspace]. -If your site has perl5 documentation in info format, you can use commands -\\[cperl-info-on-current-command] and \\[cperl-info-on-command] to access it. -These keys run commands `cperl-info-on-current-command' and -`cperl-info-on-command', which one is which is controlled by variable -`cperl-info-on-command-no-prompt' and `cperl-clobber-lisp-bindings' -(in turn affected by `cperl-hairy'). - -Even if you have no info-format documentation, short one-liner-style -help is available on \\[cperl-get-help], and one can run perldoc or -man via menu. +Short one-liner-style help is available on \\[cperl-get-help], +and one can run perldoc or man via menu. It is possible to show this help automatically after some idle time. This is regulated by variable `cperl-lazy-help-time'. Default with @@ -5669,7 +5725,7 @@ "copyright" (fn WORD)" t) (autoload 'cperl-perldoc-at-point "cperl-mode" "\ Run a `perldoc' on the word around point." t) -(register-definition-prefixes "cperl-mode" '("cperl-" "imenu-max-items")) +(register-definition-prefixes "cperl-mode" '("cperl-")) ;;; Generated autoloads from progmodes/cpp.el @@ -6249,6 +6305,13 @@ custom-file (fn &rest ARGS)") (autoload 'custom-save-icons "cus-edit" "\ Save all customized icons in `custom-file'.") +(autoload 'customize-dirlocals "cus-edit" "\ +Customize Directory Local Variables in the current directory. + +With optional argument FILENAME non-nil, customize the `.dir-locals.el' file +that FILENAME specifies. + +(fn &optional FILENAME)" t) (register-definition-prefixes "cus-edit" '("Custom-" "cus" "widget-")) @@ -6278,7 +6341,7 @@ "cus-edit" omitted, a buffer named *Custom Themes* is used. (fn &optional BUFFER)" t) -(register-definition-prefixes "cus-theme" '("custom-" "describe-theme-1")) +(register-definition-prefixes "cus-theme" '("custom-" "describe-theme-")) ;;; Generated autoloads from cedet/ede/custom.el @@ -6632,6 +6695,13 @@ "dcl-mode" (setq debugger 'debug) (autoload 'debug "debug" "\ Enter debugger. \\`\\[debugger-continue]' returns from the debugger. + +In interactive sessions, this switches to a backtrace buffer and shows +the Lisp backtrace of function calls there. In batch mode (more accurately, +when `noninteractive' is non-nil), it shows the Lisp backtrace on the +standard error stream (unless `backtrace-on-error-noninteractive' is nil), +and then kills Emacs, causing it to exit with a negative exit code. + Arguments are mainly for use when this is called from the internals of the evaluator. @@ -7261,29 +7331,36 @@ "diary-lib" (autoload 'dictionary-mode "dictionary" "\ Mode for searching a dictionary. + This is a mode for searching a dictionary server implementing the protocol defined in RFC 2229. This is a quick reference to this mode describing the default key bindings: \\ -* \\[dictionary-close] close the dictionary buffer -* \\[describe-mode] display this help information -* \\[dictionary-search] ask for a new word to search -* \\[dictionary-lookup-definition] search the word at point -* \\[forward-button] or TAB place point to the next link -* \\[backward-button] or S-TAB place point to the prev link - -* \\[dictionary-match-words] ask for a pattern and list all matching words. -* \\[dictionary-select-dictionary] select the default dictionary -* \\[dictionary-select-strategy] select the default search strategy - -* \\`RET' or \\`' visit that link") + \\[dictionary-close] close the dictionary buffer + \\[describe-mode] display this help + \\[dictionary-search] ask for a new word to search + \\[dictionary-lookup-definition] search for word at point + \\[forward-button] or \\`TAB' move point to the next link + \\[backward-button] or \\`S-TAB' move point to the previous link + + \\[dictionary-match-words] ask for a pattern and list all matching words + \\[dictionary-select-dictionary] select the default dictionary + \\[dictionary-select-strategy] select the default search strategy + + \\`RET' visit link at point + \\`' visit clicked link + +(fn)" t) (autoload 'dictionary "dictionary" "\ Create a new dictionary buffer and install `dictionary-mode'." t) (autoload 'dictionary-search "dictionary" "\ -Search the WORD in DICTIONARY if given or in all if nil. -It presents the selection or word at point as default input and -allows editing it. +Search for WORD in all the known dictionaries. +Interactively, prompt for WORD, and offer the word at point as default. + +Optional argument DICTIONARY means restrict the search to only +that one dictionary. Interactively, with prefix argument, +prompt for DICTIONARY. (fn WORD &optional DICTIONARY)" t) (autoload 'dictionary-lookup-definition "dictionary" "\ @@ -7620,7 +7697,7 @@ "dired" ;;; Generated autoloads from dired-aux.el -(register-definition-prefixes "dired-aux" '("dired-")) +(register-definition-prefixes "dired-aux" '("dired-" "shell-command-guess")) ;;; Generated autoloads from dired-x.el @@ -7677,7 +7754,7 @@ "dirtrack" redefine OBJECT if it is a symbol. (fn OBJECT &optional BUFFER INDENT INTERACTIVE-P)" t) -(register-definition-prefixes "disass" '("disassemble-")) +(register-definition-prefixes "disass" '("disassemble-" "re-disassemble")) ;;; Generated autoloads from disp-table.el @@ -8022,13 +8099,15 @@ "display-line-numbers" ;;; Generated autoloads from dnd.el -(defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://") . dnd-open-file) (,(purecopy "^file:") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|file\\|nfs\\)://") . dnd-open-file)) "\ +(defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://[^/]") . dnd-open-file) (,(purecopy "^file:/[^/]") . dnd-open-local-file) (,(purecopy "^file:[^/]") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|nfs\\)://") . dnd-open-file)) "\ The functions to call for different protocols when a drop is made. -This variable is used by `dnd-handle-one-url' and `dnd-handle-file-name'. +This variable is used by `dnd-handle-multiple-urls'. The list contains of (REGEXP . FUNCTION) pairs. The functions shall take two arguments, URL, which is the URL dropped and ACTION which is the action to be performed for the drop (move, copy, link, private or ask). +If a function's `dnd-multiple-handler' property is set, it is provided +a list of each URI dropped instead. If no match is found here, and the value of `browse-url-browser-function' is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. If no match is found, the URL is inserted as text by calling `dnd-insert-text'. @@ -8667,7 +8746,7 @@ "ebnf2ps" A call with prefix PREFIX reads the symbol to insert from the minibuffer with completion. -(fn PREFIX)" t) +(fn PREFIX)" '("P")) (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ Repeat last operation on files in tree. FIRST-TIME non-nil means this is not a repetition, but the first time. @@ -8977,7 +9056,7 @@ 'edirs-merge-with-ancestor (autoload 'ediff-windows-wordwise "ediff" "\ Compare WIND-A and WIND-B, which are selected by clicking, wordwise. This compares the portions of text visible in each of the two windows. -With prefix argument, DUMB-MODE, or on a non-windowing display, works as +With prefix argument, DUMB-MODE, or on a non-graphical display, works as follows: If WIND-A is nil, use selected window. If WIND-B is nil, use window next to WIND-A. @@ -8988,7 +9067,7 @@ 'edirs-merge-with-ancestor (autoload 'ediff-windows-linewise "ediff" "\ Compare WIND-A and WIND-B, which are selected by clicking, linewise. This compares the portions of text visible in each of the two windows. -With prefix argument, DUMB-MODE, or on a non-windowing display, works as +With prefix argument, DUMB-MODE, or on a non-graphical display, works as follows: If WIND-A is nil, use selected window. If WIND-B is nil, use window next to WIND-A. @@ -9222,14 +9301,14 @@ "semantic/edit" (fn &optional PREFIX)" t) (autoload 'read-kbd-macro "edmacro" "\ Read the region as a keyboard macro definition. -The region is interpreted as spelled-out keystrokes, e.g., \"M-x abc RET\". -See documentation for `edmacro-mode' for details. +The region between START and END is interpreted as spelled-out keystrokes, +e.g., \"M-x abc RET\". See documentation for `edmacro-mode' for details. Leading/trailing \"C-x (\" and \"C-x )\" in the text are allowed and ignored. The resulting macro is installed as the \"current\" keyboard macro. In Lisp, may also be called with a single STRING argument in which case the result is returned rather than being installed as the current macro. -The result will be a string if possible, otherwise an event vector. +The result is a vector of input events. Second argument NEED-VECTOR means to return an event vector always. (fn START &optional END)" t) @@ -9280,6 +9359,7 @@ "edt-vt100" ;;; Generated autoloads from progmodes/eglot.el (push (purecopy '(eglot 1 15)) package--builtin-versions) +(define-obsolete-function-alias 'eglot-update 'eglot-upgrade-eglot "29.1") (autoload 'eglot "eglot" "\ Start LSP server for PROJECT's buffers under MANAGED-MAJOR-MODES. @@ -9322,12 +9402,22 @@ "edt-vt100" (fn MANAGED-MAJOR-MODES PROJECT CLASS CONTACT LANGUAGE-IDS &optional INTERACTIVE)" t) (autoload 'eglot-ensure "eglot" "\ -Start Eglot session for current buffer if there isn't one.") +Start Eglot session for current buffer if there isn't one. + +Only use this function (in major mode hooks, etc) if you are +confident that Eglot can be started safely and efficiently for +*every* buffer visited where these hooks may execute. + +Since it is difficult to establish this confidence fully, it's +often wise to use the interactive command `eglot' instead. This +command only needs to be invoked once per project, as all other +files of a given major mode visited within the same project will +automatically become managed with no further user intervention +needed.") (autoload 'eglot-upgrade-eglot "eglot" "\ Update Eglot to latest version. (fn &rest _)" t) -(define-obsolete-function-alias 'eglot-update 'eglot-upgrade-eglot "29.1") (put 'eglot-workspace-configuration 'safe-local-variable 'listp) (put 'eglot--debbugs-or-github-bug-uri 'bug-reference-url-format t) (defun eglot--debbugs-or-github-bug-uri nil (format (if (string= (match-string 2) "github") "https://github.com/joaotavora/eglot/issues/%s" "https://debbugs.gnu.org/%s") (match-string 3))) @@ -9455,7 +9545,7 @@ "semantic/bovine/el" ;;; Generated autoloads from emacs-lisp/eldoc.el -(push (purecopy '(eldoc 1 14 0)) package--builtin-versions) +(push (purecopy '(eldoc 1 15 0)) package--builtin-versions) ;;; Generated autoloads from elec-pair.el @@ -9637,7 +9727,7 @@ "em-banner" ;;; Generated autoloads from eshell/em-basic.el -(register-definition-prefixes "em-basic" '("eshell")) +(register-definition-prefixes "em-basic" '("eshell" "pcomplete/eshell-mode/eshell-debug")) ;;; Generated autoloads from eshell/em-cmpl.el @@ -9859,7 +9949,7 @@ "emerge" (autoload 'emoji-recent "emoji" nil t) (autoload 'emoji-search "emoji" nil t) (autoload 'emoji-list "emoji" "\ -List emojis and insert the one that's selected. +List emojis and allow selecting and inserting one of them. Select the emoji by typing \\\\[emoji-list-select] on its picture. The glyph will be inserted into the buffer that was current when the command was invoked." t) @@ -10296,7 +10386,7 @@ "epg-config" See `erc-tls' for the meaning of ID. -(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME ID)" t) +(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME ID)" '((let ((erc--display-context `((erc-interactive-display . erc) ,@erc--display-context))) (erc-select-read-args)))) (defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ ERC is a powerful, modular, and extensible IRC client. @@ -10344,7 +10434,7 @@ 'erc-select CLIENT-CERTIFICATE, this parameter cannot be specified interactively. -(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME CLIENT-CERTIFICATE ID)" t) +(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls) (erc--display-context `((erc-interactive-display . erc-tls) ,@erc--display-context))) (erc-select-read-args)))) (autoload 'erc-handle-irc-url "erc" "\ Use ERC to IRC on HOST:PORT in CHANNEL. If ERC is already connected to HOST:PORT, simply /join CHANNEL. @@ -10544,7 +10634,7 @@ "erc-track" ;;; Generated autoloads from erc/erc-truncate.el -(register-definition-prefixes "erc-truncate" '("erc-max-buffer-size")) +(register-definition-prefixes "erc-truncate" '("erc-")) ;;; Generated autoloads from erc/erc-xdcc.el @@ -10560,8 +10650,8 @@ "erc-xdcc" BODY is evaluated as a `progn' when the test is run. It should signal a condition on failure or just return if the test passes. -`should', `should-not', `should-error' and `skip-unless' are -useful for assertions in BODY. +`should', `should-not', `should-error', `skip-when', and +`skip-unless' are useful for assertions in BODY. Use `ert' to run tests interactively. @@ -10576,9 +10666,7 @@ "erc-xdcc" If NAME is already defined as a test and Emacs is running in batch mode, an error is signaled. -(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) -(function-put 'ert-deftest 'doc-string-elt 3) -(function-put 'ert-deftest 'lisp-indent-function 2) +(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) (autoload 'ert-run-tests-batch "ert" "\ Run the tests specified by SELECTOR, printing results to the terminal. @@ -10639,7 +10727,7 @@ "esh-arg" ;;; Generated autoloads from eshell/esh-cmd.el -(register-definition-prefixes "esh-cmd" '("eshell" "pcomplete/eshell-mode/eshell-debug")) +(register-definition-prefixes "esh-cmd" '("eshell")) ;;; Generated autoloads from eshell/esh-ext.el @@ -12165,13 +12253,30 @@ "ede/files" (autoload 'add-dir-local-variable "files-x" "\ Add directory-local VARIABLE with its VALUE and MODE to .dir-locals.el. -(fn MODE VARIABLE VALUE)" t) +With a prefix argument, prompt for the file to modify. + +When called from Lisp, FILE may be the expanded name of the dir-locals file +where to add VARIABLE. + +(fn MODE VARIABLE VALUE &optional FILE)" t) (autoload 'delete-dir-local-variable "files-x" "\ -Delete all MODE settings of file-local VARIABLE from .dir-locals.el. +Delete all MODE settings of dir-local VARIABLE from .dir-locals.el. -(fn MODE VARIABLE)" t) +With a prefix argument, prompt for the file to modify. + +When called from Lisp, FILE may be the expanded name of the dir-locals file +from where to delete VARIABLE. + +(fn MODE VARIABLE &optional FILE)" t) (autoload 'copy-file-locals-to-dir-locals "files-x" "\ -Copy file-local variables to .dir-locals.el." t) +Copy file-local variables to .dir-locals.el. + +With a prefix argument, prompt for the file to modify. + +When called from Lisp, FILE may be the expanded name of the dir-locals file +where to copy the file-local variables. + +(fn &optional FILE)" t) (autoload 'copy-dir-locals-to-file-locals "files-x" "\ Copy directory-local variables to the Local Variables list." t) (autoload 'copy-dir-locals-to-file-locals-prop-line "files-x" "\ @@ -12259,11 +12364,17 @@ enable-connection-local-variables `setq-connection-local' form is the value of the last VALUE. (fn [VARIABLE VALUE]...)" nil t) +(autoload 'connection-local-value "files-x" "\ +Return connection-local VARIABLE for APPLICATION in `default-directory'. +If VARIABLE does not have a connection-local binding, the value +is the default binding of the variable. + +(fn VARIABLE &optional APPLICATION)" nil t) (autoload 'path-separator "files-x" "\ The connection-local value of `path-separator'.") (autoload 'null-device "files-x" "\ The connection-local value of `null-device'.") -(register-definition-prefixes "files-x" '("connection-local-" "dir-locals-to-string" "hack-connection-local-variables" "modify-" "read-file-local-variable")) +(register-definition-prefixes "files-x" '("connection-local-" "dir-locals-to-string" "hack-connection-local-variables" "modify-" "read-")) ;;; Generated autoloads from filesets.el @@ -12685,7 +12796,7 @@ "flow-fill" ;;; Generated autoloads from progmodes/flymake.el -(push (purecopy '(flymake 1 3 4)) package--builtin-versions) +(push (purecopy '(flymake 1 3 7)) package--builtin-versions) (autoload 'flymake-log "flymake" "\ Log, at level LEVEL, the message MSG formatted with ARGS. LEVEL is passed to `display-warning', which is used to display @@ -12866,7 +12977,7 @@ flyspell-mode Unconditionally turn on Flyspell mode.") (autoload 'turn-off-flyspell "flyspell" "\ Unconditionally turn off Flyspell mode.") -(autoload 'flyspell-mode-off "flyspell" "\ +(autoload 'flyspell--mode-off "flyspell" "\ Turn Flyspell mode off.") (autoload 'flyspell-region "flyspell" "\ Flyspell text between BEG and END. @@ -15013,6 +15124,29 @@ gud-tooltip-mode it is disabled. (fn &optional ARG)" t) +(autoload 'lldb "gud" "\ +Run LLDB passing it COMMAND-LINE as arguments. +If COMMAND-LINE names a program FILE to debug, LLDB will run in +a buffer named *gud-FILE*, and the directory containing FILE +becomes the initial working directory and source-file directory +for the debug session. If you don't want `default-directory' to +change to the directory of FILE, specify FILE without leading +directories, in which case FILE should reside either in the +directory of the buffer from which this command is invoked, or +it can be found by searching PATH. + +If COMMAND-LINE requests that LLDB attaches to a process PID, LLDB +will run in *gud-PID*, otherwise it will run in *gud*; in these +cases the initial working directory is the `default-directory' of +the buffer in which this command was invoked. + +Please note that completion framework that complete while you +type, like Corfu, do not work well with this mode. You should +consider to turn them off in this mode. + +This command runs functions from `lldb-mode-hook'. + +(fn COMMAND-LINE)" t) (register-definition-prefixes "gud" '("gdb-" "gud-")) @@ -15950,7 +16084,7 @@ "hideif" ;;; Generated autoloads from progmodes/hideshow.el -(defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (c++-ts-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (js-ts-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" " android:launchMode="singleInstance" android:windowSoftInputMode="adjustResize" android:exported="true" - android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"> + android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|locale|fontScale"> @@ -149,7 +149,7 @@ along with GNU Emacs. If not, see . --> + android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|locale|fontScale"/> Date: Thu Dec 7 13:14:51 2023 +0800 ; Fix compiler warnings * lisp/tab-bar.el (touch-screen-delay): * lisp/tab-line.el (touch-screen-delay): Declare variables. * lisp/touch-screen.el (touch-screen-hold): Autoload. diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index e21367255a0..4fda4b027a6 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -416,6 +416,8 @@ tab-bar-handle-timeout (beep) (throw 'context-menu 'context-menu)) +(defvar touch-screen-delay) + (defun tab-bar-touchscreen-begin (event) "Handle a touchscreen begin EVENT on the tab bar. diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 4637dafcd90..0c9ef72084b 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -958,6 +958,8 @@ tab-line-context-menu ;;; Touch screen support. +(defvar touch-screen-delay) + (defun tab-line-track-tap (event &optional function) "Track a tap starting from EVENT. If EVENT is not a `touchscreen-begin' event, return t. diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index be08ae1d3c8..bae0e097688 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el @@ -320,6 +320,7 @@ touch-screen-scroll ;;; Drag-to-select gesture. +;;;###autoload (defun touch-screen-hold (event) "Handle a long press EVENT. Ding and select the window at EVENT, then activate the mark. If commit 83dfdac0ca276388d2ade07d63b367d0b82404ac Author: Yuan Fu Date: Wed Dec 6 13:25:40 2023 -0800 Tweak plus and minus svg icons Shrink them a tiny bit so they look the same size as cross. * etc/images/symbols/minus_16.svg: * etc/images/symbols/plus_16.svg: Shrink a bit. diff --git a/etc/images/symbols/minus_16.pbm b/etc/images/symbols/minus_16.pbm index 4f73340f179..c564ca290d8 100644 Binary files a/etc/images/symbols/minus_16.pbm and b/etc/images/symbols/minus_16.pbm differ diff --git a/etc/images/symbols/minus_16.svg b/etc/images/symbols/minus_16.svg index 9cb61d8d379..f0769763e5d 100644 --- a/etc/images/symbols/minus_16.svg +++ b/etc/images/symbols/minus_16.svg @@ -1,3 +1,3 @@ - + diff --git a/etc/images/symbols/plus_16.pbm b/etc/images/symbols/plus_16.pbm index c369231b636..2d8a45a5db4 100644 Binary files a/etc/images/symbols/plus_16.pbm and b/etc/images/symbols/plus_16.pbm differ diff --git a/etc/images/symbols/plus_16.svg b/etc/images/symbols/plus_16.svg index a4d2f84f318..573a5e5ca76 100644 --- a/etc/images/symbols/plus_16.svg +++ b/etc/images/symbols/plus_16.svg @@ -1,3 +1,3 @@ - + commit 5c9315b201beb4660f727dcc8045ec375ab56f70 Author: Juri Linkov Date: Wed Dec 6 19:28:52 2023 +0200 * lisp/dired-aux.el (dired-do-open): New command (bug#18132). * lisp/dired.el (dired-context-menu): Bind 'dired-do-open' to "Open". * lisp/dired-aux.el (shell-command-guess-xdg): Use 'shell-quote-argument'. diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..c55719416d3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -511,6 +511,10 @@ based on marked files in Dired. Possible backends are and a universal command such as "open" or "start" that delegates to the OS. +*** New command 'dired-do-open'. +Bound to the context menu "Open", delegates opening the marked files +to the OS. + ** Ediff --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 1a17ed749e8..0998e76c410 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1367,7 +1367,8 @@ shell-command-guess-xdg (let* ((xdg-mime (when (executable-find "xdg-mime") (string-trim-right (shell-command-to-string - (concat "xdg-mime query filetype " (car files)))))) + (concat "xdg-mime query filetype " + (shell-quote-argument (car files))))))) (xdg-mime-apps (unless (string-empty-p xdg-mime) (xdg-mime-apps xdg-mime))) (xdg-commands @@ -1401,6 +1402,39 @@ shell-command-guess-open "Populate COMMANDS by the `open' command." (append (ensure-list shell-command-guess-open) commands)) +(declare-function w32-shell-execute "w32fns.c") + +(defun dired-do-open (&optional arg) + "Open the marked files or a file at click/point externally. +If files are marked, run the command from `shell-command-guess-open' +on each of marked files. Otherwise, run it on the file where +the mouse is clicked, or on the file at point." + (interactive "P" dired-mode) + (let ((files (if (mouse-event-p last-nonmenu-event) + (save-excursion + (mouse-set-point last-nonmenu-event) + (dired-get-marked-files nil arg)) + (dired-get-marked-files nil arg))) + (command shell-command-guess-open)) + (when (and (memq system-type '(windows-nt)) + (equal command "start")) + (setq command "open")) + (when command + (dolist (file files) + (cond + ((memq system-type '(gnu/linux)) + (call-process command nil 0 nil file)) + ((memq system-type '(ms-dos)) + (shell-command (concat command " " (shell-quote-argument file)))) + ((memq system-type '(windows-nt)) + (w32-shell-execute command (convert-standard-filename file))) + ((memq system-type '(cygwin)) + (call-process command nil nil nil file)) + ((memq system-type '(darwin)) + (start-process (concat command " " file) nil command file)) + (t + (error "Open not supported on this system"))))))) + ;;; Commands that delete or redisplay part of the dired buffer diff --git a/lisp/dired.el b/lisp/dired.el index 97645c731c8..7f4b96353ee 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2591,6 +2591,9 @@ dired-mode-operate-menu ["Delete Image Tag..." image-dired-delete-tag :help "Delete image tag from current or marked files"])) +(declare-function shell-command-guess "dired-aux" (files)) +(defvar shell-command-guess-open) + (defun dired-context-menu (menu click) "Populate MENU with Dired mode commands at CLICK." (when (mouse-posn-property (event-start click) 'dired-filename) @@ -2606,6 +2609,9 @@ dired-context-menu :help "Edit file at mouse click"] ["Find in Other Window" dired-mouse-find-file-other-window :help "Edit file at mouse click in other window"] + ,@(when shell-command-guess-open + '(["Open" dired-do-open + :help "Open externally"])) ,@(when commands (list (cons "Open With" (append commit 6227ea0e592f647025e725649c6ea2df341eec5a Author: Eshel Yaron Date: Wed Dec 6 14:41:56 2023 +0100 ; Remove long annotation for word completion candidates * lisp/textmodes/ispell.el (ispell-completion-at-point): Remove ':annotation-function' from return value. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 4c3b22281bd..2c387342026 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3699,7 +3699,6 @@ ispell-completion-at-point (setcdr cur (cddr cur))) (setq cur (cdr cur))) (list beg end (cdr all) - :annotation-function (lambda (_) " Dictionary word") :exclusive 'no)))))) commit d8a00879309a3bf62f6ffcae103aa3bdba776ee9 Author: Po Lu Date: Wed Dec 6 10:34:41 2023 +0800 Cease preloading touch-screen.el outside X and Android * lisp/calc/calc.el (touch-screen-display-keyboard): * lisp/minibuffer.el (clear-minibuffer-message): * lisp/term.el (touch-screen-display-keyboard): Declare touch-screen-display-keyboard before binding or setting it. * lisp/loadup.el: Don't autoload touch-screen.el outside X and Android. * lisp/touch-screen.el: Autoload functions called from commands responding to touch screen events. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 41aeb17c252..50623218701 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1285,6 +1285,8 @@ calc-kill-stack-buffer (setq calc-trail-buffer nil) t)))) +(defvar touch-screen-display-keyboard) + (defun calc-mode () "Calculator major mode. diff --git a/lisp/loadup.el b/lisp/loadup.el index d447523dc42..ef4203917d4 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -298,12 +298,9 @@ (if (featurep 'dynamic-setting) (load "dynamic-setting")) -;; touch-screen.el is tiny and is used liberally throughout the button -;; code etc, so it may as well be preloaded everywhere. -(load "touch-screen") - (if (featurep 'x) (progn + (load "touch-screen") (load "x-dnd") (load "term/common-win") (load "term/x-win"))) @@ -316,6 +313,7 @@ (if (featurep 'android) (progn (load "ls-lisp") + (load "touch-screen") (load "term/common-win") (load "term/android-win"))) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 03b64198bcf..2ddaf0af120 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -975,7 +975,7 @@ clear-minibuffer-message ;; progress, because a preview message might currently be displayed ;; in the echo area. FIXME: find some way to place this in ;; touch-screen.el. - (if (and touch-screen-preview-select + (if (and (bound-and-true-p touch-screen-preview-select) (eq (nth 3 touch-screen-current-tool) 'drag)) 'dont-clear-message ;; Return nil telling the caller that the message diff --git a/lisp/term.el b/lisp/term.el index b2875e4a17f..81746e0c20d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1085,6 +1085,8 @@ term-ansi-reset (setq term-ansi-current-invisible nil) (setq term-ansi-current-bg-color 0)) +(defvar touch-screen-display-keyboard) + (define-derived-mode term-mode fundamental-mode "Term" "Major mode for interacting with an inferior interpreter. The interpreter name is same as buffer name, sans the asterisks. diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index 56adb75cefc..be08ae1d3c8 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el @@ -1913,6 +1913,7 @@ function-key-map ;; Exports. These functions are intended for use externally. +;;;###autoload (defun touch-screen-track-tap (event &optional update data threshold) "Track a single tap starting from EVENT. EVENT should be a `touchscreen-begin' event. @@ -1970,6 +1971,7 @@ touch-screen-track-tap (eq (caadr event) (caadr new-event)))) (t (throw 'finish nil)))))))) +;;;###autoload (defun touch-screen-track-drag (event update &optional data) "Track a single drag starting from EVENT. EVENT should be a `touchscreen-begin' event. @@ -2017,6 +2019,7 @@ touch-screen-track-drag ;;; Event handling exports. These functions are intended for use by ;;; Lisp commands bound to touch screen gesture events. +;;;###autoload (defun touch-screen-inhibit-drag () "Inhibit subsequent `touchscreen-drag' events from being sent. Prevent `touchscreen-drag' and translated mouse events from being commit dc744fe6f3cd185bd9d29f61b08cd4c524e3969e Author: João Távora Date: Tue Dec 5 15:40:49 2023 -0600 ElDoc: make eldoc-display-in-echo-are useful from M-x eldoc M-x eldoc is ElDoc's interactive entry point for on-demand documentation for users that don't want the behind-the-scenes idle timer behaviour. However, eldoc-display-in-echo-area, a member of eldoc-display-functions, refused to do anything because it thought it didn't have permission to use the echo area, which isn't true in interactive use cases. Fix that. See also: https://github.com/joaotavora/eglot/discussions/1328 * lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use INTERACTIVE argument. Rework comments. (Version): Bump to 1.15.0 diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 22144ed7c18..e28d73c3555 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -5,7 +5,7 @@ ;; Author: Noah Friedman ;; Keywords: extensions ;; Created: 1995-10-06 -;; Version: 1.14.0 +;; Version: 1.15.0 ;; Package-Requires: ((emacs "26.3")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -605,25 +605,29 @@ eldoc--echo-area-prefer-doc-buffer-p 'maybe))) (get-buffer-window eldoc--doc-buffer t))) -(defun eldoc-display-in-echo-area (docs _interactive) +(defun eldoc-display-in-echo-area (docs interactive) "Display DOCS in echo area. -Honor `eldoc-echo-area-use-multiline-p' and +INTERACTIVE is non-nil if user explictly invoked ElDoc. Honor +`eldoc-echo-area-use-multiline-p' and `eldoc-echo-area-prefer-doc-buffer'." (cond - (;; Check if we have permission to mess with echo area at all. For - ;; example, if this-command is non-nil while running via an idle - ;; timer, we're still in the middle of executing a command, e.g. a - ;; query-replace where it would be annoying to overwrite the echo - ;; area. - (or - (not (eldoc-display-message-no-interference-p)) - this-command - (not (eldoc--message-command-p last-command)))) - (;; If we do but nothing to report, clear the echo area. + ((and (not interactive) + ;; When called non-interactively, check if we have permission + ;; to mess with echo area at all. For example, if + ;; this-command is non-nil while running via an idle timer, + ;; we're still in the middle of executing a command, e.g. a + ;; query-replace where it would be annoying to overwrite the + ;; echo area. + (or + (not (eldoc-display-message-no-interference-p)) + this-command + (not (eldoc--message-command-p last-command))))) + (;; If nothing to report, clear the echo area. (null docs) (eldoc--message nil)) (t - ;; Otherwise, establish some parameters. + ;; Otherwise, proceed to change the echo area. Start by + ;; establishing some parameters. (let* ((width (1- (window-width (minibuffer-window)))) (val (if (and (symbolp eldoc-echo-area-use-multiline-p) commit df842a737d6cb2b70d9672a64826e04bb8249167 Author: Stefan Monnier Date: Tue Dec 5 15:02:24 2023 -0500 * lisp/emacs-lisp/package.el (package-activate-all): Fix second-order warning diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 0a87f771ab9..bed6e74c921 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1732,8 +1732,13 @@ package-activate-all t))) (progn (require 'package) - (declare-function package--activate-all "package" ()) - (package--activate-all)))))) + ;; Silence the "unknown function" warning when this is compiled + ;; inside `loaddefs.el'. + ;; FIXME: We use `with-no-warnings' because the effect of + ;; `declare-function' is currently not scoped, so if we use + ;; it here, we end up with a redefinition warning instead :-) + (with-no-warnings + (package--activate-all))))))) (defun package--activate-all () (dolist (elt (package--alist)) commit 4f0239d814a090a7d96968c0e8f70e56b186cff9 Author: Stefan Monnier Date: Tue Dec 5 14:24:45 2023 -0500 (package-activate-all): Be more robust when quickstart fails Quickstart can fail in all kinds of ways, for example if a package was removed without updating the quickstart file. * lisp/emacs-lisp/package.el (package-activate-all): Revert to the slow path if the quickstart signals an error. (package--activate-all): Fix compilation warning without an autoload. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d4bb6710283..0a87f771ab9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1720,18 +1720,21 @@ package-activate-all package-quickstart-file)))) ;; The quickstart file presumes that it has a blank slate, ;; so don't use it if we already activated some packages. - (if (and qs (not (bound-and-true-p package-activated-list))) - ;; Skip load-source-file-function which would slow us down by a factor - ;; 2 when loading the .el file (this assumes we were careful to - ;; save this file so it doesn't need any decoding). - (let ((load-source-file-function nil)) - (unless (boundp 'package-activated-list) - (setq package-activated-list nil)) - (load qs nil 'nomessage)) - (require 'package) - (package--activate-all))))) + (or (and qs (not (bound-and-true-p package-activated-list)) + ;; Skip `load-source-file-function' which would slow us down by + ;; a factor 2 when loading the .el file (this assumes we were + ;; careful to save this file so it doesn't need any decoding). + (with-demoted-errors "Error during quickstart: %S" + (let ((load-source-file-function nil)) + (unless (boundp 'package-activated-list) + (setq package-activated-list nil)) + (load qs nil 'nomessage) + t))) + (progn + (require 'package) + (declare-function package--activate-all "package" ()) + (package--activate-all)))))) -;;;###autoload (defun package--activate-all () (dolist (elt (package--alist)) (condition-case err commit 1f1dbfc6e8da2bad097a388fbfd8cb09a2092cac Author: Jonas Bernoulli Date: Tue Dec 5 20:04:21 2023 +0100 ; * lisp/transient.el: Revert accidental changes diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index b6c426d7f21..ac330e09702 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -25,7 +25,7 @@ @dircategory Emacs misc features @direntry -* Transient: (transient). Transient Commands. +* Transient: (transient). Transient Commands. @end direntry @finalout @@ -359,7 +359,7 @@ Saving Values If the user does not save the value and just exits using a regular suffix command, then the value is merely saved to the transient's history. That value won't be used when the transient is next invoked, -but it is easily accessible (see @ref{Using History}). +but it is easily accessible (@pxref{Using History}). @table @asis @item @kbd{C-x s} (@code{transient-set}) @@ -420,8 +420,8 @@ Using History those mentioned above are bound to those commands. Authors of transients should arrange for different infix commands that -read the same kind of value to also use the same history key (see -@ref{Suffix Slots}). +read the same kind of value to also use the same history key +(@pxref{Suffix Slots}). Both kinds of history are saved to a file when Emacs is exited. @@ -635,7 +635,7 @@ Configuration The value of this option has the form @code{(@var{FUNCTION} . @var{ALIST})}, where @var{FUNCTION} is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an -alist of the same form as @var{ALIST}. See @ref{Choosing Window,,,elisp,}, +alist of the same form as @var{ALIST}. @xref{Choosing Window,,,elisp,}, for details. The default is: @@ -650,7 +650,8 @@ Configuration This displays the window at the bottom of the selected frame. Another useful @var{FUNCTION} is @code{display-buffer-below-selected}, which is what @code{magit-popup} used by default. For more alternatives see -@ref{Buffer Display Action Functions,,,elisp,}, and @ref{Buffer Display Action Alists,,,elisp,}. +@ref{Buffer Display Action Functions,,,elisp,}, and see @ref{Buffer Display +Action Alists,,,elisp,}. Note that the buffer that was current before the transient buffer is shown should remain the current buffer. Many suffix commands @@ -702,7 +703,8 @@ Configuration @code{transient-key-exit} (if allowed and they exit the transient) is used to draw the line. -Otherwise this can be any mode-line format. See @ref{Mode Line Format,,,elisp,}, for details. +Otherwise this can be any mode-line format. @xref{Mode Line +Format,,,elisp,}, for details. @end defopt @defopt transient-semantic-coloring @@ -851,10 +853,10 @@ Modifying Existing Transients as expected by @code{transient-define-prefix}. Note that an infix is a special kind of suffix. Depending on context ``suffixes'' means ``suffixes (including infixes)'' or ``non-infix suffixes''. Here it -means the former. See @ref{Suffix Specifications}. +means the former. @xref{Suffix Specifications}. @var{SUFFIX} may also be a group in the same form as expected by -@code{transient-define-prefix}. See @ref{Group Specifications}. +@code{transient-define-prefix}. @xref{Group Specifications}. @item @var{LOC} is a command, a key vector, a key description (a string as @@ -1034,7 +1036,7 @@ Defining Transients defines the complete transient, not just the transient prefix command that is used to invoke that transient. -@defmac transient-define-prefix name arglist [docstring] [keyword value]... group... [body...] +@defmac transient-define-prefix name arglist [docstring] [keyword value]@dots{} group@dots{} [body@dots{}] This macro defines @var{NAME} as a transient prefix command and binds the transient's infix and suffix commands. @@ -1049,7 +1051,7 @@ Defining Transients @var{GROUP}s add key bindings for infix and suffix commands and specify how these bindings are presented in the popup buffer. At least one -@var{GROUP} has to be specified. See @ref{Binding Suffix and Infix Commands}. +@var{GROUP} has to be specified. @xref{Binding Suffix and Infix Commands}. The @var{BODY} is optional. If it is omitted, then @var{ARGLIST} is ignored and the function definition becomes: @@ -1084,11 +1086,12 @@ Binding Suffix and Infix Commands @section Binding Suffix and Infix Commands The macro @code{transient-define-prefix} is used to define a transient. -This defines the actual transient prefix command (see @ref{Defining Transients}) and adds the transient's infix and suffix bindings, as +This defines the actual transient prefix command (@pxref{Defining +Transients}) and adds the transient's infix and suffix bindings, as described below. Users and third-party packages can add additional bindings using -functions such as @code{transient-insert-suffix} (see @ref{Modifying Existing Transients}). These functions take a ``suffix specification'' as one of +functions such as @code{transient-insert-suffix} (@pxref{Modifying Existing Transients}). These functions take a ``suffix specification'' as one of their arguments, which has the same form as the specifications used in @code{transient-define-prefix}. @@ -1119,10 +1122,13 @@ Group Specifications Group specifications then have this form: @lisp -[@{LEVEL@} @{DESCRIPTION@} @{KEYWORD VALUE@}... ELEMENT...] +[@{@var{LEVEL}@} @{@var{DESCRIPTION}@} + @{@var{KEYWORD} @var{VALUE}@}... + @var{ELEMENT}...] @end lisp -The @var{LEVEL} is optional and defaults to 4. See @ref{Enabling and Disabling Suffixes}. +The @var{LEVEL} is optional and defaults to 4. @xref{Enabling and +Disabling Suffixes}. The @var{DESCRIPTION} is optional. If present, it is used as the heading of the group. @@ -1227,7 +1233,9 @@ Suffix Specifications Suffix specifications have this form: @lisp -([LEVEL] [KEY [DESCRIPTION]] COMMAND|ARGUMENT [KEYWORD VALUE]...) +([@var{LEVEL}] + [@var{KEY} [@var{DESCRIPTION}]] + @var{COMMAND}|@var{ARGUMENT} [@var{KEYWORD} @var{VALUE}]...) @end lisp @var{LEVEL}, @var{KEY} and @var{DESCRIPTION} can also be specified using the @var{KEYWORD}s @@ -1238,8 +1246,8 @@ Suffix Specifications @itemize @item -@var{LEVEL} is the suffix level, an integer between 1 and 7. See -@ref{Enabling and Disabling Suffixes}. +@var{LEVEL} is the suffix level, an integer between 1 and 7. +@xref{Enabling and Disabling Suffixes}. @item @var{KEY} is the key binding, either a vector or key description string. @@ -1317,7 +1325,7 @@ Defining Suffix and Infix Commands ``suffixes'' means ``suffixes (including infixes)'' or ``non-infix suffixes''. -@defmac transient-define-suffix name arglist [docstring] [keyword value]... body... +@defmac transient-define-suffix name arglist [docstring] [keyword value]@dots{} body@dots{} This macro defines @var{NAME} as a transient suffix command. @var{ARGLIST} are the arguments that the command takes. @@ -1334,7 +1342,7 @@ Defining Suffix and Infix Commands inside @code{interactive}. @end defmac -@defmac transient-define-infix name arglist [docstring] [keyword value]... +@defmac transient-define-infix name arglist [docstring] [keyword value]@dots{} This macro defines @var{NAME} as a transient infix command. @var{ARGLIST} is always ignored (but mandatory never-the-less) and @@ -1371,7 +1379,7 @@ Defining Suffix and Infix Commands value of the @code{:transient} keyword. @end defmac -@defmac transient-define-argument name arglist [docstring] [keyword value]... +@defmac transient-define-argument name arglist [docstring] [keyword value]@dots{} This macro defines @var{NAME} as a transient infix command. This is an alias for @code{transient-define-infix}. Only use this alias @@ -1848,7 +1856,7 @@ Suffix Classes @item All suffix and infix classes derive from @code{transient-suffix}, which in turn derives from @code{transient-child}, from which @code{transient-group} also -derives (see @ref{Group Classes}). +derives (@pxref{Group Classes}). @item All infix classes derive from the abstract @code{transient-infix} class, @@ -1862,7 +1870,7 @@ Suffix Classes methods. Also, infixes and non-infix suffixes are usually defined using -different macros (see @ref{Defining Suffix and Infix Commands}). +different macros (@pxref{Defining Suffix and Infix Commands}). @item Classes used for infix commands that represent arguments should @@ -2055,7 +2063,7 @@ Prefix Slots @code{transient-suffix} and @code{transient-non-suffix} play a part when determining whether the currently active transient prefix command remains active/transient when a suffix or arbitrary non-suffix -command is invoked. See @ref{Transient State}. +command is invoked. @xref{Transient State}. @item @code{refresh-suffixes} Normally suffix objects and keymaps are only setup @@ -2101,7 +2109,7 @@ Prefix Slots @item @code{level} The level of the prefix commands. The suffix commands whose -layer is equal or lower are displayed. See @ref{Enabling and Disabling Suffixes}. +layer is equal or lower are displayed. @pxref{Enabling and Disabling Suffixes}. @item @code{value} The likely outdated value of the prefix. Instead of accessing @@ -2134,7 +2142,7 @@ Suffix Slots @code{command} The command, a symbol. @item -@code{transient} Whether to stay transient. See @ref{Transient State}. +@code{transient} Whether to stay transient. @xref{Transient State}. @item @code{format} The format used to display the suffix in the popup buffer. @@ -2309,7 +2317,7 @@ Predicate Slots different purpose. The value has to be an integer between 1 and 7. @code{level} controls whether a suffix or a group should be available depending on user preference. -See @ref{Enabling and Disabling Suffixes}. +@xref{Enabling and Disabling Suffixes}. @node FAQ @appendix FAQ diff --git a/lisp/transient.el b/lisp/transient.el index 6f686afd16d..94f7700ddaf 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3,11 +3,9 @@ ;; Copyright (C) 2018-2023 Free Software Foundation, Inc. ;; Author: Jonas Bernoulli -;; Homepage: https://github.com/magit/transient +;; URL: https://github.com/magit/transient ;; Keywords: extensions - ;; Version: 0.5.2 -;; Package-Requires: ((emacs "26.1") (compat "29.1.4.4") (seq "2.24")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -35,7 +33,6 @@ ;;; Code: (require 'cl-lib) -(require 'compat) (require 'eieio) (require 'edmacro) (require 'format-spec) @@ -858,6 +855,7 @@ transient-subgroups ;;; Define +;;;###autoload (defmacro transient-define-prefix (name arglist &rest args) "Define NAME as a transient prefix command. commit fa5f06c1251ff717d661f05fcd240b4792054aae Author: Jonas Bernoulli Date: Tue Dec 5 20:01:44 2023 +0100 ; * lisp/transient.el: Set Version instead of Package-Version `finder-compile-keywords' only considers the "Version" header. diff --git a/lisp/transient.el b/lisp/transient.el index f17323bec4f..6f686afd16d 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -6,7 +6,7 @@ ;; Homepage: https://github.com/magit/transient ;; Keywords: extensions -;; Package-Version: 0.5.2 +;; Version: 0.5.2 ;; Package-Requires: ((emacs "26.1") (compat "29.1.4.4") (seq "2.24")) ;; SPDX-License-Identifier: GPL-3.0-or-later commit 4675aff76828b0747d1ac900d65d4a92a457ebf5 Author: Jonas Bernoulli Date: Tue Dec 5 19:59:34 2023 +0100 Update to Transient v0.5.2 diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index e06f7759d1b..b6c426d7f21 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -25,13 +25,13 @@ @dircategory Emacs misc features @direntry -* Transient: (transient). Transient Commands. +* Transient: (transient). Transient Commands. @end direntry @finalout @titlepage @title Transient User and Developer Manual -@subtitle for version 0.4.3 +@subtitle for version 0.5.2 @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -44,37 +44,16 @@ @node Top @top Transient User and Developer Manual -Taking inspiration from prefix keys and prefix arguments, Transient -implements a similar abstraction involving a prefix command, infix -arguments and suffix commands. We could call this abstraction a -``transient command'', but because it always involves at least two -commands (a prefix and a suffix) we prefer to call it just a -``transient''. - -When the user calls a transient prefix command, a transient -(temporary) keymap is activated, which binds the transient's infix -and suffix commands, and functions that control the transient state -are added to @code{pre-command-hook} and @code{post-command-hook}. The available -suffix and infix commands and their state are shown in a popup buffer -until the transient is exited by invoking a suffix command. - -Calling an infix command causes its value to be changed, possibly by -reading a new value in the minibuffer. +Transient is the library used to implement the keyboard-driven ``menus'' +in Magit. It is distributed as a separate package, so that it can be +used to implement similar menus in other packages. -Calling a suffix command usually causes the transient to be exited -but suffix commands can also be configured to not exit the transient. - -@quotation -The second part of this manual, which describes how to modify existing -transients and create new transients from scratch, can be hard to -digest if you are just getting started. A useful resource to get over -that hurdle is Psionic K's interactive tutorial, available at -@uref{https://github.com/positron-solutions/transient-showcase}. - -@end quotation +This manual can be bit hard to digest when getting started. A useful +resource to get over that hurdle is Psionic K's interactive tutorial, +available at @uref{https://github.com/positron-solutions/transient-showcase}. @noindent -This manual is for Transient version 0.4.3. +This manual is for Transient version 0.5.2. @insertcopying @end ifnottex @@ -85,7 +64,6 @@ Top * Modifying Existing Transients:: * Defining New Commands:: * Classes and Methods:: -* Related Abstractions and Packages:: * FAQ:: * Keystroke Index:: * Command and Function Index:: @@ -110,6 +88,7 @@ Top Defining New Commands +* Technical Introduction:: * Defining Transients:: * Binding Suffix and Infix Commands:: * Defining Suffix and Infix Commands:: @@ -139,169 +118,91 @@ Top * Suffix Format Methods:: -Related Abstractions and Packages - -* Comparison With Prefix Keys and Prefix Arguments:: -* Comparison With Other Packages:: - @end detailmenu @end menu @node Introduction @chapter Introduction -Taking inspiration from prefix keys and prefix arguments, Transient -implements a similar abstraction involving a prefix command, infix -arguments and suffix commands. We could call this abstraction a -``transient command'', but because it always involves at least two -commands (a prefix and a suffix) we prefer to call it just a -``transient''. - -@cindex transient prefix command -@quotation -Transient keymaps are a feature provided by Emacs. Transients as -implemented by this package involve the use of transient keymaps. - -Emacs provides a feature that it calls @dfn{prefix commands}. When we -talk about ``prefix commands'' in this manual, then we mean our own kind -of ``prefix commands'', unless specified otherwise. To avoid ambiguity -we sometimes use the terms @dfn{transient prefix command} for our kind and -``regular prefix command'' for Emacs' kind. - -@end quotation - -When the user calls a transient prefix command, a transient -(temporary) keymap is activated, which binds the transient's infix and -suffix commands, and functions that control the transient state are -added to @code{pre-command-hook} and @code{post-command-hook}. The available suffix -and infix commands and their state are shown in a popup buffer until -the transient state is exited by invoking a suffix command. - -Calling an infix command causes its value to be changed. How that is -done depends on the type of the infix command. The simplest case is -an infix command that represents a command-line argument that does not -take a value. Invoking such an infix command causes the switch to be -toggled on or off. More complex infix commands may read a value from -the user, using the minibuffer. - -Calling a suffix command usually causes the transient to be exited; -the transient keymaps and hook functions are removed, the popup buffer -no longer shows information about the (no longer bound) suffix -commands, the values of some public global variables are set, while -some internal global variables are unset, and finally the command is -actually called. Suffix commands can also be configured to not exit -the transient. - -A suffix command can, but does not have to, use the infix arguments in -much the same way any command can choose to use or ignore the prefix -arguments. For a suffix command that was invoked from a transient, the -variable @code{transient-current-suffixes} and the function @code{transient-args} -serve about the same purpose as the variables @code{prefix-arg} and -@code{current-prefix-arg} do for any command that was called after the prefix -arguments have been set using a command such as @code{universal-argument}. +Transient is the library used to implement the keyboard-driven @dfn{menus} +in Magit. It is distributed as a separate package, so that it can be +used to implement similar menus in other packages. -The information shown in the popup buffer while a transient is active -looks a bit like this: - -@example -,----------------------------------------- -|Arguments -| -f Force (--force) -| -a Annotate (--annotate) -| -|Create -| t tag -| r release -`----------------------------------------- -@end example +This manual can be bit hard to digest when getting started. A useful +resource to get over that hurdle is Psionic K's interactive tutorial, +available at @uref{https://github.com/positron-solutions/transient-showcase}. -@quotation -This is a simplified version of @code{magit-tag}. Info manuals do not -support images or colored text, so the above ``screenshot'' lacks some -information; in practice you would be able to tell whether the -arguments @code{--force} and @code{--annotate} are enabled or not based on their -color. +@anchor{Some things that Transient can do} +@heading Some things that Transient can do -@end quotation - -@cindex command dispatchers -Transient can be used to implement simple ``command dispatchers''. The -main benefit then is that the user can see all the available commands -in a popup buffer. That is useful by itself because it frees the user -from having to remember all the keys that are valid after a certain -prefix key or command. Magit's @code{magit-dispatch} (on @kbd{C-x M-g}) command is -an example of using Transient to merely implement a command -dispatcher. - -In addition to that, Transient also allows users to interactively pass -arguments to commands. These arguments can be much more complex than -what is reasonable when using prefix arguments. There is a limit to -how many aspects of a command can be controlled using prefix -arguments. Furthermore, what a certain prefix argument means for -different commands can be completely different, and users have to read -documentation to learn and then commit to memory what a certain prefix -argument means to a certain command. - -Transient suffix commands, on the other hand, can accept dozens of -different arguments without the user having to remember anything. -When using Transient, one can call a command with arguments that are -just as complex as when calling the same function non-interactively -from Lisp. - -Invoking a transient suffix command with arguments is similar to -invoking a command in a shell with command-line completion and history -enabled. One benefit of the Transient interface is that it remembers -history not only on a global level (``this command was invoked using -these arguments, and previously it was invoked using those other -arguments''), but also remembers the values of individual arguments -independently. See @xref{Using History}. - -After a transient prefix command is invoked, @kbd{C-h @var{KEY}} can be used to -show the documentation for the infix or suffix command that @kbd{@var{KEY}} is -bound to (see @ref{Getting Help for Suffix Commands}), and infixes and -suffixes can be removed from the transient using @kbd{C-x l @var{KEY}}. Infixes -and suffixes that are disabled by default can be enabled the same way. -@xref{Enabling and Disabling Suffixes}. +@itemize +@item +Display current state of arguments +@item +Display and manage lifecycle of modal bindings +@item +Contextual user interface +@item +Flow control for wizard-like composition of interactive forms +@item +History & persistence +@item +Rendering arguments for controlling CLI programs +@end itemize -Transient ships with support for a few different types of specialized -infix commands. A command that sets a command line option, for example, -has different needs than a command that merely toggles a boolean flag. -Additionally, Transient provides abstractions for defining new types, -which the author of Transient did not anticipate (or didn't get around -to implementing yet). - -Note that suffix commands also support regular prefix arguments. A -suffix command may even be called with both infix and prefix arguments -at the same time. If you invoke a command as a suffix of a transient -prefix command, but also want to pass prefix arguments to it, then -first invoke the prefix command, and only after doing that invoke the -prefix arguments, before finally invoking the suffix command. If you -instead began by providing the prefix arguments, then those would -apply to the prefix command, not the suffix command. Likewise, if you -want to change infix arguments before invoking a suffix command with -prefix arguments, then change the infix arguments before invoking the -prefix arguments. In other words, regular prefix arguments always -apply to the next command, and since transient prefix, infix and -suffix commands are just regular commands, the same applies to them. -(Regular prefix keys behave differently because they are not commands -at all, instead they are just incomplete key sequences, and those -cannot be interrupted with prefix commands.) +@anchor{Complexity in CLI programs} +@heading Complexity in CLI programs + +Complexity tends to grow with time. How do you manage the complexity +of commands? Consider the humble shell command @samp{ls}. It now has over +@emph{fifty} command line options. Some of these are boolean flags (@samp{ls -l}). +Some take arguments (@samp{ls --sort=s}). Some have no effect unless paired +with other flags (@samp{ls -lh}). Some are mutually exclusive. Some shell +commands even have so many options that they introduce @emph{subcommands} +(@samp{git branch}, @samp{git commit}), each with their own rich set of options +(@samp{git branch -f}). + +@anchor{Using Transient for composing interactive commands} +@heading Using Transient for composing interactive commands + +What about Emacs commands used interactively? How do these handle +options? One solution is to make many versions of the same command, +so you don't need to! Consider: @samp{delete-other-windows} vs. +@samp{delete-other-windows-vertically} (among many similar examples). + +Some Emacs commands will simply prompt you for the next "argument" +(@samp{M-x switch-to-buffer}). Another common solution is to use prefix +arguments which usually start with @samp{C-u}. Sometimes these are sensibly +numerical in nature (@samp{C-u 4 M-x forward-paragraph} to move forward 4 +paragraphs). But sometimes they function instead as boolean +"switches" (@samp{C-u C-SPACE} to jump to the last mark instead of just +setting it, @samp{C-u C-u C-SPACE} to unconditionally set the mark). Since +there aren't many standards for the use of prefix options, you have to +read the command's documentation to find out what the possibilities +are. + +But when an Emacs command grows to have a truly large set of options +and arguments, with dependencies between them, lots of option values, +etc., these simple approaches just don't scale. Transient is designed +to solve this issue. Think of it as the humble prefix argument @samp{C-u}, +@emph{raised to the power of 10}. Like @samp{C-u}, it is key driven. Like the +shell, it supports boolean "flag" options, options that take +arguments, and even "sub-commands", with their own options. But +instead of searching through a man page or command documentation, +well-designed transients @emph{guide} their users to the relevant set of +options (and even their possible values!) directly, taking into +account any important pre-existing Emacs settings. And while for +shell commands like @samp{ls}, there is only one way to "execute" (hit +@samp{Return}!), transients can "execute" using multiple different keys tied +to one of many self-documenting @emph{actions} (imagine having 5 different +colored return keys on your keyboard!). Transients make navigating +and setting large, complex groups of command options and arguments +easy. Fun even. Once you've tried it, it's hard to go back to the +@samp{C-u what can I do here again?} way. @node Usage @chapter Usage -@menu -* Invoking Transients:: -* Aborting and Resuming Transients:: -* Common Suffix Commands:: -* Saving Values:: -* Using History:: -* Getting Help for Suffix Commands:: -* Enabling and Disabling Suffixes:: -* Other Commands:: -* Configuration:: -@end menu - @node Invoking Transients @section Invoking Transients @@ -366,7 +267,7 @@ Aborting and Resuming Transients Transient's predecessor bound @kbd{q} instead of @kbd{C-g} to the quit command. To learn how to get that binding back see @code{transient-bind-q-to-quit}'s -doc string. +documentation string. @table @asis @item @kbd{C-q} (@code{transient-quit-all}) @@ -458,7 +359,7 @@ Saving Values If the user does not save the value and just exits using a regular suffix command, then the value is merely saved to the transient's history. That value won't be used when the transient is next invoked, -but it is easily accessible (@pxref{Using History}). +but it is easily accessible (see @ref{Using History}). @table @asis @item @kbd{C-x s} (@code{transient-set}) @@ -519,8 +420,8 @@ Using History those mentioned above are bound to those commands. Authors of transients should arrange for different infix commands that -read the same kind of value to also use the same history key -(@pxref{Suffix Slots}). +read the same kind of value to also use the same history key (see +@ref{Suffix Slots}). Both kinds of history are saved to a file when Emacs is exited. @@ -562,8 +463,8 @@ Getting Help for Suffix Commands defined. For infix commands that represent command-line arguments this ideally shows the appropriate manpage. @code{transient-help} then tries to jump to the correct location within that. Info manuals are also -supported. The fallback is to show the command's doc string, for -non-infix suffixes this is usually appropriate. +supported. The fallback is to show the command's documentation +string, for non-infix suffixes this is usually appropriate. @node Enabling and Disabling Suffixes @section Enabling and Disabling Suffixes @@ -637,6 +538,13 @@ Enabling and Disabling Suffixes Therefore, to control which suffixes are available given a certain state, you have to make sure that that state is currently active. + +@item @kbd{C-x a} (@code{transient-toggle-level-limit}) +@kindex C-x a +@findex transient-toggle-level-limit +This command toggle whether suffixes that are on levels lower than +the level specified by @code{transient-default-level} are temporarily +available anyway. @end table @node Other Commands @@ -727,7 +635,7 @@ Configuration The value of this option has the form @code{(@var{FUNCTION} . @var{ALIST})}, where @var{FUNCTION} is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an -alist of the same form as @var{ALIST}. @xref{Choosing Window,,,elisp,}, +alist of the same form as @var{ALIST}. See @ref{Choosing Window,,,elisp,}, for details. The default is: @@ -742,8 +650,7 @@ Configuration This displays the window at the bottom of the selected frame. Another useful @var{FUNCTION} is @code{display-buffer-below-selected}, which is what @code{magit-popup} used by default. For more alternatives see -@ref{Buffer Display Action Functions,,,elisp,}, and see @ref{Buffer Display -Action Alists,,,elisp,}. +@ref{Buffer Display Action Functions,,,elisp,}, and @ref{Buffer Display Action Alists,,,elisp,}. Note that the buffer that was current before the transient buffer is shown should remain the current buffer. Many suffix commands @@ -782,27 +689,30 @@ Configuration displayed right above the echo area, then this probably is not a good value. -If @code{line} (the default), then the buffer also has no mode-line, but a -thin line is drawn instead, using the background color of the face -@code{transient-separator}. Text-mode frames cannot display thin lines, -and therefore fall back to treating @code{line} like @code{nil}. +If @code{line} (the default) or a natural number, then the buffer +has no mode-line, but a line is drawn is drawn in its place. +If a number is used, that specifies the thickness of the line. +On termcap frames we cannot draw lines, so there @code{line} and +numbers are synonyms for @code{nil}. -Otherwise this can be any mode-line format. @xref{Mode Line -Format,,,elisp,}, for details. +The color of the line is used to indicate if non-suffixes are +allowed and whether they exit the transient. The foreground +color of @code{transient-key-noop} (if non-suffix are disallowed), +@code{transient-key-stay} (if allowed and transient stays active), or +@code{transient-key-exit} (if allowed and they exit the transient) is +used to draw the line. + +Otherwise this can be any mode-line format. See @ref{Mode Line Format,,,elisp,}, for details. @end defopt @defopt transient-semantic-coloring -This option controls whether prefixes and suffixes are colored in -a Hydra-like fashion. +This option controls whether colors are used to indicate the +transient behavior of commands. If non-@code{nil}, then the key binding of each suffix is colorized to indicate whether it exits the transient state or not. The color of the prefix is indicated using the line that is drawn when the value of @code{transient-mode-line-format} is @code{line}. - -For more information about how Hydra uses colors see -@uref{https://github.com/abo-abo/hydra#color} and -@uref{https://oremacs.com/2015/02/19/hydra-colors-reloaded}. @end defopt @defopt transient-highlight-mismatched-keys @@ -941,10 +851,10 @@ Modifying Existing Transients as expected by @code{transient-define-prefix}. Note that an infix is a special kind of suffix. Depending on context ``suffixes'' means ``suffixes (including infixes)'' or ``non-infix suffixes''. Here it -means the former. @xref{Suffix Specifications}. +means the former. See @ref{Suffix Specifications}. @var{SUFFIX} may also be a group in the same form as expected by -@code{transient-define-prefix}. @xref{Group Specifications}. +@code{transient-define-prefix}. See @ref{Group Specifications}. @item @var{LOC} is a command, a key vector, a key description (a string as @@ -1014,13 +924,105 @@ Modifying Existing Transients @node Defining New Commands @chapter Defining New Commands -@menu -* Defining Transients:: -* Binding Suffix and Infix Commands:: -* Defining Suffix and Infix Commands:: -* Using Infix Arguments:: -* Transient State:: -@end menu +@node Technical Introduction +@section Technical Introduction + +Taking inspiration from prefix keys and prefix arguments, Transient +implements a similar abstraction involving a prefix command, infix +arguments and suffix commands. + +When the user calls a transient prefix command, a transient +(temporary) keymap is activated, which binds the transient's infix and +suffix commands, and functions that control the transient state are +added to @code{pre-command-hook} and @code{post-command-hook}. The available suffix +and infix commands and their state are shown in a popup buffer until +the transient state is exited by invoking a suffix command. + +Calling an infix command causes its value to be changed. How that is +done depends on the type of the infix command. The simplest case is +an infix command that represents a command-line argument that does not +take a value. Invoking such an infix command causes the switch to be +toggled on or off. More complex infix commands may read a value from +the user, using the minibuffer. + +Calling a suffix command usually causes the transient to be exited; +the transient keymaps and hook functions are removed, the popup buffer +no longer shows information about the (no longer bound) suffix +commands, the values of some public global variables are set, while +some internal global variables are unset, and finally the command is +actually called. Suffix commands can also be configured to not exit +the transient. + +A suffix command can, but does not have to, use the infix arguments in +much the same way any command can choose to use or ignore the prefix +arguments. For a suffix command that was invoked from a transient, the +variable @code{transient-current-suffixes} and the function @code{transient-args} +serve about the same purpose as the variables @code{prefix-arg} and +@code{current-prefix-arg} do for any command that was called after the prefix +arguments have been set using a command such as @code{universal-argument}. + +@cindex command dispatchers +Transient can be used to implement simple ``command dispatchers''. The +main benefit then is that the user can see all the available commands +in a popup buffer, which can be thought of as a ``menus''. That is +useful by itself because it frees the user from having to remember all +the keys that are valid after a certain prefix key or command. +Magit's @code{magit-dispatch} (on @kbd{C-x M-g}) command is an example of using +Transient to merely implement a command dispatcher. + +In addition to that, Transient also allows users to interactively pass +arguments to commands. These arguments can be much more complex than +what is reasonable when using prefix arguments. There is a limit to +how many aspects of a command can be controlled using prefix +arguments. Furthermore, what a certain prefix argument means for +different commands can be completely different, and users have to read +documentation to learn and then commit to memory what a certain prefix +argument means to a certain command. + +Transient suffix commands, on the other hand, can accept dozens of +different arguments without the user having to remember anything. +When using Transient, one can call a command with arguments that are +just as complex as when calling the same function non-interactively +from Lisp. + +Invoking a transient suffix command with arguments is similar to +invoking a command in a shell with command-line completion and history +enabled. One benefit of the Transient interface is that it remembers +history not only on a global level (``this command was invoked using +these arguments, and previously it was invoked using those other +arguments''), but also remembers the values of individual arguments +independently. See @ref{Using History}. + +After a transient prefix command is invoked, @kbd{C-h @var{KEY}} can be used to +show the documentation for the infix or suffix command that @kbd{@var{KEY}} is +bound to (see @ref{Getting Help for Suffix Commands}), and infixes and +suffixes can be removed from the transient using @kbd{C-x l @var{KEY}}. Infixes +and suffixes that are disabled by default can be enabled the same way. +See @ref{Enabling and Disabling Suffixes}. + +Transient ships with support for a few different types of specialized +infix commands. A command that sets a command line option, for example, +has different needs than a command that merely toggles a boolean flag. +Additionally, Transient provides abstractions for defining new types, +which the author of Transient did not anticipate (or didn't get around +to implementing yet). + +Note that suffix commands also support regular prefix arguments. A +suffix command may even be called with both infix and prefix arguments +at the same time. If you invoke a command as a suffix of a transient +prefix command, but also want to pass prefix arguments to it, then +first invoke the prefix command, and only after doing that invoke the +prefix arguments, before finally invoking the suffix command. If you +instead began by providing the prefix arguments, then those would +apply to the prefix command, not the suffix command. Likewise, if you +want to change infix arguments before invoking a suffix command with +prefix arguments, then change the infix arguments before invoking the +prefix arguments. In other words, regular prefix arguments always +apply to the next command, and since transient prefix, infix and +suffix commands are just regular commands, the same applies to them. +(Regular prefix keys behave differently because they are not commands +at all, instead they are just incomplete key sequences, and those +cannot be interrupted with prefix commands.) @node Defining Transients @section Defining Transients @@ -1032,7 +1034,7 @@ Defining Transients defines the complete transient, not just the transient prefix command that is used to invoke that transient. -@defmac transient-define-prefix name arglist [docstring] [keyword value]@dots{} group@dots{} [body@dots{}] +@defmac transient-define-prefix name arglist [docstring] [keyword value]... group... [body...] This macro defines @var{NAME} as a transient prefix command and binds the transient's infix and suffix commands. @@ -1047,7 +1049,7 @@ Defining Transients @var{GROUP}s add key bindings for infix and suffix commands and specify how these bindings are presented in the popup buffer. At least one -@var{GROUP} has to be specified. @xref{Binding Suffix and Infix Commands}. +@var{GROUP} has to be specified. See @ref{Binding Suffix and Infix Commands}. The @var{BODY} is optional. If it is omitted, then @var{ARGLIST} is ignored and the function definition becomes: @@ -1082,15 +1084,13 @@ Binding Suffix and Infix Commands @section Binding Suffix and Infix Commands The macro @code{transient-define-prefix} is used to define a transient. -This defines the actual transient prefix command (@pxref{Defining -Transients}) and adds the transient's infix and suffix bindings, as +This defines the actual transient prefix command (see @ref{Defining Transients}) and adds the transient's infix and suffix bindings, as described below. Users and third-party packages can add additional bindings using -functions such as @code{transient-insert-suffix} (@pxref{Modifying -Existing Transients}). These functions take a ``suffix -specification'' as one of their arguments, which has the same form as -the specifications used in @code{transient-define-prefix}. +functions such as @code{transient-insert-suffix} (see @ref{Modifying Existing Transients}). These functions take a ``suffix specification'' as one of +their arguments, which has the same form as the specifications used in +@code{transient-define-prefix}. @menu * Group Specifications:: @@ -1119,13 +1119,10 @@ Group Specifications Group specifications then have this form: @lisp -[@{@var{LEVEL}@} @{@var{DESCRIPTION}@} - @{@var{KEYWORD} @var{VALUE}@}... - @var{ELEMENT}...] +[@{LEVEL@} @{DESCRIPTION@} @{KEYWORD VALUE@}... ELEMENT...] @end lisp -The @var{LEVEL} is optional and defaults to 4. @xref{Enabling and -Disabling Suffixes}. +The @var{LEVEL} is optional and defaults to 4. See @ref{Enabling and Disabling Suffixes}. The @var{DESCRIPTION} is optional. If present, it is used as the heading of the group. @@ -1230,9 +1227,7 @@ Suffix Specifications Suffix specifications have this form: @lisp -([@var{LEVEL}] - [@var{KEY} [@var{DESCRIPTION}]] - @var{COMMAND}|@var{ARGUMENT} [@var{KEYWORD} @var{VALUE}]...) +([LEVEL] [KEY [DESCRIPTION]] COMMAND|ARGUMENT [KEYWORD VALUE]...) @end lisp @var{LEVEL}, @var{KEY} and @var{DESCRIPTION} can also be specified using the @var{KEYWORD}s @@ -1243,18 +1238,18 @@ Suffix Specifications @itemize @item -@var{LEVEL} is the suffix level, an integer between 1 and 7. -@xref{Enabling and Disabling Suffixes}. +@var{LEVEL} is the suffix level, an integer between 1 and 7. See +@ref{Enabling and Disabling Suffixes}. @item @var{KEY} is the key binding, either a vector or key description string. @item @var{DESCRIPTION} is the description, either a string or a function that -returns a string. The function should be a lambda expression to -avoid ambiguity. In some cases a symbol that is bound as a function -would also work but to be safe you should use @code{:description} in that -case. +takes zero or one arguments (the suffix object) and returns a string. +The function should be a lambda expression to avoid ambiguity. In +some cases a symbol that is bound as a function would also work but +to be safe you should use @code{:description} in that case. @end itemize The next element is either a command or an argument. This is the only @@ -1322,7 +1317,7 @@ Defining Suffix and Infix Commands ``suffixes'' means ``suffixes (including infixes)'' or ``non-infix suffixes''. -@defmac transient-define-suffix name arglist [docstring] [keyword value]@dots{} body@dots{} +@defmac transient-define-suffix name arglist [docstring] [keyword value]... body... This macro defines @var{NAME} as a transient suffix command. @var{ARGLIST} are the arguments that the command takes. @@ -1339,7 +1334,7 @@ Defining Suffix and Infix Commands inside @code{interactive}. @end defmac -@defmac transient-define-infix name arglist [docstring] [keyword value]@dots{} +@defmac transient-define-infix name arglist [docstring] [keyword value]... This macro defines @var{NAME} as a transient infix command. @var{ARGLIST} is always ignored (but mandatory never-the-less) and @@ -1376,7 +1371,7 @@ Defining Suffix and Infix Commands value of the @code{:transient} keyword. @end defmac -@defmac transient-define-argument name arglist [docstring] [keyword value]@dots{} +@defmac transient-define-argument name arglist [docstring] [keyword value]... This macro defines @var{NAME} as a transient infix command. This is an alias for @code{transient-define-infix}. Only use this alias @@ -1475,63 +1470,55 @@ Transient State warning. This does not ``deactivate'' the transient. @end itemize -But these are just the defaults. Whether a certain command -deactivates or ``exits'' the transient is configurable. There is more -than one way in which a command can be ``transient'' or ``non-transient''; -the exact behavior is implemented by calling a so-called ``pre-command'' -function. Whether non-suffix commands are allowed to be called is -configurable per transient. +The behavior can be changed for all suffixes of a particular prefix +and/or for individual suffixes. The values should nearly always be +booleans, but certain functions, called ``pre-commands'', can also be +used. These functions are named @code{transient--do-VERB}, and the symbol +@code{VERB} can be used as a shorthand. -@itemize -@item -The transient-ness of suffix commands (including infix commands) is -controlled by the value of their @code{transient} slot, which can be set -either when defining the command or when adding a binding to a -transient while defining the respective transient prefix command. +A boolean is interpreted as answering the question "does the +transient stay active, when this command is invoked?" @code{t} means that +the transient stays active, while @code{nil} means that invoking the command +exits the transient. -Valid values are booleans and the pre-commands described below. +Note that when the suffix is a ``sub-prefix'', invoking that command +always activates that sub-prefix, causing the outer prefix to no +longer be active and displayed. Here @code{t} means that when you exit the +inner prefix, then the outer prefix becomes active again, while @code{nil} +means that all outer prefixes are exited at once. @itemize @item -@code{t} is equivalent to @code{transient--do-stay}. -@item -@code{nil} is equivalent to @code{transient--do-exit}. -@item -If @code{transient} is unbound (and that is actually the default for -non-infix suffixes) then the value of the prefix's -@code{transient-suffix} slot is used instead. The default value of that -slot is @code{nil}, so the suffix's @code{transient} slot being unbound is -essentially equivalent to it being @code{nil}. -@end itemize +The behavior for non-suffixes can be set for a particular prefix, +by the prefix's @code{transient-non-suffix} slot to a boolean, a suitable +pre-command function, or a shorthand for such a function. See +@ref{Pre-commands for Non-Suffixes}. @item -A suffix command can be a prefix command itself, i.e., a -``sub-prefix''. While a sub-prefix is active we nearly always want -@kbd{C-g} to take the user back to the ``super-prefix''. However in rare -cases this may not be desirable, and that makes the following -complication necessary: +The common behavior for the suffixes of a particular prefix can be +set using the prefix's @code{transient-suffixes} slot. -For @code{transient-suffix} objects the @code{transient} slot is unbound. We can -ignore that for the most part because, as stated above, @code{nil} and the -slot being unbound are equivalent, and mean ``do exit''. That isn't -actually true for suffixes that are sub-prefixes though. For such -suffixes unbound means ``do exit but allow going back'', which is the -default, while @code{nil} means ``do exit permanently'', which requires that -slot to be explicitly set to that value. +The value specified in this slot does @strong{not} affect infixes. Because +it affects both regular suffixes as well as sub-prefixes, which +have different needs, it is best to avoid explicitly specifying a +function. @item -The transient-ness of certain built-in suffix commands is specified -using @code{transient-predicate-map}. This is a special keymap, which -binds commands to pre-commands (as opposed to keys to commands) and -takes precedence over the @code{transient} slot. +The behavior of an individual suffix can be changed using its +@code{transient} slot. While it is usually best to use a boolean, for this +slot it can occasionally make sense to specify a function explicitly. + +Note that this slot can be set when defining a suffix command using +@code{transient-define-suffix} and/or in the definition of the prefix. If +set in both places, then the latter takes precedence, as usual. @end itemize -The available pre-command functions are documented below. They are -called by @code{transient--pre-command}, a function on @code{pre-command-hook} and -the value that they return determines whether the transient is exited. -To do so the value of one of the constants @code{transient--exit} or -@code{transient--stay} is used (that way we don't have to remember if @code{t} means -``exit'' or ``stay''). +The available pre-command functions are documented in the following +sub-sections. They are called by @code{transient--pre-command}, a function +on @code{pre-command-hook}, and the value that they return determines whether +the transient is exited. To do so the value of one of the constants +@code{transient--exit} or @code{transient--stay} is used (that way we don't have to +remember if @code{t} means ``exit'' or ``stay''). Additionally, these functions may change the value of @code{this-command} (which explains why they have to be called using @code{pre-command-hook}), @@ -1539,11 +1526,39 @@ Transient State and set the values of @code{transient--exitp}, @code{transient--helpp} or @code{transient--editp}. +For completeness sake, some notes about complications: + +@itemize +@item +The transient-ness of certain built-in suffix commands is specified +using @code{transient-predicate-map}. This is a special keymap, which +binds commands to pre-commands (as opposed to keys to commands) and +takes precedence over the prefix's @code{transient-suffix} slot, but not +the suffix's @code{transient} slot. + +@item +While a sub-prefix is active we nearly always want @kbd{C-g} to take the +user back to the ``super-prefix'', even when the other suffixes don't +do that. However, in rare cases this may not be desirable, and that +makes the following complication necessary: + +For @code{transient-suffix} objects the @code{transient} slot is unbound. We can +ignore that for the most part because @code{nil} and the slot being unbound +are treated as equivalent, and mean ``do exit''. That isn't actually +true for suffixes that are sub-prefixes though. For such suffixes +unbound means ``do exit but allow going back'', which is the default, +while @code{nil} means ``do exit permanently'', which requires that slot to +be explicitly set to that value. +@end itemize + @anchor{Pre-commands for Infixes} @subheading Pre-commands for Infixes The default for infixes is @code{transient--do-stay}. This is also the only -function that makes sense for infixes. +function that makes sense for infixes, which is why this predicate is +used even if the value of the prefix's @code{transient-suffix} slot is @code{t}. In +extremely rare cases, one might want to use something else, which can +be done by setting the infix's @code{transient} slot directly. @defun transient--do-stay Call the command without exporting variables and stay transient. @@ -1554,23 +1569,16 @@ Transient State By default, invoking a suffix causes the transient to be exited. -If you want a different default behavior for a certain transient -prefix command, then set its @code{:transient-suffix} slot. The value can be -a boolean, answering the question "does the transient stay active, -when a suffix command is invoked?" @code{t} means that the transient stays -active, while @code{nil} means that invoking a suffix exits the transient. -In either case, the exact behavior depends on whether the suffix is -itself a prefix (i.e., a sub-prefix), an infix or a regular suffix. - The behavior for an individual suffix command can be changed by -setting its @code{transient} slot to one of the following pre-commands. +setting its @code{transient} slot to a boolean (which is highly recommended), +or to one of the following pre-commands. @defun transient--do-exit Call the command after exporting variables and exit the transient. @end defun @defun transient--do-return -Call the command after exporting variables and return to parent +Call the command after exporting variables and return to the parent prefix. If there is no parent prefix, then call @code{transient--do-exit}. @end defun @@ -1578,9 +1586,10 @@ Transient State Call the command after exporting variables and stay transient. @end defun -The following pre-commands are suitable for sub-prefixes. Only the -first should ever explicitly be set as the value of the @code{transient} -slot. +The following pre-commands are only suitable for sub-prefixes. It is +not necessary to explicitly use these predicates because the correct +predicate is automatically picked based on the value of the @code{transient} +slot for the sub-prefix itself. @defun transient--do-recurse Call the transient prefix command, preparing for return to active @@ -1588,15 +1597,25 @@ Transient State Whether we actually return to the parent transient is ultimately under the control of each invoked suffix. The difference between -this pre-command and @code{transient--do-replace} is that it changes the -value of the @code{transient-suffix} slot to @code{transient--do-return}. +this pre-command and @code{transient--do-stack} is that it changes the +value of the @code{transient-suffix} slot to @code{t}. If there is no parent transient, then only call this command and skip the second step. @end defun +@defun transient--do-stack +Call the transient prefix command, stacking the active transient. +Push the active transient to the transient stack. + +Unless @code{transient--do-recurse} is explicitly used, this pre-command +is automatically used for suffixes that are prefixes themselves, +i.e., for sub-prefixes. +@end defun + @defun transient--do-replace Call the transient prefix command, replacing the active transient. +Do not push the active transient to the transient stack. Unless @code{transient--do-recurse} is explicitly used, this pre-command is automatically used for suffixes that are prefixes themselves, @@ -1618,17 +1637,17 @@ Transient State beside the transient keymap) cannot be invoked. Trying to invoke such a command results in a warning and the transient stays active. -If you want a different behavior, then set the @code{:transient-non-suffix} -slot of the transient prefix command. The value can be a boolean, -answering the question, "is it allowed to invoke non-suffix commands?" +If you want a different behavior, then set the @code{transient-non-suffix} +slot of the transient prefix command. The value should be a boolean, +answering the question, "is it allowed to invoke non-suffix commands?, +a pre-command function, or a shorthand for such a function. -If the value is @code{t} or @code{transient--do-stay}, then non-suffixes can be -invoked, when it is @code{nil} or @code{transient--do-warn} (the default) then they -cannot be invoked. +If the value is @code{t}, then non-suffixes can be invoked, when it is @code{nil} +(the default) then they cannot be invoked. -The only other recommended value is @code{transient--do-leave}. If that is -used, then non-suffixes can be invoked, but if one is invoked, then -that exits the transient. +The only other recommended value is @code{leave}. If that is used, then +non-suffixes can be invoked, but if one is invoked, then that exits +the transient. @defun transient--do-warn Call @code{transient-undefined} and stay transient. @@ -1829,7 +1848,7 @@ Suffix Classes @item All suffix and infix classes derive from @code{transient-suffix}, which in turn derives from @code{transient-child}, from which @code{transient-group} also -derives (@pxref{Group Classes}). +derives (see @ref{Group Classes}). @item All infix classes derive from the abstract @code{transient-infix} class, @@ -1843,7 +1862,7 @@ Suffix Classes methods. Also, infixes and non-infix suffixes are usually defined using -different macros (@pxref{Defining Suffix and Infix Commands}). +different macros (see @ref{Defining Suffix and Infix Commands}). @item Classes used for infix commands that represent arguments should @@ -1870,6 +1889,24 @@ Suffix Classes @item Classes used for infix commands that represent variables should derived from the abstract @code{transient-variable} class. + +@item +The @code{transient-information} class is special in that suffixes that use +this class are not associated with a command and thus also not with +any key binding. Such suffixes are only used to display arbitrary +information, and that anywhere a suffix can appear. Display-only +suffix specifications take this form: + +@lisp +([LEVEL] :info DESCRIPTION [KEYWORD VALUE]...) +@end lisp + +The @code{:info} keyword argument replaces the @code{:description} keyword used for +other suffix classes. Other keyword arguments that you might want to +set, include @code{:face}, predicate keywords (such as @code{:if}), and @code{:format}. +By default the value of @code{:format} includes @code{%k}, which for this class is +replaced with the empty string or spaces, if keys are being padded in +the containing group. @end itemize Magit defines additional classes, which can serve as examples for the @@ -1990,12 +2027,13 @@ Suffix Format Methods For prefixes, show the info manual, if that is specified using the @code{info-manual} slot. Otherwise, show the manpage if that is specified -using the @code{man-page} slot. Otherwise, show the command's doc string. +using the @code{man-page} slot. Otherwise, show the command's +documentation string. -For suffixes, show the command's doc string. +For suffixes, show the command's documentation string. For infixes, show the manpage if that is specified. Otherwise show -the command's doc string. +the command's documentation string. @end defun @node Prefix Slots @@ -2017,13 +2055,26 @@ Prefix Slots @code{transient-suffix} and @code{transient-non-suffix} play a part when determining whether the currently active transient prefix command remains active/transient when a suffix or arbitrary non-suffix -command is invoked. @xref{Transient State}. +command is invoked. See @ref{Transient State}. + +@item +@code{refresh-suffixes} Normally suffix objects and keymaps are only setup +once, when the prefix is invoked. Setting this to @code{t}, causes them to +be recreated after every command. This is useful when using @code{:if...} +predicates, and those need to be rerun for some reason. Doing this +is somewhat costly, and there is a risk of losing state, so this is +disabled by default and still considered experimental. @item @code{incompatible} A list of lists. Each sub-list specifies a set of mutually exclusive arguments. Enabling one of these arguments causes the others to be disabled. An argument may appear in -multiple sub-lists. +multiple sub-lists. Arguments must me given in the same form as +used in the @code{argument} or @code{argument-format} slot of the respective +suffix objects, usually something like @code{--switch} or @code{--option=%s}. For +options and @code{transient-switches} suffixes it is also possible to match +against a specific value, as returned by @code{transient-infix-value}, +for example, @code{--option=one}. @item @code{scope} For some transients it might be necessary to have a sort of @@ -2050,7 +2101,7 @@ Prefix Slots @item @code{level} The level of the prefix commands. The suffix commands whose -layer is equal or lower are displayed. @pxref{Enabling and Disabling Suffixes}. +layer is equal or lower are displayed. See @ref{Enabling and Disabling Suffixes}. @item @code{value} The likely outdated value of the prefix. Instead of accessing @@ -2083,7 +2134,7 @@ Suffix Slots @code{command} The command, a symbol. @item -@code{transient} Whether to stay transient. @xref{Transient State}. +@code{transient} Whether to stay transient. See @ref{Transient State}. @item @code{format} The format used to display the suffix in the popup buffer. @@ -2099,8 +2150,14 @@ Suffix Slots @end itemize @item -@code{description} The description, either a string or a function that is -called with no argument and returns a string. +@code{description} The description, either a string or a function, which is +called with zero or one argument (the suffix object), and returns a +string. + +@item +@code{face} Face used for the description. In simple cases it is easier +to use this instead of using a function as @code{description} and adding +the styling there. @code{face} is appended using @code{add-face-text-property}. @item @code{show-help} A function used to display help for the suffix. If @@ -2189,8 +2246,10 @@ Suffix Slots returns a prompt string. @item -@code{choices} A list of valid values. How exactly that is used depends on -the class of the object. +@code{choices} A list of valid values, or a function that returns such a +list. The latter is not implemented for @code{transient-switches}, because +I couldn't think of a use-case. How exactly the choices are used +varies depending on the class of the suffix. @end itemize @anchor{Slots of @code{transient-variable}} @@ -2241,337 +2300,16 @@ Predicate Slots @code{if-not-derived} Enable if major-mode does not derive from value. @end itemize +By default these predicates run when the prefix command is invoked, +but this can be changes, using the @code{refresh-suffixes} prefix slot. +See @ref{Prefix Slots}. + One more slot is shared between group and suffix classes, @code{level}. Like the slots documented above, it is a predicate, but it is used for a different purpose. The value has to be an integer between 1 and 7. @code{level} controls whether a suffix or a group should be available depending on user preference. -@xref{Enabling and Disabling Suffixes}. - -@node Related Abstractions and Packages -@chapter Related Abstractions and Packages - -@menu -* Comparison With Prefix Keys and Prefix Arguments:: -* Comparison With Other Packages:: -@end menu - -@node Comparison With Prefix Keys and Prefix Arguments -@section Comparison With Prefix Keys and Prefix Arguments - -While transient commands were inspired by regular prefix keys and -prefix arguments, they are also quite different and much more complex. - -The following diagrams illustrate some of the differences. - -@itemize -@item -@samp{(c)} represents a return to the command loop. -@item -@samp{(+)} represents the user's choice to press one key or another. -@item -@samp{@{WORD@}} are possible behaviors. -@item -@samp{@{NUMBER@}} is a footnote. -@end itemize - -@anchor{Regular Prefix Commands} -@subheading Regular Prefix Commands - -@xref{Prefix Keys,,,elisp,}. - -@example - ,--> command1 --> (c) - | -(c)-(+)-> prefix command or key --+--> command2 --> (c) - | - `--> command3 --> (c) -@end example - -@anchor{Regular Prefix Arguments} -@subheading Regular Prefix Arguments - -@xref{Prefix Command Arguments,,,elisp,}. - -@example - ,----------------------------------, - | | - v | -(c)-(+)---> prefix argument command --(c)-(+)-> any command --> (c) - | ^ | - | | | - `-- sets or changes --, ,-- maybe used --' | - | | | - v | | - prefix argument state | - ^ | - | | - `-------- discards --------' -@end example - -@anchor{Transients} -@subheading Transients - -(∩`-´)⊃━☆゚.*・。゚ - -This diagram ignores the infix value and external state: - -@example -(c) - | ,- @{stay@} ------<-,-<------------<-,-<---, -(+) | | | | - | | | | | - | | ,--> infix1 --| | | - | | | | | | - | | |--> infix2 --| | | - v v | | | | - prefix -(c)-(+)-> infix3 --' ^ | - | | | - |---------------> suffix1 -->--| | - | | | - |---------------> suffix2 ----@{1@}------> @{exit@} --> (c) - | | - |---------------> suffix3 -------------> @{exit@} --> (c) - | | - `--> any command --@{2@}-> @{warn@} -->--| - | | - |--> @{noop@} -->--| - | | - |--> @{call@} -->--' - | - `------------------> @{exit@} --> (c) -@end example - -This diagram takes the infix value into account to an extend, while -still ignoring external state: - -@example -(c) - | ,- @{stay@} ------<-,-<------------<-,-<---, -(+) | | | | - | | | | | - | | ,--> infix1 --| | | - | | | | | | | - | | ,--> infix2 --| | | - v v | | | | | - prefix -(c)-(+)-> infix3 --' | | - | | ^ | - | | | | - |---------------> suffix1 -->--| | - | | ^ | | - | | | | | - |---------------> suffix2 ----@{1@}------> @{exit@} --> (c) - | | ^ | | - | | | | v - | | | | | - |---------------> suffix3 -------------> @{exit@} --> (c) - | | ^ | | - | sets | | v - | | maybe | | - | | used | | - | | | | | - | | infix --' | | - | `---> value | | - | ^ | | - | | | | - | hides | | - | | | | - | `--------------------------<---| - | | | - `--> any command --@{2@}-> @{warn@} -->--| | - | | | - |--> @{noop@} -->--| | - | | | - |--> @{call@} -->--' ^ - | | - `------------------> @{exit@} --> (c) -@end example - -This diagram provides more information about the infix value -and also takes external state into account. - -@example - ,----sets--- "anything" - | - v - ,---------> external - | state - | | | - | initialized | ☉‿⚆ - sets from | - | | maybe - | ,----------' used - | | | -(c) | | v - | ,- @{stay@} --|---<-,-<------|-----<-,-<---, -(+) | | | | | | | - | | | v | | | | - | | ,--> infix1 --| | | | - | | | | | | | | | - | | | | v | | | | - | | ,--> infix2 --| | | | - | | | | ^ | | | | - v v | | | | | | | - prefix -(c)-(+)-> infix3 --' | | | - | | ^ | ^ | - | | | v | | - |---------------> suffix1 -->--| | - | | | ^ | | | - | | | | v | | - |---------------> suffix2 ----@{1@}------> @{exit@} --> (c) - | | | ^ | | | - | | | | | | v - | | | | v | | - |---------------> suffix3 -------------> @{exit@} --> (c) - | | | ^ | | - | sets | | | v - | | initialized maybe | | - | | from used | | - | | | | | | - | | `-- infix ---' | | - | `---> value -----------------------------> persistent - | ^ ^ | | across - | | | | | invocations -, - | hides | | | | - | | `----------------------------------------------' - | | | | - | `--------------------------<---| - | | | - `--> any command --@{2@}-> @{warn@} -->--| | - | | | - |--> @{noop@} -->--| | - | | | - |--> @{call@} -->--' ^ - | | - `------------------> @{exit@} --> (c) -@end example - -@itemize -@item -@samp{@{1@}} Transients can be configured to be exited when a suffix command -is invoked. The default is to do so for all suffixes except for -those that are common to all transients and which are used to -perform tasks such as providing help and saving the value of the -infix arguments for future invocations. The behavior can also be -specified for individual suffix commands and may even depend on -state. - -@item -@samp{@{2@}} Transients can be configured to allow the user to invoke -non-suffix commands. The default is to not allow that and instead -warn the user. -@end itemize - -Despite already being rather complex, even the last diagram leaves out -many details. Most importantly it implies that the decision whether -to remain transient is made later than it actually is made (for the -most part a function on @code{pre-command-hook} is responsible). But such -implementation details are of little relevance to users and are -covered elsewhere. - -@node Comparison With Other Packages -@section Comparison With Other Packages - -@anchor{Magit-Popup} -@subheading Magit-Popup - -Transient is the successor to Magit-Popup (@pxref{Top,,,magit-popup,}). - -One major difference between these two implementations of the same -ideas is that while Transient uses transient keymaps and embraces the -command-loop, Magit-Popup implemented an inferior mechanism that does -not use transient keymaps and that instead of using the command-loop -implements a naive alternative based on @code{read-char}. - -Magit-Popup does not use classes and generic functions and defining a -new command type is near impossible as it involves adding hard-coded -special-cases to many functions. Because of that only a single new -type was added, which was not already part of Magit-Popup's initial -release. - -A lot of things are hard-coded in Magit-Popup. One random example is -that the key bindings for switches must begin with @code{-} and those for -options must begin with @code{=}. - -@anchor{Hydra} -@subheading Hydra - -Hydra (see @uref{https://github.com/abo-abo/hydra}) is another package that -provides features similar to those of Transient. - -Both packages use transient keymaps to make a set of commands -temporarily available and show the available commands in a popup -buffer. - -A Hydra ``body'' is equivalent to a Transient ``prefix'' and a Hydra -``head'' is equivalent to a Transient ``suffix''. Hydra has no equivalent -of a Transient ``infix''. - -Both hydras and transients can be used as simple command dispatchers. -Used like this they are similar to regular prefix commands and prefix -keys, except that the available commands are shown in the popup buffer. - -(Another package that does this is @code{which-key}. It does so automatically -for any incomplete key sequence. The advantage of that approach is -that no additional work is necessary; the disadvantage is that the -available commands are not organized semantically.) - -Both Hydra and Transient provide features that go beyond simple -command dispatchers: - -@itemize -@item -Invoking a command from a hydra does not necessarily exit the hydra. -That makes it possible to invoke the same command again, but using a -shorter key sequence (i.e., the key that was used to enter the hydra -does not have to be pressed again). - -Transient supports that too, but for now this feature is not a focus -and the interface is a bit more complicated. A very basic example -using the current interface: - -@lisp -(transient-define-prefix outline-navigate () - :transient-suffix 'transient--do-stay - :transient-non-suffix 'transient--do-warn - [("p" "previous visible heading" outline-previous-visible-heading) - ("n" "next visible heading" outline-next-visible-heading)]) -@end lisp - -@item -Transient supports infix arguments; values that are set by infix -commands and then consumed by the invoked suffix command(s). - -To my knowledge, Hydra does not support that. -@end itemize - -Both packages make it possible to specify how exactly the available -commands are outlined: - -@itemize -@item -With Hydra this is often done using an explicit format string, which -gives authors a lot of flexibility and makes it possible to do fancy -things. - -The downside of this is that it becomes harder for a user to add -additional commands to an existing hydra and to change key bindings. - -@item -Transient allows the author of a transient to organize the commands -into groups and the use of generic functions allows authors of -transients to control exactly how a certain command type is -displayed. - -However while Transient supports giving sections a heading it does -not currently support giving the displayed information more -structure by, for example, using box-drawing characters. - -That could be implemented by defining a new group class, which lets -the author specify a format string. It should be possible to -implement that without modifying any existing code, but it does not -currently exist. -@end itemize +See @ref{Enabling and Disabling Suffixes}. @node FAQ @appendix FAQ @@ -2584,10 +2322,10 @@ FAQ @anchor{How can I copy text from the popup buffer?} @appendixsec How can I copy text from the popup buffer? -To be able to mark text in any transient popup buffer using the mouse, -you have to add the following binding. Note that the region won't be -visualized, while doing so. After you have quit the transient popup, -you will be able to yank it another buffer. +To be able to mark text in Transient's popup buffer using the mouse, +you have to add the below binding. Note that for technical reasons, +the region won't be visualized, while doing so. After you have quit +the transient popup, you will be able to yank it in another buffer. @lisp (keymap-set transient-predicate-map @@ -2595,6 +2333,16 @@ FAQ #'transient--do-stay) @end lisp +@anchor{How does Transient compare to prefix keys and universal arguments?} +@appendixsec How does Transient compare to prefix keys and universal arguments? + +See @uref{https://github.com/magit/transient/wiki/Comparison-with-prefix-keys-and-universal-arguments}. + +@anchor{How does Transient compare to Magit-Popup and Hydra?} +@appendixsec How does Transient compare to Magit-Popup and Hydra? + +See @uref{https://github.com/magit/transient/wiki/Comparison-with-other-packages}. + @anchor{Why did some of the key bindings change?} @appendixsec Why did some of the key bindings change? @@ -2657,7 +2405,7 @@ FAQ If you want to get @kbd{q}'s old binding back then you can do so. Doing that is a bit more complicated than changing a single key binding, so I have implemented a function, @code{transient-bind-q-to-quit} that makes the -necessary changes. See its doc string for more information. +necessary changes. See its documentation string for more information. @node Keystroke Index @appendix Keystroke Index diff --git a/lisp/transient.el b/lisp/transient.el index dd2b4e0db0b..f17323bec4f 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3,11 +3,11 @@ ;; Copyright (C) 2018-2023 Free Software Foundation, Inc. ;; Author: Jonas Bernoulli -;; URL: https://github.com/magit/transient +;; Homepage: https://github.com/magit/transient ;; Keywords: extensions -;; Package-Version: 0.4.3 -;; Package-Requires: ((emacs "26.1")) +;; Package-Version: 0.5.2 +;; Package-Requires: ((emacs "26.1") (compat "29.1.4.4") (seq "2.24")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -28,35 +28,52 @@ ;;; Commentary: -;; Taking inspiration from prefix keys and prefix arguments, Transient -;; implements a similar abstraction involving a prefix command, infix -;; arguments and suffix commands. We could call this abstraction a -;; "transient command", but because it always involves at least two -;; commands (a prefix and a suffix) we prefer to call it just a -;; "transient". - -;; When the user calls a transient prefix command, then a transient -;; (temporary) keymap is activated, which binds the transient's infix -;; and suffix commands, and functions that control the transient state -;; are added to `pre-command-hook' and `post-command-hook'. The -;; available suffix and infix commands and their state are shown in -;; the echo area until the transient is exited by invoking a suffix -;; command. - -;; Calling an infix command causes its value to be changed, possibly -;; by reading a new value in the minibuffer. - -;; Calling a suffix command usually causes the transient to be exited -;; but suffix commands can also be configured to not exit the -;; transient state. +;; Transient is the library used to implement the keyboard-driven menus +;; in Magit. It is distributed as a separate package, so that it can be +;; used to implement similar menus in other packages. ;;; Code: (require 'cl-lib) +(require 'compat) (require 'eieio) (require 'edmacro) (require 'format-spec) + +(eval-and-compile + (when (and (featurep' seq) + (not (fboundp 'seq-keep))) + (unload-feature 'seq 'force))) (require 'seq) +(unless (fboundp 'seq-keep) + (display-warning 'transient (substitute-command-keys "\ +Transient requires `seq' >= 2.24, +but due to bad defaults, Emacs' package manager, refuses to +upgrade this and other built-in packages to higher releases +from GNU Elpa, when a package specifies that this is needed. + +To fix this, you have to add this to your init file: + + (setq package-install-upgrade-built-in t) + +Then evaluate that expression by placing the cursor after it +and typing \\[eval-last-sexp]. + +Once you have done that, you have to explicitly upgrade `seq': + + \\[package-upgrade] seq \\`RET' + +Then you also must make sure the updated version is loaded, +by evaluating this form: + + (progn (unload-feature 'seq t) (require 'seq)) + +Until you do this, you will get random errors about `seq-keep' +being undefined while using Transient. + +If you don't use the `package' package manager but still get +this warning, then your chosen package manager likely has a +similar defect.") :emergency)) (eval-when-compile (require 'subr-x)) @@ -65,10 +82,20 @@ (declare-function Man-next-section "man" (n)) (declare-function Man-getpage-in-background "man" (topic)) -(defvar display-line-numbers) ; since Emacs 26.1 (defvar Man-notify-method) (defvar pp-default-function) ; since Emacs 29.1 +(defmacro static-if (condition then-form &rest else-forms) + "A conditional compilation macro. +Evaluate CONDITION at macro-expansion time. If it is non-nil, +expand the macro to THEN-FORM. Otherwise expand it to ELSE-FORMS +enclosed in a `progn' form. ELSE-FORMS may be empty." + (declare (indent 2) + (debug (sexp sexp &rest sexp))) + (if (eval condition lexical-binding) + then-form + (cons 'progn else-forms))) + (defmacro transient--with-emergency-exit (&rest body) (declare (indent defun)) `(condition-case err @@ -198,21 +225,30 @@ transient-mode-line-format displayed right above the echo area, then this probably is not a good value. -If `line' (the default), then the buffer also has no mode-line, -but a thin line is drawn instead, using the background color of -the face `transient-separator'. Termcap frames cannot display -thin lines and therefore fallback to treating `line' like nil. +If `line' (the default) or a natural number, then the buffer +has no mode-line, but a line is drawn is drawn in its place. +If a number is used, that specifies the thickness of the line. +On termcap frames we cannot draw lines, so there `line' and +numbers are synonyms for nil. + +The color of the line is used to indicate if non-suffixes are +allowed and whether they exit the transient. The foreground +color of `transient-key-noop' (if non-suffix are disallowed), +`transient-key-stay' (if allowed and transient stays active), or +`transient-key-exit' (if allowed and they exit the transient) is +used to draw the line. Otherwise this can be any mode-line format. See `mode-line-format' for details." :package-version '(transient . "0.2.0") :group 'transient - :type '(choice (const :tag "hide mode-line" nil) - (const :tag "substitute thin line" line) - (const :tag "name of prefix command" - ("%e" mode-line-front-space - mode-line-buffer-identification)) - (sexp :tag "custom mode-line format"))) + :type '(choice (const :tag "hide mode-line" nil) + (const :tag "substitute thin line" line) + (number :tag "substitute line with thickness") + (const :tag "name of prefix command" + ("%e" mode-line-front-space + mode-line-buffer-identification)) + (sexp :tag "custom mode-line format"))) (defcustom transient-show-common-commands nil "Whether to show common transient suffixes in the popup buffer. @@ -236,7 +272,7 @@ transient-highlight-mismatched-keys This only affects infix arguments that represent command-line arguments. When this option is non-nil, then the key binding for infix argument are highlighted when only a long argument -\(e.g. \"--verbose\") is specified but no shor-thand (e.g \"-v\"). +\(e.g., \"--verbose\") is specified but no shorthand (e.g., \"-v\"). In the rare case that a short-hand is specified but does not match the key binding, then it is highlighted differently. @@ -285,19 +321,14 @@ transient-substitute-key-function :group 'transient :type '(choice (const :tag "Transform no keys (nil)" nil) function)) -(defcustom transient-semantic-coloring nil - "Whether to color prefixes and suffixes in Hydra-like fashion. -This feature is experimental. +(defcustom transient-semantic-coloring t + "Whether to use colors to indicate transient behavior. If non-nil, then the key binding of each suffix is colorized to -indicate whether it exits the transient state or not. The color -of the prefix is indicated using the line that is drawn when the -value of `transient-mode-line-format' is `line'. - -For more information about how Hydra uses colors see -https://github.com/abo-abo/hydra#color and -https://oremacs.com/2015/02/19/hydra-colors-reloaded." - :package-version '(transient . "0.3.0") +indicate whether it exits the transient state or not, and the +line that is drawn below the transient popup buffer is used to +indicate the behavior of non-suffix commands." + :package-version '(transient . "0.5.0") :group 'transient :type 'boolean) @@ -356,8 +387,8 @@ transient-hide-during-minibuffer-read :group 'transient :type 'boolean) +(defconst transient--max-level 7) (defconst transient--default-child-level 1) - (defconst transient--default-prefix-level 4) (defcustom transient-default-level transient--default-prefix-level @@ -436,22 +467,18 @@ transient-heading "Face used for headings." :group 'transient-faces) -(defface transient-key '((t :inherit font-lock-builtin-face)) - "Face used for keys." - :group 'transient-faces) - -(defface transient-argument '((t :inherit font-lock-warning-face)) +(defface transient-argument '((t :inherit font-lock-string-face :weight bold)) "Face used for enabled arguments." :group 'transient-faces) -(defface transient-value '((t :inherit font-lock-string-face)) - "Face used for values." - :group 'transient-faces) - (defface transient-inactive-argument '((t :inherit shadow)) "Face used for inactive arguments." :group 'transient-faces) +(defface transient-value '((t :inherit font-lock-string-face :weight bold)) + "Face used for values." + :group 'transient-faces) + (defface transient-inactive-value '((t :inherit shadow)) "Face used for inactive values." :group 'transient-faces) @@ -460,28 +487,14 @@ transient-unreachable "Face used for suffixes unreachable from the current prefix sequence." :group 'transient-faces) -(defface transient-active-infix '((t :inherit secondary-selection)) - "Face used for the infix for which the value is being read." - :group 'transient-faces) - -(defface transient-unreachable-key '((t :inherit (transient-key shadow))) - "Face used for keys unreachable from the current prefix sequence." - :group 'transient-faces) - -(defface transient-nonstandard-key '((t :underline t)) - "Face optionally used to highlight keys conflicting with short-argument. -Also see option `transient-highlight-mismatched-keys'." - :group 'transient-faces) - -(defface transient-mismatched-key '((t :underline t)) - "Face optionally used to highlight keys without a short-argument. -Also see option `transient-highlight-mismatched-keys'." - :group 'transient-faces) - (defface transient-inapt-suffix '((t :inherit shadow :italic t)) "Face used for suffixes that are inapt at this time." :group 'transient-faces) +(defface transient-active-infix '((t :inherit highlight)) + "Face used for the infix for which the value is being read." + :group 'transient-faces) + (defface transient-enabled-suffix '((t :background "green" :foreground "black" :weight bold)) "Face used for enabled levels while editing suffix levels. @@ -494,63 +507,83 @@ transient-disabled-suffix See info node `(transient)Enabling and Disabling Suffixes'." :group 'transient-faces) -(defface transient-higher-level '((t :underline t)) +(defface transient-higher-level + `((t :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1) + :color ,(let ((color (face-attribute 'shadow :foreground nil t))) + (or (and (not (eq color 'unspecified)) color) + "grey60"))))) "Face optionally used to highlight suffixes on higher levels. Also see option `transient-highlight-higher-levels'." :group 'transient-faces) -(defface transient-separator - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) - :background "grey80") - (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) - :background "grey30")) - "Face used to draw line below transient popup window. -This is only used if `transient-mode-line-format' is `line'. -Only the background color is significant." +(defface transient-delimiter '((t :inherit shadow)) + "Face used for delimiters and separators. +This includes the parentheses around values and the pipe +character used to separate possible values from each other." :group 'transient-faces) -(defgroup transient-color-faces - '((transient-semantic-coloring custom-variable)) - "Faces used by Transient for Hydra-like command coloring. -These faces are only used if `transient-semantic-coloring' -\(which see) is non-nil." +(defface transient-key '((t :inherit font-lock-builtin-face)) + "Face used for keys." :group 'transient-faces) -(defface transient-red - '((t :inherit transient-key :foreground "red")) - "Face used for red prefixes and suffixes." - :group 'transient-color-faces) +(defface transient-key-stay + `((((class color) (background light)) + :inherit transient-key + :foreground "#22aa22") + (((class color) (background dark)) + :inherit transient-key + :foreground "#ddffdd")) + "Face used for keys of suffixes that don't exit transient state." + :group 'transient-faces) -(defface transient-blue - '((t :inherit transient-key :foreground "blue")) - "Face used for blue prefixes and suffixes." - :group 'transient-color-faces) +(defface transient-key-noop + `((((class color) (background light)) + :inherit transient-key + :foreground "grey80") + (((class color) (background dark)) + :inherit transient-key + :foreground "grey30")) + "Face used for keys of suffixes that currently cannot be invoked." + :group 'transient-faces) -(defface transient-amaranth - '((t :inherit transient-key :foreground "#E52B50")) - "Face used for amaranth prefixes." - :group 'transient-color-faces) +(defface transient-key-return + `((((class color) (background light)) + :inherit transient-key + :foreground "#aaaa11") + (((class color) (background dark)) + :inherit transient-key + :foreground "#ffffcc")) + "Face used for keys of suffixes that return to the parent transient." + :group 'transient-faces) -(defface transient-pink - '((t :inherit transient-key :foreground "#FF6EB4")) - "Face used for pink prefixes." - :group 'transient-color-faces) +(defface transient-key-exit + `((((class color) (background light)) + :inherit transient-key + :foreground "#aa2222") + (((class color) (background dark)) + :inherit transient-key + :foreground "#ffdddd")) + "Face used for keys of suffixes that exit transient state." + :group 'transient-faces) -(defface transient-teal - '((t :inherit transient-key :foreground "#367588")) - "Face used for teal prefixes." - :group 'transient-color-faces) +(defface transient-unreachable-key + '((t :inherit (shadow transient-key) :weight normal)) + "Face used for keys unreachable from the current prefix sequence." + :group 'transient-faces) -(defface transient-purple - '((t :inherit transient-key :foreground "#a020f0")) - "Face used for purple prefixes. +(defface transient-nonstandard-key + `((t :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1) + :color "cyan"))) + "Face optionally used to highlight keys conflicting with short-argument. +Also see option `transient-highlight-mismatched-keys'." + :group 'transient-faces) -This is an addition to the colors supported by Hydra. It is -used by suffixes that quit the current prefix but return to -the previous prefix." - :group 'transient-color-faces) +(defface transient-mismatched-key + `((t :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1) + :color "magenta"))) + "Face optionally used to highlight keys without a short-argument. +Also see option `transient-highlight-mismatched-keys'." + :group 'transient-faces) ;;; Persistence @@ -633,6 +666,8 @@ transient-prefix (man-page :initarg :man-page :initform nil) (transient-suffix :initarg :transient-suffix :initform nil) (transient-non-suffix :initarg :transient-non-suffix :initform nil) + (transient-switch-frame :initarg :transient-switch-frame) + (refresh-suffixes :initarg :refresh-suffixes :initform nil) (incompatible :initarg :incompatible :initform nil) (suffix-description :initarg :suffix-description) (variable-pitch :initarg :variable-pitch :initform nil) @@ -698,7 +733,9 @@ transient-suffix (transient :initarg :transient) (format :initarg :format :initform " %k %d") (description :initarg :description :initform nil) + (face :initarg :face :initform nil) (show-help :initarg :show-help :initform nil) + (inapt-face :initarg :inapt-face :initform 'transient-inapt-suffix) (inapt :initform nil) (inapt-if :initarg :inapt-if @@ -734,6 +771,12 @@ transient-suffix :documentation "Inapt if major-mode does not derive from value.")) "Superclass for suffix command.") +(defclass transient-information (transient-suffix) + ((format :initform " %k %d") + (key :initform " ")) + "Display-only information. +A suffix object with no associated command.") + (defclass transient-infix (transient-suffix) ((transient :initform t) (argument :initarg :argument) @@ -788,8 +831,8 @@ transient-group ((suffixes :initarg :suffixes :initform nil) (hide :initarg :hide :initform nil) (description :initarg :description :initform nil) - (setup-children :initarg :setup-children) - (pad-keys :initarg :pad-keys)) + (pad-keys :initarg :pad-keys :initform nil) + (setup-children :initarg :setup-children)) "Abstract superclass of all group classes." :abstract t) @@ -815,7 +858,6 @@ transient-subgroups ;;; Define -;;;###autoload (defmacro transient-define-prefix (name arglist &rest args) "Define NAME as a transient prefix command. @@ -932,11 +974,11 @@ transient-define-infix The function definitions is always: - (lambda () - (interactive) - (let ((obj (transient-suffix-object))) - (transient-infix-set obj (transient-infix-read obj))) - (transient--show)) + (lambda () + (interactive) + (let ((obj (transient-suffix-object))) + (transient-infix-set obj (transient-infix-read obj))) + (transient--show)) `transient-infix-read' and `transient-infix-set' are generic functions. Different infix commands behave differently because @@ -973,7 +1015,16 @@ 'transient-define-argument \(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]...)") (defun transient--default-infix-command () - "Most transient infix commands are but an alias for this command." + ;; Most infix commands are but an alias for this command. + "Cannot show any documentation for this anonymous infix command. + +This infix command was defined anonymously, i.e., it was define +inside a call to `transient-define-prefix'. + +When you request help for such an infix command, then we usually +show the respective man-page and jump to the location where the +respective argument is being described. This isn't possible in +this case, because the `man-page' slot was not set in this case." (interactive) (let ((obj (transient-suffix-object))) (transient-infix-set obj (transient-infix-read obj))) @@ -981,30 +1032,31 @@ transient--default-infix-command (put 'transient--default-infix-command 'interactive-only t) (put 'transient--default-infix-command 'command-modes (list 'not-a-mode)) -(defun transient--expand-define-args (args &optional arglist) - (unless (listp arglist) - (error "Mandatory ARGLIST is missing")) - (let (class keys suffixes docstr) - (when (stringp (car args)) - (setq docstr (pop args))) - (while (keywordp (car args)) - (let ((k (pop args)) - (v (pop args))) - (if (eq k :class) - (setq class v) - (push k keys) - (push v keys)))) - (while (let ((arg (car args))) - (or (vectorp arg) - (and arg (symbolp arg)))) - (push (pop args) suffixes)) - (list (if (eq (car-safe class) 'quote) - (cadr class) - class) - (nreverse keys) - (nreverse suffixes) - docstr - args))) +(eval-and-compile + (defun transient--expand-define-args (args &optional arglist) + (unless (listp arglist) + (error "Mandatory ARGLIST is missing")) + (let (class keys suffixes docstr) + (when (stringp (car args)) + (setq docstr (pop args))) + (while (keywordp (car args)) + (let ((k (pop args)) + (v (pop args))) + (if (eq k :class) + (setq class v) + (push k keys) + (push v keys)))) + (while (let ((arg (car args))) + (or (vectorp arg) + (and arg (symbolp arg)))) + (push (pop args) suffixes)) + (list (if (eq (car-safe class) 'quote) + (cadr class) + class) + (nreverse keys) + (nreverse suffixes) + docstr + args)))) (defun transient--parse-child (prefix spec) (cl-etypecase spec @@ -1069,8 +1121,9 @@ transient--parse-suffix (commandp (cadr spec))) (setq args (plist-put args :description (macroexp-quote pop))))) (cond + ((eq car :info)) ((keywordp car) - (error "Need command, got `%s'" car)) + (error "Need command or `:info', got `%s'" car)) ((symbolp car) (setq args (plist-put args :command (macroexp-quote pop)))) ((and (commandp car) @@ -1088,7 +1141,10 @@ transient--parse-suffix `(prog1 ',sym (put ',sym 'interactive-only t) (put ',sym 'command-modes (list 'not-a-mode)) - (defalias ',sym ,(macroexp-quote cmd))))))) + (defalias ',sym + ,(if (eq (car-safe cmd) 'lambda) + cmd + (macroexp-quote cmd)))))))) ((or (stringp car) (and car (listp car))) (let ((arg pop) @@ -1123,6 +1179,9 @@ transient--parse-suffix (val pop)) (cond ((eq key :class) (setq class val)) ((eq key :level) (setq level val)) + ((eq key :info) + (setq class 'transient-information) + (setq args (plist-put args :description val))) ((eq (car-safe val) '\,) (setq args (plist-put args key (cadr val)))) ((or (symbolp val) @@ -1191,11 +1250,11 @@ transient--insert-suffix (equal (transient--suffix-predicate suf) (transient--suffix-predicate conflict))))) (transient-remove-suffix prefix key)) - (cl-ecase action - (insert (setcdr mem (cons elt (cdr mem))) - (setcar mem suf)) - (append (setcdr mem (cons suf (cdr mem)))) - (replace (setcar mem suf))))))) + (pcase-exhaustive action + ('insert (setcdr mem (cons elt (cdr mem))) + (setcar mem suf)) + ('append (setcdr mem (cons suf (cdr mem)))) + ('replace (setcar mem suf))))))) ;;;###autoload (defun transient-insert-suffix (prefix loc suffix &optional keep-other) @@ -1306,7 +1365,7 @@ transient--layout-member-1 (delq (car (transient--group-member loc layout)) (aref layout 3))) nil) - (t (transient--group-member loc layout)))) + ((transient--group-member loc layout)))) (defun transient--group-member (loc group) (cl-member-if (lambda (suffix) @@ -1335,7 +1394,7 @@ transient--spec-key (plist-get plist :command))))) (defun transient--command-key (cmd) - (and-let* ((obj (get cmd 'transient--suffix))) + (and-let* ((obj (transient--suffix-prototype cmd))) (cond ((slot-boundp obj 'key) (oref obj key)) ((slot-exists-p obj 'shortarg) @@ -1376,11 +1435,15 @@ transient--stay (defconst transient--exit nil "Do exit the transient.") (defvar transient--exitp nil "Whether to exit the transient.") -(defvar transient--showp nil "Whether the transient is show in a popup buffer.") +(defvar transient--showp nil "Whether to show the transient popup buffer.") (defvar transient--helpp nil "Whether help-mode is active.") (defvar transient--editp nil "Whether edit-mode is active.") -(defvar transient--active-infix nil "The active infix awaiting user input.") +(defvar transient--refreshp nil + "Whether to refresh the transient completely.") + +(defvar transient--all-levels-p nil + "Whether temporary display of suffixes on all levels is active.") (defvar transient--timer nil) @@ -1392,7 +1455,7 @@ transient--buffer-name "Name of the transient buffer.") (defvar transient--window nil - "The window used to display the transient popup.") + "The window used to display the transient popup buffer.") (defvar transient--original-window nil "The window that was selected before the transient was invoked. @@ -1402,7 +1465,24 @@ transient--original-buffer "The buffer that was current before the transient was invoked. Usually it remains current while the transient is active.") -(defvar transient--debug nil "Whether put debug information into *Messages*.") +(defvar transient--restore-winconf nil + "Window configuration to restore after exiting help.") + +(defvar transient--shadowed-buffer nil + "The buffer that is temporarily shadowed by the transient buffer. +This is bound while the suffix predicate is being evaluated and while +drawing in the transient buffer.") + +(defvar transient--pending-suffix nil + "The suffix that is currently being processed. +This is bound while the suffix predicate is being evaluated.") + +(defvar transient--pending-group nil + "The group that is currently being processed. +This is bound while the suffixes are drawn in the transient buffer.") + +(defvar transient--debug nil + "Whether to put debug information into *Messages*.") (defvar transient--history nil) @@ -1414,6 +1494,31 @@ transient--scroll-commands ;;; Identities +(defun transient-prefix-object () + "Return the current prefix as an object. + +While a transient is being setup or refreshed (which involves +preparing its suffixes) the variable `transient--prefix' can be +used to access the prefix object. Thus this is what has to be +used in suffix methods such as `transient-format-description', +and in object-specific functions that are stored in suffix slots +such as `description'. + +When a suffix command is invoked (i.e., in its `interactive' form +and function body) then the variable `transient-current-prefix' +has to be used instead. + +Two distinct variables are needed, because any prefix may itself +be used as a suffix of another prefix, and such sub-prefixes have +to be able to tell themselves apart from the prefix they were +invoked from. + +Regular suffix commands, which are not prefixes, do not have to +concern themselves with this distinction, so they can use this +function instead. In the context of a plain suffix, it always +returns the value of the appropiate variable." + (or transient--prefix transient-current-prefix)) + (defun transient-suffix-object (&optional command) "Return the object associated with the current suffix command. @@ -1425,11 +1530,11 @@ transient-suffix-object are usually aliases of `transient--default-infix-command', which is defined like this: - (defun transient--default-infix-command () - (interactive) - (let ((obj (transient-suffix-object))) - (transient-infix-set obj (transient-infix-read obj))) - (transient--show)) + (defun transient--default-infix-command () + (interactive) + (let ((obj (transient-suffix-object))) + (transient-infix-set obj (transient-infix-read obj))) + (transient--show)) \(User input is read outside of `interactive' to prevent the command from being added to `command-history'. See #23.) @@ -1474,12 +1579,17 @@ transient-suffix-object (listify-key-sequence (this-command-keys)))) suffixes)) (car suffixes))) - (when-let* ((obj (get (or command this-command) 'transient--suffix)) - (obj (clone obj))) - ;; Cannot use and-let* because of debbugs#31840. - (transient-init-scope obj) - (transient-init-value obj) - obj))) + (and-let* ((obj (transient--suffix-prototype (or command this-command))) + (obj (clone obj))) + (progn ; work around debbugs#31840 + (transient-init-scope obj) + (transient-init-value obj) + obj)))) + +(defun transient--suffix-prototype (command) + (or (get command 'transient--suffix) + (seq-some (lambda (cmd) (get cmd 'transient--suffix)) + (function-alias-p command)))) ;;; Keymaps @@ -1570,7 +1680,8 @@ transient--common-command-prefixes (if transient-show-common-commands "Hide common commands" "Show common permanently"))) - (list "C-x l" "Show/hide suffixes" #'transient-set-level)))))))) + (list "C-x l" "Show/hide suffixes" #'transient-set-level) + (list "C-x a" #'transient-toggle-level-limit)))))))) (defvar-keymap transient-popup-navigation-map :doc "One of the keymaps used when popup navigation is enabled. @@ -1588,6 +1699,16 @@ transient-button-map "" #'transient-push-button "" #'transient-push-button) +(defvar-keymap transient-resume-mode-map + :doc "Keymap for `transient-resume-mode'. + +This keymap remaps every command that would usually just quit the +documentation buffer to `transient-resume', which additionally +resumes the suspended transient." + " " #'transient-resume + " " #'transient-resume + " " #'transient-resume) + (defvar-keymap transient-predicate-map :doc "Base keymap used to map common commands to their transient behavior. @@ -1623,7 +1744,9 @@ transient-predicate-map "" #'transient--do-stay "" #'transient--do-stay "" #'transient--do-call + "" #'transient--do-exit "" #'transient--do-call + "" #'transient--do-exit "" #'transient--do-call "" #'transient--do-stay "" #'transient--do-stay @@ -1699,50 +1822,66 @@ transient--make-transient-map map)) (defun transient--make-predicate-map () - (let ((map (make-sparse-keymap))) + (let* ((default (transient--resolve-pre-command + (oref transient--prefix transient-suffix))) + (return (and transient-current-prefix (eq default t))) + (map (make-sparse-keymap))) (set-keymap-parent map transient-predicate-map) - (when (memq (oref transient--prefix transient-non-suffix) - '(nil transient--do-warn transient--do-noop)) - (keymap-set map "" #'transient--do-suspend)) + (when (or (and (slot-boundp transient--prefix 'transient-switch-frame) + (transient--resolve-pre-command + (not (oref transient--prefix transient-switch-frame)))) + (memq (transient--resolve-pre-command + (oref transient--prefix transient-non-suffix)) + '(nil transient--do-warn transient--do-noop))) + (define-key map [handle-switch-frame] #'transient--do-suspend)) (dolist (obj transient--suffixes) (let* ((cmd (oref obj command)) - (sub-prefix (and (symbolp cmd) (get cmd 'transient--prefix) t))) + (kind (cond ((get cmd 'transient--prefix) 'prefix) + ((cl-typep obj 'transient-infix) 'infix) + (t 'suffix)))) (cond ((oref obj inapt) (define-key map (vector cmd) #'transient--do-warn-inapt)) ((slot-boundp obj 'transient) (define-key map (vector cmd) - (let ((do (oref obj transient))) - (pcase (list do sub-prefix) - ('(t t) #'transient--do-recurse) - ('(t nil) (if (cl-typep obj 'transient-infix) - #'transient--do-stay - #'transient--do-call)) - ('(nil t) #'transient--do-replace) - ('(nil nil) #'transient--do-exit) - (_ do))))) + (pcase (list kind + (transient--resolve-pre-command (oref obj transient)) + return) + (`(prefix t ,_) #'transient--do-recurse) + (`(prefix nil ,_) #'transient--do-stack) + (`(infix t ,_) #'transient--do-stay) + (`(suffix t ,_) #'transient--do-call) + ('(suffix nil t) #'transient--do-return) + (`(,_ nil ,_) #'transient--do-exit) + (`(,_ ,do ,_) do)))) ((not (lookup-key transient-predicate-map (vector cmd))) (define-key map (vector cmd) - (if sub-prefix - #'transient--do-replace - (or (oref transient--prefix transient-suffix) - #'transient--do-exit))))))) + (pcase (list kind default return) + (`(prefix ,(or 'transient--do-stay 'transient--do-call) ,_) + #'transient--do-recurse) + (`(prefix t ,_) #'transient--do-recurse) + (`(prefix ,_ ,_) #'transient--do-stack) + (`(infix ,_ ,_) #'transient--do-stay) + (`(suffix t ,_) #'transient--do-call) + ('(suffix nil t) #'transient--do-return) + (`(suffix nil ,_) #'transient--do-exit) + (`(suffix ,do ,_) do))))))) map)) (defun transient--make-redisplay-map () (setq transient--redisplay-key - (cl-case this-command - (transient-update + (pcase this-command + ('transient-update (setq transient--showp t) (setq unread-command-events (listify-key-sequence (this-single-command-raw-keys)))) - (transient-quit-seq + ('transient-quit-seq (setq unread-command-events (butlast (listify-key-sequence (this-single-command-raw-keys)) 2)) (butlast transient--redisplay-key)) - (t nil))) + (_ nil))) (let ((topmap (make-sparse-keymap)) (submap (make-sparse-keymap))) (when transient--redisplay-key @@ -1786,7 +1925,7 @@ transient-setup (setq params (list :scope (oref transient--prefix scope)))) (transient--prefix ;; Invoked as a ":transient-non-suffix 'transient--do-{stay,call}" - ;; of an outer prefix. Unlike the usual `transient--do-replace', + ;; of an outer prefix. Unlike the usual `transient--do-stack', ;; these predicates fail to clean up after the outer prefix. (transient--pop-keymap 'transient--transient-map) (transient--pop-keymap 'transient--redisplay-map)) @@ -1797,10 +1936,8 @@ transient-setup ;; Returning from help to edit. (setq transient--editp t))) (transient--init-objects name layout params) + (transient--init-keymaps) (transient--history-init transient--prefix) - (setq transient--predicate-map (transient--make-predicate-map)) - (setq transient--transient-map (transient--make-transient-map)) - (setq transient--redisplay-map (transient--make-redisplay-map)) (setq transient--original-window (selected-window)) (setq transient--original-buffer (current-buffer)) (setq transient--minibuffer-depth (minibuffer-depth)) @@ -1817,8 +1954,16 @@ transient-setup-children (funcall (oref group setup-children) children) children)) -(defun transient--init-objects (name layout params) - (setq transient--prefix (transient--init-prefix name params)) +(defun transient--init-keymaps () + (setq transient--predicate-map (transient--make-predicate-map)) + (setq transient--transient-map (transient--make-transient-map)) + (setq transient--redisplay-map (transient--make-redisplay-map))) + +(defun transient--init-objects (&optional name layout params) + (if name + (setq transient--prefix (transient--init-prefix name params)) + (setq name (oref transient--prefix command))) + (setq transient--refreshp (oref transient--prefix refresh-suffixes)) (setq transient--layout (or layout (transient--init-suffixes name))) (setq transient--suffixes (transient--flatten-suffixes transient--layout))) @@ -1845,10 +1990,11 @@ transient--flatten-suffixes (cl-labels ((s (def) (cond ((stringp def) nil) + ((cl-typep def 'transient-information) nil) ((listp def) (cl-mapcan #'s def)) - ((transient-group--eieio-childp def) + ((cl-typep def 'transient-group) (cl-mapcan #'s (oref def suffixes))) - ((transient-suffix--eieio-childp def) + ((cl-typep def 'transient-suffix) (list def))))) (cl-mapcan #'s layout))) @@ -1860,31 +2006,37 @@ transient--init-child (defun transient--init-group (levels spec) (pcase-let ((`(,level ,class ,args ,children) (append spec nil))) - (when-let* ((- (transient--use-level-p level)) - (obj (apply class :level level args)) - (- (transient--use-suffix-p obj)) - (suffixes (cl-mapcan (lambda (c) (transient--init-child levels c)) - (transient-setup-children obj children)))) - ;; Cannot use and-let* because of debbugs#31840. - (oset obj suffixes suffixes) - (list obj)))) + (and-let* ((- (transient--use-level-p level)) + (obj (apply class :level level args)) + (- (transient--use-suffix-p obj)) + (suffixes (cl-mapcan (lambda (c) (transient--init-child levels c)) + (transient-setup-children obj children)))) + (progn ; work around debbugs#31840 + (oset obj suffixes suffixes) + (list obj))))) (defun transient--init-suffix (levels spec) (pcase-let* ((`(,level ,class ,args) spec) (cmd (plist-get args :command)) - (level (or (alist-get cmd levels) level))) + (key (transient--kbd (plist-get args :key))) + (level (or (alist-get (cons cmd key) levels nil nil #'equal) + (alist-get cmd levels) + level))) (let ((fn (and (symbolp cmd) (symbol-function cmd)))) (when (autoloadp fn) (transient--debug " autoload %s" cmd) (autoload-do-load fn))) (when (transient--use-level-p level) - (unless (and cmd (symbolp cmd)) - (error "BUG: Non-symbolic suffix command: %s" cmd)) - (let ((obj (if-let ((proto (get cmd 'transient--suffix))) - (apply #'clone proto :level level args) - (apply class :command cmd :level level args)))) - (cond ((commandp cmd)) + (let ((obj (if (child-of-class-p class 'transient-information) + (apply class :level level args) + (unless (and cmd (symbolp cmd)) + (error "BUG: Non-symbolic suffix command: %s" cmd)) + (if-let ((proto (and cmd (transient--suffix-prototype cmd)))) + (apply #'clone proto :level level args) + (apply class :command cmd :level level args))))) + (cond ((not cmd)) + ((commandp cmd)) ((or (cl-typep obj 'transient-switch) (cl-typep obj 'transient-option)) ;; As a temporary special case, if the package was compiled @@ -1893,7 +2045,8 @@ transient--init-suffix (defalias cmd #'transient--default-infix-command)) ((transient--use-suffix-p obj) (error "Suffix command %s is not defined or autoloaded" cmd))) - (transient--init-suffix-key obj) + (unless (cl-typep obj 'transient-information) + (transient--init-suffix-key obj)) (when (transient--use-suffix-p obj) (if (transient--inapt-suffix-p obj) (oset obj inapt t) @@ -1917,33 +2070,38 @@ transient--init-suffix-key (error "No key for %s" (oref obj command)))))) (defun transient--use-level-p (level &optional edit) - (or (and transient--editp (not edit)) + (or transient--all-levels-p + (and transient--editp (not edit)) (and (>= level 1) (<= level (oref transient--prefix level))))) (defun transient--use-suffix-p (obj) - (transient--do-suffix-p - (oref obj if) - (oref obj if-not) - (oref obj if-nil) - (oref obj if-non-nil) - (oref obj if-mode) - (oref obj if-not-mode) - (oref obj if-derived) - (oref obj if-not-derived) - t)) + (let ((transient--shadowed-buffer (current-buffer)) + (transient--pending-suffix obj)) + (transient--do-suffix-p + (oref obj if) + (oref obj if-not) + (oref obj if-nil) + (oref obj if-non-nil) + (oref obj if-mode) + (oref obj if-not-mode) + (oref obj if-derived) + (oref obj if-not-derived) + t))) (defun transient--inapt-suffix-p (obj) - (transient--do-suffix-p - (oref obj inapt-if) - (oref obj inapt-if-not) - (oref obj inapt-if-nil) - (oref obj inapt-if-non-nil) - (oref obj inapt-if-mode) - (oref obj inapt-if-not-mode) - (oref obj inapt-if-derived) - (oref obj inapt-if-not-derived) - nil)) + (let ((transient--shadowed-buffer (current-buffer)) + (transient--pending-suffix obj)) + (transient--do-suffix-p + (oref obj inapt-if) + (oref obj inapt-if-not) + (oref obj inapt-if-nil) + (oref obj inapt-if-non-nil) + (oref obj inapt-if-mode) + (oref obj inapt-if-not-mode) + (oref obj inapt-if-derived) + (oref obj inapt-if-not-derived) + nil))) (defun transient--do-suffix-p (if if-not if-nil if-non-nil if-mode if-not-mode if-derived if-not-derived @@ -1959,14 +2117,15 @@ transient--do-suffix-p (if-not-mode (not (if (atom if-not-mode) (eq major-mode if-not-mode) (memq major-mode if-not-mode)))) - (if-derived (if (or (atom if-derived) (>= emacs-major-version 30)) + (if-derived (if (or (atom if-derived) + (>= emacs-major-version 30)) (derived-mode-p if-derived) (apply #'derived-mode-p if-derived))) (if-not-derived (not (if (or (atom if-not-derived) (>= emacs-major-version 30)) (derived-mode-p if-not-derived) (apply #'derived-mode-p if-not-derived)))) - (t default))) + (default))) (defun transient--suffix-predicate (spec) (let ((plist (nth 2 spec))) @@ -1997,6 +2156,17 @@ transient--init-transient ;; that we just added. (setq transient--exitp 'replace))) +(defun transient--refresh-transient () + (transient--debug 'refresh-transient) + (transient--pop-keymap 'transient--predicate-map) + (transient--pop-keymap 'transient--transient-map) + (transient--pop-keymap 'transient--redisplay-map) + (transient--init-objects) + (transient--init-keymaps) + (transient--push-keymap 'transient--transient-map) + (transient--push-keymap 'transient--redisplay-map) + (transient--redisplay)) + (defun transient--pre-command () (transient--debug 'pre-command) (transient--with-emergency-exit @@ -2005,8 +2175,8 @@ transient--pre-command ;; lead to a suffix being remapped to a non-suffix. We have to undo ;; the remapping in that case. However, remapping a non-suffix to ;; another should remain possible. - (when (and (transient--get-predicate-for this-original-command 'suffix) - (not (transient--get-predicate-for this-command 'suffix))) + (when (and (transient--get-pre-command this-original-command 'suffix) + (not (transient--get-pre-command this-command 'suffix))) (setq this-command this-original-command)) (cond ((memq this-command '(transient-update transient-quit-seq)) @@ -2030,34 +2200,11 @@ transient--pre-command (transient--wrap-command)) (t (setq transient--exitp nil) - (let ((exitp (eq (transient--do-pre-command) transient--exit))) + (let ((exitp (eq (transient--call-pre-command) transient--exit))) (transient--wrap-command) (when exitp (transient--pre-exit))))))) -(defun transient--do-pre-command () - (if-let ((fn (transient--get-predicate-for this-command))) - (let ((action (funcall fn))) - (when (eq action transient--exit) - (setq transient--exitp (or transient--exitp t))) - action) - (if (let ((keys (this-command-keys-vector))) - (eq (aref keys (1- (length keys))) ?\C-g)) - (setq this-command 'transient-noop) - (unless (transient--edebug-command-p) - (setq this-command 'transient-undefined))) - transient--stay)) - -(defun transient--get-predicate-for (cmd &optional suffix-only) - (or (ignore-errors - (lookup-key transient--predicate-map (vector cmd))) - (and (not suffix-only) - (let ((pred (oref transient--prefix transient-non-suffix))) - (pcase pred - ('t #'transient--do-stay) - ('nil #'transient--do-warn) - (_ pred)))))) - (defun transient--pre-exit () (transient--debug 'pre-exit) (transient--delete-window) @@ -2086,8 +2233,9 @@ transient--delete-window (and (minibuffer-selected-window) (selected-window))) (buf (window-buffer transient--window))) - ;; Only delete the window if it never showed another buffer. - (unless (eq (car (window-parameter transient--window 'quit-restore)) 'other) + ;; Only delete the window if it has never shown another buffer. + (unless (eq (car (window-parameter transient--window 'quit-restore)) + 'other) (with-demoted-errors "Error while exiting transient: %S" (delete-window transient--window))) (kill-buffer buf) @@ -2163,66 +2311,65 @@ transient--with-suspended-override (remove-hook 'minibuffer-exit-hook ,exit))) ,@body))) -(defun transient--wrap-command () - (if (>= emacs-major-version 30) - (transient--wrap-command-30) - (transient--wrap-command-29))) - -(defun transient--wrap-command-30 () - (letrec - ((prefix transient--prefix) - (suffix this-command) - (advice (lambda (fn &rest args) - (interactive - (lambda (spec) - (let ((abort t)) - (unwind-protect - (prog1 (advice-eval-interactive-spec spec) - (setq abort nil)) - (when abort - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil)))))) - (unwind-protect - (apply fn args) - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil))))) - (advice-add suffix :around advice '((depth . -99))))) - -(defun transient--wrap-command-29 () - (let* ((prefix transient--prefix) - (suffix this-command) - (advice nil) - (advice-interactive - (lambda (spec) - (let ((abort t)) +(static-if (>= emacs-major-version 30) + (defun transient--wrap-command () + (cl-assert + (>= emacs-major-version 30) nil + "Emacs was downgraded, making it necessary to recompile Transient") + (letrec + ((prefix transient--prefix) + (suffix this-command) + (advice (lambda (fn &rest args) + (interactive + (lambda (spec) + (let ((abort t)) + (unwind-protect + (prog1 (advice-eval-interactive-spec spec) + (setq abort nil)) + (when abort + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-interactive) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil)))))) + (unwind-protect + (apply fn args) + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-command) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil))))) + (advice-add suffix :around advice '((depth . -99))))) + + (defun transient--wrap-command () + (let* ((prefix transient--prefix) + (suffix this-command) + (advice nil) + (advice-interactive + (lambda (spec) + (let ((abort t)) + (unwind-protect + (prog1 (advice-eval-interactive-spec spec) + (setq abort nil)) + (when abort + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-interactive) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil)))))) + (advice-body + (lambda (fn &rest args) (unwind-protect - (prog1 (advice-eval-interactive-spec spec) - (setq abort nil)) - (when abort - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil)))))) - (advice-body - (lambda (fn &rest args) - (unwind-protect - (apply fn args) - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil))))) - (setq advice `(lambda (fn &rest args) - (interactive ,advice-interactive) - (apply ',advice-body fn args))) - (advice-add suffix :around advice '((depth . -99))))) + (apply fn args) + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-command) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil))))) + (setq advice `(lambda (fn &rest args) + (interactive ,advice-interactive) + (apply ',advice-body fn args))) + (advice-add suffix :around advice '((depth . -99)))))) (defun transient--premature-post-command () (and (equal (this-command-keys-vector) []) @@ -2243,7 +2390,21 @@ transient--post-command (transient--debug 'post-command) (transient--with-emergency-exit (cond (transient--exitp (transient--post-exit)) - ((eq this-command (oref transient--prefix command))) + ;; If `this-command' is the current transient prefix, then we + ;; have already taken care of updating the transient buffer... + ((and (eq this-command (oref transient--prefix command)) + ;; ... but if `prefix-arg' is non-nil, then the values + ;; of `this-command' and `real-this-command' are untrue + ;; because `prefix-command-preserve-state' changes them. + ;; We cannot use `current-prefix-arg' because it is set + ;; too late (in `command-execute'), and if it were set + ;; earlier, then we likely still would not be able to + ;; rely on it and `prefix-command-preserve-state-hook' + ;; would have to be used to record that a universal + ;; argument is in effect. + (not prefix-arg))) + (transient--refreshp + (transient--refresh-transient)) ((let ((old transient--redisplay-map) (new (transient--make-redisplay-map))) (unless (equal old new) @@ -2283,6 +2444,7 @@ transient--post-exit (setq transient--exitp nil) (setq transient--helpp nil) (setq transient--editp nil) + (setq transient--all-levels-p nil) (setq transient--minibuffer-depth 0) (run-hooks 'transient-exit-hook) (when resume @@ -2293,6 +2455,7 @@ transient--stack-push (push (list (oref transient--prefix command) transient--layout transient--editp + :transient-suffix (oref transient--prefix transient-suffix) :scope (oref transient--prefix scope)) transient--stack)) @@ -2353,12 +2516,12 @@ transient--debug (concat ", " (apply #'format args))) (args (concat ", " (apply (car args) (cdr args)))) - (t ""))) + (""))) (apply #'message arg args))))) (defun transient--emergency-exit () "Exit the current transient command after an error occurred. -When no transient is active (i.e. when `transient--prefix' is +When no transient is active (i.e., when `transient--prefix' is nil) then do nothing." (transient--debug 'emergency-exit) (when transient--prefix @@ -2369,6 +2532,36 @@ transient--emergency-exit ;;; Pre-Commands +(defun transient--call-pre-command () + (if-let ((fn (transient--get-pre-command this-command))) + (let ((action (funcall fn))) + (when (eq action transient--exit) + (setq transient--exitp (or transient--exitp t))) + action) + (if (let ((keys (this-command-keys-vector))) + (eq (aref keys (1- (length keys))) ?\C-g)) + (setq this-command 'transient-noop) + (unless (transient--edebug-command-p) + (setq this-command 'transient-undefined))) + transient--stay)) + +(defun transient--get-pre-command (&optional cmd enforce-type) + (or (and (not (eq enforce-type 'non-suffix)) + (lookup-key transient--predicate-map (vector cmd))) + (and (not (eq enforce-type 'suffix)) + (transient--resolve-pre-command + (oref transient--prefix transient-non-suffix) + t)))) + +(defun transient--resolve-pre-command (pre &optional resolve-boolean) + (cond ((booleanp pre) + (if resolve-boolean + (if pre #'transient--do-stay #'transient--do-warn) + pre)) + ((string-match-p "--do-" (symbol-name pre)) pre) + ((let ((sym (intern (format "transient--do-%s" pre)))) + (if (functionp sym) sym pre))))) + (defun transient--do-stay () "Call the command without exporting variables and stay transient." transient--stay) @@ -2409,7 +2602,8 @@ transient--do-exit (defun transient--do-leave () "Call the command without exporting variables and exit the transient." - transient--stay) + (transient--stack-zap) + transient--exit) (defun transient--do-push-button () "Call the command represented by the activated button. @@ -2424,26 +2618,35 @@ transient--do-push-button (posn-point (event-start last-command-event)) (point)) 'command))) - (transient--do-pre-command))) + (transient--call-pre-command))) (defun transient--do-recurse () "Call the transient prefix command, preparing for return to active transient. If there is no parent prefix, then just call the command." - (transient--do-replace)) + (transient--do-stack)) (defun transient--setup-recursion (prefix-obj) (when transient--stack (let ((command (oref prefix-obj command))) (when-let ((suffix-obj (transient-suffix-object command))) - (when (and (slot-boundp suffix-obj 'transient) - (memq (oref suffix-obj transient) - (list t #'transient--do-recurse))) - (oset prefix-obj transient-suffix 'transient--do-return)))))) + (when (memq (if (slot-boundp suffix-obj 'transient) + (oref suffix-obj transient) + (oref transient-current-prefix transient-suffix)) + (list t #'transient--do-recurse)) + (oset prefix-obj transient-suffix t)))))) + +(defun transient--do-stack () + "Call the transient prefix command, stacking the active transient. +Push the active transient to the transient stack." + (transient--export) + (transient--stack-push) + (setq transient--exitp 'replace) + transient--exit) (defun transient--do-replace () - "Call the transient prefix command, replacing the active transient." + "Call the transient prefix command, replacing the active transient. +Do not push the active transient to the transient stack." (transient--export) - (transient--stack-push) (setq transient--exitp 'replace) transient--exit) @@ -2462,7 +2665,9 @@ transient--do-quit-one (setq transient--editp nil) (transient-setup) transient--stay) - (t transient--exit))) + (prefix-arg + transient--stay) + (transient--exit))) (defun transient--do-quit-all () "Exit all transients without saving the transient stack." @@ -2474,7 +2679,7 @@ transient--do-move In that case behave like `transient--do-stay', otherwise similar to `transient--do-warn'." (unless transient-enable-popup-navigation - (setq this-command 'transient-popup-navigation-help)) + (setq this-command 'transient-inhibit-move)) transient--stay) (defun transient--do-minus () @@ -2485,22 +2690,27 @@ transient--do-minus (setq this-command 'transient-update)) transient--stay) -(put 'transient--do-stay 'transient-color 'transient-red) -(put 'transient--do-noop 'transient-color 'transient-red) -(put 'transient--do-warn 'transient-color 'transient-red) -(put 'transient--do-warn-inapt 'transient-color 'transient-red) -(put 'transient--do-call 'transient-color 'transient-red) -(put 'transient--do-return 'transient-color 'transient-purple) -(put 'transient--do-exit 'transient-color 'transient-blue) -(put 'transient--do-recurse 'transient-color 'transient-red) -(put 'transient--do-replace 'transient-color 'transient-blue) -(put 'transient--do-suspend 'transient-color 'transient-blue) -(put 'transient--do-quit-one 'transient-color 'transient-blue) -(put 'transient--do-quit-all 'transient-color 'transient-blue) -(put 'transient--do-move 'transient-color 'transient-red) -(put 'transient--do-minus 'transient-color 'transient-red) +(put 'transient--do-stay 'transient-face 'transient-key-stay) +(put 'transient--do-noop 'transient-face 'transient-key-noop) +(put 'transient--do-warn 'transient-face 'transient-key-noop) +(put 'transient--do-warn-inapt 'transient-face 'transient-key-noop) +(put 'transient--do-call 'transient-face 'transient-key-stay) +(put 'transient--do-return 'transient-face 'transient-key-return) +(put 'transient--do-exit 'transient-face 'transient-key-exit) +(put 'transient--do-leave 'transient-face 'transient-key-exit) + +(put 'transient--do-recurse 'transient-face 'transient-key-stay) +(put 'transient--do-stack 'transient-face 'transient-key-stay) +(put 'transient--do-replace 'transient-face 'transient-key-exit) +(put 'transient--do-suspend 'transient-face 'transient-key-exit) + +(put 'transient--do-quit-one 'transient-face 'transient-key-return) +(put 'transient--do-quit-all 'transient-face 'transient-key-exit) +(put 'transient--do-move 'transient-face 'transient-key-stay) +(put 'transient--do-minus 'transient-face 'transient-key-stay) ;;; Commands +;;;; Noop (defun transient-noop () "Do nothing at all." @@ -2539,27 +2749,23 @@ transient--invalid (other-window 1) (display-warning 'transient "Inconsistent transient state detected. This should never happen. -Please open an issue and post the shown command log. -This is a heisenbug, so any additional details might help. -Thanks!" :error))) +Please open an issue and post the shown command log." :error))) -(defun transient-toggle-common () - "Toggle whether common commands are always shown." +(defun transient-inhibit-move () + "Warn the user that popup navigation is disabled." (interactive) - (setq transient-show-common-commands (not transient-show-common-commands))) + (message "To enable use of `%s', please customize `%s'" + this-original-command + 'transient-enable-popup-navigation)) -(defun transient-suspend () - "Suspend the current transient. -It can later be resumed using `transient-resume' while no other -transient is active." - (interactive)) +;;;; Core (defun transient-quit-all () "Exit all transients without saving the transient stack." (interactive)) (defun transient-quit-one () - "Exit the current transients, possibly returning to the previous." + "Exit the current transients, returning to outer transient, if any." (interactive)) (defun transient-quit-seq () @@ -2569,17 +2775,48 @@ transient-quit-seq (defun transient-update () "Redraw the transient's state in the popup buffer." (interactive) - (when (equal this-original-command 'negative-argument) - (setq prefix-arg current-prefix-arg))) + (setq prefix-arg current-prefix-arg)) (defun transient-show () "Show the transient's state in the popup buffer." (interactive) (setq transient--showp t)) -(defvar-local transient--restore-winconf nil) +(defun transient-push-button () + "Invoke the suffix command represented by this button." + (interactive)) -(defvar transient-resume-mode) +;;;; Suspend + +(defun transient-suspend () + "Suspend the current transient. +It can later be resumed using `transient-resume', while no other +transient is active." + (interactive)) + +(define-minor-mode transient-resume-mode + "Auxiliary minor-mode used to resume a transient after viewing help.") + +(defun transient-resume () + "Resume a previously suspended stack of transients." + (interactive) + (cond (transient--stack + (let ((winconf transient--restore-winconf)) + (kill-local-variable 'transient--restore-winconf) + (when transient-resume-mode + (transient-resume-mode -1) + (quit-window)) + (when winconf + (set-window-configuration winconf))) + (transient--stack-pop)) + (transient-resume-mode + (kill-local-variable 'transient--restore-winconf) + (transient-resume-mode -1) + (quit-window)) + (t + (message "No suspended transient command")))) + +;;;; Help (defun transient-help (&optional interactive) "Show help for the active transient or one of its suffixes.\n\n(fn)" @@ -2596,12 +2833,15 @@ transient-help transient--prefix (or (transient-suffix-object) this-original-command))) - (setq transient--restore-winconf winconf)) + (setq-local transient--restore-winconf winconf)) (fit-window-to-buffer nil (frame-height) (window-height)) (transient-resume-mode) - (message "Type \"q\" to resume transient command.") + (message (substitute-command-keys + "Type \\`q' to resume transient command.")) t)))) +;;;; Level + (defun transient-set-level (&optional command level) "Set the level of the transient or one of its suffix commands." (interactive @@ -2613,10 +2853,9 @@ transient-set-level (list command (let ((keys (this-single-command-raw-keys))) (and (lookup-key transient--transient-map keys) - (string-to-number - (let ((transient--active-infix - (transient-suffix-object command))) - (transient--show) + (progn + (transient--show) + (string-to-number (transient--read-number-N (format "Set level for `%s': " command) nil nil (not (eq command prefix))))))))))) @@ -2627,32 +2866,64 @@ transient-set-level (level (let* ((prefix (oref transient--prefix command)) (alist (alist-get prefix transient-levels)) - (sym command)) - (if (eq command prefix) - (progn (oset transient--prefix level level) - (setq sym t)) - (oset (transient-suffix-object command) level level)) - (setf (alist-get sym alist) level) + (akey command)) + (cond ((eq command prefix) + (oset transient--prefix level level) + (setq akey t)) + (t + (oset (transient-suffix-object command) level level) + (when (cdr (cl-remove-if-not (lambda (obj) + (eq (oref obj command) command)) + transient--suffixes)) + (setq akey (cons command (this-command-keys)))))) + (setf (alist-get akey alist) level) (setf (alist-get prefix transient-levels) alist)) (transient-save-levels) (transient--show)) (t (transient-undefined)))) +(transient-define-suffix transient-toggle-level-limit () + "Toggle whether to temporarily displayed suffixes on all levels." + :description + (lambda () + (cond + ((= transient-default-level transient--max-level) + "Always displaying all levels") + (transient--all-levels-p + (format "Hide suffix %s" + (propertize + (format "levels > %s" (oref (transient-prefix-object) level)) + 'face 'transient-higher-level))) + ("Show all suffix levels"))) + :inapt-if (lambda () (= transient-default-level transient--max-level)) + :transient t + (interactive) + (setq transient--all-levels-p (not transient--all-levels-p)) + (setq transient--refreshp t)) + +;;;; Value + (defun transient-set () - "Save the value of the active transient for this Emacs session." + "Set active transient's value for this Emacs session." (interactive) - (transient-set-value (or transient--prefix transient-current-prefix))) + (transient-set-value (transient-prefix-object))) + +(defalias 'transient-set-and-exit 'transient-set + "Set active transient's value for this Emacs session and exit.") (defun transient-save () - "Save the value of the active transient persistenly across Emacs sessions." + "Save active transient's value for this and future Emacs sessions." (interactive) - (transient-save-value (or transient--prefix transient-current-prefix))) + (transient-save-value (transient-prefix-object))) + +(defalias 'transient-save-and-exit 'transient-save + "Save active transient's value for this and future Emacs sessions and exit.") (defun transient-reset () "Clear the set and saved values of the active transient." (interactive) - (transient-reset-value (or transient--prefix transient-current-prefix))) + (transient-reset-value (transient-prefix-object))) (defun transient-history-next () "Switch to the next value used for the active transient." @@ -2679,44 +2950,36 @@ transient-history-prev (oset obj value (nth pos hst)) (mapc #'transient-init-value transient--suffixes)))) -(defun transient-scroll-up (&optional arg) - "Scroll text of transient popup window upward ARG lines. -If ARG is nil scroll near full screen. This is a wrapper -around `scroll-up-command' (which see)." - (interactive "^P") - (with-selected-window transient--window - (scroll-up-command arg))) - -(defun transient-scroll-down (&optional arg) - "Scroll text of transient popup window down ARG lines. -If ARG is nil scroll near full screen. This is a wrapper -around `scroll-down-command' (which see)." - (interactive "^P") - (with-selected-window transient--window - (scroll-down-command arg))) +;;;; Auxiliary -(defun transient-push-button () - "Invoke the suffix command represented by this button." - (interactive)) +(defun transient-toggle-common () + "Toggle whether common commands are permanently shown." + (interactive) + (setq transient-show-common-commands (not transient-show-common-commands))) -(defun transient-resume () - "Resume a previously suspended stack of transients." +(defun transient-toggle-debug () + "Toggle debugging statements for transient commands." (interactive) - (cond (transient--stack - (let ((winconf transient--restore-winconf)) - (kill-local-variable 'transient--restore-winconf) - (when transient-resume-mode - (transient-resume-mode -1) - (quit-window)) - (when winconf - (set-window-configuration winconf))) - (transient--stack-pop)) - (transient-resume-mode - (kill-local-variable 'transient--restore-winconf) - (transient-resume-mode -1) - (quit-window)) - (t - (message "No suspended transient command")))) + (setq transient--debug (not transient--debug)) + (message "Debugging transient %s" + (if transient--debug "enabled" "disabled"))) + +(transient-define-suffix transient-echo-arguments (arguments) + "Show the transient's active ARGUMENTS in the echo area. +Intended for use in prefixes used for demonstration purposes, +such as when suggesting a new feature or reporting an issue." + :transient t + :description "Echo arguments" + :key "x" + (interactive (list (transient-args transient-current-command))) + (message "%s: %s" + (key-description (this-command-keys)) + (mapconcat (lambda (arg) + (propertize (if (string-match-p " " arg) + (format "%S" arg) + arg) + 'face 'transient-argument)) + arguments " "))) ;;; Value ;;;; Init @@ -2822,28 +3085,18 @@ transient-infix-read `transient-infix' method described below). For some infix classes the value is changed without reading -anything in the minibuffer, i.e. the mere act of invoking the +anything in the minibuffer, i.e., the mere act of invoking the infix command determines what the new value should be, based on the previous value.") (cl-defmethod transient-infix-read :around ((obj transient-infix)) - "Highlight the infix in the popup buffer. + "Refresh the transient buffer buffer calling the next method. -This also wraps the call to `cl-call-next-method' with two -macros. - -`transient--with-suspended-override' is necessary to allow -reading user input using the minibuffer. - -`transient--with-emergency-exit' arranges for the transient to -be exited in case of an error because otherwise Emacs would get -stuck in an inconsistent state, which might make it necessary to -kill it from the outside. - -If you replace this method, then you must make sure to always use -the latter macro and most likely also the former." - (let ((transient--active-infix obj)) - (transient--show)) +Also wrap `cl-call-next-method' with two macros: +- `transient--with-suspended-override' allows use of minibuffer. +- `transient--with-emergency-exit' arranges for the transient to + be exited in case of an error." + (transient--show) (transient--with-emergency-exit (transient--with-suspended-override (cl-call-next-method obj)))) @@ -2861,7 +3114,7 @@ transient-infix-read Only for very simple classes that toggle or cycle through a very limited number of possible values should you replace this with a -simple method that does not handle history. (E.g. for a command +simple method that does not handle history. (E.g., for a command line switch the only possible values are \"use it\" and \"don't use it\", in which case it is pointless to preserve history.)" (with-slots (value multi-value always-read allow-empty choices) obj @@ -2872,6 +3125,7 @@ transient-infix-read (oset obj value nil) (let* ((enable-recursive-minibuffers t) (reader (oref obj reader)) + (choices (if (functionp choices) (funcall choices) choices)) (prompt (transient-prompt obj)) (value (if multi-value (mapconcat #'identity value ",") value)) (history-key (or (oref obj history-key) @@ -2894,7 +3148,7 @@ transient-infix-read initial-input history)) (choices (completing-read prompt choices nil t initial-input history)) - (t (read-string prompt initial-input history))))) + ((read-string prompt initial-input history))))) (cond ((and (equal value "") (not allow-empty)) (setq value nil)) ((and (equal value "\"\"") allow-empty) @@ -2926,7 +3180,7 @@ transient-infix-read Use this if you want to share an infix's history with a regular stand-alone command." (cl-letf (((symbol-function #'transient--show) #'ignore)) - (transient-infix-read (get command 'transient--suffix)))) + (transient-infix-read (transient--suffix-prototype command)))) ;;;; Readers @@ -3017,8 +3271,6 @@ transient-prompt ;;;; Set -(defvar transient--unset-incompatible t) - (cl-defgeneric transient-infix-set (obj value) "Set the value of infix object OBJ to value.") @@ -3026,29 +3278,32 @@ transient-infix-set "Set the value of infix object OBJ to value." (oset obj value value)) -(cl-defmethod transient-infix-set :around ((obj transient-argument) value) +(cl-defmethod transient-infix-set :after ((obj transient-argument) value) "Unset incompatible infix arguments." - (let ((arg (if (slot-boundp obj 'argument) - (oref obj argument) - (oref obj argument-regexp)))) - (if-let ((sic (and value arg transient--unset-incompatible)) - (spec (oref transient--prefix incompatible)) - (incomp (cl-mapcan (lambda (rule) - (and (member arg rule) - (remove arg rule))) - spec))) - (progn - (cl-call-next-method obj value) - (dolist (arg incomp) - (when-let ((obj (cl-find-if - (lambda (obj) - (and (slot-exists-p obj 'argument) - (slot-boundp obj 'argument) - (equal (oref obj argument) arg))) - transient--suffixes))) - (let ((transient--unset-incompatible nil)) - (transient-infix-set obj nil))))) - (cl-call-next-method obj value)))) + (when-let* ((--- value) + (val (transient-infix-value obj)) + (arg (if (slot-boundp obj 'argument) + (oref obj argument) + (oref obj argument-format))) + (spec (oref transient--prefix incompatible)) + (filter (lambda (x rule) + (and (member x rule) + (remove x rule)))) + (incomp (nconc + (cl-mapcan (apply-partially filter arg) spec) + (and (not (equal val arg)) + (cl-mapcan (apply-partially filter val) spec))))) + (dolist (obj transient--suffixes) + (when-let* ((--- (cl-typep obj 'transient-argument)) + (val (transient-infix-value obj)) + (arg (if (slot-boundp obj 'argument) + (oref obj argument) + (oref obj argument-format))) + (--- (if (equal val arg) + (member arg incomp) + (or (member val incomp) + (member arg incomp))))) + (transient-infix-set obj nil))))) (cl-defgeneric transient-set-value (obj) "Set the value of the transient prefix OBJ.") @@ -3111,11 +3366,11 @@ transient-get-value (defun transient--get-wrapped-value (obj) (and-let* ((value (transient-infix-value obj))) - (cl-ecase (and (slot-exists-p obj 'multi-value) - (oref obj multi-value)) - ((nil) (list value)) - ((t rest) (list value)) - (repeat value)))) + (pcase-exhaustive (and (slot-exists-p obj 'multi-value) + (oref obj multi-value)) + ('nil (list value)) + ((or 't 'rest) (list value)) + ('repeat value)))) (cl-defgeneric transient-infix-value (obj) "Return the value of the suffix object OBJ. @@ -3150,17 +3405,17 @@ transient-infix-value "Return ARGUMENT and VALUE as a unit or nil if the latter is nil." (and-let* ((value (oref obj value))) (let ((arg (oref obj argument))) - (cl-ecase (oref obj multi-value) - ((nil) (concat arg value)) - ((t rest) (cons arg value)) - (repeat (mapcar (lambda (v) (concat arg v)) value)))))) + (pcase-exhaustive (oref obj multi-value) + ('nil (concat arg value)) + ((or 't 'rest) (cons arg value)) + ('repeat (mapcar (lambda (v) (concat arg v)) value)))))) (cl-defmethod transient-infix-value ((_ transient-variable)) "Return nil, which means \"no value\". Setting the value of a variable is done by, well, setting the -value of the variable. I.e. this is a side-effect and does not -contribute to the value of the transient." +value of the variable. I.e., this is a side-effect and does +not contribute to the value of the transient." nil) ;;;; Utilities @@ -3242,12 +3497,13 @@ transient--show-brief (list (propertize (oref suffix key) 'face 'transient-key))))) transient--suffixes) #'string<) - (propertize "|" 'face 'transient-unreachable-key)))))) + (propertize "|" 'face 'transient-delimiter)))))) (defun transient--show () (transient--timer-cancel) (setq transient--showp t) - (let ((buf (get-buffer-create transient--buffer-name)) + (let ((transient--shadowed-buffer (current-buffer)) + (buf (get-buffer-create transient--buffer-name)) (focus nil)) (with-current-buffer buf (when transient-enable-popup-navigation @@ -3260,9 +3516,11 @@ transient--show (when (bound-and-true-p tab-line-format) (setq tab-line-format nil)) (setq header-line-format nil) - (setq mode-line-format (if (eq transient-mode-line-format 'line) - nil - transient-mode-line-format)) + (setq mode-line-format + (if (or (natnump transient-mode-line-format) + (eq transient-mode-line-format 'line)) + nil + transient-mode-line-format)) (setq mode-line-buffer-identification (symbol-name (oref transient--prefix command))) (if transient-enable-popup-navigation @@ -3273,16 +3531,8 @@ transient--show (transient--insert-groups) (when (or transient--helpp transient--editp) (transient--insert-help)) - (when (and (eq transient-mode-line-format 'line) - window-system) - (let ((face - (if-let ((f (and (transient--semantic-coloring-p) - (transient--prefix-color transient--prefix)))) - `(,@(and (>= emacs-major-version 27) '(:extend t)) - :background ,(face-foreground f)) - 'transient-separator))) - (insert (propertize "__" 'face face 'display '(space :height (1)))) - (insert (propertize "\n" 'face face 'line-height t)))) + (when-let ((line (transient--separator-line))) + (insert line)) (when transient-force-fixed-pitch (transient--force-fixed-pitch))) (unless (window-live-p transient--window) @@ -3304,11 +3554,31 @@ transient--fit-window-to-buffer (fit-window-to-buffer window nil (window-height window)) (fit-window-to-buffer window nil 1)))) +(defun transient--separator-line () + (and-let* ((height (cond ((not window-system) nil) + ((natnump transient-mode-line-format) + transient-mode-line-format) + ((eq transient-mode-line-format 'line) 1))) + (face `(,@(and (>= emacs-major-version 27) '(:extend t)) + :background + ,(or (face-foreground (transient--key-face nil 'non-suffix) + nil t) + "#gray60")))) + (concat (propertize "__" 'face face 'display `(space :height (,height))) + (propertize "\n" 'face face 'line-height t)))) + +(defmacro transient-with-shadowed-buffer (&rest body) + "While in the transient buffer, temporarly make the shadowed buffer current." + (declare (indent 0) (debug t)) + `(with-current-buffer (or transient--shadowed-buffer (current-buffer)) + ,@body)) + (defun transient--insert-groups () (let ((groups (cl-mapcan (lambda (group) (let ((hide (oref group hide))) (and (not (and (functionp hide) - (funcall hide))) + (transient-with-shadowed-buffer + (funcall hide)))) (list group)))) transient--layout)) group) @@ -3324,23 +3594,25 @@ transient--insert-group (cl-defmethod transient--insert-group :around ((group transient-group)) "Insert GROUP's description, if any." - (when-let ((desc (transient-format-description group))) + (when-let ((desc (transient-with-shadowed-buffer + (transient-format-description group)))) (insert desc ?\n)) (let ((transient--max-group-level - (max (oref group level) transient--max-group-level))) + (max (oref group level) transient--max-group-level)) + (transient--pending-group group)) (cl-call-next-method group))) (cl-defmethod transient--insert-group ((group transient-row)) (transient--maybe-pad-keys group) (dolist (suffix (oref group suffixes)) - (insert (transient-format suffix)) + (insert (transient-with-shadowed-buffer (transient-format suffix))) (insert " ")) (insert ?\n)) (cl-defmethod transient--insert-group ((group transient-column)) (transient--maybe-pad-keys group) (dolist (suffix (oref group suffixes)) - (let ((str (transient-format suffix))) + (let ((str (transient-with-shadowed-buffer (transient-format suffix)))) (insert str) (unless (string-match-p ".\n\\'" str) (insert ?\n))))) @@ -3350,10 +3622,11 @@ transient--insert-group (mapcar (lambda (column) (transient--maybe-pad-keys column group) - (let ((rows (mapcar #'transient-format (oref column suffixes)))) - (when-let ((desc (transient-format-description column))) - (push desc rows)) - (flatten-tree rows))) + (transient-with-shadowed-buffer + (let ((rows (mapcar #'transient-format (oref column suffixes)))) + (when-let ((desc (transient-format-description column))) + (push desc rows)) + (flatten-tree rows)))) (oref group suffixes))) (vp (or (oref transient--prefix variable-pitch) transient-align-variable-pitch)) @@ -3393,15 +3666,6 @@ transient--insert-group (when (= c (1- cs)) (insert ?\n)))))))) -(defun transient--pixel-width (string) - (save-window-excursion - (with-temp-buffer - (insert string) - (set-window-dedicated-p nil nil) - (set-window-buffer nil (current-buffer)) - (car (window-text-pixel-size - nil (line-beginning-position) (point)))))) - (cl-defmethod transient--insert-group ((group transient-subgroups)) (let* ((subgroups (oref group suffixes)) (n (length subgroups))) @@ -3432,36 +3696,31 @@ transient-format "Return a string containing just the ARG character." (char-to-string arg)) -(cl-defmethod transient-format :around ((obj transient-infix)) - "When reading user input for this infix, then highlight it." +(cl-defmethod transient-format :around ((obj transient-suffix)) + "Add additional formatting if appropriate. +When reading user input for this infix, then highlight it. +When edit-mode is enabled, then prepend the level information. +When `transient-enable-popup-navigation' is non-nil then format +as a button." (let ((str (cl-call-next-method obj))) - (when (eq obj transient--active-infix) - (setq str (concat str "\n")) - (add-face-text-property - (if (eq this-command 'transient-set-level) 3 0) - (length str) - 'transient-active-infix nil str)) + (when (and (cl-typep obj 'transient-infix) + (eq (oref obj command) this-original-command) + (active-minibuffer-window)) + (setq str (transient--add-face str 'transient-active-infix))) + (when transient--editp + (setq str (concat (let ((level (oref obj level))) + (propertize (format " %s " level) + 'face (if (transient--use-level-p level t) + 'transient-enabled-suffix + 'transient-disabled-suffix))) + str))) + (when (and transient-enable-popup-navigation + (slot-boundp obj 'command)) + (setq str (make-text-button str nil + 'type 'transient + 'command (oref obj command)))) str)) -(cl-defmethod transient-format :around ((obj transient-suffix)) - "When edit-mode is enabled, then prepend the level information. -Optional support for popup buttons is also implemented here." - (let ((str (concat - (and transient--editp - (let ((level (oref obj level))) - (propertize (format " %s " level) - 'face (if (transient--use-level-p level t) - 'transient-enabled-suffix - 'transient-disabled-suffix)))) - (cl-call-next-method obj)))) - (when (oref obj inapt) - (add-face-text-property 0 (length str) 'transient-inapt-suffix nil str)) - (if transient-enable-popup-navigation - (make-text-button str nil - 'type 'transient - 'command (oref obj command)) - str))) - (cl-defmethod transient-format ((obj transient-infix)) "Return a string generated using OBJ's `format'. %k is formatted using `transient-format-key'. @@ -3483,10 +3742,19 @@ transient-format (cl-defgeneric transient-format-key (obj) "Format OBJ's `key' for display and return the result.") +(cl-defmethod transient-format-key :around ((obj transient-suffix)) + "Add `transient-inapt-suffix' face if suffix is inapt." + (let ((str (cl-call-next-method))) + (if (oref obj inapt) + (transient--add-face str 'transient-inapt-suffix) + str))) + (cl-defmethod transient-format-key ((obj transient-suffix)) "Format OBJ's `key' for display and return the result." - (let ((key (oref obj key)) - (cmd (oref obj command))) + (let ((key (if (slot-boundp obj 'key) (oref obj key) "")) + (cmd (and (slot-boundp obj 'command) (oref obj command)))) + (when-let ((width (oref transient--pending-group pad-keys))) + (setq key (truncate-string-to-width key width nil ?\s))) (if transient--redisplay-key (let ((len (length transient--redisplay-key)) (seq (cl-coerce (edmacro-parse-keys key t) 'list))) @@ -3503,7 +3771,7 @@ transient-format-key (setq pre (string-replace "TAB" "C-i" pre)) (setq suf (string-replace "RET" "C-m" suf)) (setq suf (string-replace "TAB" "C-i" suf)) - ;; We use e.g. "-k" instead of the more correct "- k", + ;; We use e.g., "-k" instead of the more correct "- k", ;; because the former is prettier. If we did that in ;; the definition, then we want to drop the space that ;; is reinserted above. False-positives are possible @@ -3513,33 +3781,27 @@ transient-format-key (setq suf (string-replace " " "" suf))) (concat (propertize pre 'face 'transient-unreachable-key) (and (string-prefix-p (concat pre " ") key) " ") - (transient--colorize-key suf cmd) + (propertize suf 'face (transient--key-face cmd)) (save-excursion (and (string-match " +\\'" key) (propertize (match-string 0 key) 'face 'fixed-pitch)))))) ((transient--lookup-key transient-sticky-map (kbd key)) - (transient--colorize-key key cmd)) + (propertize key 'face (transient--key-face cmd))) (t (propertize key 'face 'transient-unreachable-key)))) - (transient--colorize-key key cmd)))) - -(defun transient--colorize-key (key command) - (propertize key 'face - (or (and (transient--semantic-coloring-p) - (transient--suffix-color command)) - 'transient-key))) + (propertize key 'face (transient--key-face cmd))))) (cl-defmethod transient-format-key :around ((obj transient-argument)) + "Handle `transient-highlight-mismatched-keys'." (let ((key (cl-call-next-method obj))) - (cond ((not transient-highlight-mismatched-keys)) - ((not (slot-boundp obj 'shortarg)) - (add-face-text-property - 0 (length key) 'transient-nonstandard-key nil key)) - ((not (string-equal key (oref obj shortarg))) - (add-face-text-property - 0 (length key) 'transient-mismatched-key nil key))) - key)) + (cond + ((not transient-highlight-mismatched-keys) key) + ((not (slot-boundp obj 'shortarg)) + (transient--add-face key 'transient-nonstandard-key)) + ((not (string-equal key (oref obj shortarg))) + (transient--add-face key 'transient-mismatched-key)) + (key)))) (cl-defgeneric transient-format-description (obj) "Format OBJ's `description' for display and return the result.") @@ -3548,10 +3810,14 @@ transient-format-description "The `description' slot may be a function, in which case that is called inside the correct buffer (see `transient--insert-group') and its value is returned to the caller." - (and-let* ((desc (oref obj description))) - (if (functionp desc) - (with-current-buffer transient--original-buffer - (funcall desc)) + (and-let* ((desc (oref obj description)) + (desc (if (functionp desc) + (if (= (car (func-arity desc)) 1) + (funcall desc obj) + (funcall desc)) + desc))) + (if-let* ((face (transient--get-face obj 'face))) + (transient--add-face desc face t) desc))) (cl-defmethod transient-format-description ((obj transient-group)) @@ -3573,16 +3839,19 @@ transient-format-description (funcall (oref transient--prefix suffix-description) obj)) (propertize "(BUG: no description)" 'face 'error)))) - (cond ((transient--key-unreachable-p obj) - (propertize desc 'face 'transient-unreachable)) - ((and transient-highlight-higher-levels - (> (max (oref obj level) transient--max-group-level) - transient--default-prefix-level)) - (add-face-text-property - 0 (length desc) 'transient-higher-level nil desc) - desc) - (t - desc)))) + (when (if transient--all-levels-p + (> (oref obj level) transient--default-prefix-level) + (and transient-highlight-higher-levels + (> (max (oref obj level) transient--max-group-level) + transient--default-prefix-level))) + (setq desc (transient--add-face desc 'transient-higher-level))) + (when-let ((inapt-face (and (oref obj inapt) + (transient--get-face obj 'inapt-face)))) + (setq desc (transient--add-face desc inapt-face))) + (when (and (slot-boundp obj 'key) + (transient--key-unreachable-p obj)) + (setq desc (transient--add-face desc 'transient-unreachable))) + desc)) (cl-defgeneric transient-format-value (obj) "Format OBJ's value for display and return the result.") @@ -3596,24 +3865,32 @@ transient-format-value (cl-defmethod transient-format-value ((obj transient-option)) (let ((argument (oref obj argument))) (if-let ((value (oref obj value))) - (propertize - (cl-ecase (oref obj multi-value) - ((nil) (concat argument value)) - ((t rest) (concat argument - (and (not (string-suffix-p " " argument)) " ") - (mapconcat #'prin1-to-string value " "))) - (repeat (mapconcat (lambda (v) (concat argument v)) value " "))) - 'face 'transient-value) - (propertize argument 'face 'transient-inactive-value)))) + (pcase-exhaustive (oref obj multi-value) + ('nil + (concat (propertize argument 'face 'transient-argument) + (propertize value 'face 'transient-value))) + ((or 't 'rest) + (concat (propertize (if (string-suffix-p " " argument) + argument + (concat argument " ")) + 'face 'transient-argument) + (propertize (mapconcat #'prin1-to-string value " ") + 'face 'transient-value))) + ('repeat + (mapconcat (lambda (value) + (concat (propertize argument 'face 'transient-argument) + (propertize value 'face 'transient-value))) + value " "))) + (propertize argument 'face 'transient-inactive-argument)))) (cl-defmethod transient-format-value ((obj transient-switches)) (with-slots (value argument-format choices) obj (format (propertize argument-format 'face (if value - 'transient-value - 'transient-inactive-value)) - (concat - (propertize "[" 'face 'transient-inactive-value) + 'transient-argument + 'transient-inactive-argument)) + (format + (propertize "[%s]" 'face 'transient-delimiter) (mapconcat (lambda (choice) (propertize choice 'face @@ -3621,8 +3898,30 @@ transient-format-value 'transient-value 'transient-inactive-value))) choices - (propertize "|" 'face 'transient-inactive-value)) - (propertize "]" 'face 'transient-inactive-value))))) + (propertize "|" 'face 'transient-delimiter)))))) + +(defun transient--add-face (string face &optional append beg end) + (let ((str (copy-sequence string))) + (add-face-text-property (or beg 0) (or end (length str)) face append str) + str)) + +(defun transient--get-face (obj slot) + (and-let* ((! (slot-exists-p obj slot)) + (! (slot-boundp obj slot)) + (face (slot-value obj slot))) + (if (and (not (facep face)) + (functionp face)) + (funcall face) + face))) + +(defun transient--key-face (&optional cmd enforce-type) + (or (and transient-semantic-coloring + (not transient--helpp) + (not transient--editp) + (or (and cmd (get cmd 'transient-face)) + (get (transient--get-pre-command cmd enforce-type) + 'transient-face))) + (if cmd 'transient-key 'transient-key-noop))) (defun transient--key-unreachable-p (obj) (and transient--redisplay-key @@ -3637,19 +3936,24 @@ transient--lookup-key (and val (not (integerp val)) val))) (defun transient--maybe-pad-keys (group &optional parent) - (when-let ((pad (if (slot-boundp group 'pad-keys) - (oref group pad-keys) - (and parent - (slot-boundp parent 'pad-keys) - (oref parent pad-keys))))) - (let ((width (apply #'max - (cons (if (integerp pad) pad 0) - (mapcar (lambda (suffix) - (length (oref suffix key))) - (oref group suffixes)))))) - (dolist (suffix (oref group suffixes)) - (oset suffix key - (truncate-string-to-width (oref suffix key) width nil ?\s)))))) + (when-let ((pad (or (oref group pad-keys) + (and parent (oref parent pad-keys))))) + (oset group pad-keys + (apply #'max (cons (if (integerp pad) pad 0) + (seq-keep (lambda (suffix) + (and (eieio-object-p suffix) + (slot-boundp suffix 'key) + (length (oref suffix key)))) + (oref group suffixes))))))) + +(defun transient--pixel-width (string) + (save-window-excursion + (with-temp-buffer + (insert string) + (set-window-dedicated-p nil nil) + (set-window-buffer nil (current-buffer)) + (car (window-text-pixel-size + nil (line-beginning-position) (point)))))) (defun transient-command-summary-or-name (obj) "Return the summary or name of the command represented by OBJ. @@ -3677,7 +3981,7 @@ transient-show-help (cond (show-help (funcall show-help obj)) (info-manual (transient--show-manual info-manual)) (man-page (transient--show-manpage man-page)) - (t (transient--describe-function command))))) + ((transient--describe-function command))))) (cl-defmethod transient-show-help ((obj transient-suffix)) "Call `show-help' if non-nil, else use `describe-function'. @@ -3691,9 +3995,9 @@ transient-show-help 'transient--prefix))) (and prefix (not (eq (oref transient--prefix command) this-command)) (prog1 t (transient-show-help prefix))))) - (t (if-let ((show-help (oref obj show-help))) - (funcall show-help obj) - (transient--describe-function this-command))))) + ((if-let ((show-help (oref obj show-help))) + (funcall show-help obj) + (transient--describe-function this-command))))) (cl-defmethod transient-show-help ((obj transient-infix)) "Call `show-help' if non-nil, else show the `man-page' @@ -3713,7 +4017,7 @@ transient-show-help (transient--describe-function cmd)) (defun transient--describe-function (fn) - (describe-function (if (symbolp fn) fn 'transient--anonymous-infix-argument)) + (describe-function fn) (unless (derived-mode-p 'help-mode) (when-let* ((buf (get-buffer "*Help*")) (win (or (and buf (get-buffer-window buf)) @@ -3723,21 +4027,6 @@ transient--describe-function (window-list))))) (select-window win)))) -(defun transient--anonymous-infix-argument () - "Cannot show any documentation for this anonymous infix command. - -The infix command in question was defined anonymously, i.e., -it was define when the prefix command that it belongs to was -defined, which means that it gets no docstring and also that -no symbol is bound to it. - -When you request help for an infix command, then we usually -show the respective man-page and jump to the location where -the respective argument is being described. - -Because the containing prefix command does not specify any -man-page, we cannot do that in this case. Sorry about that.") - (defun transient--show-manual (manual) (info manual)) @@ -3830,37 +4119,23 @@ transient--insert-help (propertize (format ">=%s" (1+ level)) 'face 'transient-disabled-suffix)))))) -(defvar-keymap transient-resume-mode-map - :doc "Keymap for `transient-resume-mode'. - -This keymap remaps every command that would usually just quit the -documentation buffer to `transient-resume', which additionally -resumes the suspended transient." - " " #'transient-resume - " " #'transient-resume - " " #'transient-resume) - -(define-minor-mode transient-resume-mode - "Auxiliary minor-mode used to resume a transient after viewing help.") - -(defun transient-toggle-debug () - "Toggle debugging statements for transient commands." - (interactive) - (setq transient--debug (not transient--debug)) - (message "Debugging transient %s" - (if transient--debug "enabled" "disabled"))) - ;;; Popup Navigation -(defun transient-popup-navigation-help () - "Inform the user how to enable popup navigation commands." - (interactive) - (message "This command is only available if `%s' is non-nil" - 'transient-enable-popup-navigation)) +(defun transient-scroll-up (&optional arg) + "Scroll text of transient popup window upward ARG lines. +If ARG is nil scroll near full screen. This is a wrapper +around `scroll-up-command' (which see)." + (interactive "^P") + (with-selected-window transient--window + (scroll-up-command arg))) -(define-button-type 'transient - 'face nil - 'keymap transient-button-map) +(defun transient-scroll-down (&optional arg) + "Scroll text of transient popup window down ARG lines. +If ARG is nil scroll near full screen. This is a wrapper +around `scroll-down-command' (which see)." + (interactive "^P") + (with-selected-window transient--window + (scroll-down-command arg))) (defun transient-backward-button (n) "Move to the previous button in the transient popup buffer. @@ -3876,6 +4151,10 @@ transient-forward-button (with-selected-window transient--window (forward-button n t))) +(define-button-type 'transient + 'face nil + 'keymap transient-button-map) + (defun transient--goto-button (command) (cond ((stringp command) @@ -3953,36 +4232,6 @@ transient--isearch-exit (select-window transient--original-window) (transient--resume-override)) -;;;; Hydra Color Emulation - -(defun transient--semantic-coloring-p () - (and transient-semantic-coloring - (not transient--helpp) - (not transient--editp))) - -(defun transient--suffix-color (command) - (or (get command 'transient-color) - (get (transient--get-predicate-for command) 'transient-color))) - -(defun transient--prefix-color (command) - (let* ((nonsuf (or (oref command transient-non-suffix) - 'transient--do-warn)) - (nonsuf (if (memq nonsuf '(transient--do-noop transient--do-warn)) - 'disallow - (get nonsuf 'transient-color))) - (suffix (if-let ((pred (oref command transient-suffix))) - (get pred 'transient-color) - (if (eq nonsuf 'transient-red) - 'transient-red - 'transient-blue)))) - (pcase (list suffix nonsuf) - (`(transient-purple ,_) 'transient-purple) - ('(transient-red disallow) 'transient-amaranth) - ('(transient-blue disallow) 'transient-teal) - ('(transient-red transient-red) 'transient-pink) - ('(transient-red transient-blue) 'transient-red) - ('(transient-blue transient-blue) 'transient-blue)))) - ;;;; Edebug (defun transient--edebug-command-p () @@ -4044,7 +4293,7 @@ transient-rebind-quit-commands (let ((key (oref obj key))) (cond ((string-equal key "q") "Q") ((string-equal key "Q") "M-q") - (t key)))) + (key)))) (defun transient--force-fixed-pitch () (require 'face-remap) @@ -4079,8 +4328,7 @@ transient-font-lock-keywords (regexp-opt (list "transient-define-prefix" "transient-define-infix" "transient-define-argument" - "transient-define-suffix" - "transient-define-groups") + "transient-define-suffix") t) "\\_>[ \t'(]*" "\\(\\(?:\\sw\\|\\s_\\)+\\)?") commit 71c5f3694fd11caee14e61de1f75306825ade96d Author: Eli Zaretskii Date: Tue Dec 5 19:12:00 2023 +0200 ; Another fix of doc string of 'message-mail-user-agent' (bug#67638). diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 646d4427941..615d24cbc2e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1878,12 +1878,13 @@ message-hierarchical-addresses :type '(repeat (repeat string))) (defcustom message-mail-user-agent nil - "Your preferred mail composition package when reading email with message.el. -Like `mail-user-agent' (which see), this specifies the mail-sending -package you prefer. -The value can be any value accepted by `mail-user-agent', and in -addition it can be nil or t. If the value is nil, use the Gnus native -Mail User Agent (MUA); if it is t, use the value of `mail-user-agent'." + "Your preferred package for composing and sending email when using message.el. +Like `mail-user-agent' (which see), this specifies the package you prefer +to use for composing and sending email messages. +The value can be anything accepted by `mail-user-agent', and in addition +it can be nil or t. If the value is nil, use the Gnus native Mail User +Agent (MUA); if it is t, use the value of `mail-user-agent'. +For more about mail user agents, see Info node `(emacs)Mail Methods'" :version "22.1" :type '(radio (const :tag "Gnus native" :format "%t\n" commit 04a39353bae83ddca8312d2dbdf6f47c4fa02b48 Author: Eli Zaretskii Date: Tue Dec 5 16:29:41 2023 +0200 ; * lisp/gnus/message.el (message-mail-user-agent): Doc fix (bug#67638). diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index ff33133a9a1..646d4427941 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1878,9 +1878,12 @@ message-hierarchical-addresses :type '(repeat (repeat string))) (defcustom message-mail-user-agent nil - "Like `mail-user-agent'. -Except if it is nil, use Gnus native MUA; if it is t, use -`mail-user-agent'." + "Your preferred mail composition package when reading email with message.el. +Like `mail-user-agent' (which see), this specifies the mail-sending +package you prefer. +The value can be any value accepted by `mail-user-agent', and in +addition it can be nil or t. If the value is nil, use the Gnus native +Mail User Agent (MUA); if it is t, use the value of `mail-user-agent'." :version "22.1" :type '(radio (const :tag "Gnus native" :format "%t\n" commit 19a3b499f84b70019f0316c85c19a6a808516d80 Author: Po Lu Date: Tue Dec 5 18:37:11 2023 +0800 ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded. diff --git a/lisp/loadup.el b/lisp/loadup.el index 3b58d5fb9b7..d447523dc42 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -393,14 +393,18 @@ ;; from the repository. It is generated just after temacs is built. (load "leim/leim-list.el" t) -;; Actively disallow advised functions during preload since: -;; - advices in Emacs's core are generally considered bad style; -;; - `Snarf-documentation' looses docstrings of primitives advised -;; during preload (bug#66032#20). -(mapatoms - (lambda (f) - (and (advice--p (symbol-function f)) - (error "Preload advice on %s" f)))) +(unless (featurep 'ls-lisp) + ;; Actively disallow advised functions during preload since: + ;; - advices in Emacs's core are generally considered bad style; + ;; - `Snarf-documentation' looses docstrings of primitives advised + ;; during preload (bug#66032#20). + ;; + ;; Don't verify this under MS-Windows and Android, both systems that + ;; load ls-lisp, which advises insert-directory. + (mapatoms + (lambda (f) + (and (advice--p (symbol-function f)) + (error "Advice installed on preloaded function %s" f))))) ;; If you want additional libraries to be preloaded and their ;; doc strings kept in the DOC file rather than in core, commit 82ddcf37ec6fa09887114648d493df9ee81ceaf7 Author: Eli Zaretskii Date: Mon Dec 4 19:13:50 2023 +0200 ; * doc/lispref/files.texi (Changing Files): Fix last change. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 69f8ebbfab7..13fe8d97182 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1865,10 +1865,10 @@ Changing Files @var{filename} is a symbolic link, @code{delete-file} deletes only the symbolic link and not its target. -A suitable kind of @code{file-error} error is signaled is not -deletable. (On GNU and other POSIX-like systems, a file is deletable -if its directory is writable.) No error is signaled if the file does -not exist. +The command signals a suitable kind of @code{file-error} error if +@var{filename} cannot be deleted. (On GNU and other POSIX-like +systems, a file can be deleted if its directory is writable.) If the +file does not exist, this command will not signal any error. If the optional argument @var{trash} is non-@code{nil} and the variable @code{delete-by-moving-to-trash} is non-@code{nil}, this commit 89068516b3e1c5c77ea843d8a5bec52274c0fbe5 Author: Philipp Stephani Date: Mon Dec 4 14:17:31 2023 +0100 Don't claim to signal an error when deleting a nonexisting file. The behavior has changed in commit 1a65afb7ecc2a52127d6164bad19313440237f9d to no longer signal an error on ENOENT. * doc/lispref/files.texi (Changing Files): Fix documentation about error reporting. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 6a8bd69b102..69f8ebbfab7 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1865,9 +1865,10 @@ Changing Files @var{filename} is a symbolic link, @code{delete-file} deletes only the symbolic link and not its target. -A suitable kind of @code{file-error} error is signaled if the file -does not exist, or is not deletable. (On GNU and other POSIX-like -systems, a file is deletable if its directory is writable.) +A suitable kind of @code{file-error} error is signaled is not +deletable. (On GNU and other POSIX-like systems, a file is deletable +if its directory is writable.) No error is signaled if the file does +not exist. If the optional argument @var{trash} is non-@code{nil} and the variable @code{delete-by-moving-to-trash} is non-@code{nil}, this commit 4fd254e183033ce4a6739ee010322e7dc2c924a7 Author: Eli Zaretskii Date: Mon Dec 4 14:22:32 2023 +0200 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67620). diff --git a/lisp/indent.el b/lisp/indent.el index f64049d64b2..784a1e57fb4 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -265,7 +265,7 @@ indent-rigidly (interactive "r\nP\np") (if (and (not arg) interactive) (set-transient-map indent-rigidly-map t #'deactivate-mark - "Indent region with %k") + "Type %k to indent region interactively") (save-excursion (goto-char end) (setq end (point-marker)) commit 5f923ff1a6a8a9ff6f06dc49c8e0e2ceee111567 Author: Stefan Kangas Date: Sun Dec 3 23:31:30 2023 +0100 ; Fix typos diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index d6627a2a1ca..eb8ff413b79 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -14630,7 +14630,7 @@ count-words-in-defun @need 800 @noindent -Let's re-use @kbd{C-c =} as a convenient key binding: +Let's reuse @kbd{C-c =} as a convenient key binding: @smallexample (global-set-key "\C-c=" 'count-words-defun) diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index be924b5655a..c0d5905102d 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -491,7 +491,7 @@ Creating Keymaps defined, but which should have the @code{repeat-map} property. If the @code{:exit} list is empty then no commands in the map exit -@code{repeat-mode}. Specifying one ore more commands in this list is +@code{repeat-mode}. Specifying one or more commands in this list is useful if the keymap being defined contains a command that should not have the @code{repeat-map} property. @end table diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index de014bf0344..33d1f4160ff 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -11953,7 +11953,7 @@ Trail Commands @cindex Retrieving previous results The @kbd{t y} (@code{calc-trail-yank}) command reads the selected value in the trail and pushes it onto the Calculator stack. It allows you to -re-use any previously computed value without retyping. With a numeric +reuse any previously computed value without retyping. With a numeric prefix argument @var{n}, it yanks the value @var{n} lines above the current trail pointer. diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index e1074bf9f0e..f7543193f18 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -1210,7 +1210,7 @@ User-specific configuration @end lisp Note that the global value of @code{eglot-workspace-configuration} is -always overriden if a directory-local value is detected. +always overridden if a directory-local value is detected. @node JSONRPC objects in Elisp @section JSONRPC objects in Elisp diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 917fd588593..3d00bc111c0 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -456,9 +456,9 @@ Encrypting/decrypting gpg files but it will prompt for your passphrase for file reads every now and then, depending on the GnuPG Agent cache configuration. -@cindex tempory files created by easypg assistant +@cindex temporary files created by easypg assistant To encrypt and decrypt files as described above EasyPG Assistant under -certain circumstances uses intermediate tempory files that contain the +certain circumstances uses intermediate temporary files that contain the plain-text contents of the files it processes. EasyPG Assistant creates them below the directory returned by function @code{temporary-file-directory} (@pxref{Unique File Names, , diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 8cfa22df923..db7655e692c 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -4015,7 +4015,7 @@ height of the mode lines, but also remove their border: #+end_src The above relies on the ~set-face-attribute~ function, though users who -plan to re-use colors from the theme and do so at scale are better off +plan to reuse colors from the theme and do so at scale are better off with the more streamlined combination of the ~modus-themes-with-colors~ macro and ~custom-set-faces~. @@ -4023,7 +4023,7 @@ macro and ~custom-set-faces~. As explained before in this document, this approach has a syntax that is consistent with the source code of the themes, so it probably is easier -to re-use parts of the design. +to reuse parts of the design. The following emulates the stock Emacs style, while still using the colors of the Modus themes (whichever attribute is not explicitly stated @@ -5076,7 +5076,7 @@ advanced customization options of the themes. [[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]]. In the following example, we are assuming that the user wants to (i) -re-use color variables provided by the themes, (ii) be able to retain +reuse color variables provided by the themes, (ii) be able to retain their tweaks while switching between ~modus-operandi~ and ~modus-vivendi~, and (iii) have the option to highlight either the foreground of the parentheses or the background as well. @@ -5096,7 +5096,7 @@ Then we can update our preference with this: (setq my-highlight-parentheses-use-background nil) #+end_src -To re-use colors from the themes, we must wrap our code in the +To reuse colors from the themes, we must wrap our code in the ~modus-themes-with-colors~ macro. Our implementation must interface with the variables ~highlight-parentheses-background-colors~ and/or ~highlight-parentheses-colors~. @@ -5770,7 +5770,7 @@ more effective than trying to do the same with either red or blue (the latter is the least effective in that regard). When we need to work with several colors, it is always better to have -sufficient manoeuvring space, especially since we cannot pick arbitrary +sufficient maneuvering space, especially since we cannot pick arbitrary colors but only those that satisfy the accessibility objectives of the themes. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index a4583a6074e..b604062c6c1 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3619,7 +3619,7 @@ Ad-hoc multi-hops Each involved method must be an inline method (@pxref{Inline methods}). @value{tramp} adds the ad-hoc definitions on the fly to -@code{tramp-default-proxies-alist} and is available for re-use during +@code{tramp-default-proxies-alist} and is available for reuse during that Emacs session. Subsequent @value{tramp} connections to the same remote host can then use the shortcut form: @samp{@trampfn{ssh,you@@remotehost,/path}}. diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index eb411f29c5c..e8b41315000 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -1703,7 +1703,7 @@ editable-field @item :prompt-value A function that uses the @code{:prompt-internal} function and the -@code{:prompt-history} value to prompt for a string, and retun the +@code{:prompt-history} value to prompt for a string, and return the user response in the external format. @item :action @@ -1714,7 +1714,7 @@ editable-field @code{:size} and @code{:value}. @item :value-set -Function to use to modify programatically the current value of the +Function to use to modify programmatically the current value of the widget. @item :value-delete @@ -2455,7 +2455,7 @@ constants user to see the variable or function documentation for the symbol. This is accomplished via using the @samp{%h} format escape, and adding -an appropiate @code{:documentation-property} function for each widget. +an appropriate @code{:documentation-property} function for each widget. @deffn Widget variable-item An immutable symbol that is bound as a variable. diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index 9672a86345b..fb72b0834ac 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -1195,7 +1195,7 @@ Only the macros in cl-macs.el are used. ** Make flood protection toggle-able as on/off, removing the 'strict option. -** If possible, re-use channel buffers when reconnecting to a server. +** If possible, reuse channel buffers when reconnecting to a server. ** Text in ERC buffers is now read-only by default. To get the previous behavior, diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 5f92c056018..1e87f10748f 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -1098,7 +1098,7 @@ Conversion to SVG exposes a number of additional customizations that give the user full control over the contents of the latex source block. ~org-babel-latex-preamble~, ~org-babel-latex-begin-env~ and ~org-babel-latex-end-env~ are new customization options added to allow -the user to specify the preamble and code that preceedes and proceeds +the user to specify the preamble and code that precedes and proceeds the contents of the source block. *** New option ~org-html-meta-tags~ allows for HTML meta tags customization diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 71cade6343c..f290b86cb8a 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1994,7 +1994,7 @@ remote X server, try this: *** Dropping text on xterm doesn't work. -Emacs sends sythetic button events to legacy clients such as xterm +Emacs sends synthetic button events to legacy clients such as xterm that do not support either the XDND or Motif drag-and-drop protocols in order to "paste" the text that was dropped. Unfortunately, xterm is configured to ignore these events by default. Add the following to diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 6f84b83ab75..b6ad9b598df 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -1046,7 +1046,7 @@ semantic-collector-calculate-completions (and last-prefix (string-prefix-p last-prefix prefix t))) ;; We have the same prefix, or last-prefix is a ;; substring of the of new prefix, in which case we are - ;; refining our symbol so just re-use cache. + ;; refining our symbol so just reuse cache. (oref obj last-all-completions)) ((and last-prefix (> (length prefix) 1) diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el index 4eb7632b721..7e74746f1da 100644 --- a/lisp/cedet/srecode/extract.el +++ b/lisp/cedet/srecode/extract.el @@ -33,7 +33,7 @@ ;; or deep template calls can be extracted. ;; ;; This code was specifically written for srecode-document, which -;; wants to extract user written text, and re-use it in a reformatted +;; wants to extract user written text, and reuse it in a reformatted ;; comment. (require 'srecode) diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 6bd416c5690..30509298ddc 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el @@ -420,7 +420,7 @@ semantic-get-local-variables (when (string= (car (car subdicts)) name) (setq res (cdr (car subdicts)))) (setq subdicts (cdr subdicts))) - ;; Pre-pend our global vars. + ;; Prepend our global vars. (append global res)) ;; If we aren't in a subsection, just do the global variables global diff --git a/lisp/desktop.el b/lisp/desktop.el index d6d3e609b21..9894b73bd6a 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -293,7 +293,7 @@ desktop-no-desktop-file-hook :version "22.1") (defcustom desktop-not-loaded-hook nil - "Normal hook run when the user declines to re-use a desktop file. + "Normal hook run when the user declines to reuse a desktop file. Run in the directory in which the desktop file was found. May be used to deal with accidental multiple Emacs jobs." :type 'hook diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 787232067a1..4653e1f991c 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -690,7 +690,7 @@ comp-cstr-intersection-homogeneous (cl-loop for val in (valset src) ;; If (member value) is subtypep of all other sources then - ;; is good to be colleted. + ;; is good to be collected. when (cl-every (lambda (s) (or (memql val (valset s)) (cl-some (lambda (type) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b5355acf7cc..586a4df3890 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4322,7 +4322,7 @@ comp-write-bytecode-file Make sure that eln file is younger than byte-compiled one and return the filename of this last. -This function can be used only in conjuntion with +This function can be used only in conjunction with `byte+native-compile' `byte-to-native-output-buffer-file' (see `batch-byte+native-compile')." (pcase byte-to-native-output-buffer-file diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 5d001307125..74c59953db6 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -98,7 +98,7 @@ ert-batch-backtrace-line-length produce extremely long lines in backtraces and lengthy delays in forming them. This variable governs the target maximum line length by manipulating these two variables while printing stack -traces. Setting this variable to t will re-use the value of +traces. Setting this variable to t will reuse the value of `backtrace-line-length' while printing stack traces in ERT batch mode. Any other value will be temporarily bound to `backtrace-line-length' when producing stack traces in batch diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 17d58b1e3c6..0bd1cc8b2e0 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -93,7 +93,7 @@ backward-sexp (defun mark-sexp (&optional arg allow-extend) "Set mark ARG sexps from point or move mark one sexp. -When called from Lisp with ALLOW-EXTEND ommitted or nil, mark is +When called from Lisp with ALLOW-EXTEND omitted or nil, mark is set ARG sexps from point. With ARG and ALLOW-EXTEND both non-nil (interactively, with prefix argument), the place to which mark goes is the same place \\[forward-sexp] diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 2a5f14b3ee3..c6625bf0ff8 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -29,7 +29,7 @@ ;; To install a package from source use `package-vc-install'. If you ;; aren't interested in activating a package, you can use ;; `package-vc-checkout' instead, which will prompt you for a target -;; directory. If you wish to re-use an existing checkout, the command +;; directory. If you wish to reuse an existing checkout, the command ;; `package-vc-install-from-checkout' will create a symbolic link and ;; prepare the package. ;; diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 2e6959cc3f0..270cd1bdd4c 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -168,7 +168,7 @@ erc-prompt-for-nickserv-password :type 'boolean) (defcustom erc-use-auth-source-for-nickserv-password nil - "Query auth-source for a password when identifiying to NickServ. + "Query auth-source for a password when identifying to NickServ. Passwords from `erc-nickserv-passwords' take precedence. See function `erc-nickserv-get-password'." :version "28.1" diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 27c71fa6c6a..13265586e5f 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1444,7 +1444,7 @@ gnus-search-indexed-parse-output (when (and f-name (file-readable-p f-name) (null (file-directory-p f-name))) - ;; `expand-file-name' canoncalizes the file name, + ;; `expand-file-name' canonicalizes the file name, ;; specifically collapsing multiple consecutive directory ;; separators. (setq f-name (expand-file-name f-name) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index c7a75105c08..95d2d52c342 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -1023,7 +1023,7 @@ nndiary-save-nov (defun nndiary-generate-nov-databases (&optional server) "Generate NOV databases in all nndiary directories." (interactive (list (or (nnoo-current-server 'nndiary) ""))) - ;; Read the active file to make sure we don't re-use articles + ;; Read the active file to make sure we don't reuse articles ;; numbers in empty groups. (nnmail-activate 'nndiary) (unless (nndiary-server-opened server) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index d969716f020..44962c61b4b 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -830,7 +830,7 @@ nnml-save-nov (defun nnml-generate-nov-databases (&optional server) "Generate NOV databases in all nnml directories." (interactive (list (or (nnoo-current-server 'nnml) ""))) - ;; Read the active file to make sure we don't re-use articles + ;; Read the active file to make sure we don't reuse articles ;; numbers in empty groups. (nnmail-activate 'nnml) (unless (nnml-server-opened server) diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el index be0364b1c23..6334b63334c 100644 --- a/lisp/language/hanja-util.el +++ b/lisp/language/hanja-util.el @@ -6437,7 +6437,7 @@ hanja-init-load (message ""))) ;; List of current conversion status. -;; The first element is the strating position of shown list. +;; The first element is the starting position of shown list. ;; It is a group number each split by `hanja-list-width'. ;; The second element is the position of selected element. ;; The third element is a list of suitable Hanja candidate. diff --git a/lisp/loadup.el b/lisp/loadup.el index 1cc70348267..8f884108d9a 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -479,7 +479,7 @@ (defvar comp-subr-arities-h) (when (featurep 'native-compile) ;; Save the arity for all primitives so the compiler can always - ;; retrive it even in case of redefinition. + ;; retrieve it even in case of redefinition. (mapatoms (lambda (f) (when (subr-primitive-p (symbol-function f)) (puthash f (func-arity f) comp-subr-arities-h)))) diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index d0c0efec53b..465526c59cd 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -454,7 +454,7 @@ rmail-output-to-rmail-buffer (narrow-to-region (point-max) (point-max))) (insert-buffer-substring tembuf) (rmail-count-new-messages t) - ;; FIXME should re-use existing windows. + ;; FIXME should reuse existing windows. (if (rmail-summary-exists) (rmail-select-summary (rmail-update-summary))) (rmail-show-message-1 msg))) diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 39988ba6cfb..3b2714f3cc4 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -1466,7 +1466,7 @@ newsticker--treeview-get-first-child nil))) (defun newsticker--treeview-get-second-child (node) - "Get scond child of NODE." + "Get second child of NODE." (let ((children (widget-get node :children))) (if children (car (cdr children)) diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 4866f788bff..733b235bedf 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -171,7 +171,7 @@ sieve-manage--append-to-log "Append ARGS to `sieve-manage-log' buffer. ARGS can be a string or a list of strings. -The buffer to use for logging is specifified via `sieve-manage-log'. +The buffer to use for logging is specified via `sieve-manage-log'. If it is nil, logging is disabled. When the `sieve-manage-log' buffer doesn't exist, it gets created (and diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 73974f864b3..badf24c74d9 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -1953,7 +1953,7 @@ soap-decode-xs-complex-type (xml-get-children node (intern e-name))) ;; e-name is nil so a) we don't know which ;; children to operate on, and b) we want to - ;; re-use soap-decode-xs-complex-type, which + ;; reuse soap-decode-xs-complex-type, which ;; expects a node argument with a complex ;; type; therefore we need to operate on the ;; entire node. We wrap node in a list so diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index aa1d025bf19..cf113b117ed 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2498,7 +2498,7 @@ tramp-do-copy-or-rename-file-out-of-band copy-program copy-args))) (tramp-message v 6 "%s" (string-join (process-command p) " ")) (process-put p 'tramp-vector v) - ;; This is neded for ssh or PuTTY based processes, and + ;; This is needed for ssh or PuTTY based processes, and ;; only if the respective options are set. Perhaps, ;; the setting could be more fine-grained. ;; (process-put p 'tramp-shared-socket t) @@ -3840,7 +3840,7 @@ tramp-sh-handle-file-notify-add-watch (string-join sequence " ")) (tramp-message v 6 "Run `%s', %S" (string-join sequence " ") p) (process-put p 'tramp-vector v) - ;; This is neded for ssh or PuTTY based processes, and only if + ;; This is needed for ssh or PuTTY based processes, and only if ;; the respective options are set. Perhaps, the setting could ;; be more fine-grained. ;; (process-put p 'tramp-shared-socket t) @@ -5224,7 +5224,7 @@ tramp-maybe-open-connection ;; Set sentinel and query flag. Initialize variables. (set-process-sentinel p #'tramp-process-sentinel) (process-put p 'tramp-vector vec) - ;; This is neded for ssh or PuTTY based processes, and + ;; This is needed for ssh or PuTTY based processes, and ;; only if the respective options are set. Perhaps, ;; the setting could be more fine-grained. ;; (process-put p 'tramp-shared-socket t) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5e8d6bbcd08..70f8a45bdcc 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5083,7 +5083,7 @@ tramp-handle-make-process (when filter (set-process-filter p filter)) (process-put p 'tramp-vector v) - ;; This is neded for ssh or PuTTY based processes, and + ;; This is needed for ssh or PuTTY based processes, and ;; only if the respective options are set. Perhaps, the ;; setting could be more fine-grained. ;; (process-put p 'tramp-shared-socket t) diff --git a/lisp/org/oc-biblatex.el b/lisp/org/oc-biblatex.el index b2d31f0f635..0ed5459a66d 100644 --- a/lisp/org/oc-biblatex.el +++ b/lisp/org/oc-biblatex.el @@ -26,7 +26,7 @@ ;; The processor relies on "biblatex" LaTeX package. As such it ensures that ;; the package is properly required in the document's preamble. More -;; accurately, it will re-use any "\usepackage{biblatex}" already present in +;; accurately, it will reuse any "\usepackage{biblatex}" already present in ;; the document (e.g., through `org-latex-packages-alist'), or insert one using ;; options defined in `org-cite-biblatex-options'. diff --git a/lisp/org/oc.el b/lisp/org/oc.el index 8a7b662098a..269f7fd13a1 100644 --- a/lisp/org/oc.el +++ b/lisp/org/oc.el @@ -52,7 +52,7 @@ ;; through the "cite_export" keyword. ;; Eventually, this library provides some tools, mainly targeted at -;; processor implementors. Most are export-specific and are located +;; processor implementers. Most are export-specific and are located ;; in the "Tools only available during export" and "Tools generating ;; or operating on parsed data" sections. diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index a696c615b2a..41872ff87ef 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1312,7 +1312,7 @@ org-capture-place-item (while (< (point) end) (indent-to i) (forward-line))) - ;; Pre-pending an item could change the type of the list + ;; Prepending an item could change the type of the list ;; if there is a mismatch. In this situation, ;; prioritize the existing list. (when prepend? diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index d5bf2191ae7..db5e9283bf5 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -141,7 +141,7 @@ org-file-has-changed-p--hash-table Elements in COMPONENTS must be a string or nil. DIRECTORY or the non-final elements in COMPONENTS may or may not end with a slash -- if they don't end with a slash, a slash will be -inserted before contatenating." +inserted before concatenating." (save-match-data (mapconcat #'identity diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 0debd1a6818..e6bff9120c4 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -5484,7 +5484,7 @@ org-element--cache-non-modifying-commands to slow down the command. If the commands end up modifying the cache, the worst case scenario is -performance drop. So, advicing these commands is safe. Yet, it is +performance drop. So, advising these commands is safe. Yet, it is better to remove the commands advised in such a way from this list.") (defmacro org-element--request-key (request) diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el index 01078f4596d..dc9fe3a7103 100644 --- a/lisp/org/org-persist.el +++ b/lisp/org/org-persist.el @@ -111,7 +111,7 @@ ;; ;; Each collection is represented as a plist containing the following ;; properties: -;; - `:container' : list of data continers to be stored in single +;; - `:container' : list of data containers to be stored in single ;; file; ;; - `:persist-file': data file name; ;; - `:associated' : list of associated objects; @@ -253,7 +253,7 @@ org-persist--index persistent data storage. Each plist contains the following properties: - - `:container' : list of data continers to be stored in single file + - `:container' : list of data containers to be stored in single file - `:persist-file': data file name - `:associated' : list of associated objects - `:last-access' : last date when the container has been read diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index fd10ccf576f..eb4da2c3a72 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -4894,7 +4894,7 @@ org-table-analyze (push (cons field v) org-table-local-parameters) (push (list field line col) org-table-named-field-locations)))))))))) - ;; Re-use existing markers when possible. + ;; Reuse existing markers when possible. (if (markerp org-table-current-begin-pos) (move-marker org-table-current-begin-pos (point)) (setq org-table-current-begin-pos (point-marker))) diff --git a/lisp/org/org.el b/lisp/org/org.el index 863a9e093f5..2f4cfe16866 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -1230,7 +1230,7 @@ org-indirect-buffer-display Valid values are: current-window Display in the current window other-window Just display in another window. -dedicated-frame Create one new frame, and re-use it each time. +dedicated-frame Create one new frame, and reuse it each time. new-frame Make a new frame each time. Note that in this case previously-made indirect buffers are kept, and you need to kill these buffers yourself." @@ -4582,7 +4582,7 @@ org-file-contents file) nil)) (error (if noerror - (message "Org could't download \"%s\": %s %S" file (car error) (cdr error)) + (message "Org couldn't download \"%s\": %s %S" file (car error) (cdr error)) (signal (car error) (cdr error))))) (funcall (if noerror #'message #'user-error) "The remote resource %S is considered unsafe, and will not be downloaded." diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 3b0814970ad..eba13934ede 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -116,7 +116,7 @@ c-ts-common--comment-regexp "Regexp pattern that matches a comment in C-like languages.") (defun c-ts-common--fill-paragraph (&optional arg) - "Fillling function for `c-ts-common'. + "Filling function for `c-ts-common'. ARG is passed to `fill-paragraph'." (interactive "*P") (save-restriction @@ -134,7 +134,7 @@ c-ts-common--fill-paragraph t))) (defun c-ts-common--fill-block-comment (&optional arg) - "Fillling function for block comments. + "Filling function for block comments. ARG is passed to `fill-paragraph'. Assume point is in a block comment." (let* ((node (treesit-node-at (point))) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 31a9d0fc886..21fb0ca9e53 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1321,7 +1321,7 @@ c-ts-mode-menu c-ts-mode-indent-style) :help "Show the name of the C/C++ indentation style for current buffer"] ["Set Comment Style" c-ts-mode-toggle-comment-style - :help "Toglle C/C++ comment style between block and line comments"]) + :help "Toggle C/C++ comment style between block and line comments"]) "--" ("Toggle..." ["SubWord Mode" subword-mode diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ccf64fb670b..b09a308c70a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1786,7 +1786,7 @@ compile ;; run compile with the default command line (defun recompile (&optional edit-command) "Re-compile the program including the current buffer. -If this is run in a Compilation mode buffer, re-use the arguments from the +If this is run in a Compilation mode buffer, reuse the arguments from the original use. Otherwise, recompile using `compile-command'. If the optional argument `edit-command' is non-nil, the command can be edited." (interactive "P") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 412283f3488..f67518185bd 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1329,7 +1329,7 @@ cperl--imenu-entries-rx (defun cperl-block-declaration-p () "Test whether the following ?\\{ opens a declaration block. -Returns the column where the declarating keyword is found, or nil +Returns the column where the declaring keyword is found, or nil if this isn't a declaration block. Declaration blocks are named subroutines, packages and the like. They start with a keyword and a name, to be followed by various descriptive items which are diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 9137119d052..c5d4df2ccfc 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -465,7 +465,7 @@ perl-syntax-propertize-special-constructs (scan-error (goto-char startpos) nil)) (not (or (nth 8 (parse-partial-sexp ;; Since we don't know if point is within - ;; the first or the scond arg, we have to + ;; the first or the second arg, we have to ;; start from the beginning. (if twoargs (1+ (nth 8 state)) (point)) limit nil nil state 'syntax-table)) @@ -511,7 +511,7 @@ perl-syntax-propertize-special-constructs (string-to-syntax "|e") (string-to-syntax "\"e"))) (forward-char 1) - ;; Re-use perl-syntax-propertize-special-constructs to handle the + ;; Reuse perl-syntax-propertize-special-constructs to handle the ;; second part (the first delimiter of second part can't be ;; preceded by "s" or "tr" or "y", so it will not be considered ;; as twoarg). diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index 5b432c8098c..c146b80542e 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -601,7 +601,7 @@ ruby-ts--indent-rules ;; case expression: when, in_clause, and else are all ;; children of case. when and in_clause have pattern and - ;; body as fields. body has "then" and then the statemets. + ;; body as fields. body has "then" and then the statements. ;; i.e. the statements are not children of when but then. ;; But for the statements are children of else. ((match "when" "case") diff --git a/lisp/ses.el b/lisp/ses.el index 30bf33e47bf..23018403cda 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2245,7 +2245,7 @@ ses-create-header-string ;; Redisplay and recalculation ;;---------------------------------------------------------------------------- (defun ses-jump-prefix (prefix-int) - "Convert an integer (unversal prefix) into a (ROW . COL). + "Convert an integer (universal prefix) into a (ROW . COL). Does it by numbering cells starting from 0 from top left to bottom right, going row by row." (and (>= prefix-int 0) diff --git a/lisp/simple.el b/lisp/simple.el index 9ef348f74dc..6453dfbcd2b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8705,7 +8705,7 @@ backward-word (defun mark-word (&optional arg allow-extend) "Set mark ARG words from point or move mark one word. -When called from Lisp with ALLOW-EXTEND ommitted or nil, mark is +When called from Lisp with ALLOW-EXTEND omitted or nil, mark is set ARG words from point. With ARG and ALLOW-EXTEND both non-nil (interactively, with prefix argument), the place to which mark goes is the same place \\[forward-word] diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index c2112b76ad3..e7b6776de33 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -714,7 +714,7 @@ vc-rcs-annotate-command (insert insn) (delete-char insn))) ;; Now apply the forward-chronological edits (directly from the - ;; parse-tree) for the branch(es), if necessary. We re-use vars + ;; parse-tree) for the branch(es), if necessary. We reuse vars ;; `pre' and `meta' for the sake of internal func `r/d/a'. (while nbls (setq pre (cdr (pop nbls))) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1dadceda8c4..c9a26250f1a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -668,7 +668,7 @@ ;;;; New Primitives: ;; ;; - uncommit: undo last checkin, leave changes in place in the workfile, -;; stash the commit comment for re-use. +;; stash the commit comment for reuse. ;; ;; - deal with push operations. ;; diff --git a/src/conf_post.h b/src/conf_post.h index 0d5f90a6910..1a8c35720f2 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -96,7 +96,7 @@ Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2023 Free Software #ifdef emacs /* We include stdlib.h here, because Gnulib's stdlib.h might redirect 'free' to its replacement, and we want to avoid that in unexec - builds. Inclduing it here will render its inclusion after config.h + builds. Including it here will render its inclusion after config.h a no-op. */ # if (defined DARWIN_OS && defined HAVE_UNEXEC) || defined HYBRID_MALLOC # include diff --git a/src/fileio.c b/src/fileio.c index 4d5365bff9a..4d3aea3554e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -758,7 +758,7 @@ DEFUN ("file-name-concat", Ffile_name_concat, Sfile_name_concat, 1, MANY, 0, Elements in COMPONENTS must be a string or nil. DIRECTORY or the non-final elements in COMPONENTS may or may not end with a slash -- if they don't end with a slash, a slash will be -inserted before contatenating. +inserted before concatenating. usage: (record DIRECTORY &rest COMPONENTS) */) (ptrdiff_t nargs, Lisp_Object *args) { diff --git a/src/image.c b/src/image.c index c717ac88dca..e557f97377d 100644 --- a/src/image.c +++ b/src/image.c @@ -11424,7 +11424,7 @@ svg_load_image (struct frame *f, struct image *img, char *contents, } #if HAVE_NTGUI - /* Windows stores the image colours in BGR format, and SVG expects + /* Windows stores the image colors in BGR format, and SVG expects them in RGB. */ foreground = (foreground & 0x0000FF) << 16 | (foreground & 0xFF0000) >> 16 diff --git a/src/itree.c b/src/itree.c index b8db08bc74c..6e80c330c94 100644 --- a/src/itree.c +++ b/src/itree.c @@ -74,7 +74,7 @@ Copyright (C) 2017-2023 Free Software Foundation, Inc. Consider the case where next-overlay-change is called at POS, all interval BEG positions are less than pos POS and all interval END - posistions are after. These END positions have no order, and so + positions are after. These END positions have no order, and so *every* interval must be examined. This is at least O(N). The previous-overlay-change case is similar. The root issue is that the iterative "narrowing" approach is not guaranteed to reduce the diff --git a/src/tparam.c b/src/tparam.c index 1a5eab37452..d1db99e7417 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -184,7 +184,7 @@ tparam1 (const char *string, char *outstring, int len, argp++; break; - case 'b': /* %b means back up one arg (and re-use it). */ + case 'b': /* %b means back up one arg (and reuse it). */ argp--; break; diff --git a/src/window.c b/src/window.c index 1dc977626b3..a5d88e2ad87 100644 --- a/src/window.c +++ b/src/window.c @@ -526,7 +526,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, /* Do not select a tooltip window (Bug#47207). */ error ("Cannot select a tooltip window"); - /* We deinitely want to select WINDOW, not the mini-window. */ + /* We definitely want to select WINDOW, not the mini-window. */ f->select_mini_window_flag = false; /* Make the selected window's buffer current. */ diff --git a/src/xfont.c b/src/xfont.c index ce32c7a2188..fdadb05500a 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -238,7 +238,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont, static Lisp_Object xfont_scripts_cache; -/* Re-usable vector to store characteristic font properties. */ +/* Reusable vector to store characteristic font properties. */ static Lisp_Object xfont_scratch_props; /* Return a list of scripts supported by the font of FONTNAME whose diff --git a/src/xterm.c b/src/xterm.c index 6f335ea11da..2dd86e77631 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12229,7 +12229,7 @@ x_dnd_process_quit (struct frame *f, Time timestamp) /* This function is defined far away from the rest of the XDND code so it can utilize `x_any_window_to_frame'. */ -/* Implementors beware! On most other platforms (where drag-and-drop +/* Implementers beware! On most other platforms (where drag-and-drop data is not provided via selections, but some kind of serialization mechanism), it is usually much easier to implement a suitable primitive instead of copying the C code here, and then to build diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el index 4dc099a18af..c973955e4ce 100644 --- a/test/lisp/international/mule-tests.el +++ b/test/lisp/international/mule-tests.el @@ -49,7 +49,7 @@ mule-cmds--test-universal-coding-system-argument (kbd "C-x RET c u t f - 8 RET C-u C-u c a b RET") (read-string "prompt:")))))) -;;Bug#65997, ensure that old-names haven't overriden new names. +;;Bug#65997, ensure that old-names haven't overridden new names. (ert-deftest mule-cmds-tests--ucs-names-old-name-override () (let (code-points) (dotimes (u (1+ (max-char 'ucs))) diff --git a/test/lisp/progmodes/perl-mode-tests.el b/test/lisp/progmodes/perl-mode-tests.el index 3757ac25547..3b22c5d8750 100644 --- a/test/lisp/progmodes/perl-mode-tests.el +++ b/test/lisp/progmodes/perl-mode-tests.el @@ -28,7 +28,7 @@ perl-test-lock (font-lock-ensure (point-min) (point-max)) (should (equal (get-text-property 4 'face) 'font-lock-variable-name-face)))) -;;;; Re-use cperl-mode tests +;;;; Reuse cperl-mode tests (defvar cperl-test-mode) (setq cperl-test-mode #'perl-mode) commit a1f88963f5d185551af143c0faa7854519706858 Author: Christophe Troestler Date: Sat Dec 2 21:51:15 2023 +0100 rust-ts-mode--comment-docstring: Handle block doc comments * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--comment-docstring): Handle block doc comments. Inhibit match-data modification. diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 18951a10c55..8127aa956f4 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -292,7 +292,7 @@ rust-ts-mode--comment-docstring (let* ((beg (treesit-node-start node)) (face (save-excursion (goto-char beg) - (if (looking-at "//\\(?:/\\|!\\)") + (if (looking-at "/\\(?:/\\(?:/[^/]\\|!\\)\\|*\\(?:*[^*/]\\|!\\)\\)" t) 'font-lock-doc-face 'font-lock-comment-face)))) (treesit-fontify-with-override beg (treesit-node-end node) commit a547b0e2e832054f63bb1ed5a715a9c28759ba09 Author: Christophe TROESTLER Date: Sat Dec 2 18:58:40 2023 +0200 rust-ts-mode--comment-docstring: Fix/improve the previous change * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--comment-docstring): Match also "inner" line docs. Stop rebinding 'end' and use the argument's value in the 'treesit-fontify-with-override' call. diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index a07634199ff..18951a10c55 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -290,13 +290,13 @@ rust-ts-mode--font-lock-settings (defun rust-ts-mode--comment-docstring (node override start end &rest _args) "Use the comment or documentation face appropriately for comments." (let* ((beg (treesit-node-start node)) - (end (treesit-node-end node)) (face (save-excursion (goto-char beg) - (if (looking-at "///") + (if (looking-at "//\\(?:/\\|!\\)") 'font-lock-doc-face 'font-lock-comment-face)))) - (treesit-fontify-with-override beg end face override start end))) + (treesit-fontify-with-override beg (treesit-node-end node) + face override start end))) (defun rust-ts-mode--fontify-scope (node override start end &optional tail-p) (let* ((case-fold-search nil)