From 39035fbfc5f6dfa66c9ba14f61a8d1c751d847c0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Apr 2023 08:51:22 +0300 Subject: [PATCH 01/21] Avoid crashes in 'describe-keymap' due to shadowing * src/keymap.c (describe_vector): Handle shadowing by something other than a symbol. (Bug#62867) --- src/keymap.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index efac410d317..7f5777c9251 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3308,13 +3308,18 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, if (this_shadowed) { SET_PT (PT - 1); - static char const fmt[] = " (currently shadowed by `%s')"; - USE_SAFE_ALLOCA; - char *buffer = SAFE_ALLOCA (sizeof fmt + - SBYTES (SYMBOL_NAME (shadowed_by))); - esprintf (buffer, fmt, SDATA (SYMBOL_NAME (shadowed_by))); - insert_string (buffer); - SAFE_FREE(); + if (SYMBOLP (shadowed_by)) + { + static char const fmt[] = " (currently shadowed by `%s')"; + USE_SAFE_ALLOCA; + char *buffer = + SAFE_ALLOCA (sizeof fmt + SBYTES (SYMBOL_NAME (shadowed_by))); + esprintf (buffer, fmt, SDATA (SYMBOL_NAME (shadowed_by))); + insert_string (buffer); + SAFE_FREE(); + } + else /* Could be a keymap, a lambda, or a keyboard macro. */ + insert_string (" (currently shadowed)"); SET_PT (PT + 1); } } From 9686b015a0d71d08828afb0cfe6e477bbc4909ae Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Apr 2023 09:19:15 +0300 Subject: [PATCH 02/21] Fix strike-through attribute support on TTY frames * src/term.c (init_tty): Fix setting the strike-through capability with "smxx". (Bug#62265) --- src/term.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/term.c b/src/term.c index d881dee39fe..8a16ce4e33f 100644 --- a/src/term.c +++ b/src/term.c @@ -4163,7 +4163,15 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ tty->TS_enter_alt_charset_mode = tgetstr ("as", address); tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); tty->TS_exit_attribute_mode = tgetstr ("me", address); +#ifdef TERMINFO + tty->TS_enter_strike_through_mode = tigetstr ("smxx", address); + if (tty->TS_enter_strike_through_mode == (char *) (intptr_t) -1) + tty->TS_enter_strike_through_mode = NULL; +#else + /* FIXME: Is calling tgetstr here for non-terminfo case correct, + even though "smxx" is more than 2 characters? */ tty->TS_enter_strike_through_mode = tgetstr ("smxx", address); +#endif MultiUp (tty) = tgetstr ("UP", address); MultiDown (tty) = tgetstr ("DO", address); From 200dbf7d302e659e618f74bde81c7b3ccd795639 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Apr 2023 11:12:39 +0300 Subject: [PATCH 03/21] Minor changes in c-ts-mode.el's support of DEFUNs * lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-DEFUN): Renamed from 'c-ts-mode--fontify-defun'; all callers changed. (c-ts-mode-emacs-sources-support): Renamed from 'c-ts-mode-emacs-devel' and made into a defcustom; all users changed. (c-ts-mode--emacs-defun-p, c-ts-mode--emacs-defun-at-point) (c-ts-mode--emacs-current-defun-name): Doc fixes. (Bug#62825) --- lisp/progmodes/c-ts-mode.el | 59 ++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index c2d68086f33..166399f922d 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -193,9 +193,17 @@ To set the default indent style globally, use (c-ts-mode--get-indent-style (if (derived-mode-p 'c-ts-mode) 'c 'cpp)))))) -(defvar c-ts-mode-emacs-devel nil - "If the value is t, enable Emacs source-specific features. -This needs to be set before enabling `c-ts-mode'.") +(defcustom c-ts-mode-emacs-sources-support t + "Whether to enable Emacs source-specific features. +This enables detection of definitions of Lisp function using +the DEFUN macro. +This needs to be set before enabling `c-ts-mode'; if you change +the value after enabling `c-ts-mode', toggle the mode off and on +again." + :version "29.1" + :type 'boolean + :safe 'booleanp + :group 'c) ;;; Syntax table @@ -671,7 +679,7 @@ MODE is either `c' or `cpp'." :override t '(((call_expression (call_expression function: (identifier) @fn) - @c-ts-mode--fontify-defun) + @c-ts-mode--fontify-DEFUN) (:match "^DEFUN$" @fn))))) ;;; Font-lock helpers @@ -735,14 +743,14 @@ OVERRIDE, START, END, and ARGS, see `treesit-font-lock-rules'." (treesit-node-start node) (treesit-node-end node) 'font-lock-variable-use-face override start end))) -(defun c-ts-mode--fontify-defun (node override start end &rest _) - "Correctly fontify the DEFUN macro. +(defun c-ts-mode--fontify-DEFUN (node override start end &rest _) + "Correctly fontify calls to the DEFUN macro in Emacs sources. For NODE, OVERRIDE, START, and END, see `treesit-font-lock-rules'. The captured NODE is a -call_expression where DEFUN is the function. +call_expression node, where DEFUN is the function. -This function corrects the fontification on the colon in -\"doc:\", and the parameter list." +This function corrects the fontification of the colon in +\"doc:\", and of the parameter list." (let* ((parent (treesit-node-parent node)) ;; ARG-LIST-1 and 2 are like this: ;; @@ -808,7 +816,7 @@ Return nil if NODE is not a defun node or doesn't have a name." "union_specifier" "class_specifier" "namespace_definition") (treesit-node-child-by-field-name node "name")) - ;; DEFUNs in Emacs source. + ;; DEFUNs in Emacs sources. ("expression_statement" (let* ((call-exp-1 (treesit-node-child node 0)) (call-exp-2 (treesit-node-child call-exp-1 0)) @@ -885,7 +893,9 @@ the semicolon. This function skips the semicolon." (list node parent bol))) (defun c-ts-mode--emacs-defun-p (node) - "Return non-nil if NODE is a DEFUN in Emacs source files." + "Return non-nil if NODE is a Lisp function defined using DEFUN. +This function detects Lisp primitives defined in Emacs source +files using the DEFUN macro." (and (equal (treesit-node-type node) "expression_statement") (equal (treesit-node-text (treesit-node-child-by-field-name @@ -896,23 +906,25 @@ the semicolon. This function skips the semicolon." "DEFUN"))) (defun c-ts-mode--emacs-defun-at-point (&optional range) - "Return the current defun node. + "Return the defun node at point. -This function recognizes DEFUNs in Emacs source files. +In addition to regular C functions, this function recognizes +definitions of Lisp primitrives in Emacs source files using DEFUN, +if `c-ts-mode-emacs-sources-support' is non-nil. -Note that for the case of a DEFUN, it is made of two separate -nodes, one for the declaration and one for the body, this +Note that DEFUN is parsed by tree-sitter as two separate +nodes, one for the declaration and one for the body; this function returns the declaration node. If RANGE is non-nil, return (BEG . END) where BEG end END -encloses the whole defun. This solves the problem of only -returning the declaration part for DEFUN." +encloses the whole defun. This is for when the entire defun +is required, not just the declaration part for DEFUN." (or (when-let ((node (treesit-defun-at-point))) (if range (cons (treesit-node-start node) (treesit-node-end node)) node)) - (and c-ts-mode-emacs-devel + (and c-ts-mode-emacs-sources-support (let ((candidate-1 ; For when point is in the DEFUN statement. (treesit-node-prev-sibling (treesit-node-top-level @@ -945,9 +957,10 @@ returning the declaration part for DEFUN." (defun c-ts-mode--emacs-current-defun-name () "Return the name of the current defun. -This is used for `add-log-current-defun-function'. This -recognizes DEFUN in Emacs sources, in addition to normal function -definitions." +This is used for `add-log-current-defun-function'. +In addition to regular C functions, this function also recognizes +Emacs primitives defined using DEFUN in Emacs sources, +if `c-ts-mode-emacs-sources-support' is non-nil." (or (treesit-add-log-current-defun) (c-ts-mode--defun-name (c-ts-mode--emacs-defun-at-point)))) @@ -1067,7 +1080,7 @@ in your configuration." (setq-local treesit-defun-tactic 'top-level) (treesit-major-mode-setup) - (when c-ts-mode-emacs-devel + (when c-ts-mode-emacs-sources-support (setq-local add-log-current-defun-function #'c-ts-mode--emacs-current-defun-name)))) @@ -1106,7 +1119,7 @@ recommended to enable `electric-pair-mode' with this mode." (setq-local treesit-font-lock-settings (c-ts-mode--font-lock-settings 'cpp)) (treesit-major-mode-setup) - (when c-ts-mode-emacs-devel + (when c-ts-mode-emacs-sources-support (setq-local add-log-current-defun-function #'c-ts-mode--emacs-current-defun-name)))) From 329304c23fa46d5511b8336a8f0eeabedd64620f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Apr 2023 11:16:45 +0300 Subject: [PATCH 04/21] ; * src/term.c (init_tty): Fix last change. (Bug#62877) --- src/term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/term.c b/src/term.c index 8a16ce4e33f..53ba2a231e4 100644 --- a/src/term.c +++ b/src/term.c @@ -4164,7 +4164,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); tty->TS_exit_attribute_mode = tgetstr ("me", address); #ifdef TERMINFO - tty->TS_enter_strike_through_mode = tigetstr ("smxx", address); + tty->TS_enter_strike_through_mode = tigetstr ("smxx"); if (tty->TS_enter_strike_through_mode == (char *) (intptr_t) -1) tty->TS_enter_strike_through_mode = NULL; #else From 580d8278c5f4838c09576798dbbabc8ff51609a9 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 13 Apr 2023 20:13:59 +0200 Subject: [PATCH 05/21] Allow upgrading built-in packages with 'package-install' * etc/NEWS: Mention the change * lisp/emacs-lisp/package.el (package--upgradable-built-in-p): Add new predicate. (package-install-upgrade-built-in): Add new user option to enable feature. (package-install): Respect new user option. --- etc/NEWS | 5 ++++ lisp/emacs-lisp/package.el | 47 +++++++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 84dbb94a71a..0789fa49d75 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1876,6 +1876,11 @@ package maintainers. By customizing this user option you can specify specific packages to install. +--- +*** New user option 'package-install-upgrade-built-in'. +When enabled, 'package-install' can be used to install +newer versions of built-in packages. + ** Emacs Sessions (Desktop) +++ diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f92afe56b76..c0cc7bebeb2 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -797,6 +797,21 @@ specifying the minimum acceptable version." (require 'finder-inf nil t) ; For `package--builtins'. (assq package package--builtins)))))) +(defun package--active-built-in-p (package) + "Return non-nil if PACKAGE if the built-in version is used. +If the built-in version of PACKAGE is used and PACKAGE is +also available for installation from an archive, it is an +indication that PACKAGE was never upgraded to any newer +version from the archive." + (and (not (assq (cond + ((package-desc-p package) + (package-desc-name package)) + ((stringp package) (intern package)) + ((symbolp package) package) + ((error "Unknown package format: %S" package))) + (package--alist))) + (package-built-in-p package))) + (defun package--autoloads-file-name (pkg-desc) "Return the absolute name of the autoloads file, sans extension. PKG-DESC is a `package-desc' object." @@ -2182,12 +2197,18 @@ using `package-compute-transaction'." (unless package-archive-contents (package-refresh-contents))) +(defcustom package-install-upgrade-built-in nil + "Non-nil means that built-in packages can be upgraded via a package archive. +If disabled, then `package-install' will not suggest to replace a +built-in package with a version from a package archive." + :type 'boolean + :version "29.1") + ;;;###autoload (defun package-install (pkg &optional dont-select) "Install the package PKG. PKG can be a `package-desc' or a symbol naming one of the -available packages in an archive in `package-archives'. When -called interactively, prompt for the package name. +available packages in an archive in `package-archives'. Mark the installed package as selected by adding it to `package-selected-packages'. @@ -2197,7 +2218,11 @@ non-nil, install the package but do not add it to `package-selected-packages'. If PKG is a `package-desc' and it is already installed, don't try -to install it but still mark it as selected." +to install it but still mark it as selected. + +If the command is invoked with a prefix argument, the upgrading +of built-in packages will be possible, as if +`package-install-upgrade-built-in' had been enabled." (interactive (progn ;; Initialize the package system to get the list of package @@ -2205,11 +2230,14 @@ to install it but still mark it as selected." (package--archives-initialize) (list (intern (completing-read "Install package: " - (delq nil - (mapcar (lambda (elt) - (unless (package-installed-p (car elt)) - (symbol-name (car elt)))) - package-archive-contents)) + (mapcan + (lambda (elt) + (and (or (and (or current-prefix-arg + package-install-upgrade-built-in) + (package--active-built-in-p (car elt))) + (not (package-installed-p (car elt)))) + (list (symbol-name (car elt))))) + package-archive-contents) nil t)) nil))) (package--archives-initialize) @@ -2220,6 +2248,9 @@ to install it but still mark it as selected." (unless (or dont-select (package--user-selected-p name)) (package--save-selected-packages (cons name package-selected-packages))) + (when (and (or current-prefix-arg package-install-upgrade-built-in) + (package--active-built-in-p pkg)) + (setq pkg (or (cadr (assq name package-archive-contents)) pkg))) (if-let* ((transaction (if (package-desc-p pkg) (unless (package-installed-p pkg) From a0b04a2247908e4d7d1d9f66886d3c1f21866084 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Apr 2023 18:11:07 +0300 Subject: [PATCH 06/21] Documentation copyedits for 'package-install-upgrade-built-in' etc * etc/NEWS: More details about the new option 'package-install-upgrade-built-in'. * lisp/emacs-lisp/package.el (package-install-upgrade-built-in) (package--active-built-in-p, package-install): Doc fixes. (Bug#62720) --- etc/NEWS | 20 ++++++++++++++++++-- lisp/emacs-lisp/package.el | 10 +++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0789fa49d75..0d31fc679da 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1878,8 +1878,16 @@ install. --- *** New user option 'package-install-upgrade-built-in'. -When enabled, 'package-install' can be used to install -newer versions of built-in packages. +When enabled, 'package-install' will include in the list of +upgradeable packages those built-in packages (like Eglot and +use-package, for example) for which a newer version is available in +package archives, and will allow to install those newer versions. By +default, this is disabled; however, if 'package-install' is invoked +with a prefix argument, it will act as if this new option were +enabled. + +If you customize this option, we recommend to place its non-default +setting in your early-init file. ** Emacs Sessions (Desktop) @@ -3249,6 +3257,10 @@ based on data provided by language servers using the Language Server Protocol (LSP). See the new Info manual "(eglot) Top" for more. Also see "etc/EGLOT-NEWS". +If you want to be able to use 'package-install' to upgrade Eglot to +newer versions released on GNU ELPA, customize the new option +'package-install-upgrade-built-in' to a non-nil value. + +++ ** use-package: Declarative package configuration. use-package is now shipped with Emacs. It provides the 'use-package' @@ -3256,6 +3268,10 @@ macro, which allows you to isolate package configuration in your init file in a way that is declarative, tidy, and performance-oriented. See the new Info manual "(use-package) Top" for more. +If you want to be able to use 'package-install' to upgrade use-package +to newer versions released on GNU ELPA, customize the new option +'package-install-upgrade-built-in' to a non-nil value. + --- ** New package 'wallpaper'. This package provides the command 'wallpaper-set', which sets the diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c0cc7bebeb2..ffa6272dd1f 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -798,7 +798,7 @@ specifying the minimum acceptable version." (assq package package--builtins)))))) (defun package--active-built-in-p (package) - "Return non-nil if PACKAGE if the built-in version is used. + "Return non-nil if the built-in version of PACKAGE is used. If the built-in version of PACKAGE is used and PACKAGE is also available for installation from an archive, it is an indication that PACKAGE was never upgraded to any newer @@ -2200,7 +2200,7 @@ using `package-compute-transaction'." (defcustom package-install-upgrade-built-in nil "Non-nil means that built-in packages can be upgraded via a package archive. If disabled, then `package-install' will not suggest to replace a -built-in package with a version from a package archive." +built-in package with a (possibly newer) version from a package archive." :type 'boolean :version "29.1") @@ -2220,9 +2220,9 @@ non-nil, install the package but do not add it to If PKG is a `package-desc' and it is already installed, don't try to install it but still mark it as selected. -If the command is invoked with a prefix argument, the upgrading -of built-in packages will be possible, as if -`package-install-upgrade-built-in' had been enabled." +If the command is invoked with a prefix argument, it will allow +upgrading of built-in packages, as if `package-install-upgrade-built-in' +had been enabled." (interactive (progn ;; Initialize the package system to get the list of package From 596b780ab71d6495f866de35c234fe65a8a7914a Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 16 Apr 2023 21:13:08 -0400 Subject: [PATCH 07/21] Update to Org 9.6.4-2-g0f6ae7 --- doc/misc/org.org | 5 +++-- etc/refcards/orgcard.tex | 2 +- lisp/org/ob-tangle.el | 10 +++++----- lisp/org/org-agenda.el | 3 +-- lisp/org/org-element.el | 2 +- lisp/org/org-macs.el | 6 +++++- lisp/org/org-table.el | 6 ++---- lisp/org/org-version.el | 4 ++-- lisp/org/org.el | 5 +++-- lisp/org/ox-latex.el | 2 +- lisp/org/ox-odt.el | 10 ++++++++-- 11 files changed, 32 insertions(+), 23 deletions(-) diff --git a/doc/misc/org.org b/doc/misc/org.org index 7ff0933de75..ae3fae0623e 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -5958,8 +5958,9 @@ the agenda (see [[*Weekly/daily agenda]]). We distinguish: #+findex: org-block For more complex date specifications, Org mode supports using the - special expression diary entries implemented in the Emacs Calendar - package[fn:20]. For example, with optional time: + special expression diary entries implemented in the + [[info:emacs#Special Diary Entries][Emacs Calendar package]][fn:20]. + For example, with optional time: #+begin_example ,* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index f8894d9dc1c..c5d112dba72 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.6.3} +\def\orgversionnumber{9.6.4} \def\versionyear{2023} % latest update \input emacsver.tex diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 27443fc2e81..980d4a12054 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -158,9 +158,9 @@ result. The default value is `org-remove-indentation'." :version "24.1" :type 'function) -(defcustom org-babel-tangle-default-file-mode #o544 +(defcustom org-babel-tangle-default-file-mode #o644 "The default mode used for tangled files, as an integer. -The default value 356 correspands to the octal #o544, which is +The default value 420 correspands to the octal #o644, which is read-write permissions for the user, read-only for everyone else." :group 'org-babel-tangle :package-version '(Org . "9.6") @@ -361,9 +361,9 @@ Did you give the decimal value %1$d by mistake?" mode))) ;; Match regexp taken from `file-modes-symbolic-to-number'. (file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode)) ((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode) - (file-modes-symbolic-to-number (concat "u=" (substring mode 0 3) - ",g=" (substring mode 3 6) - ",o=" (substring mode 6 9)) + (file-modes-symbolic-to-number (concat "u=" (delete ?- (substring mode 0 3)) + ",g=" (delete ?- (substring mode 3 6)) + ",o=" (delete ?- (substring mode 6 9))) 0)) (t (error "File mode %S not recognized as a valid format. See `org-babel-interpret-file-mode'." mode)))) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 2ec2f4c00bc..d3e61643190 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -7724,8 +7724,7 @@ The optional argument TYPE tells the agenda type." (unless (string= org-agenda-todo-keyword-format "") ;; Remove `display' property as the icon could leak ;; on the white space. - (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) + (apply #'propertize " " (org-plist-delete (text-properties-at 0 x) 'display))) (substring x (match-end 3))))))) x))) diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 51729b3f33d..517d45b0224 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -5329,7 +5329,7 @@ seconds.") "Duration, as a time value, of the pause between synchronizations. See `org-element-cache-sync-duration' for more information.") -(defvar org-element--cache-self-verify t +(defvar org-element--cache-self-verify nil "Activate extra consistency checks for the cache. This may cause serious performance degradation depending on the value diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 8d7b0b034f8..aef05bc6ee6 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -36,6 +36,10 @@ ;;; Org version verification. +(defconst org--built-in-p nil + "When non-nil, assume that Org is a part of Emacs source. +For internal use only. See Emacs bug #62762. +This variable is only supposed to be changed by Emacs build scripts.") (defmacro org-assert-version () "Assert compile time and runtime version match." ;; We intentionally use a more permissive `org-release' instead of @@ -45,7 +49,7 @@ ;; `org-assert-version' calls would fail using strict ;; `org-git-version' check because the generated Org version strings ;; will not match. - `(unless (equal (org-release) ,(org-release)) + `(unless (or org--built-in-p (equal (org-release) ,(org-release))) (warn "Org version mismatch. Org loading aborted. This warning usually appears when a built-in Org version is loaded prior to the more recent Org version. diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 5116b1127f7..83bad3f3a64 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -5414,12 +5414,10 @@ overwritten, and the table is not marked as requiring realignment." (self-insert-command N)) (setq org-table-may-need-update t) (let* (orgtbl-mode - a (cmd (or (key-binding (or (and (listp function-key-map) - (setq a (assoc last-input-event function-key-map)) - (cdr a)) - (vector last-input-event))) + (cdr (assoc last-command-event function-key-map))) + (vector last-command-event))) 'self-insert-command))) (call-interactively cmd) (if (and org-self-insert-cluster-for-undo diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 43fdcb82832..15e4a50877a 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.6.3")) + (let ((org-release "9.6.4")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.6.3-2-gf2949d")) + (let ((org-git-version "release_9.6.4-2-g0f6ae7")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index be9d0e32dd0..f7c2b6d16d1 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "26.1")) -;; Version: 9.6.3 +;; Version: 9.6.4 ;; This file is part of GNU Emacs. ;; @@ -9143,7 +9143,8 @@ nil or a string to be used for the todo mark." ) (replace-match "0" t nil nil 1))))) (defvar org-state) -(defvar org-blocked-by-checkboxes) +;; FIXME: We should refactor this and similar dynamically scoped blocker flags. +(defvar org-blocked-by-checkboxes nil) ; dynamically scoped (defun org-todo (&optional arg) "Change the TODO state of an item. diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 50a0950aa04..26f8742bec8 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -1822,7 +1822,7 @@ INFO is a plist used as a communication channel. See (replace-regexp-in-string "--\\|[\\{}$%&_#~^]" (lambda (m) - (cond ((equal m "--") "-{}-") + (cond ((equal m "--") "-{}-{}") ((equal m "\\") "\\textbackslash{}") ((equal m "~") "\\textasciitilde{}") ((equal m "^") "\\textasciicircum{}") diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index cf217c9e781..03c909f78ed 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -2923,17 +2923,23 @@ contextual information." ;; not be desired in scripts that do not separate words with ;; spaces (for example, Han script). `fill-region' is able to ;; handle such situations. - ;; FIXME: The unnecessary spaced may still remain when a newline + ;; FIXME: The unnecessary spacing may still remain when a newline ;; is at a boundary between Org objects (e.g. italics markup ;; followed by newline). (setq output (with-temp-buffer - (insert output) (save-match-data (let ((leading (and (string-match (rx bos (1+ blank)) output) (match-string 0 output))) (trailing (and (string-match (rx (1+ blank) eos) output) (match-string 0 output)))) + (insert + (substring + output + (length leading) + (pcase (length trailing) + (0 nil) + (n (- n))))) ;; Unfill, retaining leading/trailing space. (let ((fill-column most-positive-fixnum)) (fill-region (point-min) (point-max))) From 2f59595f5f4e86a791c425a6f9e2c1594d6813e4 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 17 Apr 2023 12:24:30 +0200 Subject: [PATCH 08/21] ; * etc/NEWS: Grammar fixes. --- etc/NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0d31fc679da..1822ff17265 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1881,12 +1881,12 @@ install. When enabled, 'package-install' will include in the list of upgradeable packages those built-in packages (like Eglot and use-package, for example) for which a newer version is available in -package archives, and will allow to install those newer versions. By +package archives, and will allow installing those newer versions. By default, this is disabled; however, if 'package-install' is invoked with a prefix argument, it will act as if this new option were enabled. -If you customize this option, we recommend to place its non-default +If you customize this option, we recommend you place its non-default setting in your early-init file. ** Emacs Sessions (Desktop) From 1456adf4248117b9889c6fa71f798ada2f45a3a4 Mon Sep 17 00:00:00 2001 From: Idir Lankri Date: Fri, 14 Apr 2023 15:52:24 +0200 Subject: [PATCH 09/21] ; Eglot: fix a typo in a customization type * lisp/progmodes/eglot.el (eglot-ignored-server-capabilities): Fix the value associated with the tag "Go to declaration". (Bug#62849) Copyright-paperwork-exempt: yes --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4943b44107a..9b499b944cd 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1673,7 +1673,7 @@ under cursor." (const :tag "Go to definition" :definitionProvider) (const :tag "Go to type definition" :typeDefinitionProvider) (const :tag "Go to implementation" :implementationProvider) - (const :tag "Go to declaration" :implementationProvider) + (const :tag "Go to declaration" :declarationProvider) (const :tag "Find references" :referencesProvider) (const :tag "Highlight symbols automatically" :documentHighlightProvider) (const :tag "List symbols in buffer" :documentSymbolProvider) From 60560cc7adfe685ef8c04623a6d019dc659123b1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 18 Apr 2023 14:30:28 +0300 Subject: [PATCH 10/21] Fix description of lexical environment's internals * doc/lispref/variables.texi (Lexical Binding): Update the description of how the lexical environment is represented internally. (Bug#62840) --- doc/lispref/variables.texi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 5584cbce9a6..6dd935d8763 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1183,13 +1183,16 @@ wants the current value of a variable, it looks first in the lexical environment; if the variable is not specified in there, it looks in the symbol's value cell, where the dynamic value is stored. - (Internally, the lexical environment is an alist of symbol-value -pairs, with the final element in the alist being the symbol @code{t} -rather than a cons cell. Such an alist can be passed as the second -argument to the @code{eval} function, in order to specify a lexical -environment in which to evaluate a form. @xref{Eval}. Most Emacs -Lisp programs, however, should not interact directly with lexical -environments in this way; only specialized programs like debuggers.) + (Internally, the lexical environment is a list whose members are +usually cons cells that are symbol-value pairs, but some of its +members can be symbols rather than cons cells. A symbol in the list +means the lexical environment declared that symbol's variable as +locally considered to be dynamically bound. This list can be passed +as the second argument to the @code{eval} function, in order to +specify a lexical environment in which to evaluate a form. +@xref{Eval}. Most Emacs Lisp programs, however, should not interact +directly with lexical environments in this way; only specialized +programs like debuggers.) @cindex closures, example of using Lexical bindings have indefinite extent. Even after a binding From e0dc60e07803f9859ad0008bae4b22d6452547b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 18 Apr 2023 14:36:28 +0300 Subject: [PATCH 11/21] ; Fix typos in gdb-mi.el * lisp/progmodes/gdb-mi.el (gdbmi-bnf-result-state-configs): Fix typos introduced while fixing bug#10580. (Bug#62858) --- lisp/progmodes/gdb-mi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 8db16729163..27f04e07e80 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2406,7 +2406,7 @@ a GDB/MI reply message." ("+" . ()) ("=" . (("thread-created" . (gdb-thread-created . atomic)) ("thread-selected" . (gdb-thread-selected . atomic)) - ("thread-existed" . (gdb-ignored-notification . atomic)) + ("thread-exited" . (gdb-thread-exited . atomic)) ('default . (gdb-ignored-notification . atomic))))) "Alist of alists, mapping the type and class of message to a handler function. Handler functions are all flagged as either `progressive' or `atomic'. From df17682ebf15be96aaa8e383df99ffd2eac7e63d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 18 Apr 2023 14:49:18 +0300 Subject: [PATCH 12/21] ; Support 'dart-ts-mode' in Eglot * lisp/progmodes/eglot.el (eglot-server-programs): Add 'dart-ts-mode'. Patch by Mou Tong . (Bug#62879) --- lisp/progmodes/eglot.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9b499b944cd..ed554087084 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -218,8 +218,9 @@ chosen (interactively or automatically)." ((R-mode ess-r-mode) . ("R" "--slave" "-e" "languageserver::run()")) ((java-mode java-ts-mode) . ("jdtls")) - (dart-mode . ("dart" "language-server" - "--client-id" "emacs.eglot-dart")) + ((dart-mode dart-ts-mode) + . ("dart" "language-server" + "--client-id" "emacs.eglot-dart")) (elixir-mode . ("language_server.sh")) (ada-mode . ("ada_language_server")) (scala-mode . ,(eglot-alternatives From 1b8b2cf61bdc29db098e8c7dd61fd5a7971c3a1e Mon Sep 17 00:00:00 2001 From: Shynur Date: Mon, 17 Apr 2023 02:13:32 +0800 Subject: [PATCH 13/21] Fix typo and inaccuracy in the ELisp Reference manual * doc/lispref/loading.texi (Dynamic Modules): Fix a typo. * doc/lispref/customize.texi (Group Definitions): Faces are also in the 'custom-group' property of a customization group. (Bug#62887) Copyright-paperwork-exempt: yes --- doc/lispref/customize.texi | 7 ++++--- doc/lispref/loading.texi | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6015c134d21..6d5d9e0a2bc 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -264,11 +264,12 @@ have any number of prefixes. @end table @cindex @code{custom-group} property -The variables and subgroups of a group are stored in the +The variables, faces, and subgroups of a group are stored in the @code{custom-group} property of the group's symbol. @xref{Symbol Plists}. The value of that property is a list of pairs whose -@code{car} is the variable or subgroup symbol and the @code{cdr} is -either @code{custom-variable} or @code{custom-group}. +@code{car} is the symbol of the variable or the face or the subgroup, +and the @code{cdr} is one of the corresponding symbols +@code{custom-variable}, @code{custom-face}, or @code{custom-group}. @end defmac @defopt custom-unlispify-remove-prefixes diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 5c84ba4b1eb..d6fc4e8d636 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -1338,7 +1338,7 @@ specified @var{file} and perform the necessary initialization of the module. This is the primitive which makes sure the module exports the @code{plugin_is_GPL_compatible} symbol, calls the module's @code{emacs_module_init} function, and signals an error if that -function returns an error indication, or if the use typed @kbd{C-g} +function returns an error indication, or if the user typed @kbd{C-g} during the initialization. If the initialization succeeds, @code{module-load} returns @code{t}. Note that @var{file} must already have the proper file-name extension, as this function doesn't From 3d6f7553319b38bbc9a93d66cf7879926a695da1 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 19 Apr 2023 01:29:20 +0300 Subject: [PATCH 14/21] xref-search-program-alist: Fix searching larger file lists on MS Windows * lisp/progmodes/xref.el (xref-search-program-alist): Add '-s 10000' to xargs' options when on Windows or DOS. Apparently the xargs port doesn't currently know how to obey the system-wide limits (https://debbugs.gnu.org/bug=61667#521). --- lisp/progmodes/xref.el | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 1ae60796601..0666b18cba1 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1820,16 +1820,22 @@ IGNORES is a list of glob patterns for files to ignore." ;; Ripgrep gets jumbled output, though, even with --line-buffered. ;; But Grep seems to be stable. Even without --line-buffered. (defcustom xref-search-program-alist - '((grep - . - ;; '-s' because 'git ls-files' can output broken symlinks. - "xargs -0 grep --null -snHE -e ") - (ripgrep - . - ;; '!*/' is there to filter out dirs (e.g. submodules). - "xargs -0 rg --null -nH --no-heading --no-messages -g '!*/' -e " - ) - (ugrep . "xargs -0 ugrep --null -ns -e ")) + (let ((xargs-max-chars + (and (memq system-type '(windows-nt ms-dos)) + "-s 10000 "))) + `((grep + . + ;; '-s' because 'git ls-files' can output broken symlinks. + ,(concat "xargs -0 " xargs-max-chars "grep --null -snHE -e ")) + (ripgrep + . + ;; '!*/' is there to filter out dirs (e.g. submodules). + ,(concat "xargs -0 " + xargs-max-chars + "rg --null -nH --no-heading --no-messages -g '!*/' -e ")) + (ugrep + . + ,(concat "xargs -0 " xargs-max-chars "ugrep --null -ns -e ")))) "Association list mapping program identifiers to command templates. Program identifier should be a symbol, named after the search program. @@ -1844,7 +1850,7 @@ The template should have the following fields: :type '(repeat (cons (symbol :tag "Program identifier") (string :tag "Command template"))) - :version "28.1" + :version "29.1" :package-version '(xref . "1.0.4")) (defcustom xref-search-program 'grep From 1c4783c3300e32e1405ceb75b5e25700b5025a0f Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 18 Apr 2023 16:10:10 +0200 Subject: [PATCH 15/21] ; * etc/NEWS: Copyedits and grammar fixes. --- etc/NEWS | 111 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 1822ff17265..62d2fdcd3a4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -218,13 +218,13 @@ of 'user-emacs-directory'. +++ ** The image commands have changed key bindings. -In previous Emacs versions, images have had the '+', '-' and 'r' keys -bound when point is over an image. In Emacs 29.1, additional commands -were added, and this made it more likely that users would trigger the -image commands by mistake. To avoid this, all image commands have +In previous Emacs versions, the '+', '-' and 'r' keys were bound when +point was over an image. In Emacs 29.1, additional commands have been +added, and this made it more likely that users would trigger the image +commands by mistake. To avoid this, all image commands have been moved to the 'i' prefix keymap, so '+' is now 'i +', '-' is now 'i -', and 'r' is now 'i r'. In addition, these commands are now repeating, -so, for example, you can rotate an image twice by typing 'i r r'. +so you can rotate an image twice by saying 'i r r', for instance. +++ ** Emacs now picks the correct coding-system for X input methods. @@ -380,7 +380,7 @@ this user option to nil to revert back to the old behavior. --- ** Support for old EIEIO functions is not autoloaded any more. You need an explicit '(require 'eieio-compat)' to use 'defmethod' -and 'defgeneric' (which have been made obsolete in Emacs 25.1 with +and 'defgeneric' (which were made obsolete in Emacs 25.1 by 'cl-defmethod' and 'cl-defgeneric'). Similarly you might need to '(require 'eieio-compat)' before loading files that were compiled with an old EIEIO (Emacs<25). @@ -497,7 +497,7 @@ the 'nlinum' package from GNU ELPA instead. The former has better performance, but the latter is closer to a drop-in replacement. 1. To use 'display-line-numbers-mode', add something like this to your - Init file: + init file: (global-display-line-numbers-mode 1) ;; Alternatively, to use it only in programming modes: @@ -517,7 +517,7 @@ performance, but the latter is closer to a drop-in replacement. --- ** The thumbs.el library is now obsolete. -We recommend using command 'image-dired' instead. +We recommend using the 'image-dired' command instead. --- ** The autoarg.el library is now marked obsolete. @@ -577,7 +577,7 @@ encoding, only for decoding. ** New user option 'major-mode-remap-alist' to specify favorite major modes. This user option lets you remap the default modes (e.g. 'perl-mode' or 'latex-mode') to your favorite ones (e.g. 'cperl-mode' or -'LaTeX-mode') without having to use 'defalias', which can have +'LaTeX-mode') instead of having to use 'defalias', which can have undesirable side effects. This applies to all modes specified via 'auto-mode-alist', file-local variables, etc. @@ -587,6 +587,8 @@ variables, etc. --- ** New user option 'electric-quote-replace-consecutive'. +This allows you to disable the default behavior of consecutive single +quotes being replaced with a double quote. --- ** Emacs is now capable of editing files with very long lines. @@ -801,7 +803,7 @@ element: 'set-minibuffer-message', which displays echo-area messages at the end of the minibuffer text when the minibuffer is active. Other useful functions include 'inhibit-message', which allows specifying, via 'inhibit-message-regexps', the list of messages whose -display shall be inhibited; and 'set-multi-message' that accumulates +display should be inhibited; and 'set-multi-message' that accumulates recent messages and displays them stacked together. --- @@ -902,7 +904,7 @@ frame's contents will be hidden, leaving only the title bar on display. --- ** New user option 'x-gtk-use-native-input'. This controls whether or not GTK input methods are used by Emacs, -instead of XIM input methods. +instead of XIM input methods. Defaults to nil. +++ ** New user option 'use-system-tooltips'. @@ -999,17 +1001,17 @@ combinations in a graphical menu system. +++ *** New command 'emoji-search' (bound to 'C-x 8 e s'). -This command lets you search for Emoji based on names. +This command lets you search for and insert an Emoji based on names. +++ *** New command 'emoji-list' (bound to 'C-x 8 e l'). This command lists all Emoji (categorized by themes) in a special -buffer and lets you choose one of them. +buffer and lets you choose one of them to insert. --- *** New command 'emoji-recent' (bound to 'C-x 8 e r'). This command lets you choose among the Emoji you have recently -inserted. +inserted and insert it. +++ *** New command 'emoji-describe' (bound to 'C-x 8 e d'). @@ -1043,7 +1045,7 @@ quotes removed. --- *** 'M-x apropos-variable' output now includes values of variables. -Such apropos buffer is more easily viewed with outlining after +Such an apropos buffer is more easily viewed with outlining after enabling 'outline-minor-mode' in 'apropos-mode'. +++ @@ -1075,7 +1077,7 @@ This has been changed to: +++ *** The 'C-h .' command now accepts a prefix argument. 'C-u C-h .' would previously inhibit displaying a warning message if -there's no local help at point. This has been changed to call +there was no local help at point. This has been changed to call 'button-describe'/'widget-describe' and display button/widget help instead. @@ -1128,7 +1130,7 @@ helpful commands for various tasks. You can toggle the display using 'C-h C-q'. ** Emacs now comes with Org v9.6. -See the file "ORG-NEWS" for user-visible changes in Org. +See the file "etc/ORG-NEWS" for user-visible changes in Org. ** Outline Mode @@ -1191,12 +1193,13 @@ the display of several buffers in a row more amenable. +++ *** New buffer display action alist entry 'lru-frames'. -This allows to specify which frames 'display-buffer' should consider -when using a window that shows another buffer. +This allows specifying which frames 'display-buffer' should consider +when using a window that shows another buffer. It is interpreted as +per the ALL-FRAMES argument of 'get-lru-window'. +++ *** New buffer display action alist entry 'lru-time'. -'display-buffer' will ignore windows with a use time higher than that +'display-buffer' will ignore windows with a use time higher than this when using a window that shows another buffer. +++ @@ -1206,12 +1209,14 @@ making it a less likely candidate for displaying another buffer. +++ *** New buffer display action alist entry 'window-min-width'. -This allows to specify a minimum width of the window used to display a -buffer. +This allows specifying a preferred minimum width of the window used to +display a buffer. --- -*** You can customize on which window 'scroll-other-window' operates. -This is controlled by the new 'other-window-scroll-default' variable. +*** You can specify on which window 'scroll-other-window' operates. +This is controlled by the new 'other-window-scroll-default' variable, +which should be set to a function that returns a window. When this +variable is nil, 'next-window' is used. ** Frames @@ -1274,17 +1279,19 @@ respond within N seconds. The default is to wait forever. +++ *** 'server-stop-automatically' can be used to automatically stop the server. The Emacs server will be automatically stopped when certain conditions -are met. The conditions are given by the argument, which can be -'empty', 'delete-frame' or 'kill-terminal'. +are met. The conditions are determined by the argument to +'server-stop-automatically', which can be 'empty', 'delete-frame' or +'kill-terminal'. ** Rcirc +++ *** New command 'rcirc-when'. +This shows the reception time of the message at point (if available). +++ *** New user option 'rcirc-cycle-completion-flag'. -Rcirc will use the default 'completion-at-point' mechanism. The +Rcirc now uses the default 'completion-at-point' mechanism. The conventional IRC behavior of completing by cycling through the available options can be restored by enabling this option. @@ -1869,7 +1876,7 @@ packages checked out using 'package-vc-install'. +++ *** New command 'package-report-bug'. This command helps you compose an email for sending bug reports to -package maintainers. +package maintainers, and is bound to 'b' in the "*Packages*" buffer. +++ *** New user option 'package-vc-selected-packages'. @@ -1946,8 +1953,8 @@ displayed in a window. +++ *** New user option 'compilation-hidden-output'. -This can be used to make specific parts of compilation output -invisible. +This regular expression can be used to make specific parts of +compilation output invisible. +++ *** The 'compilation-auto-jump-to-first-error' user option has been extended. @@ -2330,7 +2337,7 @@ EUDC inline expansion result formatting defaulted to ("%s %s <%s>" firstname name email) Since email address specifications need to comply with RFC 5322 in -order to be useful in messages, there was a risk to produce syntax +order to be useful in messages, there was a risk of producing syntax which was standard with RFC 822, but is marked as obsolete syntax by its successor RFC 5322. Also, the first and last name part was never enclosed in double quotes, potentially producing invalid address @@ -2364,8 +2371,8 @@ used to select the entry type in the ecomplete database. +++ *** New back-end for mailabbrev. A new back-end for mailabbrev allows information from that database to -be queried by EUDC, too. The attributes 'email', 'name', and 'firstname' -are supported only. +be queried by EUDC, too. Only the attributes 'email', 'name', and +'firstname' are supported. ** EWW/SHR @@ -2612,14 +2619,14 @@ as opposed to via the command-line. +++ *** New command 'image-transform-fit-to-window'. This command fits the image to the current window by scaling down or -up as necessary. Unlike 'image-transform-fit-both', this does not -only scale the image down, but up as well. It is bound to 's w' in -Image Mode by default. +up as necessary. Unlike 'image-transform-fit-both', this can scale +the image up as well as down. It is bound to 's w' in Image Mode by +default. --- *** New command 'image-mode-wallpaper-set'. This command sets the desktop background to the current image. It is -bound to 'W' by default. +bound to 'W' in Image Mode by default. +++ *** 'image-transform-fit-to-{height,width}' are now obsolete. @@ -2637,14 +2644,14 @@ much (in percent). It is nil by default, which means no limit. --- *** New user option 'image-text-based-formats'. -This controls whether or not to show a message when opening certain -image formats saying how to edit it as text. The default is to show -this message for SVG and XPM. +This controls whether or not to show a message, when opening certain +image formats, explaining how to edit it as text. The default is to +show this message for SVG and XPM. +++ *** New command 'image-transform-set-percent'. -It allows setting the image size to a percentage of its original size, -and is bound to 's p' in Image mode. +It allows resizing the image to a percentage of its original size, and +is bound to 's p' in Image mode. +++ *** 'image-transform-original' renamed to 'image-transform-reset-to-original'. @@ -3936,9 +3943,9 @@ connection-local profile. +++ *** New macro 'with-connection-local-application-variables'. This macro works like 'with-connection-local-variables', but it allows -to use another application but 'tramp'. This is useful when running -code in a buffer where Tramp has already set some connection-local -variables. +using another application instead of 'tramp'. This is useful when +running code in a buffer where Tramp has already set some +connection-local variables. +++ *** New macro 'setq-connection-local'. @@ -4017,8 +4024,8 @@ This returns a list of sub-sequences of the specified sequence. +++ *** New function 'seq-remove-at-position'. -This function returns a copy of the specified sequence where the -element at a given (zero-based) index got removed. +This function returns a copy of the specified sequence with the +element at a given (zero-based) index removed. +++ *** New function 'seq-positions'. @@ -4086,7 +4093,7 @@ that quote character has to be escaped to avoid Emacs displaying it as (setq foo '(1 2 3)) -invalid. Emacs will now warn during byte compilation if it seems +invalid. Emacs will now warn during byte compilation if it sees something like that, and also warn about when using RIGHT/LEFT SINGLE QUOTATION MARK directly. In both these cases, if these characters should really be present in the docstring, they should be quoted with @@ -4146,7 +4153,7 @@ example for benchmarking purposes. ** New function 'string-edit'. This is meant to be used when the user has to edit a (potentially) long string. It pops up a new buffer where you can edit the string, -and a callback is called when the user types 'C-c C-c'. +and the provided callback is called when the user types 'C-c C-c'. +++ ** New function 'read-string-from-buffer'. @@ -4292,7 +4299,7 @@ them towards or away from each other. +++ ** New hook 'x-pre-popup-menu-hook'. -This hook, run before 'x-popup-menu', is about to display a +This hook is run before 'x-popup-menu' is about to display a deck-of-cards menu on screen. --- @@ -4393,8 +4400,8 @@ switch to these new functions. +++ *** 'define-key' now takes an optional REMOVE argument. If non-nil, remove the definition from the keymap. This is subtly -different from setting a definition to nil (when the keymap has a -parent). +different from setting a definition to nil: when the keymap has a +parent such a definition will shadow the parent's definition. +++ *** 'read-multiple-choice' now takes an optional SHOW-HELP argument. From 327986936c3476bcfe930314e5d825c2ada55f49 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 19 Apr 2023 12:29:57 +0200 Subject: [PATCH 16/21] Add index entry for fallback modes * doc/emacs/custom.texi (Specifying File Variables): Add index for 'fallback modes'. --- doc/emacs/custom.texi | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ee818a74b57..87290734cc9 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1245,6 +1245,7 @@ Manual}. These four keywords are not really variables; setting them in any other context has no special meaning. +@cindex fallback modes If you're editing a file across Emacs versions, and a new mode has been introduced to handle a file in a newer Emacs version, you can use several @code{mode} entries to use the new mode (called From 626e1ac62b213261d80007524e400ac6a0768dae Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 19 Apr 2023 12:33:18 +0200 Subject: [PATCH 17/21] Improve 'message-server-alist' docstring * lisp/gnus/message.el (message-server-alist): Fix typo and clarify what happens if there is already an X-Message-SMTP-Method header. --- lisp/gnus/message.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index f4cfffa2e8a..7a71ac9f58e 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4359,8 +4359,10 @@ If COND is a function, METHOD will be inserted if COND returns a non-nil value when called in the message buffer without any arguments. If METHOD is nil in this case, the return value of the function will be inserted instead. -If the buffer already has a\"X-Message-SMTP-Method\" header, -it is left unchanged." + +Note: if the buffer already has a \"X-Message-SMTP-Method\" +header, these rules are ignored, and the header is left +unchanged." :type '(alist :key-type (choice (string :tag "From Address") (function :tag "Predicate")) From ecdd3a9efac3e56850ce10260747c158865f9378 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 18 Apr 2023 18:03:36 -0400 Subject: [PATCH 18/21] Improve Completion Example section in the Emacs manual This can be a useful substitute for full-on fuzzy completion, as provided by other completion styles and completion packages. * doc/emacs/mini.texi (Completion Example): Give an example of completion with point not at end of minibuffer. Also, use @kbd{@key{TAB}} when telling the user to hit TAB. (Bug#62836) --- doc/emacs/mini.texi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 6fb312ec321..c2e13adb08f 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -313,19 +313,27 @@ may be defined in your Emacs session. For example, if a command called @code{authorize-me} was defined, Emacs could only complete as far as @samp{aut}.) - If you type @key{TAB} again immediately, it cannot determine the -next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it -does not add any characters; instead, @key{TAB} displays a list of all -possible completions in another window. + If you type @kbd{@key{TAB}} again immediately, it cannot determine +the next character; it could be @samp{-}, @samp{a}, or @samp{c}. So +it does not add any characters; instead, @key{TAB} displays a list of +all possible completions in another window. Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and the only command name that starts with this is @code{auto-fill-mode}. -If you now type @key{TAB}, completion fills in the rest of the +If you now type @kbd{@key{TAB}}, completion fills in the rest of the argument @samp{auto-fill-mode} into the minibuffer. Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to enter @samp{auto-fill-mode}. + @key{TAB} also works while point is not at the end of the +minibuffer. In that case, it will fill in text both at point and at +the end of the minibuffer. If you type @kbd{M-x autocm}, then press +@kbd{C-b} to move point before the @samp{m}, you can type +@kbd{@key{TAB}} to insert the text @samp{onf-} at point and @samp{ode} +at the end of the minibuffer, so that the minibuffer contains +@samp{autoconf-mode}. + @node Completion Commands @subsection Completion Commands From 9ac12592781934bcd934bc0cae71a637311119ec Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 19 Apr 2023 20:46:40 +0300 Subject: [PATCH 19/21] Fix display of menu-bar bindings of commands in *Help* buffers * lisp/help-fns.el (help-fns--insert-menu-bindings): Propertize with 'help-key-binding' face only the menu items, not the arrows between successive items. This is because 'char-displayable-p' is unreliable when we propertize the character with an arbitrary face: that face could specify a font which doesn't support the character after all, while 'char-displayable-p' assumes there are no restrictions on fonts that can be used for displaying the character. Also, make the code more efficient by avoiding the call to 'char-displayable-p' inside the loop. --- lisp/help-fns.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a1fc2267564..be13d40cfa3 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -592,22 +592,22 @@ the C sources, too." ;; First collect all the printed representations of menus. (dolist (menu menus) (let ((map (lookup-key global-map (seq-take menu 1))) - (string nil)) + (string nil) + (sep (if (char-displayable-p ?→) " → " " => "))) (seq-do-indexed (lambda (entry level) (when (symbolp map) (setq map (symbol-function map))) (when-let ((elem (assq entry (cdr map)))) (when (> level 0) - (push (if (char-displayable-p ?→) - " → " - " => ") - string)) + (push sep string)) (if (eq (nth 1 elem) 'menu-item) (progn - (push (nth 2 elem) string) + (push (propertize (nth 2 elem) 'face 'help-key-binding) + string) (setq map (cadddr elem))) - (push (nth 1 elem) string) + (push (propertize (nth 1 elem) 'face 'help-key-binding) + string) (setq map (cddr elem))))) (cdr (seq-into menu 'list))) (when string @@ -622,8 +622,7 @@ the C sources, too." (cond ((zerop i) "") ((= i (1- (length menus))) " and ") (t ", ")) - (propertize (string-join (nreverse string)) - 'face 'help-key-binding))) + (string-join (nreverse string)))) strings)))) (defun help-fns--compiler-macro (function) From 2b10e1827d3b200b3b7ff4da53082f428022fe0c Mon Sep 17 00:00:00 2001 From: Nicolas Martyanoff Date: Sun, 16 Apr 2023 15:30:47 +0200 Subject: [PATCH 20/21] sql: add missing postgresql types * lisp/progmodes/sql.el: Add multiple missing PostgreSQL types: bigserial, smallserial, macaddr8, jsonb, jsonpath, built-in range types, object identifier types (oid & co). --- lisp/progmodes/sql.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d8bd6bc2685..c6667c075f6 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2192,14 +2192,17 @@ to add functions and PL/SQL keywords.") ;; Postgres Data Types (sql-font-lock-keywords-builder 'font-lock-type-face nil -"bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char" -"character" "cidr" "circle" "date" "decimal" "double" "float4" -"float8" "inet" "int" "int2" "int4" "int8" "integer" "interval" "line" -"lseg" "macaddr" "money" "name" "numeric" "path" "point" "polygon" -"precision" "real" "serial" "serial4" "serial8" "sequences" "smallint" "text" -"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsvector" -"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without" -"xml" "zone" + "bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char" "character" +"cidr" "circle" "date" "daterange" "decimal" "double" "float4" "float8" "inet" +"int" "int2" "int4" "int4range" "int8" "int8range" "integer" "interval" +"jsonb" "jsonpath" "line" "lseg" "macaddr" "macaddr8" "money" "name" "numeric" +"numrange" "oid" "path" "point" "polygon" "precision" "real" "regclass" +"regcollation" "regconfig" "regdictionary" "regnamespace " "regoper" +"regoperator" "regproc" "regprocedure" "regrole" "regtype" "sequences" +"serial" "serial4" "serial8" "smallint" "smallserial" "text" "time" +"timestamp" "timestamptz" "timetz" "tsquery" "tsrange" "tstzrange" "tsvector" +"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without" "xml" +"zone" ))) "Postgres SQL keywords used by font-lock. From 3899acbb3367984d66c7484a208b40a6851f4cc2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 20 Apr 2023 13:06:24 +0300 Subject: [PATCH 21/21] ; * src/fringe.c: Fix description of large circle. (Bug#62961) --- src/fringe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fringe.c b/src/fringe.c index 5fcb1b27272..ed257c073b9 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -211,14 +211,14 @@ static unsigned short right_curly_arrow_bits[] = { /* Large circle bitmap. */ /* - ........ ..xxxx.. .xxxxxx. xxxxxxxx xxxxxxxx + xxxxxxxx + xxxxxxxx .xxxxxx. ..xxxx.. - ........ */ static unsigned short large_circle_bits[] = { 0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0x7e, 0x3c};