commit 28bf56b8718fc545ed94e3fdb09a3cfa446ca61e (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Wed Jul 29 08:47:29 2020 +0200 Don't default to librgravatar, since there are security implications * lisp/image/gravatar.el (gravatar-service): Change the default from libravatar, since that has privacy concerns (bug#40676). diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el index ff59a72ac8..5b5c27dbe1 100644 --- a/lisp/image/gravatar.el +++ b/lisp/image/gravatar.el @@ -125,11 +125,14 @@ a gravatar for a given email address." (libravatar . ,#'gravatar--service-libravatar)) "Alist of supported gravatar services.") -(defcustom gravatar-service 'libravatar +(defcustom gravatar-service 'gravatar "Symbol denoting gravatar-like service to use. Note that certain services might ignore other options, such as `gravatar-default-image' or certain values as with -`gravatar-rating'." +`gravatar-rating'. + +Note that `'libravatar' has security implications: It can be used +to track whether you're reading a specific mail." :type `(choice ,@(mapcar (lambda (s) `(const ,(car s))) gravatar-service-alist)) :version "28.1" commit db1b1f09b820efeefa60a49684c06d511b70eecb Author: Lars Ingebrigtsen Date: Wed Jul 29 08:38:52 2020 +0200 Use a new method to determine when to auto-stop image animations * lisp/image.el (image-animate-timeout): Make the animation auto-stop use a decaying average to determine when to stop (bug#40685). The default stop condition will probably require some tweaking -- the current default may be too aggressive. diff --git a/etc/NEWS b/etc/NEWS index 4c77162a25..e4d9887480 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -490,6 +490,15 @@ more readable text. Set this variable to nil to get the previous behavior of rendering as wide as the window-width allows. If 'shr-width' is non-nil, it overrides this variable. +** Images + +--- +*** Animated images stop automatically under high CPU pressure sooner. +Previously, an animated image would stop animating if any single image +took more than two seconds to display. The new algorithm maintains a +decaying average of delays, and if this number gets too high, the +animation is stopped. + ** EWW +++ diff --git a/lisp/image.el b/lisp/image.el index 4ea8594a97..4b2faa992f 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -784,6 +784,7 @@ number, play until that number of seconds has elapsed." (if (setq timer (image-animate-timer image)) (cancel-timer timer)) (plist-put (cdr image) :animate-buffer (current-buffer)) + (plist-put (cdr image) :animate-tardiness 0) (run-with-timer 0.2 nil #'image-animate-timeout image (or index 0) (car animation) 0 limit (+ (float-time) 0.2))))) @@ -848,9 +849,14 @@ The minimum delay between successive frames is `image-minimum-frame-delay'. If the image has a non-nil :speed property, it acts as a multiplier for the animation speed. A negative value means to animate in reverse." + ;; We keep track of "how late" image frames arrive. We decay the + ;; previous cumulative value by 10% and then add the current delay. + (plist-put (cdr image) :animate-tardiness + (+ (* (plist-get (cdr image) :animate-tardiness) 0.9) + (float-time (time-since target-time)))) (when (and (buffer-live-p (plist-get (cdr image) :animate-buffer)) - ;; Delayed more than two seconds more than expected. - (or (time-less-p (time-since target-time) 2) + ;; Cumulatively delayed two seconds more than expected. + (or (< (plist-get (cdr image) :animate-tardiness) 2) (progn (message "Stopping animation; animation possibly too big") nil))) commit 76f71e39f583b7f8bb47a47b315f49af6f23886e Author: Lars Ingebrigtsen Date: Wed Jul 29 07:13:56 2020 +0200 Make eww use the XDG download directory * lisp/net/eww.el (erc--download-directory): New function (bug#41030). (eww-download-directory): Use it. (eww-download): Use it. (eww-download-callback): Adjust parameters. diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 9bca0faa85..f9901b6fd7 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -135,7 +135,9 @@ HTML-specified colors or not. This sets the @code{shr-use-colors} variable. A URL can be downloaded with @kbd{d} (@code{eww-download}). This will download the link under point if there is one, or else the URL of the current page. The file will be written to the directory specified -in @code{eww-download-directory} (default: @file{~/Downloads/}). +by @code{eww-download-directory} (default: @file{~/Downloads/}, if it +exists; otherwise as specified by the @samp{DOWNLOAD} @acronym{XDG} +directory)). @findex eww-back-url @findex eww-forward-url diff --git a/etc/NEWS b/etc/NEWS index 650b95867f..4c77162a25 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -492,6 +492,11 @@ behavior of rendering as wide as the window-width allows. If ** EWW ++++ +*** 'eww-download-directory' will now use the XDG location, if defined. +However, if ~/Downloads/ already exists, that will continue to be +used. + --- *** The command 'eww-follow-link' now supports custom mailto handlers. The function that is invoked when clicking on or otherwise following a diff --git a/lisp/net/eww.el b/lisp/net/eww.el index f4e3aa36c5..edb2f729c8 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -32,6 +32,7 @@ (require 'thingatpt) (require 'url) (require 'url-queue) +(require 'xdg) (eval-when-compile (require 'subr-x)) (defgroup eww nil @@ -55,11 +56,24 @@ :group 'eww :type 'string) -(defcustom eww-download-directory "~/Downloads/" - "Directory where files will downloaded." - :version "24.4" +(defun erc--download-directory () + "Return the name of the download directory. +If ~/Downloads/ exists, that will be used, and if not, the +DOWNLOAD XDG user directory will be returned. If that's +undefined, ~/Downloads/ is returned anyway." + (or (and (file-exists-p "~/Downloads/") + "~/Downloads/") + (when-let ((dir (xdg-user-dir "DOWNLOAD"))) + (file-name-as-directory dir)) + "~/Downloads/")) + +(defcustom eww-download-directory 'erc--download-directory + "Directory where files will downloaded. +This should either be a directory name or a function (called with +no parameters) that returns a directory name." + :version "28.1" :group 'eww - :type 'directory) + :type '(choice directory function)) ;;;###autoload (defcustom eww-suggest-uris @@ -1632,20 +1646,23 @@ Differences in #targets are ignored." "Download URL to `eww-download-directory'. Use link at point if there is one, else the current page's URL." (interactive) - (access-file eww-download-directory "Download failed") - (let ((url (or (get-text-property (point) 'shr-url) - (eww-current-url)))) - (if (not url) - (message "No URL under point") - (url-retrieve url #'eww-download-callback (list url))))) - -(defun eww-download-callback (status url) + (let ((dir (if (stringp eww-download-directory) + eww-download-directory + (funcall eww-download-directory)))) + (access-file dir "Download failed") + (let ((url (or (get-text-property (point) 'shr-url) + (eww-current-url)))) + (if (not url) + (message "No URL under point") + (url-retrieve url #'eww-download-callback (list url dir)))))) + +(defun eww-download-callback (status url dir) (unless (plist-get status :error) (let* ((obj (url-generic-parse-url url)) (path (directory-file-name (car (url-path-and-query obj)))) (file (eww-make-unique-file-name (eww-decode-url-file-name (file-name-nondirectory path)) - eww-download-directory))) + dir))) (goto-char (point-min)) (re-search-forward "\r?\n\r?\n") (let ((coding-system-for-write 'no-conversion)) commit bcf486c6043ba5f862c164f618f5b1017a1e0637 Author: Philip K Date: Wed Jul 29 06:54:05 2020 +0200 Make the erc-header-line default to header-line * lisp/erc/erc.el (erc-header-line): Inherit from header-line (the old values were very similar in light mode, but very different in dark mode) (bug#41095). diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 3880778794..bfe8a2b42e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1212,7 +1212,7 @@ which the local user typed." :group 'erc-faces) (defface erc-header-line - '((t :foreground "grey20" :background "grey90")) + '((t :inherit header-line)) "ERC face used for the header line. This will only be used if `erc-header-line-face-method' is non-nil." commit eb9e065c00c5590967255fa3abf51db966a5df72 Author: Juri Linkov Date: Wed Jul 29 03:47:29 2020 +0300 * lisp/vc/vc-git.el (vc-git-log-view-mode): Font-lock AuthorDate (bug#40248) Highlight "AuthorDate" in log-view-font-lock-keywords when [format] pretty = fuller. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 7f6e1db1ed..e0cf9e7959 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1266,7 +1266,7 @@ log entries." ("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)" (1 'change-log-acknowledgment) (2 'change-log-acknowledgment)) - ("^Date: \\(.+\\)" (1 'change-log-date)) + ("^\\(?:Date: \\|AuthorDate: \\)\\(.+\\)" (1 'change-log-date)) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) commit 2ab66c9f9be923350f123fdea05b5b3ce8283d8a Author: Philip K Date: Wed Jul 29 01:21:56 2020 +0300 Replace project-kill-buffers-ignores with project-kill-buffer-conditions * lisp/progmodes/project.el (project-kill-buffer-conditions): Replace the project-kill-buffers-ignores user option. (project--kill-buffer-check): New function. (project--buffers-to-kill): New function. (project-kill-buffers): Use them. Add the NO-CONFIRM argument. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index da4a589c21..51b9347bb9 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1001,16 +1001,51 @@ displayed." (interactive (list (project--read-project-buffer))) (display-buffer-other-frame buffer-or-name)) -(defcustom project-kill-buffers-ignores - '("\\*Help\\*") - "Conditions for buffers `project-kill-buffers' should not kill. -Each condition is either a regular expression matching a buffer -name, or a predicate function that takes a buffer object as -argument and returns non-nil if it matches. Buffers that match -any of the conditions will not be killed." - :type '(repeat (choice regexp function)) +(defcustom project-kill-buffer-conditions + '(buffer-file-name ; All file-visiting buffers are included. + ;; Most of the temp buffers in the background: + (major-mode . fundamental-mode) + ;; non-text buffer such as xref, occur, vc, log, ... + (and (derived-mode . special-mode) + (not (major-mode . help-mode))) + (derived-mode . compilation-mode) + (derived-mode . dired-mode) + (derived-mode . diff-mode)) + "List of conditions to kill buffers related to a project. +This list is used by `project-kill-buffers'. +Each condition is either: +- a regular expression, to match a buffer name, +- a predicate function that takes a buffer object as argument + and returns non-nil if the buffer should be killed, +- a cons-cell, where the car describes how to interpret the cdr. + The car can be one of the following: + * `major-mode': the buffer is killed if the buffer's major + mode is eq to the cons-cell's cdr + * `defived-mode': the buffer is killed if the buffer's major + mode is derived from the major mode denoted by the cons-cell's + cdr + * `not': the cdr is interpreted as a negation of a condition. + * `and': the cdr is a list of recursive conditions, that all have + to be met. + * `or': the cdr is a list of recursive conditions, of which at + least one has to be met. + +If any of these conditions are satified for a buffer in the +current project, it will be killed." + :type '(repeat (choice regexp function symbol + (cons :tag "Major mode" + (const major-mode) symbol) + (cons :tag "Derived mode" + (const derived-mode) symbol) + (cons :tag "Negation" + (const not) sexp) + (cons :tag "Conjunction" + (const and) sexp) + (cons :tag "Disjunction" + (const or) sexp))) :version "28.1" - :package-version '(project . "0.5.0")) + :group 'project + :package-version '(project . "0.6.0")) (defun project--buffer-list (pr) "Return the list of all buffers in project PR." @@ -1022,26 +1057,66 @@ any of the conditions will not be killed." (push buf bufs))) (nreverse bufs))) -;;;###autoload -(defun project-kill-buffers () - "Kill all live buffers belonging to the current project. -Two buffers belong to the same project if their project instances, -as reported by `project-current' in each buffer, are identical. -Certain buffers may be \"spared\", see `project-kill-buffers-ignores'." - (interactive) - (let ((pr (project-current t)) bufs) +(defun project--kill-buffer-check (buf conditions) + "Check if buffer BUF matches any element of the list CONDITIONS. +See `project-kill-buffer-conditions' for more details on the form +of CONDITIONS." + (catch 'kill + (dolist (c conditions) + (when (cond + ((stringp c) + (string-match-p c (buffer-name buf))) + ((symbolp c) + (funcall c buf)) + ((eq (car-safe c) 'major-mode) + (eq (buffer-local-value 'major-mode buf) + (cdr c))) + ((eq (car-safe c) 'derived-mode) + (provided-mode-derived-p + (buffer-local-value 'major-mode buf) + (cdr c))) + ((eq (car-safe c) 'not) + (not (project--kill-buffer-check buf (cdr c)))) + ((eq (car-safe c) 'or) + (project--kill-buffer-check buf (cdr c))) + ((eq (car-safe c) 'and) + (seq-every-p + (apply-partially #'project--kill-buffer-check + buf) + (mapcar #'list (cdr c))))) + (throw 'kill t))))) + +(defun project--buffers-to-kill (pr) + "Return list of buffers in project PR to kill. +What buffers should or should not be killed is described +in `project-kill-buffer-conditions'." + (let (bufs) (dolist (buf (project--buffer-list pr)) - (unless (seq-some - (lambda (c) - (cond ((stringp c) - (string-match-p c (buffer-name buf))) - ((functionp c) - (funcall c buf)))) - project-kill-buffers-ignores) + (when (project--kill-buffer-check buf project-kill-buffer-conditions) (push buf bufs))) - (when (yes-or-no-p (format "Kill %d buffers in %s? " - (length bufs) (project-root pr))) - (mapc #'kill-buffer bufs)))) + bufs)) + +;;;###autoload +(defun project-kill-buffers (&optional no-confirm) + "Kill the buffers belonging to the current project. +Two buffers belong to the same project if their project +instances, as reported by `project-current' in each buffer, are +identical. Only the buffers that match a condition in +`project-kill-buffer-conditions' will be killed. If NO-CONFIRM +is non-nil, the command will not ask the user for confirmation. +NO-CONFIRM is always nil when the command is invoked +interactivly." + (interactive) + (let* ((pr (project-current t)) + (bufs (project--buffers-to-kill pr))) + (cond (no-confirm + (mapc #'kill-buffer bufs)) + ((null bufs) + (message "No buffers to kill")) + ((yes-or-no-p (format "Kill %d buffers in %s? " + (length bufs) + (project-root pr))) + (mapc #'kill-buffer bufs))))) ;;; Project list commit bc486d1e20cd4b7c61dfefb4cda4720628666fe6 Author: Nicolas Petton Date: Tue Jul 28 21:58:50 2020 +0200 Revert "* etc/NEWS.27: Remove temporary markup." This reverts commit c270104e503cf0435a5ae40c5d0e430f4ef4bfb0. diff --git a/etc/NEWS.27 b/etc/NEWS.27 index 7eebb89abf..2c8fa9dd39 100644 --- a/etc/NEWS.27 +++ b/etc/NEWS.27 @@ -15,15 +15,23 @@ in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. +Temporary note: ++++ indicates that all relevant manuals in doc/ have been updated. +--- means no change in the manuals is needed. +When you add a new item, use the appropriate mark if you are sure it +applies, and please also update docstrings as needed. + * Installation Changes in Emacs 27.1 +--- ** Emacs now uses GMP, the GNU Multiple Precision library. By default, if 'configure' does not find a suitable libgmp, it arranges for the included mini-gmp library to be built and used. The new configure option '--without-libgmp' uses mini-gmp even if a suitable libgmp is available. +--- ** Emacs can now use HarfBuzz as its shaping engine. The new configure option '--with-harfbuzz' adds support for the HarfBuzz text shaping engine. It is on by default; use './configure @@ -36,6 +44,7 @@ supported ones, so the font backends that use older shaping engines enabled by default; they can be enabled via the 'font-backend' frame parameter or via X resources. +--- ** The new configure option '--with-json' adds native support for JSON. This uses the Jansson library. The option is on by default; use './configure --with-json=no' to build without Jansson support. The @@ -43,6 +52,7 @@ new JSON functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer' are typically much faster than their Lisp counterparts from json.el. +--- ** The configure option '--with-cairo' is no longer experimental. This builds Emacs with Cairo drawing, and supports built-in printing when Emacs is built with GTK+. Some severe bugs in this build were @@ -51,6 +61,7 @@ that building with Cairo enabled results in using Pango instead of libXft for font support, and that Pango 1.44 has removed support for bitmapped fonts. ++++ ** Emacs now uses a "portable dumper" instead of unexec. This improves compatibility with memory allocation on modern systems, and in particular better supports the Address Space Layout @@ -74,10 +85,12 @@ use the configure-time option '--with-dumping=unexec'; however, please file a bug report describing the situation, as unexec dumping is deprecated, and we plan on removing it in some future release. +--- ** The new configure option '--enable-checking=structs' attempts to check that the portable dumper code has been updated to match the last change to one of the data structures that it relies on. +--- ** The configure options '--enable-checking=conslist' and '--enable-checking=xmallocoverrun' have been withdrawn. The former made Emacs irredeemably slow, and the latter made it crash. Neither @@ -85,16 +98,19 @@ option was useful with modern debugging tools such as AddressSanitizer. (See "etc/DEBUG" for the details of using the modern replacements of the removed configure options.) +--- ** Emacs no longer defaults to using ImageMagick to display images. This is due to security and stability concerns with ImageMagick. To override the default, use 'configure --with-imagemagick'. +--- ** Several configure options now accept an option-argument 'ifavailable'. For example, './configure --with-xpm=ifavailable' now configures Emacs to attempt to use libxpm but to continue building even if libxpm is absent. The other affected options are '--with-gif', '--with-gnutls', '--with-jpeg', '--with-png', and '--with-tiff'. +--- ** The 'etags' program now uses the C library's regular expression matcher. If it's possible, 'etags' will use the regexp matcher from the system's standard C library, otherwise it will be linked with a @@ -104,6 +120,7 @@ configure option '--without-included-regex' forces 'etags' to use the C library's regex matcher even if the regex substitute ordinarily would be used to work around compatibility problems. +--- ** Emacs has been ported to the '-fcheck-pointer-bounds' option of GCC. This causes Emacs to check bounds of some arrays addressed by its internal pointers, which can be helpful when debugging the Emacs @@ -111,6 +128,7 @@ interpreter or modules that it uses. If your platform supports it you can enable it when configuring, e.g., './configure CFLAGS="-g3 -O2 -mmpx -fcheck-pointer-bounds"' on Intel MPX platforms. +--- ** Emacs now normally uses a C pointer type instead of a C integer type to implement Lisp_Object, which is the fundamental machine word type internal to the Emacs Lisp interpreter. This change aims to @@ -119,24 +137,30 @@ option '--enable-check-lisp-object-type' is therefore no longer as useful and so is no longer enabled by default in developer builds, to reduce differences between developer and production builds. +--- ** The distribution tarball now has test cases; 'make check' runs them. This is intended mostly to help developers. +--- ** Emacs now requires GTK 2.24 and GTK 3.10 for the GTK 2 and GTK 3 builds respectively. +--- ** New make target 'help' shows a summary of common make targets. +--- ** Emacs now builds with dynamic module support by default. Pass '--without-modules' to 'configure' to disable dynamic module support. +--- ** The ftx font backend driver is now obsolete and will be removed in Emacs 28. * Startup Changes in Emacs 27.1 ++++ ** Emacs can now use the XDG convention for init files. The 'XDG_CONFIG_HOME' environment variable (which defaults to "~/.config") specifies the XDG configuration parent directory. Emacs @@ -156,6 +180,7 @@ Emacs will never create "$XDG_CONFIG_HOME/emacs". Whichever directory Emacs decides to use, it will set 'user-emacs-directory' to point to it. ++++ ** Emacs can now be configured using an early init file. The file is called "early-init.el", in 'user-emacs-directory'. It is loaded very early in the startup process: before graphical elements @@ -171,6 +196,7 @@ process, and some important parts of the Emacs session, such as 'window-system' and other GUI features, are not yet set up, which could make some customization fail to work. ++++ ** Installed packages are now activated *before* loading the init file. As a result of this change, it is no longer necessary to call 'package-initialize' in your init file. @@ -192,6 +218,7 @@ it won't work right without some adjustment: does not need to pay attention to 'package-load-list' or 'package-user-dir' any more. +--- ** Emacs now notifies systemd when startup finishes or shutdown begins. Units that are ordered after 'emacs.service' will only be started after Emacs has finished initialization and is ready for use. @@ -202,8 +229,10 @@ the new version of the file again.) * Changes in Emacs 27.1 +--- ** Emacs now supports Unicode Standard version 13.0. ++++ ** Emacs now supports resizing and rotating images without ImageMagick. All modern systems support this feature. (On GNU and Unix systems, Cairo drawing or the XRender extension to X11 is required for this to @@ -213,10 +242,12 @@ enable scaling.) The new function 'image-transforms-p' can be used to test whether any given frame supports these capabilities. ++++ ** The Network Security Manager now allows more fine-grained control of what checks to run via the 'network-security-protocol-checks' user option. ++++ ** TLS connections have their security tightened by default. Most of the checks for outdated, believed-to-be-weak TLS algorithms and ciphers are now switched on by default. (In addition, several new @@ -228,6 +259,7 @@ issued), you can either set 'network-security-protocol-checks' to nil, or adjust the elements in that user option to only happen on the 'high' security level (assuming you use the 'medium' level). +--- ** New user option 'nsm-trust-local-network'. Allows skipping Network Security Manager checks for hosts on your local subnet(s). It defaults to nil. Usually, there should be no @@ -235,18 +267,21 @@ need to set this non-nil, and doing that risks opening your local network connections to attacks. So be sure you know what you are doing before changing the value. ++++ ** Native GnuTLS connections can now use client certificates. Previously, this support was only available when using the external 'gnutls-cli' or 'starttls' command. Call 'open-network-stream' with ':client-certificate t' to trigger looking up of per-server certificates via 'auth-source'. ++++ ** New user option 'network-stream-use-client-certificates'. When non-nil, 'open-network-stream' performs lookups of client certificates using 'auth-source' as if ':client-certificate t' were specified if there is no explicit ':client-certificate' parameter. Defaults to nil. ++++ ** 'next/previous-multiframe-window' have been renamed. The new names are as follows: @@ -257,11 +292,12 @@ The old function names are maintained as aliases for backward compatibility. ** emacsclient - ++++ *** emacsclient now supports the 'EMACS_SOCKET_NAME' environment variable. The command-line argument '--socket-name' overrides it. (The same behavior as for the pre-existing 'EMACS_SERVER_FILE' variable.) ++++ *** Emacs and emacsclient now default to "$XDG_RUNTIME_DIR/emacs". This is used as the directory for client/server sockets, if Emacs is running on a platform or environment that sets the 'XDG_RUNTIME_DIR' @@ -269,9 +305,11 @@ environment variable to indicate where session sockets should go. To get the old, less-secure behavior, you can set the 'EMACS_SOCKET_NAME' environment variable to an appropriate value. +--- *** When run by root, emacsclient no longer connects to non-root sockets. (Instead you can use Tramp methods to run root commands in a non-root Emacs.) +--- ** 'xft-ignore-color-fonts' now ignores even more color fonts. There are color fonts that managed to bypass the existing checks, causing XFT crashes, they are now filtered out. Setting @@ -279,36 +317,45 @@ causing XFT crashes, they are now filtered out. Setting require setting 'face-ignored-fonts' to filter out problematic fonts. Known problematic fonts are "Noto Color Emoji" and "Emoji One". +--- ** The GTK+ font chooser now respects 'face-ignored-fonts'. When using 'menu-set-font' under GTK3, the available fonts are now matched against 'face-ignored-fonts'. +--- ** The GTK+ font chooser now remembers the previously selected settings. It now remembers the name, size, style, etc. ++++ ** New user option 'what-cursor-show-names'. When non-nil, 'what-cursor-position' will show the name of the character in addition to the decimal/hex/octal representation. Default nil. ++++ ** New function 'network-lookup-address-info'. This does IPv4 and/or IPv6 address lookups on hostnames. ++++ ** 'network-interface-list' can now return IPv4 and IPv6 addresses. IPv4 and IPv6 addresses are now returned by default if available, optionally including netmask/broadcast address information. +--- ** Control of the threshold for using the 'distant-foreground' color. The threshold for color distance below which the 'distant-foreground' color of the face will be used instead of the foreground color can now be controlled via the new variable 'face-near-same-color-threshold'. The default value is 30000, as the previously hard-coded threshold. ++++ ** The function 'read-passwd' uses "*" as default character to hide passwords. ++++ ** The function 'read-answer' now accepts not only single character answers, but also function keys like 'F1', character events such as 'C-M-h', and control characters like 'C-h'. ++++ ** Lexical binding is now used by default when evaluating interactive Elisp. More specifically, 'lexical-binding' is now used by default for 'M-:' and '--eval' (including in evaluations invoked from 'emacsclient' via @@ -324,16 +371,19 @@ to work with lexical binding, or wrap it in an extra level of 'eval'. For example, --eval "FORM" becomes --eval "(eval 'FORM)" (note the extra quote in 'FORM). +--- ** The new user option 'tooltip-resize-echo-area' avoids truncating tooltip text on GUI frames when tooltips are displayed in the echo area. Instead, it resizes the echo area as needed to accommodate the full tool-tip text. +--- ** Show mode line tooltips only if the corresponding action applies. Customize the user option 'mode-line-default-help-echo' to restore the old behavior where the tooltip text is also shown when the corresponding action does not apply. ++++ ** New hook 'server-after-make-frame-hook'. This hook is a convenient place to perform initializations in daemon mode which require GUI features to be available. One example is @@ -342,12 +392,15 @@ the call to 'desktop-read' in this hook, if you want the GUI settings to be restored, or if desktop.el needs to interact with you during restoration of the session. ++++ ** The functions 'set-frame-height' and 'set-frame-width' are now commands, and will set the currently selected frame to the height/ width specified by the numeric prefix. ++++ ** New function 'logcount' calculates an integer's Hamming weight. ++++ ** New function 'libxml-available-p'. This function returns non-nil if libxml support is both compiled in and available at run time. Lisp programs should use this function to @@ -355,6 +408,7 @@ detect built-in libxml support, instead of testing for that indirectly, e.g., by checking that functions like 'libxml-parse-html-region' return nil. ++++ ** 'libxml-parse-xml-region' and 'libxml-parse-html-region' take a parameter that's called DISCARD-COMMENTS, but it really only discards the top-level comment. Therefore this parameter is now @@ -362,67 +416,83 @@ obsolete, and the new utility function 'xml-remove-comments' can be used to remove comments before calling the libxml functions to parse the data. ++++ ** A new DOM (the XML/HTML document structure returned by functions such as 'libxml-parse-html-region') traversal function has been added: 'dom-search', which takes a DOM and a predicate and returns all nodes that match. ++++ ** New function 'fill-polish-nobreak-p', to be used in 'fill-nobreak-predicate'. It blocks line breaking after a one-letter word, also in the case when this word is preceded by a non-space, but non-alphanumeric character. ++++ ** The limit on repetitions in regexps has been raised to 2^16-1. It was previously limited to 2^15-1. For example, the following regular expression was previously invalid, but is now accepted: x\{32768\} +--- ** The German prefix and postfix input methods now support Capital sharp S. +--- ** New input methods 'hawaiian-postfix' and 'hawaiian-prefix'. +--- ** New input methods 'georgian-qwerty' and 'georgian-nuskhuri'. +--- ** New input methods for several variants of the Sami language. The Sami input methods include: 'norwegian-sami-prefix', 'bergsland-hasselbrink-sami-prefix', 'southern-sami-prefix', 'ume-sami-prefix', 'northern-sami-prefix', 'inari-sami-prefix', 'skolt-sami-prefix', and 'kildin-sami-prefix'. ++++ ** Japanese environments use UTF-8 by default. In Japanese environments that do not specify encodings and are not based on MS-Windows, the default encoding is now utf-8 instead of japanese-iso-8bit. ++++ ** New function 'exec-path'. This function by default returns the value of the corresponding user option, but can optionally return the equivalent of 'exec-path' from a remote host. ++++ ** The function 'executable-find' supports an optional argument REMOTE. This triggers searching for the program on the remote host as indicated by 'default-directory'. ++++ ** New user option 'auto-save-no-message'. When set to t, no message will be shown when auto-saving (default value: nil). +--- ** The value of 'make-cursor-line-fully-visible' can now be a function. In addition to nil or non-nil, the value can now be a predicate function. Follow mode uses this to control scrolling of its windows when the last screen line in a window is not fully visible. ++++ ** New variable 'emacs-repository-branch'. It reports the git branch from which Emacs was built. ++++ ** New user option 'switch-to-buffer-obey-display-actions'. When non-nil, 'switch-to-buffer' uses 'pop-to-buffer-same-window' that respects display actions specified by 'display-buffer-alist' and 'display-buffer-overriding-action'. ++++ ** The user option 'switch-to-visible-buffer' is now obsolete. Customize 'switch-to-prev-buffer-skip' instead. ++++ ** New user option 'switch-to-prev-buffer-skip'. This user option allows specifying the set of buffers that may be shown by 'switch-to-prev-buffer' and 'switch-to-next-buffer' more @@ -434,8 +504,10 @@ matches strings where the pattern appears as a subsequence. Put simply, makes "foo" complete to both "barfoo" and "frodo". Add 'flex' to 'completion-styles' or 'completion-category-overrides' to use it. +--- ** The 'completion-common-part' face is now visible by default. ++++ ** New face attribute ':extend' to control face extension at EOL. The new face attribute ':extend' controls whether to use the face for displaying the empty space beyond end of line (EOL) till the edge of @@ -452,25 +524,32 @@ Consequently, a theme generally shouldn't specify this attribute unless it has a good reason to do so. ** Connection-local variables ++++ *** Connection-local variables are applied by default like file-local and directory-local variables. ++++ *** The macro 'with-connection-local-variables' has been renamed from 'with-connection-local-profiles'. No argument PROFILES needed any longer. +--- ** New user option 'next-error-verbose' controls when 'next-error' outputs a message about the error locus. +--- ** New user option 'grep-search-path' defines the directories searched for grep hits (this used to be controlled by 'compilation-search-path'). +--- ** New user option 'emacs-lisp-compilation-search-path' defines the directories searched for byte-compiler error messages (this used to be controlled by 'compilation-search-path'). +--- ** Multicolor fonts such as "Noto Color Emoji" can be displayed on Emacs configured with Cairo drawing and linked with cairo >= 1.16.0. ++++ ** Emacs now optionally displays a fill column indicator. This is similar to what 'fill-column-indicator' package provides, but much faster and compatible with 'show-trailing-whitespace'. @@ -485,36 +564,46 @@ in tooltips, as it is not useful there. There are 2 new buffer local variables and 1 face to customize this mode, they are described in the manual "(emacs) Display". ++++ ** 'progress-reporter-update' now accepts an optional suffix string to display. +--- ** New user option 'xref-file-name-display' controls the display of file names in xref buffers. +--- ** New user option 'byte-count-to-string-function'. It is used for displaying file sizes and disk space in some cases. ++++ ** Emacs now interprets RGB triplets like HTML, SVG, and CSS do. The X convention previously used differed slightly, particularly for RGB triplets with a single hexadecimal digit per component. +--- ** The toolbar now shows the equivalent key binding in its tooltips. +--- ** The File menu-bar menu was re-arranged. Print menu items moved to submenu, and also added the new entries for tabs. +--- ** 'scroll-lock-mode' is now bound to the 'Scroll_Lock' key globally. Note that this key binding will not work on MS-Windows systems if 'w32-scroll-lock-modifier' is non-nil. +--- ** 'global-set-key', called interactively, now no longer downcases a key binding with an upper case letter - if you can type it, you can bind it. ++++ ** 'read-from-minibuffer' now works with buffer-local history variables. The HIST argument of 'read-from-minibuffer' now works correctly with buffer-local variables. This means that different buffers can have their own separated input history list if desired. ++++ ** 'backup-by-copying-when-privileged-mismatch' applies to file gid, too. In addition to checking the file owner uid, Emacs also checks that the group gid is not greater than 'backup-by-copying-when-privileged-mismatch'; @@ -523,39 +612,48 @@ if so, 'backup-by-copying-when-mismatch' will be forced on. * Editing Changes in Emacs 27.1 ++++ ** When asked to visit a large file, Emacs now offers to visit it literally. Previously, Emacs would only ask for confirmation before visiting large files. Now it also offers a third alternative: to visit the file literally, as in 'find-file-literally', which speeds up navigation and editing of large files. ++++ ** 'zap-to-char' now uses the history of characters you used to zap to. 'zap-to-char' uses the new 'read-char-from-minibuffer' function to allow navigating through the history of characters that have been input. This is mostly useful for characters that have complex input methods where inputting the character again may involve many keystrokes. ++++ ** 'save-some-buffers' now has a new action in the prompt: 'C-f' will exit the command and switch to the buffer currently being asked about. +--- ** More commands support noncontiguous rectangular regions, namely 'upcase-dwim', 'downcase-dwim', 'capitalize-dwim', 'capitalize-region', 'upcase-initials-region', 'replace-string', 'replace-regexp', and 'delimit-columns-region'. ++++ ** The new 'amalgamating-undo-limit' variable can be used to control how many changes should be amalgamated when using the 'undo' command. +--- ** The 'newline-and-indent' command (commonly bound to 'RET' in many modes) now takes an optional numeric argument to specify how many times is should insert newlines (and indent). ++++ ** New command 'make-empty-file'. +--- ** New variable 'x-wait-for-event-timeout'. This controls how long Emacs will wait for updates to the graphical state to take effect (making a frame visible, for example). ++++ ** New user option 'electric-quote-replace-double'. This option controls whether '"' is replaced in 'electric-quote-mode', in addition to other quote characters. If non-nil, ASCII double-quote @@ -563,48 +661,59 @@ characters that quote text "like this" are replaced by double typographic quotes, “like this”, in text modes, and in comments in non-text modes. +--- ** New user option 'flyspell-case-fold-duplications'. This option controls whether Flyspell mode considers consecutive words to be duplicates if they are not in the same case. If non-nil, the default, words are considered to be duplicates even if their letters' case does not match. +--- ** 'write-abbrev-file' now includes special properties. 'write-abbrev-file' now writes special properties like ':case-fixed' for abbrevs that have them. ++++ ** 'write-abbrev-file' skips empty tables. 'write-abbrev-file' now skips inserting a 'define-abbrev-table' form for tables which do not have any non-system abbrevs to save. ++++ ** The new functions and commands 'text-property-search-forward' and 'text-property-search-backward' have been added. These provide an interface that's more like functions like 'search-forward'. +--- ** 'add-dir-local-variable' now uses dotted pair notation syntax to write alists of variables to ".dir-locals.el". This is the same syntax that you can see in the example of a ".dir-locals.el" file in the node "(emacs) Directory Variables" of the user manual. ++++ ** Network connections using 'local' can now use IPv6. 'make-network-process' now uses the correct loopback address when asked to use ':host 'local' and ':family 'ipv6'. ++++ ** The new function 'replace-region-contents' replaces the current region using a given replacement-function in a non-destructive manner (in terms of 'replace-buffer-contents'). ++++ ** The command 'replace-buffer-contents' now has two optional arguments mitigating performance issues when operating on huge buffers. ++++ ** Dragging 'C-M-mouse-1' now marks rectangular regions. ++++ ** The command 'delete-indentation' now operates on the active region. If the region is active, the command joins all the lines in the region. When there's no active region, the command works on the current and the previous or the next line, as before. ++++ ** You can now change the font size with the mouse wheel. Scrolling the mouse wheel with the Ctrl key pressed will now act the same as the 'C-x C-+' and 'C-x C--' commands. @@ -612,15 +721,18 @@ same as the 'C-x C-+' and 'C-x C--' commands. * Changes in Specialized Modes and Packages in Emacs 27.1 +--- ** New HTML mode skeleton 'html-id-anchor'. This new command (which inserts an _ skeleton) is bound to 'C-c C-c #'. ++++ ** New command 'font-lock-refontify'. This is an interactive convenience function to be used when developing font locking for a mode. It recomputes the font locking data and then re-fontifies the buffer. +--- ** Font Lock is smarter about fontifying unterminated strings and comments. When you type a quote that starts a string, or a comment delimiter that starts a comment, font-lock will not immediately refontify the @@ -631,22 +743,28 @@ comment. This is controlled by the new user option 'jit-lock-antiblink-grace', which specifies the delay in seconds. The default is 2 seconds; set to nil to get back the old behavior. +--- ** The 'C' command in 'tar-mode' will now preserve the timestamp of the extracted file if the new user option 'tar-copy-preserve-time' is non-nil. +--- ** 'autoconf-mode' is now used instead of 'm4-mode' for the "acinclude.m4" / "aclocal.m4" / "acsite.m4" files. +--- ** On GNU/Linux, 'M-x battery' will now list all batteries, no matter what they're named, and the 'battery-linux-sysfs-regexp' variable has been removed. +--- ** The 'list-processes' command now includes port numbers in the network connection information (in addition to the host name). +--- ** The 'cl' package is now officially deprecated in favor of 'cl-lib'. +--- ** desktop *** When called interactively with a prefix arg 'C-u', 'desktop-read' @@ -654,94 +772,115 @@ now prompts the user for the directory containing the desktop file. ** display-line-numbers-mode ++++ *** New faces 'line-number-major-tick' and 'line-number-minor-tick', and user options 'display-line-numbers-major-tick' and 'display-line-numbers-minor-tick' can be used to highlight the line numbers of lines multiple of certain numbers. ++++ *** New variable 'display-line-numbers-offset', when non-zero, adds an offset to absolute line numbers. ** winner ++++ *** A new user option, 'winner-boring-buffers-regexp', has been added. ** table ++++ *** 'table-generate-source' now supports wiki and mediawiki. This command can now output wiki and mediawiki format tables. ** telnet-mode +--- *** Reverting a buffer in 'telnet-mode' will restart a closed connection. ** goto-addr +--- *** A way to more conveniently specify what URI address schemes should be ignored has been added via the 'goto-address-uri-schemes-ignored' variable. ** tex-mode ++++ *** 'latex-noindent-commands' controls indentation of certain commands. You can use this new user option to control indentation of arguments of \emph, \footnote, and similar commands. ** byte compiler ++++ *** 'byte-compile-dynamic' is now obsolete. This is because on the one hand it suffers from misbehavior in corner cases that have plagued it for years, and on the other hand experience indicates that it doesn't bring any measurable benefit. +--- *** The 'g' keystroke in "*Compile-Log*" buffers has been bound to a new command that will recompile the file previously compiled with 'M-x byte-compile-file' and the like. ** compile.el +--- *** In 'compilation-error-regexp-alist', 'line' (and 'end-line') can be functions. ++++ *** 'compilation-context-lines' can now take the value t; this is like nil, but instead of scrolling the current line to the top of the screen when there is no left fringe, it inserts a visible arrow before column zero. +--- *** The new 'compilation-transform-file-match-alist' user option can be used to transform file name matches compilation output, and remove known false positives being recognized as warnings/errors. ** cl-lib.el ++++ *** 'cl-defstruct' has a new ':noinline' argument to prevent inlining its functions. ++++ *** 'cl-defstruct' slots accept a ':documentation' property. +--- *** 'cl-values-list' will now signal an error if its argument isn't a list. ** doc-view.el +--- *** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'. +--- *** Added support for password-protected PDF files. +--- *** A new user option 'doc-view-pdftotext-program-args' has been added to allow controlling how the conversion to text is done. ++++ *** The prefix key 's' was changed to 'c' for slicing commands to avoid conflicts with 'image-mode' key 's'. The new key 'c' still has good mnemonics of "cut", "clip", "crop". ** Ido +--- *** New user option 'ido-big-directories' to mark directories whose names match certain regular expressions as big. Ido won't attempt to list the contents of such directories when completing file names. ** Minibuffer ++++ *** New user option 'minibuffer-beginning-of-buffer-movement'. This option allows control of how the 'M-<' command works in the minibuffer. If non-nil, point will move to the end of the prompt @@ -749,6 +888,7 @@ the minibuffer. If non-nil, point will move to the end of the prompt preserves the original behavior of 'M-<' moving to the beginning of the prompt. ++++ *** When the minibuffer is active, echo-area messages are displayed at the end of the minibuffer instead of hiding the minibuffer by the echo area display. The new user option 'minibuffer-message-clear-timeout' @@ -758,15 +898,19 @@ temporarily overwrote the minibuffer contents until the user typed something, set 'set-message-function' and 'clear-message-function' to nil. +--- *** Minibuffer now uses 'minibuffer-message' to display error messages at the end of the active minibuffer. To disable this, remove 'minibuffer-error-initialize' from 'minibuffer-setup-hook'. ++++ *** 'y-or-n-p' now uses the minibuffer to read 'y' or 'n' answer. +--- *** Some commands that previously used 'read-char-choice' now read a character using the minibuffer by 'read-char-from-minibuffer'. +--- ** map.el *** Now also understands plists. @@ -775,8 +919,10 @@ a character using the minibuffer by 'read-char-from-minibuffer'. *** 'map-contains-key' now returns a boolean rather than the key. *** Deprecate the 'testfn' args of 'map-elt' and 'map-contains-key'. *** New generic function 'map-insert'. ++++ *** The 'type' arg can be a list '(hash-table :key1 VAL1 :key2 VAL2 ...)'. +--- ** seq.el New convenience functions 'seq-first' and 'seq-rest' give easy access to respectively the first and all but the first elements of sequences. @@ -784,18 +930,22 @@ to respectively the first and all but the first elements of sequences. The new predicate function 'seq-contains-p' should be used instead of the now obsolete 'seq-contains'. +--- ** Follow mode In the current follow group of windows, "ghost" cursors are no longer displayed in the non-selected follow windows. To get the old behavior back, customize 'follow-hide-ghost-cursors' to nil. ++++ ** New variable 'warning-fill-column' for 'display-warning'. ** Windmove +--- *** 'windmove-create-window' when non-nil makes a new window. This happens upon moving off the edge of the frame. ++++ *** Windmove supports directional window display and selection. The new command 'windmove-display-default-keybindings' binds default keys with provided modifiers (by default, Shift-Meta) to the commands @@ -809,6 +959,7 @@ display the buffer in the same window, for example, 'S-M-0 C-h e' displays the "*Messages*" buffer in the same window. 'S-M-t C-h r' displays the Emacs manual in a new tab. ++++ *** Windmove also supports directional window deletion. The new command 'windmove-delete-default-keybindings' binds default keys with provided prefix (by default, 'C-x') and modifiers (by default, @@ -818,10 +969,12 @@ With a prefix arg 'C-u', also kills the buffer in that window. With 'M-0', deletes the selected window and selects the window that was in the specified direction. ++++ *** New command 'windmove-swap-states-in-direction' binds default keys to the commands that swap the states of the selected window with the window in the specified direction. +--- *** Windmove code no longer used is now obsolete. That includes the user option 'windmove-window-distance-delta' and the functions 'windmove-coord-add', 'windmove-constrain-to-range', @@ -829,82 +982,104 @@ functions 'windmove-coord-add', 'windmove-constrain-to-range', 'windmove-constrain-loc-for-movement', 'windmove-wrap-loc-for-movement', 'windmove-reference-loc' and 'windmove-other-window-loc'. +--- ** Octave mode The mode is automatically enabled in files that start with the 'function' keyword. ** project.el ++++ *** New commands 'project-search' and 'project-query-replace-regexp'. +--- *** New user option 'project-read-file-name-function'. ** Etags ++++ *** 'next-file' is now an obsolete alias of 'tags-next-file'. +--- *** 'tags-loop-revert-buffers' is an obsolete alias of 'fileloop-revert-buffers'. ++++ *** The 'tags-loop-continue' function along with the 'tags-loop-operate' and 'tags-loop-scan' variables are now obsolete; use the new 'fileloop-initialize' and 'fileloop-continue' functions instead. ++++ *** etags is now able to read Zstandard-compressed files. ** bibtex +--- *** New commands 'bibtex-next-entry' and 'bibtex-previous-entry'. In 'bibtex-mode-map', 'forward-paragraph' and 'backward-paragraph' are remapped to these, respectively. ** Dired ++++ *** New command 'dired-create-empty-file'. ++++ *** New command 'dired-number-of-marked-files'. It is by default bound to '* N'. +--- *** The marking commands now report how many files were marked by the command itself, not how many files are marked in total. ++++ *** The new user option 'dired-create-destination-dirs' controls whether 'dired-do-copy' and 'dired-rename-file' should create non-existent directories in the destination. ++++ *** 'dired-dwim-target' can be customized to prefer either the next window, or one of the most recently visited windows with a Dired buffer. ++++ *** When the new user option 'dired-vc-rename-file' is non-nil, Dired performs file renaming using underlying version control system. +--- *** Zstandard compression is now supported for 'dired-do-compress' and 'dired-do-compress-to'. +--- *** On systems that support suid/guid files, Dired now fontifies the permissions of such files with a special face 'dired-set-id'. +--- *** A new face, 'dired-special', is used to highlight sockets, named pipes, block devices and character devices. ** Find-Dired +--- *** New user option 'find-dired-refine-function'. The default value is 'find-dired-sort-by-filename'. +--- *** New sorting options for the user option 'find-ls-option'. ** Change Logs and VC +--- *** New user option 'vc-tor'. When non-nil, this user option causes the VC commands to communicate with the repository via Tor's proxy, using the 'torsocks' wrapper script. The default is nil. ++++ *** New command 'log-edit-generate-changelog-from-diff', bound to 'C-c C-w'. This generates ChangeLog entries from the VC fileset diff. ++++ *** Recording ChangeLog entries doesn't require an actual file. If a ChangeLog file doesn't exist, and if the new user option 'add-log-dont-create-changelog-file' is non-nil (which is the @@ -914,26 +1089,32 @@ still be used if it exists.) Set the user option to nil to get the previous behavior of always creating a buffer that visits a ChangeLog file. ++++ *** The new 'd' command ('vc-dir-clean-files') in 'vc-dir-mode' buffers will delete the marked files (or if no files are marked, the file under point). This command does not notify the VC backend, and is mostly useful for unregistered files. +--- *** 'vc-dir-ignore' now takes a prefix argument to ignore all marked files. +--- *** New user option 'vc-git-grep-template'. This new user option allows customizing the default arguments passed to 'git-grep' when 'vc-git-grep' is used. +--- *** Command 'vc-git-stash' now respects marks in the "*vc-dir*" buffer. When some files are marked, only those are stashed. When no files are marked, all modified files are stashed, as before. +--- *** 'vc-dir' now shows a button allowing you to hide the stash list. Controlled by user option 'vc-git-show-stash'. Default t means show the entire list as before. An integer value limits the list length (but still allows you to show the entire list via the button). +--- *** 'vc-git-stash' is now bound to 'C' in the stash headers. -- @@ -941,35 +1122,44 @@ the entire list as before. An integer value limits the list length 'vc-git-stash' and 'vc-git-stash-snapshot' can now be run using 'C' and 'S' respectively, including when there are no stashes. +--- *** The new hook 'vc-retrieve-tag-hook' runs after retrieving a tag. +--- *** 'vc-hg' now invokes 'smerge-mode' when visiting files. Code that attempted to invoke 'smerge-mode' when visiting an Hg file with conflicts existed in earlier versions of Emacs, but incorrectly never detected a conflict due to invalid assumptions about cached values. ++++ *** The Hg (Mercurial) back-end now supports 'vc-region-history'. The 'C-x v h' command now works in buffers that visit files controlled by Hg. ++++ *** The Hg (Mercurial) back-end now prompts for revision to merge when you invoke 'C-x v m' ('vc-merge'). +--- *** The Hg (Mercurial) back-end now uses tags, branches and bookmarks instead of revision numbers as completion candidates when it prompts for a revision. +--- *** New user option 'vc-hg-revert-switches'. It specifies switches to pass to Hg's 'revert' command. ++++ *** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions and compares their entire trees. +--- *** 'C-x v M D' ('vc-diff-mergebase') and 'C-x v M L' ('vc-log-mergebase') print diffs and logs between the merge base (common ancestor) of two given revisions. ++++ *** New command 'vc-log-search' asks for a pattern, searches it in the revision log, and displays matched log entries in the log buffer. For example, 'M-x vc-log-search RET bug#36644 RET' @@ -978,6 +1168,7 @@ With a prefix argument asks for a command, so for example, 'C-u M-x vc-log-search RET git log -1 f302475 RET' will display just one log entry found by its revision number. ++++ *** It is now possible to display a specific revision given by its ID. If you invoke 'C-x v L' ('vc-print-root-log') with a numeric argument of 1, as in 'C-1 C-x v L' or 'C-u 1 C-x v L', it asks for a revision @@ -985,46 +1176,56 @@ ID, and shows its log entry together with the diffs introduced by the revision's commit. (For some less capable VCSes, only the log entry is shown.) +--- *** New user option 'vc-find-revision-no-save'. With non-nil, 'vc-find-revision' doesn't write the created buffer to file. +--- *** 'C-x v =' can now mimic Magit's diff format. Set the new user option 'diff-font-lock-prettify' to t for that, see below under "Diff mode". +--- *** The 'diff' function arguments OLD and NEW may each be a buffer rather than a file, in non-interactive calls. This change was made in Emacs 24.1, but wasn't documented until now. ++++ *** New command 'diff-buffers' interactively diffs two buffers. ** Diff mode ++++ *** Hunks are now automatically refined by font-lock. To disable refinement, set the new user option 'diff-refine' to nil. To get back the old behavior where hunks are refined as you navigate through a diff, set 'diff-refine' to the symbol 'navigate'. ++++ *** 'diff-auto-refine-mode' is deprecated in favor of 'diff-refine'. It is no longer enabled by default and binding it no longer has any effect. ++++ *** Better syntax highlighting of Diff hunks. Fragments of source in Diff hunks are now by default highlighted according to the appropriate major mode. Customize the new user option 'diff-font-lock-syntax' to nil to disable this. +--- *** File headers can be shortened, mimicking Magit's diff format. To enable it, set the new user option 'diff-font-lock-prettify' to t. On GUI frames, this option also displays the insertion and deletion indicators on the left fringe. ++++ *** Prefix arg of 'diff-goto-source' means jump to the old revision of the file under version control if point is on an old changed line, or to the new revision of the file otherwise. ** Texinfo ++++ *** New function for inserting '@pxref', '@xref', or '@ref' commands. The function 'texinfo-insert-dwim-@ref', bound to 'C-c C-c r' by default, inserts one of three types of references based on the text @@ -1033,29 +1234,35 @@ start of a sentence or at '(point-min)', else '@ref'. ** Browse-url +--- *** The function 'browse-url-emacs' can now visit a URL in selected window. It now treats the optional 2nd argument to mean that the URL should be shown in the currently selected window. +--- *** A new function, 'browse-url-add-buttons' can be used to add clickable links to most ordinary special-mode buffers that display text that have URLs embedded. 'browse-url-button-regexp' controls what's considered a button. +--- *** New user option 'browse-url-secondary-browser-function'. It can be set to a function that invokes an alternative browser. ** Comint ++++ *** 'send-invisible' is now an obsolete alias for 'comint-send-invisible'. Also, 'shell-strip-ctrl-m' is declared obsolete. ++++ *** 'C-c .' ('comint-insert-previous-argument') no longer interprets '&'. This feature caused problems when '&&' was present in the previous command. Since this command emulates 'M-.' in Bash and zsh, neither of which treats '&' specially, the feature was removed for compatibility with these shells. ++++ *** 'comint-insert-previous-argument' can now count arguments from the end. By default, invoking 'C-c .' with a numeric argument N would copy the Nth argument, counting from the first one. But if the new user option @@ -1065,9 +1272,11 @@ better emulate 'M-.' in both Bash and zsh, since the former counts from the beginning of the arguments, while the latter counts from the end. ++++ *** 'comint-run' can now accept a list of switches to pass to the program. 'C-u M-x comint-run' will prompt for the switches interactively. ++++ *** Abnormal hook 'comint-password-function' has been added. This hook permits a derived mode to supply a password for the underlying command interpreter without prompting the user. For @@ -1083,6 +1292,7 @@ if it had been supplied on the command line. ** SQL +--- *** SQL Indent Minor Mode SQL Mode now supports the ELPA 'sql-indent' package for assisting sophisticated SQL indenting rules. Note, however, that SQL is not @@ -1095,16 +1305,19 @@ prefer to rely upon existing Emacs facilities for formatting code but the 'sql-indent' package provides facilities to aid more casual SQL developers layout queries and complex expressions. +--- **** 'sql-use-indent-support' (default t) enables SQL indention support. The 'sql-indent' package from ELPA must be installed to get the indentation support in 'sql-mode' and 'sql-interactive-mode'. +--- **** 'sql-mode-hook' and 'sql-interactive-mode-hook' changed. Both hook variables have had 'sql-indent-enable' added to their default values. If you have existing customizations to these variables, you should make sure that the new default entry is included. +--- *** Connection Wallet Database passwords can now by stored in NETRC or JSON data files that may optionally be encrypted. When establishing an interactive session @@ -1123,39 +1336,48 @@ be encrypted with GPG by adding an additional ".gpg" suffix. ** Term +--- *** 'term-read-noecho' is now obsolete, use 'read-passwd' instead. ++++ *** 'serial-term' now takes an optional parameter to leave the emulator in line mode. ** Flymake ++++ *** The variable 'flymake-diagnostic-types-alist' is obsolete. You should instead set properties on known diagnostic symbols, like ':error' and ':warning', as demonstrated in the Flymake manual. ++++ *** New user option 'flymake-start-on-save-buffer'. Control whether Flymake starts checking the buffer on save. +--- *** Flymake and backend functions may exchange hints about buffer changes. This enables more efficient backends. See the docstring of 'flymake-diagnostic-functions' or the Flymake manual for details. ++++ *** 'flymake-start-syntax-check-on-newline' is now obsolete, use 'post-self-insert-hook' to check on newline. ** Ruby +--- *** The Rubocop Flymake diagnostic function will only run Lint cops if it can't find the config file. --- *** Rubocop is called with 'bundle exec' if Gemfile mentions it. +--- *** New command 'ruby-find-library-file' bound to 'C-c C-f'. ** Package +--- *** Warn if "footer line" is missing, but still install package. package.el used to refuse to install a package without the so-called "footer line", which appears at the very end of the file: @@ -1170,20 +1392,24 @@ Note that versions of Emacs older than 27.1 will not only refuse to install packages without such a line -- they will be unable to parse package data. It is therefore recommended to keep this line. ++++ *** Change of 'package-check-signature' for packages with multiple sigs. In previous Emacsen, t checked that all signatures are valid. Now t only checks that at least one signature is valid and the new 'all' value needs to be used if you want to enforce that all signatures are valid. This only affects packages with multiple signatures. ++++ *** The meaning of 'allow-unsigned' in 'package-check-signature' has changed slightly: If a usable OpenPGP configuration can't be found (for instance, if gpg isn't installed), it now has the same meaning as nil. +--- *** New function 'package-get-version' lets packages query their own version. Example use in auctex.el: '(defconst auctex-version (package-get-version))' +--- *** New 'package-quickstart' feature. When 'package-quickstart' is non-nil, package.el precomputes a big autoloads file so that activation of packages can be done much faster, @@ -1193,8 +1419,10 @@ It also causes user options like 'package-user-dir' and is run rather than at startup so you don't need to set them in your early init file. +--- *** New function 'package-activate-all'. ++++ *** New functions for filtering packages list. A new function has been added which allows users to filter the packages list by name: 'package-menu-filter-by-name'. By default, it @@ -1204,10 +1432,13 @@ is bound to '/ n'. Additionally, the function (from 'f'). To clear any of the two filters, the user can now call the 'package-menu-clear-filter' function, bound to '/ /' by default. +--- *** Imenu support has been added to 'package-menu-mode'. +--- *** The package list can now be sorted by version or description. ++++ *** In Package Menu, 'g' now updates package data from archives. Previously, 'g' invoked 'tabulated-list-revert' which did not update the cached archive data. It is now bound to 'revert-buffer', which @@ -1217,16 +1448,19 @@ will update the data. ** Info ++++ *** Clicking on the left/right arrow icon in the Info tool-bar while holding down the Ctrl key pops up a menu of previously visited Info nodes where you can select a node to go back (like in browsers). +--- *** Info can now follow 'file://' protocol URLs. The 'file://' URLs in Info documents can now be followed by passing them to the 'browse-url' function, like the other protocols: 'ftp', 'http', and 'https'. This allows having references to local HTML files, for example. +--- ** Display of man pages now limits the width for formatting pages. The new user option 'Man-width-max' (80 by default) limits the number of columns passed to the 'man' program for formatting man pages. This @@ -1235,32 +1469,40 @@ windows (which are customary with today's large displays). ** Xref ++++ *** New command 'xref-find-definitions-at-mouse'. This command finds definitions of the identifier at the place of a mouse click event, and is intended to be bound to a mouse event. ++++ *** Changing 'xref-marker-ring-length' works after xref.el is loaded. Previously, setting 'xref-marker-ring-length' would only take effect if set before xref.el was loaded. +--- *** 'xref-find-definitions' now sets the mark at the buffer position where it was invoked. +--- *** New xref faces 'xref-file-header', 'xref-line-number', 'xref-match'. +--- *** New user option 'xref-show-definitions-function'. It encapsulates the logic pertinent to showing the result of 'xref-find-definitions'. The user can change it to customize its behavior and the display of results. +--- *** Search results show the buffer even for one hit. The search-type Xref commands (e.g. 'xref-find-references' or 'project-find-regexp') now show the results buffer even when there is only one hit. This can be altered by changing 'xref-show-xrefs-function'. ++++ *** Xref buffers support refreshing the search results. A new command 'xref-revert-buffer' is bound to 'g'. +--- *** Imenu support has been added to 'xref--xref-buffer-mode'. *** New generic method 'xref-backend-identifier-completion-ignore-case'. @@ -1269,6 +1511,7 @@ identifier completion. ** Checkdoc +--- *** Checkdoc can now optionally spell-check doc strings. Invoking 'checkdoc-buffer' with a non-nil TAKE-NOTES argument (interactively, with a prefix arg) will now spell-check the doc @@ -1276,6 +1519,7 @@ strings and report all the spelling mistakes. ** Icomplete ++++ *** New minor mode Fido mode. This mode is based on Icomplete, and its name stands for "Fake Ido". The point of this mode is to be an 'ido-mode' workalike, providing @@ -1285,24 +1529,29 @@ completion facilities. ** Ecomplete +--- *** The Ecomplete sorting has changed to a decay-based algorithm. This can be controlled by the new 'ecomplete-sort-predicate' user option. +--- *** The 'ecomplete-database-file' file is now placed in "~/.emacs.d/ecompleterc" by default. Of course it will still find it if you have it in "~/.ecompleterc". ** Gnus +--- *** 'mm-uu-diff-groups-regexp' now defaults to matching all groups, which means that "git am" diffs are recognized everywhere. ++++ *** Two new Gnus summary mode navigation commands have been added, bound to the '[' and ']' keys: 'gnus-summary-prev-unseen-article' and 'gnus-summary-next-unseen-article'. These take you (respectively) to the previous unseen or next unseen article. (These are the ones that are marked with "." in the summary mode lines.) ++++ *** The Gnus user variable 'nnimap-expunge' supports three new values: 'never' for never expunging messages, 'immediately' for immediately expunging deleted messages, and 'on-exit' to expunge deleted articles @@ -1312,53 +1561,67 @@ result in Gnus expunging all messages that have been flagged as deleted by any IMAP client (rather than just those that have been deleted by Gnus). ++++ *** New user option 'gnus-use-atomic-windows' makes Gnus window layouts atomic. See the "(elisp) Atomic Windows" node of the Elisp manual for details. ++++ *** There's a new value for 'gnus-article-date-headers', 'combined-local-lapsed', which will show both the time (in the local timezone) and the lapsed time. +--- *** Gnus now maps imaps to 993 only on old MS-Windows versions. The nnimap backend used to do this unconditionally to work around problems on old versions of MS-Windows. This is now done only for Windows XP and older. ++++ *** The nnimap backend now has support for IMAP namespaces. This feature can be enabled by setting the new 'nnimap-use-namespaces' server variable to non-nil. ++++ *** A prefix argument to 'gnus-summary-limit-to-score' will limit in reverse. Limit to articles with score "at or below" the SCORE argument rather than "at or above". +--- *** The function 'gnus-score-find-favorite-words' has been renamed from 'gnus-score-find-favourite-words'. +--- *** Gmane has been removed as an nnir backend, since Gmane no longer has a search engine. ++++ *** Splitting mail on common mailing list headers has been added. See the concept index in the Gnus manual for the 'match-list' entry. ++++ *** nil is no longer an allowed value for 'mm-text-html-renderer'. ++++ *** The default value of 'mm-inline-large-images' has changed from nil to 'resize', which means that large images will be resized instead of displayed with an external program by default. ++++ *** A new Gnus summary mode command, 'S A' ('gnus-summary-attach-article') can be used to attach the current article(s) to a pre-existing Message buffer, or create a new Message buffer with the article(s) attached. ++++ *** A new Gnus summary mode command, 'w' ('gnus-summary-browse-url') scans the article buffer for URLs, and offers them to the user to open with 'browse-url'. +--- *** New user option 'nnir-notmuch-filter-group-names-function'. This option controls whether and how to use Gnus search groups as 'path:' search terms to 'notmuch'. +--- *** The buttons in the Gnus article buffer were formerly widgets (i.e., buttons from widget.el). This has now changed, and they are now buttons (from button.el), and commands like 'TAB' now search for @@ -1368,18 +1631,22 @@ fail. ** erc +--- *** New hook 'erc-insert-done-hook'. This hook is called after strings have been inserted into the buffer, and is free to alter point and window configurations, as it's not called from inside a 'save-excursion', as opposed to 'erc-insert-post-hook'. +--- *** 'erc-button-google-url' has been renamed to 'erc-button-search-url' and its value has been changed to Duck Duck Go. +--- *** 'erc-send-pre-hook' and 'erc-send-this' have been obsoleted. The user option to use instead to alter text to be sent is now 'erc-pre-send-functions'. +--- *** Improve matching/highlighting of nicknames. Open and close parenthesis and apostrophe are not considered valid nick characters anymore, matching the given grammar in RFC 2812 @@ -1387,35 +1654,43 @@ section 2.3.1. This enables correct matching and highlighting of nicks when they are surrounded by parentheses, like "(nick)", and when adjacent to an apostrophe, like "nick's". +--- *** Set 'erc-button-url-regexp' to 'browse-url-button-regexp' which better handles surrounding pair of parentheses. +--- *** New function 'erc-switch-to-buffer-other-window' which is like 'erc-switch-to-buffer', but opens the buffer in another window. +--- *** New function 'erc-track-switch-buffer-other-window' which is like 'erc-track-switch-buffer', but opens the buffer in another window. ** EUDC +--- *** XEmacs support has been removed. ** eww/shr ++++ *** The new user option 'shr-cookie-policy' can be used to control when to use cookies when fetching embedded images. The default is to use them when the images are from the same domain as the main HTML document. ++++ *** The 'eww' command can now create a new EWW buffer. Invoking the command with a prefix argument will cause it to create a new EWW buffer for the URL instead of reusing the default one. ++++ *** Clicking with the Ctrl key or 'C-u RET' on a link opens a new tab when tab-bar-mode is enabled. ++++ *** The 'd' ('eww-download') command now falls back to current page's URL. If this command is invoked with no URL at point, it now downloads the current page instead of signaling an error. @@ -1425,24 +1700,30 @@ current page instead of signaling an error. 'shr-selected-link' face to give the user feedback that the command has been executed. ++++ *** New user option 'shr-discard-aria-hidden'. If set, shr will not render tags with attribute 'aria-hidden="true"'. This attribute is meant to tell screen readers to ignore a tag. ++++ *** 'shr-external-browser' has been made into an obsolete alias of 'browse-url-secondary-browser-function'. +--- *** 'shr-tag-ol' now respects the ordered list 'start' attribute. +--- *** The following tags are now handled: '', '', and ''. ** Htmlfontify ++++ *** The functions 'hfy-color', 'hfy-color-vals' and 'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map' and 'hfy-rgb-txt-color-map' have been renamed from names that used 'colour' instead of 'color'. ++++ ** Enriched mode supports the 'charset' text property. You can add or modify the 'charset' text properties of text using the 'Edit->Text Properties->Special Properties' menu, or by invoking the @@ -1452,57 +1733,70 @@ restored when the file is visited. ** Smtpmail +--- *** Authentication mechanisms can be added via external packages, by defining new 'cl-defmethod' of 'smtpmail-try-auth-method'. ++++ *** To always force smtpmail to send credentials over on the first attempt when communicating with the SMTP server(s), the 'smtpmail-servers-requiring-authorization' user option can be used. ++++ *** smtpmail will now try resending mail when getting a transient "4xx" error message from the SMTP server. The new 'smtpmail-retries' user option says how many times to retry. ** Footnote mode +--- *** Support Hebrew-style footnotes. +--- *** Footnote text lines are now aligned. Can be controlled via the new user option 'footnote-align-to-fn-text'. ** CSS mode +--- *** A new command 'css-cycle-color-format' for cycling between color formats (e.g. "black" => "#000000" => "rgb(0, 0, 0)") has been added, bound to 'C-c C-f'. +--- *** CSS mode, SCSS mode, and Less CSS mode now have support for Imenu. ** SGML mode +--- *** 'sgml-quote' now handles double quotes and apostrophes when escaping text and in addition all numeric entities when unescaping text. ** Python mode +--- *** Python mode supports three different font lock decoration levels. The maximum level is used by default; customize 'font-lock-maximum-decoration' to tone down the decoration. +--- *** New user option 'python-pdbtrack-kill-buffers'. If non-nil, the default, buffers opened during pdbtracking session are killed when pdbtracking session is finished. +--- *** New function 'python-shell-send-statement. It sends the statement delimited by 'python-nav-beginning-of-statement' and 'python-nav-end-of-statement' to the inferior Python process. ** Help +--- *** Descriptions of variables and functions give an estimated first release where the variable or function appeared in Emacs. +--- *** Output format of 'C-h l' ('view-lossage') has changed. For convenience, 'view-lossage' now displays the last keystrokes and commands in the same format as the edit buffer of @@ -1510,19 +1804,23 @@ and commands in the same format as the edit buffer of the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'. +--- *** The list of help commands produced by 'C-h C-h' ('help-for-help') can now be searched via 'C-s'. ** Ibuffer +--- *** New filter 'ibuffer-filter-by-process'; bound to '/ E'. +--- *** All mode filters can now accept a list of symbols. This means you can now easily filter several major modes, as well as a single mode. ** Search and Replace ++++ *** Isearch supports a prefix argument for 'C-s' ('isearch-repeat-forward') and 'C-r' ('isearch-repeat-backward'). With a prefix argument, these commands repeat the search for the specified occurrence of the search string. @@ -1532,6 +1830,7 @@ This makes possible also to use a prefix argument for 'M-s .' Also a prefix argument is supported for 'isearch-yank-until-char', 'isearch-yank-word-or-char', 'isearch-yank-symbol-or-char'. ++++ *** To go to the first/last occurrence of the current search string is possible now with new commands 'isearch-beginning-of-buffer' and 'isearch-end-of-buffer' bound to 'M-s M-<' and 'M-s M->' in Isearch. @@ -1540,12 +1839,14 @@ counting from the beginning/end of the buffer. This complements 'C-s'/'C-r' that searches for the next Nth relative occurrence with a numeric argument. ++++ *** 'isearch-lazy-count' shows the current match number and total number of matches in the Isearch prompt. User options 'lazy-count-prefix-format' and 'lazy-count-suffix-format' define the format of the current and the total number of matches in the prompt's prefix and suffix, respectively. +--- *** 'lazy-highlight-buffer' highlights matches in the full buffer. It is useful in combination with 'lazy-highlight-cleanup' customized to nil to leave matches highlighted in the whole buffer after exiting isearch. @@ -1554,6 +1855,7 @@ navigation through the matches without flickering is more smooth. 'lazy-highlight-buffer-max-at-a-time' controls the number of matches to highlight in one iteration while processing the full buffer. ++++ *** New isearch bindings. 'C-M-z' invokes new function 'isearch-yank-until-char', which yanks everything from point up to but not including the specified @@ -1569,21 +1871,27 @@ string to highlight lines matching the search string. This is similar to the existing binding 'M-s h r' ('highlight-regexp') that highlights JUST the search string. ++++ *** New user option 'isearch-yank-on-move' provides options t and 'shift' to extend the search string by yanking text that ends at the new position after moving point in the current buffer. 'shift' extends the search string by motion commands while holding down the shift key. ++++ *** 'isearch-allow-scroll' provides a new option 'unlimited' to allow scrolling any distance off screen. +--- *** Isearch now remembers the regexp-based search mode for words/symbols and case-sensitivity together with search strings in the search ring. +--- *** Isearch now has its own tool-bar and menu-bar menu. ++++ *** 'flush-lines' prints and returns the number of deleted matching lines. +--- *** 'char-fold-to-regexp' now matches more variants of a base character. The table used to check for equivalence of characters is now built using the complete chain of unicode decompositions of a character, @@ -1591,6 +1899,7 @@ rather than stopping after one level, such that searching for e.g. "GREEK SMALL LETTER IOTA" will now also find "GREEK SMALL LETTER IOTA WITH OXIA". ++++ *** New char-folding options: 'char-fold-include' lets you add ad hoc foldings, 'char-fold-exclude' to remove foldings from default decomposition, and 'char-fold-symmetric' to search for any of an equivalence class of @@ -1601,6 +1910,7 @@ to find "e". ** Debugger ++++ *** The Lisp Debugger is now based on 'backtrace-mode'. Backtrace mode adds fontification and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -1608,37 +1918,45 @@ the Elisp manual for documentation of the new mode and its commands. ** Edebug ++++ *** 'edebug-eval-last-sexp' and 'edebug-eval-print-last-sexp' interactively now take a zero prefix analogously to the non-Edebug counterparts. ++++ *** New faces 'edebug-enabled-breakpoint' and 'edebug-disabled-breakpoint'. When setting breakpoints in Edebug, an overlay with these faces are placed over the point in question, depending on whether they are enabled or not. ++++ *** New command 'edebug-toggle-disable-breakpoint'. This command allows you to disable a breakpoint temporarily. This is mainly useful with breakpoints that are conditional and would take some time to recreate. ++++ *** New command 'edebug-unset-breakpoints'. To clear all breakpoints in the current form, the 'U' command in 'edebug-mode', or 'M-x edebug-unset-breakpoints' can be used. +--- *** Re-instrumenting a function with Edebug will now try to preserve previously-set breakpoints. However, if the code has changed substantially, this may not be possible. ++++ *** New command 'edebug-remove-instrumentation'. This command removes Edebug instrumentation from all functions that have been instrumented. ++++ *** The runtime behavior of Edebug's instrumentation can be changed using the new variables 'edebug-behavior-alist', 'edebug-after-instrumentation-function' and 'edebug-new-definition-function'. Edebug's behavior can be changed globally or for individual definitions. ++++ *** Edebug's backtrace buffer now uses 'backtrace-mode'. Backtrace mode adds fontification, links and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -1655,12 +1973,14 @@ been instrumented by Edebug. ** Enhanced xterm support +--- *** New user option 'xterm-set-window-title' controls whether Emacs sets the XTerm window title. This feature is experimental and is disabled by default. ** Grep ++++ *** 'rgrep', 'lgrep' and 'zrgrep' now hide part of the command line that contains a list of ignored directories and files. Clicking on the button with ellipsis unhides it. @@ -1668,13 +1988,16 @@ The abbreviation can be disabled by the new user option 'grep-find-abbreviate'. The new command 'grep-find-toggle-abbreviation' toggles it interactively. +--- *** 'grep-find-use-xargs' is now customizable with sorting options. ** ERT ++++ *** New variable 'ert-quiet' allows making ERT output in batch mode less verbose by removing non-essential information. ++++ *** ERT's backtrace buffer now uses 'backtrace-mode'. Backtrace mode adds fontification and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -1682,61 +2005,73 @@ the Elisp manual for documentation of the new mode and its commands. ** Gamegrid +--- *** Gamegrid now determines its default glyph size based on display dimensions, instead of always using 16 pixels. As a result, Tetris, Snake and Pong are better playable on HiDPI displays. +--- *** 'gamegrid-add-score' can now sort scores from lower to higher. This is useful for games where lower scores are better, like time-based games. ** Filecache +--- *** Completing file names in the minibuffer via 'C-TAB' now uses the styles as configured by the user option 'completion-styles'. ++++ ** New macros 'thunk-let' and 'thunk-let*'. These macros are analogue to 'let' and 'let*', but create bindings that are evaluated lazily. ** next-error ++++ *** New user option 'next-error-find-buffer-function'. The value should be a function that determines how to find the next buffer to be used by 'next-error' and 'previous-error'. The default is to use the last buffer that navigated to the current error. ++++ *** New command 'next-error-select-buffer'. It can be used to set any buffer as the next one to be used by 'next-error' and 'previous-error'. ** nxml-mode +--- *** The default value of 'nxml-sexp-element-flag' is now t. This means that pressing 'C-M-SPACE' now selects the entire tree by default, and not just the opening element. ** Eshell +--- *** TAB completion uses the standard 'completion-at-point' rather than 'pcomplete'. Its UI is slightly different but can be customized to behave similarly, e.g. Pcomplete's default cycling can be obtained with '(setq completion-cycle-threshold 5)'. ++++ *** Expansion of history event designators is disabled by default. To restore the old behavior, use (add-hook 'eshell-expand-input-functions #'eshell-expand-history-references) +--- *** The function 'eshell-uniquify-list' has been renamed from 'eshell-uniqify-list'. +--- *** The function 'eshell/kill' is now able to handle signal switches. Previously 'eshell/kill' would fail if provided a kill signal to send to the process. It now accepts signals specified either by name or by its number. +--- *** Emacs now follows symlinks in history-related files. The files specified by 'eshell-history-file-name' and 'eshell-last-dir-ring-file-name' can include symlinks; these are now @@ -1744,13 +2079,16 @@ followed when Emacs writes the relevant history variables to the disk. ** Shell +--- *** Program name completion inside remote shells works now as expected. ++++ *** The user option 'shell-file-name' can be set now as connection-local variable for remote shells. It still defaults to "/bin/sh". ** Single shell commands ++++ *** New values of 'shell-command-dont-erase-buffer'. This user option can now have the value 'erase' to force to erase the output buffer before execution of the command, even if the output goes @@ -1758,34 +2096,42 @@ to the current buffer. Additional values 'beg-last-out', 'end-last-out', and 'save-point' control where to put point in the output buffer after inserting the 'shell-command' output. +--- *** The new functions 'shell-command-save-pos-or-erase' and 'shell-command-set-point-after-cmd' control how point is handled between two consecutive shell commands in the same output buffer. ++++ *** 'async-shell-command-width' defines the number of display columns available for output of asynchronous shell commands. ++++ *** Prompt for shell commands can now show the current directory. Customize the new user option 'shell-command-prompt-show-cwd' to enable it. ** Pcomplete +--- *** The 'pcomplete' command is now obsolete. The Pcomplete functionality can be obtained via 'completion-at-point' instead, by adding 'pcomplete-completions-at-point' to 'completion-at-point-functions'. +--- *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. +--- *** 'pcomplete/make' now completes on targets in included files, recursively. To recover the previous behavior, set new user option 'pcmpl-gnu-makefile-includes' to nil. ** Auth-source +--- *** The Secret Service backend supports the ':create' key now. +--- *** ".authinfo" and ".netrc" files now use a new mode: 'authinfo-mode'. This is just like 'fundamental-mode', except that it hides passwords under a "****" display property. When the cursor moves to this text, @@ -1794,89 +2140,110 @@ the real password is revealed (via 'reveal-mode'). The new ** Tramp ++++ *** New connection method "nextcloud", which allows accessing OwnCloud or NextCloud hosted files and directories. ++++ *** New connection method "rclone", which allows accessing system storages via the 'rclone' program. This feature is experimental. ++++ *** New connection method "sudoedit", which allows editing local files with different user credentials. Contrary to the "sudo" method, no session is run permanently in the background. This is for security reasons. ++++ *** Connection methods "obex" and "synce" have been removed, because they are obsoleted in GVFS. ++++ *** Validated passwords are saved by auth-source backends which support this. ++++ *** During user and host name completion in the minibuffer, results from auth-source search are taken into account. This can be disabled by setting the user option 'tramp-completion-use-auth-sources' to nil. ++++ *** The user option 'tramp-ignored-file-name-regexp' allows disabling Tramp for some look-alike remote file names. ++++ *** For some connection methods, like "su" or "sudo", the host name in multi-hop file names must match the previous hop. Default host names are adjusted to the host name from the previous hop. ++++ *** A timeout has been added for the connection methods "sudo" and "doas". The underlying session is disabled when the timeout expires. This is for security reasons. ++++ *** For some connection methods, like "sshx" or "plink", it is possible to configure the remote login shell. This avoids problems with remote hosts, where "/bin/sh" is a link to a shell which cooperates badly with Tramp. ++++ *** New commands 'tramp-rename-files' and 'tramp-rename-these-files'. They allow saving remote files somewhere else when the corresponding host is not reachable anymore. ** Rcirc +--- *** New user option 'rcirc-url-max-length'. Setting this option to an integer causes URLs displayed in Rcirc buffers to be truncated to that many characters. +--- *** The default '/quit' and '/part' reasons are now configurable. Two new user options are provided for this: 'rcirc-default-part-reason' and 'rcirc-default-quit-reason'. ** Register +--- *** The return value of method 'register-val-describe' includes the names of buffers shown by the windows of a window configuration. ** Message +--- *** Completion of email addresses can use the standard completion UI. This is controlled by 'message-expand-name-standard-ui'. With the standard UI the different sources (ecomplete, bbdb, and eudc) are matched together and try to obey 'completion-styles'. It should work for other completion front ends like Company. +--- *** 'message-mode' now supports highlighting citations of different depths. This can be customized via the new user option 'message-cite-level-function' and the new 'message-cited-text-*' faces. ++++ *** Messages can now be systematically encrypted when the PGP keyring contains a public key for every recipient. To achieve this, add 'message-sign-encrypt-if-all-keys-available' to 'message-send-hook'. +--- *** When replying a message that have addresses on the form '"foo@bar.com" ', Message will elide the repeated "name" from the address field in the response. +--- *** The default of 'message-forward-as-mime' has changed from t to nil as it has been reported that many recipients can't read forwards that are formatted as MIME digests. ++++ *** 'message-forward-included-headers' has changed its default to exclude most headers when forwarding. +--- *** 'mml-secure-openpgp-sign-with-sender' sets also "gpg --sender". When 'mml-secure-openpgp-sign-with-sender' is non-nil, message sender's email address (in addition to its old behavior) will also be used to @@ -1892,48 +2259,61 @@ The option is useful for two reasons when verifying the signature: 2.2.17 to fully benefit from this feature. See gpg(1) man page for "--auto-key-retrieve". ++++ *** The 'mail-from-style' variable is now obsolete. According to RFC 5322, only the 'angles' value is valid. +--- ** EasyPG +--- *** 'epa-pinentry-mode' is renamed to 'epg-pinentry-mode'. It now applies to epg functions as well as epa functions. +--- *** The alias functions 'epa--encode-coding-string', 'epa--decode-coding-string', and 'epa--select-safe-coding-system' have been removed. Use 'encode-coding-string', 'decode-coding-string', and 'select-safe-coding-system' instead. +--- *** 'epg-context' structure supports now 'sender' slot. The value of the new 'sender' slot (if a string) is used to set gpg's "--sender" option. This feature is used by 'mml-secure-openpgp-sign-with-sender'. See gpg(1) manual page about "--sender" for more information. +--- ** Rmail ++++ *** New user option 'rmail-output-reset-deleted-flag'. If this option is non-nil, messages appended to an output file by the 'rmail-output' command have their Deleted flag reset. +--- *** The command 'rmail-summary-by-senders' with an empty argument selects the messages to summarize with a regexp that matches the sender of the current message. ** Threads ++++ *** New variable 'main-thread' holds Emacs's main thread. This is handy in Lisp programs that run on a non-main thread and want to signal the main thread, e.g., when they encounter an error. ++++ *** 'thread-join' now returns the result of the finished thread. ++++ *** 'thread-signal' does not propagate errors to the main thread. Instead, error messages are just printed in the main thread. +--- *** 'thread-alive-p' is now obsolete, use 'thread-live-p' instead. ++++ *** New command 'list-threads' shows Lisp threads. See the current list of live threads in a tabulated-list buffer which automatically updates. In the buffer, you can use 's q' or 's e' to @@ -1942,35 +2322,42 @@ backtrace with 'b'. ** thingatpt.el +--- *** 'thing-at-point' supports a new "thing" called 'uuid'. A symbol 'uuid' can be passed to 'thing-at-point' and it returns the UUID at point. +--- *** 'number-at-point' will now recognize hex numbers like 0xAb09 and #xAb09 and return them as numbers. +--- *** 'word-at-point' and 'sentence-at-point' accept NO-PROPERTIES. Just like 'thing-at-point' itself. ** Interactive automatic highlighting ++++ *** 'highlight-regexp' can now highlight subexpressions. The new command accepts a prefix numeric argument to choose the subexpression. ** Mouse display of minor mode menu +--- *** 'minor-mode-menu-from-indicator' now displays full minor mode name. When there is no menu for a mode, display the mode name after the indicator instead of just the indicator (which is sometimes cryptic). ** rx +--- *** rx now handles raw bytes in character alternatives correctly, when given in a string. Previously, '(any "\x80-\xff")' would match characters U+0080...U+00FF. Now the expression matches raw bytes in the 128...255 range, as expected. +--- *** The rx 'or' and 'seq' forms no longer require any arguments. '(or)' produces a regexp that never matches anything, while '(seq)' matches the empty string, each being an identity for the operation. @@ -1978,25 +2365,31 @@ This also works for their aliases: '|' for 'or'; ':', 'and' and 'sequence' for 'seq'. The symbol 'unmatchable' can be used as an alternative to '(or)'. +--- *** 'regexp' and new 'literal' accept arbitrary lisp as arguments. In this case, 'rx' will generate code which produces a regexp string at run time, instead of a constant string. +--- *** New rx extension mechanism: 'rx-define', 'rx-let', 'rx-let-eval'. These macros add new forms to the rx notation. ++++ *** 'anychar' is now an alias for 'anything'. Both match any single character; 'anychar' is more descriptive. ++++ *** New 'intersection' form for character sets. With 'or' and 'not', it can be used to compose character-matching expressions from simpler parts. ++++ *** 'not' now accepts more argument types. The argument can now also be a character, a single-character string, an 'intersection' form, or an 'or' form whose arguments each match a single character. ++++ *** Nested 'or' forms of strings guarantee a longest match. For example, '(or (or "IN" "OUT") (or "INPUT" "OUTPUT"))' now matches the whole string "INPUT" if present, not just "IN". Previously, this @@ -2004,12 +2397,15 @@ was only guaranteed inside a single 'or' form of string literals. ** Frames ++++ *** New command 'make-frame-on-monitor' makes a frame on the specified monitor. ++++ *** New value of 'minibuffer' frame parameter 'child-frame'. This allows creating and immediately parenting a minibuffer-only child frame when making a frame. +--- *** New predicates 'display-blink-cursor-p' and 'display-symbol-keys-p'. These predicates are to be preferred over 'display-graphic-p' when testing for blinking cursor capability and the capability to have @@ -2017,6 +2413,7 @@ symbols (e.g., '[return]', '[tab]', '[backspace]') as keys respectively. ** Tabulated List mode ++++ *** New user options for tabulated list sort indicators. You can now customize which sorting indicator character to display near the current column in Tabulated Lists (see user options @@ -2025,42 +2422,52 @@ near the current column in Tabulated Lists (see user options 'tabulated-list-tty-sort-indicator-asc', and 'tabulated-list-tty-sort-indicator-desc'). ++++ *** Two new commands and keystrokes have been added to the tabulated list mode: 'w' (which widens the current column) and 'c' which makes the current column contract. ++++ *** New function 'tabulated-list-clear-all-tags'. This function clears all tags from the padding area in the current buffer. Tags are typically added by calling 'tabulated-list-put-tag'. ** Text mode ++++ *** 'text-mode-variant' is now obsolete, use 'derived-mode-p' instead. ** CUA mode +--- *** New user option 'cua-rectangle-terminal-modifier-key'. This user option allows for the customization of the modifier key used in a terminal frame. ** JS mode +--- *** JSX syntax is now automatically detected and enabled. If a file imports Facebook's 'React' library, or if the file uses the extension ".jsx", then various features supporting XML-like syntax will be supported in 'js-mode' and derivative modes. ('js-jsx-mode' no longer needs to be enabled.) +--- *** New user option 'js-jsx-detect-syntax' disables automatic detection. This is turned on by default. +--- *** New user option 'js-jsx-syntax' enables JSX syntax unconditionally. This is off by default. +--- *** New variable 'js-jsx-regexps' controls JSX detection. +--- *** JSX syntax is now highlighted like SGML. +--- *** JSX code is properly indented in many more scenarios. Previously, JSX indentation usually only worked when an element was wrapped in parenthesis (e.g. in a 'return' statement or a function @@ -2070,6 +2477,7 @@ supported; and, indentation conventions align more closely with those of the React developer community (see 'js-jsx-align->-with-<'), otherwise still adhering to SGML conventions. +--- *** New user option 'js-jsx-align->-with-<' controls '>' indents. Commonly in JSX code, a '>' on its own line is indented at the same level as its opening '<'. This is the new default for JSX. This @@ -2081,6 +2489,7 @@ This is turned on by default. To get back the old default indentation behavior of aligning '>' with attributes, set 'js-jsx-align->-with-<' to nil. +--- *** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'. Since JSX is a syntax extension of JavaScript, it makes the most sense for JSX expressions to be indented the same number of spaces as other @@ -2091,17 +2500,21 @@ be indented like JS, you won't need to change your config. The old behavior can be emulated by controlling JSX indentation independently of JS, by setting 'js-jsx-indent-level'. +--- *** New user option 'js-jsx-indent-level' for different JSX indentation. If you wish to indent JSX by a different number of spaces than JS, set this user option to the desired number. +--- *** New user option 'js-jsx-attribute-offset' for JSX attribute indents. +--- *** New variable 'js-syntactic-mode-name' controls mode name display. Previously, the mode name was simply 'JavaScript'. Now, when a syntax extension like JSX is enabled, the mode name is 'JavaScript[JSX]'. Set this variable to nil to disable the new behavior. +--- *** New function 'js-use-syntactic-mode-name' for deriving modes. Packages deriving from 'js-mode' with 'define-derived-mode' should call this function to add enabled syntax extensions to their mode @@ -2109,6 +2522,7 @@ name, too. ** Autorevert ++++ *** New user option 'auto-revert-avoid-polling' for saving power. When set to a non-nil value, buffers in Auto Revert mode are no longer polled for changes periodically. This reduces the power consumption @@ -2116,6 +2530,7 @@ of an idle Emacs, but may fail on some network file systems; set 'auto-revert-notify-exclude-dir-regexp' to match files where notification is not supported. The default value is nil. ++++ *** New variable 'buffer-auto-revert-by-notification'. A major mode can declare that notification on the buffer's default directory is sufficient to know when updates are required, by setting @@ -2123,33 +2538,41 @@ the new variable 'buffer-auto-revert-by-notification' to a non-nil value. Auto Revert mode can use this information to avoid polling the buffer periodically when 'auto-revert-avoid-polling' is non-nil. +--- *** 'global-auto-revert-ignore-buffer' can now also be a predicate function that can be used for more fine-grained control of which buffers to auto-revert. ** auth-source-pass ++++ *** New user option 'auth-source-pass-filename'. Allows setting the path to the password-store, defaults to "~/.password-store". ++++ *** New user option 'auth-source-pass-port-separator'. Specifies separator between host and port, defaults to colon ":". +--- *** Minimize the number of decryptions during password lookup. This makes the package usable with physical tokens requiring touching a sensor for every decryption. +--- *** 'auth-source-pass-get' is now autoloaded. ** Bookmarks +--- *** 'bookmark-file' and 'bookmark-old-default-file' are now obsolete aliases of 'bookmark-default-file'. +--- *** New user option 'bookmark-watch-bookmark-file'. When non-nil, watch whether the bookmark file has changed on disk. +--- *** The old bookmark file format is no longer supported. This bookmark file format has not been used in Emacs since at least version 19.34, released in 1996, and will no longer be automatically @@ -2161,12 +2584,14 @@ The following functions are now declared obsolete: 'bookmark-upgrade-file-format-from-0', and 'bookmark-upgrade-version-0-alist'. +--- ** The mantemp.el library is now marked obsolete. This library generates manual C++ template instantiations. It should no longer be useful on modern compilers, which do this automatically. ** Ispell +--- *** New hook 'ispell-change-dictionary-hook'. This runs after changing the dictionary and could be used to automatically spellcheck a buffer when changing language without @@ -2174,36 +2599,43 @@ needing to advice 'ispell-change-dictionary'. ** scroll-lock +--- *** New command 'scroll-lock-next-line-always-scroll'. This command is bound to 'S-down' and scrolls the buffer up in particular when the end of the buffer is visible in the window. ** mwheel.el +--- *** 'mwheel-install' is now obsolete. Use 'mouse-wheel-mode' instead. Note that 'mouse-wheel-mode' is already enabled by default on most graphical displays. ** Gravatar ++++ *** 'gravatar-cache-ttl' is now a number of seconds. The previously used timestamp format of a list of integers is still supported, but is deprecated. The default value has not changed. ++++ *** 'gravatar-size' can now be nil. This results in the use of Gravatar's default size of 80 pixels. ++++ *** The default fallback gravatar is now configurable. This is possible using the new user options 'gravatar-default-image' and 'gravatar-force-default'. ** ada-mode +--- *** The built-in ada-mode is now deleted. The GNU ELPA package is a good replacement, even in very large source files. ** time-stamp +--- *** New '%5z' conversion for 'time-stamp-format' gives time zone offset. Specifying '%5z' in 'time-stamp-format' or 'time-stamp-pattern' expands to the time zone offset, e.g., '+0100'. The time zone used is @@ -2213,6 +2645,7 @@ Because this feature is new in Emacs 27.1, do not use it in the local variables section of any file that might be edited by an older version of Emacs. +--- *** Some conversions recommended for 'time-stamp-format' have changed. The new documented/recommended %-conversions are closer to those used by 'format-time-string' and are compatible at least as far back @@ -2236,12 +2669,15 @@ file-local variable, you may need to update the value. ** mode-local +--- *** Declare 'define-overload' and 'define-child-mode' as obsolete. +--- *** Rename several internal functions to use a 'mode-local-' prefix. ** CC Mode ++++ *** You can now flag "wrong style" comments with 'font-lock-warning-face'. To do this, use 'c-toggle-comment-style', if needed, to set the desired default comment style (block or line); then set the user option @@ -2249,10 +2685,12 @@ default comment style (block or line); then set the user option ** Mailcap +--- *** The new function 'mailcap-file-name-to-mime-type' has been added. It's a simple convenience function for looking up MIME types based on file name extensions. +--- *** The default way the list of possible external viewers for MIME types is sorted and chosen has changed. Earlier, the most specific viewer was chosen, even if there was a general override in "~/.mailcap". @@ -2264,6 +2702,7 @@ method back, set 'mailcap-prefer-mailcap-viewers' to nil. ** MH-E ++++ *** The hook 'mh-show-mode-hook' is now called before the message is inserted. Functions that want to affect the message text (for example, to change highlighting) can no longer use 'mh-show-mode-hook', because the @@ -2272,6 +2711,7 @@ called. Such functions should now be attached to 'mh-show-hook'. ** URL +--- *** The 'file:' handler no longer looks for "index.html" in directories if you ask it for a "file:///dir" URL. Since this is a low-level library, such decisions (if they are to be made at all) are @@ -2282,6 +2722,7 @@ left to higher-level functions. ** Tab Bars ++++ *** Tab Bar mode The new command 'tab-bar-mode' enables the tab bar at the top of each frame (including TTY frames), where you can use tabs to switch between @@ -2310,6 +2751,7 @@ using completion on tab names, or using 'tab-switcher'. Read the new Info node "(emacs) Tab Bars" for full description of all related features. ++++ *** Tab Line mode The new command 'global-tab-line-mode' enables the tab line above each window, which you can use to switch buffers in the window. Selecting @@ -2323,13 +2765,16 @@ line scrolls tabs. Read the new Info node "(emacs) Tab Line" for full description of all related features. ++++ ** fileloop.el lets one setup multifile operations like search&replace. ++++ ** Emacs can now visit files in archives as if they were directories. This feature uses Tramp and works only on systems which support GVFS, i.e. GNU/Linux, roughly spoken. See the node "(tramp) Archive file names" in the Tramp manual for full documentation of these facilities. ++++ ** New library for writing JSONRPC applications (https://jsonrpc.org). The 'jsonrpc' library enables writing Emacs Lisp applications that rely on this protocol. Since the protocol is designed to be @@ -2338,12 +2783,14 @@ transport strategies as well as a separate API to use them. A transport implementation for process-based communication, such as is used by the Language Server Protocol (LSP), is readily available. ++++ ** Backtrace mode improves viewing of Elisp backtraces. Backtrace mode adds pretty printing, fontification and ellipsis expansion to backtrace buffers produced by the Lisp debugger, Edebug and ERT. See the node "(elisp) Backtraces" in the Elisp manual for documentation of the new mode and its commands. ++++ ** so-long.el helps to mitigate performance problems with long lines. When 'global-so-long-mode' has been enabled, visiting a file with very long lines will (subject to configuration) cause the user's preferred @@ -2355,6 +2802,7 @@ immediately. Type 'M-x so-long-commentary' for full documentation. * Incompatible Lisp Changes in Emacs 27.1 +--- ** Incomplete destructive splicing support has been removed. Support for Common Lisp style destructive splicing (",.") was incomplete and broken for a long time. It has now been removed. @@ -2367,9 +2815,11 @@ starting with a period ("."). Consider the following example: In the past, this would have incorrectly evaluated to '(\,\. foo)', but will now instead evaluate to '42'. +--- ** The REGEXP in 'magic-mode-alist' is now matched case-sensitively. Likewise for 'magic-fallback-mode-alist'. ++++ ** 'add-hook' does not always add to the front or the end any more. The replacement of 'append' with 'depth' implies that the function is not always added to the very front (when append/depth is nil) or the @@ -2378,12 +2828,15 @@ the hook may have specified higher/lower depths. This makes it possible to control the ordering of functions more precisely, as was already possible in 'add-function' and 'advice-add'. +--- ** In 'compilation-error-regexp-alist' the old undocumented feature where 'line' could be a function of 2 arguments has been dropped. +--- ** 'define-fringe-bitmap' is always defined, even when Emacs is built without any GUI support. +--- ** Just loading a theme's file no longer activates the theme's settings. Loading a theme with 'M-x load-theme' still activates the theme, as it did before. However, loading the theme's file with 'M-x load-file', @@ -2399,8 +2852,10 @@ default applied immediately. The variable 'custom--inhibit-theme-enable' controls this behavior; its default value changed in Emacs 27.1. +--- ** The REPETITIONS argument of 'benchmark-run' can now also be a variable. +--- ** Interpretation of relative 'HOME' directory has changed. If "$HOME" is set to a relative file name, 'expand-file-name' now interprets it relative to the directory where Emacs was started, not @@ -2408,12 +2863,15 @@ relative to the 'default-directory' of the current buffer. We recommend always setting "$HOME" to an absolute file name, so that its meaning is independent of where Emacs was started. +--- ** 'file-name-absolute-p' no longer considers "~foo" to be an absolute file name if there is no user named "foo". ++++ ** The FILENAME argument to 'file-name-base' is now mandatory and no longer defaults to 'buffer-file-name'. ++++ ** File metadata primitives now signal an error if I/O, access, or other serious errors prevent them from determining the result. Formerly, these functions often (though not always) silently returned @@ -2426,29 +2884,35 @@ file does not exist. The affected primitives are 'file-modes', 'file-newer-than-file-p', 'file-selinux-context', 'file-system-info', and 'set-visited-file-modtime'. +--- ** The function 'eldoc-message' now accepts a single argument. Programs that called it with multiple arguments before should pass them through 'format' first. Even that is discouraged: for ElDoc support, you should set 'eldoc-documentation-function' instead of calling 'eldoc-message' directly. +--- ** Old-style backquotes now generate an error. They have been generating warnings for a decade. To interpret old-style backquotes as new-style, bind the new variable 'force-new-style-backquotes' to t. +--- ** Defining a Common Lisp structure using 'cl-defstruct' or 'cl-struct-define' whose name clashes with a builtin type (e.g., 'integer' or 'hash-table') now signals an error. +--- ** When formatting a floating-point number as an octal or hexadecimal integer, Emacs now signals an error if the number is too large for the implementation to format. ++++ ** 'logb' now returns infinity when given an infinite or zero argument, and returns a NaN when given a NaN. Formerly, it returned an extreme fixnum for such arguments. +--- ** Some functions and variables obsolete since Emacs 22 have been removed: 'archive-mouse-extract', 'assoc-ignore-case', 'assoc-ignore-representation', 'backward-text-line', 'blink-cursor', 'bookmark-exit-hooks', @@ -2486,24 +2950,28 @@ fixnum for such arguments. 'vc-previous-comment', 'view-todo', 'x-lost-selection-hooks', 'x-sent-selection-hooks'. +--- ** Further functions and variables obsolete since Emacs 24 have been removed: 'default-directory-alist', 'dired-default-directory', 'dired-default-directory-alist', 'dired-enable-local-variables', 'dired-hack-local-variables', 'dired-local-variables-file', 'dired-omit-here-always'. ++++ ** Garbage collection no longer treats miscellaneous objects specially; they are now allocated like any other pseudovector. As a result, the 'garbage-collect' and 'memory-use-count' functions no longer return a 'misc' component, and the 'misc-objects-consed' variable has been removed. ++++ ** Reversed character ranges are no longer permitted in 'rx'. Previously, ranges where the starting character is greater than the ending character were silently omitted. For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only. Now, such 'rx' expressions generate an error. +--- ** Internal 'rx' functions and variables have been removed, as a consequence of an improved implementation. Packages using these should use the public 'rx' and 'rx-to-string' instead. @@ -2511,6 +2979,7 @@ these should use the public 'rx' and 'rx-to-string' instead. extension mechanism is preferred: 'rx-define', 'rx-let' and 'rx-let-eval'. ++++ ** 'text-mode' no longer sets the value of 'indent-line-function'. The global value of 'indent-line-function', which defaults to 'indent-relative', will no longer be reset locally when turning on @@ -2519,22 +2988,28 @@ The global value of 'indent-line-function', which defaults to To get back the old behavior, add a function to 'text-mode-hook' which performs '(setq-local indent-line-function #'indent-relative)'. +--- ** 'make-process' no longer accepts a non-nil ':stop' key. This has never worked reliably, and now causes an error. ++++ ** 'eventp' no longer returns non-nil for lists whose car is nil. This is consistent with the fact that nil, though a symbol, is not a valid event type. +--- ** The obsolete package xesam.el (since Emacs 24) has been removed. ++++ ** The XBM image handler now accepts a ':stride' argument, which should be specified in image specs representing the entire bitmap as a single bool vector. ++++ ** 'regexp-quote' may return its argument string. If the argument needs no quoting, it can be returned instead of a copy. ++++ ** Mouse scroll up and down with control key modifier changes font size. Previously, the control key modifier was used to scroll up or down by an amount which was close to near a full screen. This is now instead @@ -2551,19 +3026,24 @@ pointer is over. To change this behavior, you can customize the user option 'mouse-wheel-follow-mouse'. Note that this will also affect scrolling. ++++ ** Mouse scroll up and down with control key modifier also works on images where it scales the image under the mouse pointer. +--- ** 'help-follow-symbol' now signals 'user-error' if point (or the position pointed to by the argument POS) is not in a symbol. +--- ** The options.el library has been removed. It was obsolete since Emacs 22.1, replaced by customize. +--- ** The tls.el and starttls.el libraries are now marked obsolete. Use of built-in libgnutls based functionality (described in the Emacs GnuTLS manual) is recommended instead. +--- ** The url-ns.el library is now marked obsolete. This library is used to open configuration files for the long defunct web browser Netscape, and is no longer relevant. @@ -2571,6 +3051,7 @@ web browser Netscape, and is no longer relevant. * Lisp Changes in Emacs 27.1 ++++ ** Emacs Lisp integers can now be of arbitrary size. Emacs uses the GNU Multiple Precision (GMP) library to support integers whose size is too large to support natively. The integers @@ -2598,17 +3079,20 @@ like 'file-attributes' that compute file sizes and other attributes, functions like 'process-id' that compute process IDs, and functions like 'user-uid' and 'group-gid' that compute user and group IDs. ++++ ** 'overflow-error' is now documented as a subcategory of 'range-error'. Formerly it was undocumented, and was (incorrectly) a subcategory of 'domain-error'. ** Time values ++++ *** New function 'time-convert' converts Lisp time values to Lisp timestamps of various forms, including a new timestamp form '(TICKS . HZ)' where TICKS is an integer and HZ a positive integer denoting a clock frequency. ++++ *** Although the default timestamp format is still '(HI LO US PS)', it is planned to change in a future Emacs version, to exploit bignums. The documentation has been updated to mention that the timestamp @@ -2617,6 +3101,7 @@ format may change and that programs should use functions like probing the innards of a timestamp directly, or creating a timestamp by hand. ++++ *** Decoded (calendrical) timestamps now have subsecond resolution. This affects 'decode-time', which generates these timestamps, as well as functions like 'encode-time' that accept them. The subsecond info @@ -2633,9 +3118,11 @@ traditional behavior, this default may change in future Emacs versions, so callers requiring an integer should specify FORM explicitly. ++++ *** 'encode-time' supports a new API '(encode-time TIME)'. The old 'encode-time' API is still supported. ++++ *** A new package to parse ISO 8601 time, date, durations and intervals has been added. The main function to use is 'iso8601-parse', but there's also 'iso8601-parse-date', @@ -2644,25 +3131,30 @@ intervals has been added. The main function to use is structures, except the final one, which returns three of them (start, end and duration). ++++ *** 'time-add', 'time-subtract', and 'time-less-p' now accept infinities and NaNs too, and propagate them or return nil like floating-point operators do. If both arguments are finite, these functions now return exact results instead of rounding in some cases, and they also avoid excess precision when that is easy. ++++ *** New function 'time-equal-p' compares time values for equality. ++++ *** 'format-time-string' supports a new conversion specifier flag '+' that acts like the '0' flag but also puts a '+' before nonnegative years containing more than four digits. This is for compatibility with POSIX.1-2017. ++++ *** To access (or alter) the elements of a decoded time value, the 'decoded-time-second', 'decoded-time-minute', 'decoded-time-hour', 'decoded-time-day', 'decoded-time-month', 'decoded-time-year', 'decoded-time-weekday', 'decoded-time-dst' and 'decoded-time-zone' accessors can be used. ++++ *** The new functions 'date-days-in-month' (which will say how many days there are in a month in a specific year), 'date-ordinal-to-time' (that computes the date of an ordinal day), 'decoded-time-add' (for @@ -2671,6 +3163,7 @@ doing computations on a decoded time structure), 'make-decoded-time' filled out), and 'encoded-time-set-defaults' (which fills in nil elements as if it's midnight January 1st, 1970) have been added. ++++ *** In the DST slot, 'encode-time' and 'parse-time-string' now return -1 if it is not known whether daylight saving time is in effect. Formerly they were inconsistent: 'encode-time' returned t in this @@ -2678,31 +3171,38 @@ situation, whereas 'parse-time-string' returned nil. Now they consistently use nil to mean that DST is not in effect, and use -1 to mean that it is not known whether DST is in effect. ++++ ** New macro 'benchmark-progn'. This macro works like 'progn', but messages how long it takes to evaluate the body forms. The value of the last form is the return value. ++++ ** New function 'read-char-from-minibuffer'. This function works like 'read-char', but uses 'read-from-minibuffer' to read a character, so it maintains a history that can be navigated via usual minibuffer keystrokes 'M-p'/'M-n'. +--- ** New variables 'set-message-function' and 'clear-message-function' can be used to specify functions to show and clear messages that normally are displayed in the echo area. ++++ ** 'setq-local' can now set an arbitrary number of variables, which makes the syntax more like 'setq'. +--- ** 'reveal-mode' can now also be used for more than to toggle between invisible and visible: It can also toggle 'display' properties in overlays. This is only done on 'display' properties that have the 'reveal-toggle-invisible' property set. ++++ ** 'process-contact' now takes an optional NO-BLOCK argument to allow not waiting for a process to be set up. +--- ** New variable 'read-process-output-max' controls sub-process throughput. This variable determines how many bytes can be read from a sub-process in one read operation. The default, 4096 bytes, was previously a @@ -2710,94 +3210,118 @@ hard-coded constant. Setting it to a larger value might enhance throughput of reading from sub-processes that produces vast (megabytes) amounts of data in one go. ++++ ** The new user option 'quit-window-hook' is now run first when executing the 'quit-window' command. ++++ ** The user options 'help-enable-completion-auto-load', 'help-enable-auto-load' and 'vhdl-project-auto-load', as well as the function 'vhdl-auto-load-project' have been renamed to have "autoload" without the hyphen in their names. Obsolete aliases from the old names have been added. ++++ ** Buttons (created with 'make-button' and related functions) can now use the 'button-data' property. If present, the data in this property will be passed on to the 'action' function instead of the button itself in 'button-activate'. ++++ ** 'defcustom' now takes a ':local' keyword that can be either t or 'permanent', which mean that the variable should be automatically buffer-local. 'permanent' also sets the variable's 'permanent-local' property. ++++ ** The new macro 'with-suppressed-warnings' can be used to suppress specific byte-compile warnings. ++++ ** The new macro 'ignore-error' is like 'ignore-errors', but takes a specific error condition, and will only ignore that condition. (This can also be a list of conditions.) +--- ** The new function 'byte-compile-info-message' can be used to output informational messages that look pleasing during the Emacs build. +--- ** New 'help-fns-describe-variable-functions' hook. It makes it possible to add metadata information to 'describe-variable'. ** i18n (internationalization) +--- *** 'ngettext' can be used now to return the right plural form according to the given numeric value. ++++ ** 'inhibit-null-byte-detection' is renamed to 'inhibit-nul-byte-detection'. ++++ ** 'self-insert-command' takes the char to insert as (optional) argument. ++++ ** 'lookup-key' can take a list of keymaps as argument. ++++ ** 'condition-case' now accepts t to match any error symbol. ++++ ** New function 'proper-list-p'. Given a proper list as argument, this predicate returns its length; otherwise, it returns nil. 'format-proper-list-p' is now an obsolete alias for the new function. +--- ** 'define-minor-mode' automatically documents the meaning of ARG. ++++ ** The function 'recenter' now accepts an additional optional argument. By default, calling 'recenter' will not redraw the frame even if 'recenter-redisplay' is non-nil. Call 'recenter' with the new second argument non-nil to force redisplay per 'recenter-redisplay's value. ++++ ** New functions 'major-mode-suspend' and 'major-mode-restore'. Use them when switching temporarily to another major mode, e.g. for 'hexl-mode', or to switch between 'c-mode' and 'image-mode' in XPM. ++++ ** New macro 'dolist-with-progress-reporter'. This works like 'dolist', but reports progress similar to 'dotimes-with-progress-reporter'. ++++ ** New hook 'after-delete-frame-functions'. This works like 'delete-frame-functions', but runs after the frame to be deleted has been made dead and removed from the frame list. +--- ** The function 'provided-mode-derived-p' was extended to support aliases. The function now returns non-nil when the argument MODE is derived from any alias of any of MODES. ++++ ** New frame focus state inspection interface. The hooks 'focus-in-hook' and 'focus-out-hook' are now obsolete. Instead, attach to 'after-focus-change-function' using 'add-function' and inspect the focus state of each frame using 'frame-focus-state'. ++++ ** Emacs now requests and recognizes focus-change notifications from TTYs. On terminal emulators that support the feature, Emacs can now support 'focus-in-hook' and 'focus-out-hook' for TTY frames. ++++ ** Window-specific face remapping. Face specifications (of the kind used in 'face-remapping-alist') now support filters, allowing faces to vary between different windows displaying the same buffer. See the node "(elisp) Face Remapping" of the Emacs Lisp Reference manual for more detail. ++++ ** Window change functions have been redesigned. Hooks reacting to window changes run now only when redisplay detects that a change has actually occurred. Six hooks are now provided: @@ -2827,44 +3351,55 @@ Also 'run-window-configuration-change-hook' is declared obsolete. See the section "(elisp) Window Hooks" in the Elisp manual for a detailed explanation of the new behavior. ++++ ** Scroll bar and fringe settings can now be made persistent for windows. The functions 'set-window-scroll-bars' and 'set-window-fringes' now have a new optional argument that makes the settings they produce reliably survive subsequent invocations of 'set-window-buffer'. ++++ ** New user option 'resize-mini-frames'. This option allows automatically resizing minibuffer-only frames similarly to how minibuffer windows are resized on "normal" frames. ++++ ** New buffer display action function 'display-buffer-in-direction'. This function allows specifying the location of the window chosen by 'display-buffer' in various ways. ++++ ** New buffer display action alist entry 'dedicated'. Such an entry allows specifying the dedicated status of a window created by 'display-buffer'. ++++ ** New buffer display action alist entry 'window-min-height'. Such an entry allows specifying a minimum height of the window used for displaying a buffer. 'display-buffer-below-selected' is the only action function to respect it at the moment. ++++ ** New buffer display action alist entry 'direction'. This entry is used to specify the location of the window chosen by 'display-buffer-in-direction'. ++++ ** Additional meaning of display action alist entry 'window'. A 'window' entry can now also specify a reference window for 'display-buffer-in-direction'. ++++ ** The function 'assoc-delete-all' now takes an optional predicate argument. ++++ ** New function 'string-distance' to calculate the Levenshtein distance between two strings. ++++ ** 'print-quoted' now defaults to t, so if you want to see '(quote x)' instead of 'x you will have to bind it to nil where applicable. ++++ ** Numbers formatted via '%o' or '%x' are now formatted as signed integers. This avoids problems in calls like '(read (format "#x%x" -1))', and is more compatible with bignums. To get the traditional machine-dependent @@ -2873,10 +3408,12 @@ and if the new behavior breaks your code please email <32252@debbugs.gnu.org>. Because '%o' and '%x' can now format signed integers, they now support the '+' and space flags. ++++ ** In Emacs Lisp mode, symbols with confusable quotes are highlighted. For example, the first character in '‘foo' would be highlighted in 'font-lock-warning-face'. ++++ ** Omitting variables after '&optional' and '&rest' is now allowed. For example '(defun foo (&optional))' is no longer an error. This is sometimes convenient when writing macros. See the ChangeLog entry @@ -2884,6 +3421,7 @@ titled "Allow '&rest' or '&optional' without following variable (Bug#29165)" for a full listing of which arglists are accepted across versions. +--- ** Internal parsing commands now use 'syntax-ppss' and disregard 'open-paren-in-column-0-is-defun-start'. This affects mostly things like 'forward-comment', 'scan-sexps', and 'forward-sexp' when parsing backward. @@ -2894,6 +3432,7 @@ brackets at the start of a line inside documentation strings with a backslash, although there is no harm in doing so to make the code easier to edit with an older Emacs version. +--- ** New symbolic accessor functions for a parse state list. The new accessor functions 'ppss-depth', 'ppss-list-start', 'ppss-last-sexp-start', 'ppss-string-terminator', 'comment-depth', @@ -2901,30 +3440,37 @@ The new accessor functions 'ppss-depth', 'ppss-list-start', and 'two-character-syntax' can be used on the list value returned by 'parse-partial-sexp' and 'syntax-ppss'. +--- ** The 'server-name' and 'server-socket-dir' variables are set when a socket has been passed to Emacs. +--- ** The 'file-system-info' function is now available on all platforms. instead of just Microsoft platforms. This fixes a 'get-free-disk-space' bug on OS X 10.8 and later. +--- ** The function 'get-free-disk-space' returns now a non-nil value for remote systems, which support this check. ++++ ** 'memory-limit' now returns a better estimate of memory consumption. ++++ ** When interpreting 'gc-cons-percentage', Emacs now estimates the heap size more often and (we hope) more accurately. E.g., formerly '(progn (let ((gc-cons-percentage 0.8)) BODY1) BODY2)' continued to use the 0.8 value during BODY2 until the next garbage collection, but that is no longer true. Applications may need to re-tune their GC tricks. ++++ ** New macro 'combine-change-calls' arranges to call the change hooks ('before-change-functions' and 'after-change-functions') just once each around a sequence of lisp forms, given a region. This is useful when a function makes a possibly large number of repetitive changes and the change hooks are time consuming. ++++ ** 'eql', 'make-hash-table', etc. now treat NaNs consistently. Formerly, some of these functions ignored signs and significands of NaNs. Now, all these functions treat NaN signs and significands as @@ -2934,29 +3480,36 @@ Also, Emacs now reads and prints NaN significands; e.g., if X is a NaN, '(format "%s" X)' now returns "0.0e+NaN", "1.0e+NaN", etc., depending on X's significand. ++++ ** The function 'make-string' accepts an additional optional argument. If the optional third argument is non-nil, 'make-string' will produce a multibyte string even if its second argument is an ASCII character. +--- ** '(format "%d" X)' no longer mishandles a floating-point number X that does not fit in a machine integer. +--- ** New coding-system 'ibm038'. This is the International EBCDIC encoding, also available as aliases 'ebcdic-int' and 'cp038'. +--- ** New JSON parsing and serialization functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These are implemented in C using the Jansson library. ++++ ** New function 'ring-resize'. 'ring-resize' can be used to grow or shrink a ring. ++++ ** New function 'flatten-tree'. 'flatten-list' is provided as an alias. These functions take a tree and 'flatten' it such that the result is a list of all the terminal nodes. ++++ ** 'zlib-decompress-region' can partially decompress corrupted data. If the new optional ALLOW-PARTIAL argument is passed, then the data that was decompressed successfully before failing will be inserted @@ -2964,19 +3517,23 @@ into the buffer. ** Image mode +--- *** New library Exif. An Exif library has been added that can parse JPEG files and output data about creation times and orientation and the like. 'exif-parse-file' and 'exif-parse-buffer' are the main interface functions. +--- *** 'image-mode' now uses this library to automatically rotate images according to the orientation in the Exif data, if any. ++++ *** The command 'image-rotate' now accepts a prefix argument. With a prefix argument, 'image-rotate' now rotates the image at point 90 degrees counter-clockwise, instead of the default clockwise. ++++ *** In 'image-mode' the image is resized automatically to fit in window. By default, the image will resize upon first display and whenever the window's dimensions change. Two user options 'image-auto-resize' and @@ -2985,17 +3542,20 @@ window's dimensions change. Two user options 'image-auto-resize' and key 's' contains the commands that can be used to fit the image to the window manually. +--- *** Some 'image-mode' variables are now buffer-local. The image parameters 'image-transform-rotation', 'image-transform-scale' and 'image-transform-resize' are now declared buffer-local, so each buffer could have its own values for these parameters. ++++ *** Three new 'image-mode' commands have been added: 'm', which marks the file in the dired buffer(s) for the directory the file is in; 'u', which unmarks the file; and 'w', which pushes the current buffer's file name to the kill ring. +--- *** New library image-converter. If you need to view exotic image formats for which Emacs doesn't have native support, customize the new user option @@ -3003,10 +3563,12 @@ native support, customize the new user option GraphicsMagick, ImageMagick or 'ffmpeg' installed, they will then be used to convert images automatically before displaying them. +--- *** 'auto-mode-alist' now includes many of the types typically supported by the external image converters, like WEPB, BMP and ICO. These now default to using 'image-mode'. +--- *** 'imagemagick-types-inhibit' disables using ImageMagick by default. 'image-mode' started using ImageMagick by default for all images some years back. It now respects 'imagemagick-types-inhibit' as a way @@ -3014,53 +3576,66 @@ to disable that. ** Modules +--- *** The function 'load' now behaves correctly when loading modules. Specifically, it puts the module name into 'load-history', prints loading messages if requested, and protects against recursive loads. ++++ *** New module environment function 'process_input' to process user input while module code is running. ++++ *** New module environment functions 'make_time' and 'extract_time' to convert between timespec structures and Emacs Lisp time values. ++++ *** New module environment functions 'make_big_integer' and 'extract_big_integer' to create and extract arbitrary-size integer values. ++++ *** emacs-module.h now defines a macro 'EMACS_MAJOR_VERSION' that expands to the major version of the latest Emacs supported by the header. ++++ ** The function 'read-variable' now uses its own history list. The history of variable names read by 'read-variable' is recorded in the new variable 'custom-variable-history'. +--- ** The functions 'string-to-unibyte' and 'string-to-multibyte' are no longer declared obsolete. We have found that there are legitimate use cases for these functions, where there's no better alternative. We believe that the incorrect uses of these functions all but disappeared by now, so we are un-obsoleting them. ++++ ** New function 'group-name' returns a group name corresponding to GID. ++++ ** 'make-process' now takes a keyword argument ':file-handler'; if that is non-nil, it will look for a file name handler for the current buffer's 'default-directory' and invoke that file name handler to make the process. That way 'make-process' can start remote processes. ++++ ** '(locale-info 'paper)' now returns the paper size on systems that support it. This is currently supported on GNUish hosts and on modern versions of MS-Windows. ++++ ** The function 'regexp-opt', when given an empty list of strings, now returns a regexp that never matches anything, which is an identity for this operation. Previously, the empty string was returned in this case. ++++ ** New constant 'regexp-unmatchable' contains a never-matching regexp. It is a convenient and readable way to specify a regexp that should not match anything, and is as fast as any such regexp can be. ++++ ** New functions to handle the URL variant of base-64 encoding. New functions 'base64url-encode-string' and 'base64url-encode-region' implement the url-variant of base-64 encoding as defined in RFC4648. @@ -3069,6 +3644,7 @@ The functions 'base64-decode-string' and 'base64-decode-region' now accept an optional argument to decode the URL variant of base-64 encoding. ++++ ** The function 'file-size-human-readable' accepts more optional arguments. The new third argument is a string put between the number and unit; it defaults to the empty string. The new fourth argument is a string @@ -3077,68 +3653,82 @@ argument is 'iec' and the empty string otherwise. We recommend a space or non-breaking space as third argument, and "B" as fourth argument, circumstances allowing. ++++ ** 'format-spec' has been expanded with several modifiers to allow greater flexibility when customizing variables. The modifiers include zero-padding, upper- and lower-casing, and limiting the length of the interpolated strings. The function has now also been documented in the Emacs Lisp manual. ++++ ** 'directory-files-recursively' can now take an optional PREDICATE parameter to control descending into subdirectories, and a FOLLOW-SYMLINK parameter to say that symbolic links that point to other directories should be followed. ++++ ** New function 'xor' returns the boolean exclusive-or of its args. The function was previously defined in array.el, but has been moved to subr.el so that it is available by default. It now always returns the non-nil argument when the other is nil. Several duplicates of 'xor' in other packages are now obsolete aliases of 'xor'. ++++ ** 'define-globalized-minor-mode' now takes BODY forms. ++++ ** New text property 'help-echo-inhibit-substitution'. Setting this on the first character of a help string disables conversions via 'substitute-command-keys'. ++++ ** New text property 'minibuffer-message'. Setting this on a character of the minibuffer text will display the temporary echo messages before that character, when messages need to be displayed while minibuffer is active. ++++ ** 'undo' can be made to ignore the active region for a command by setting 'undo-inhibit-region' symbol property of that command to non-nil. This is used by 'mouse-drag-region' to make the effect easier to undo immediately afterwards. +--- ** When called interactively, 'next-buffer' and 'previous-buffer' now signal 'user-error' if there is no buffer to switch to. * Changes in Emacs 27.1 on Non-Free Operating Systems +--- ** Battery status is now supported in all Cygwin builds. Previously it was supported only in the Cygwin-w32 build. +--- ** Emacs now handles key combinations involving the macOS "command" and "option" modifier keys more correctly. ++++ ** MacOS modifier key behavior is now more adjustable. The behavior of the macOS "Option", "Command", "Control" and "Function" keys can now be specified separately for use with ordinary keys, function keys and mouse clicks. This allows using them in their standard macOS way for composing characters. ++++ ** The special handling of 'frame-title-format' on NS where setting it to t would enable the macOS proxy icon has been replaced with a separate variable, 'ns-use-proxy-icon'. 'frame-title-format' will now work as on other platforms. +--- ** New primitive 'w32-read-registry'. This primitive lets Lisp programs access the MS-Windows Registry by retrieving values stored under a given key. It is intended to be used for supporting features such as XDG-like location of important files and directories. ++++ ** The default value of 'w32-pipe-read-delay' is now zero. This speeds up reading output from sub-processes that produce a lot of data. @@ -3149,6 +3739,7 @@ versions of MS-Windows. Set this variable to 50 if for some reason you need the old behavior (and please report such situations to Emacs developers). +--- ** New variable 'w32-multibyte-code-page'. This variable holds the value of the multibyte code page used by the system. It is usually zero, which indicates that 'w32-ansi-code-page' @@ -3156,10 +3747,12 @@ is being used, except in Far Eastern locales. When this variable is non-zero, Emacs at startup sets 'locale-coding-system' to the corresponding encoding, instead of using 'w32-ansi-code-page'. +--- ** The default value of 'inhibit-compacting-font-caches' is t on MS-Windows. Experience shows that compacting font caches causes more trouble on MS-Windows than it helps. ++++ ** Font lookup on MS-Windows was improved to support rare scripts. To activate the improvement, run the new function 'w32-find-non-USB-fonts' once per Emacs session, or assign to the new @@ -3167,11 +3760,13 @@ variable 'w32-non-USB-fonts' the list of scripts and the corresponding fonts. See the documentation of this function and variable in the Emacs manual for more details. ++++ ** On NS the behavior of drag and drop can now be modified by use of modifier keys in line with Apples guidelines. This makes the drag and drop behavior more consistent, as previously the sending application was able to 'set' modifiers without the knowledge of the user. +--- ** On NS multicolor font display is enabled again since it is also implemented in Emacs on free operating systems via Cairo drawing. commit c270104e503cf0435a5ae40c5d0e430f4ef4bfb0 Author: Nicolas Petton Date: Tue Jul 28 21:45:39 2020 +0200 * etc/NEWS.27: Remove temporary markup. diff --git a/etc/NEWS.27 b/etc/NEWS.27 index 2c8fa9dd39..7eebb89abf 100644 --- a/etc/NEWS.27 +++ b/etc/NEWS.27 @@ -15,23 +15,15 @@ in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. -Temporary note: -+++ indicates that all relevant manuals in doc/ have been updated. ---- means no change in the manuals is needed. -When you add a new item, use the appropriate mark if you are sure it -applies, and please also update docstrings as needed. - * Installation Changes in Emacs 27.1 ---- ** Emacs now uses GMP, the GNU Multiple Precision library. By default, if 'configure' does not find a suitable libgmp, it arranges for the included mini-gmp library to be built and used. The new configure option '--without-libgmp' uses mini-gmp even if a suitable libgmp is available. ---- ** Emacs can now use HarfBuzz as its shaping engine. The new configure option '--with-harfbuzz' adds support for the HarfBuzz text shaping engine. It is on by default; use './configure @@ -44,7 +36,6 @@ supported ones, so the font backends that use older shaping engines enabled by default; they can be enabled via the 'font-backend' frame parameter or via X resources. ---- ** The new configure option '--with-json' adds native support for JSON. This uses the Jansson library. The option is on by default; use './configure --with-json=no' to build without Jansson support. The @@ -52,7 +43,6 @@ new JSON functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer' are typically much faster than their Lisp counterparts from json.el. ---- ** The configure option '--with-cairo' is no longer experimental. This builds Emacs with Cairo drawing, and supports built-in printing when Emacs is built with GTK+. Some severe bugs in this build were @@ -61,7 +51,6 @@ that building with Cairo enabled results in using Pango instead of libXft for font support, and that Pango 1.44 has removed support for bitmapped fonts. -+++ ** Emacs now uses a "portable dumper" instead of unexec. This improves compatibility with memory allocation on modern systems, and in particular better supports the Address Space Layout @@ -85,12 +74,10 @@ use the configure-time option '--with-dumping=unexec'; however, please file a bug report describing the situation, as unexec dumping is deprecated, and we plan on removing it in some future release. ---- ** The new configure option '--enable-checking=structs' attempts to check that the portable dumper code has been updated to match the last change to one of the data structures that it relies on. ---- ** The configure options '--enable-checking=conslist' and '--enable-checking=xmallocoverrun' have been withdrawn. The former made Emacs irredeemably slow, and the latter made it crash. Neither @@ -98,19 +85,16 @@ option was useful with modern debugging tools such as AddressSanitizer. (See "etc/DEBUG" for the details of using the modern replacements of the removed configure options.) ---- ** Emacs no longer defaults to using ImageMagick to display images. This is due to security and stability concerns with ImageMagick. To override the default, use 'configure --with-imagemagick'. ---- ** Several configure options now accept an option-argument 'ifavailable'. For example, './configure --with-xpm=ifavailable' now configures Emacs to attempt to use libxpm but to continue building even if libxpm is absent. The other affected options are '--with-gif', '--with-gnutls', '--with-jpeg', '--with-png', and '--with-tiff'. ---- ** The 'etags' program now uses the C library's regular expression matcher. If it's possible, 'etags' will use the regexp matcher from the system's standard C library, otherwise it will be linked with a @@ -120,7 +104,6 @@ configure option '--without-included-regex' forces 'etags' to use the C library's regex matcher even if the regex substitute ordinarily would be used to work around compatibility problems. ---- ** Emacs has been ported to the '-fcheck-pointer-bounds' option of GCC. This causes Emacs to check bounds of some arrays addressed by its internal pointers, which can be helpful when debugging the Emacs @@ -128,7 +111,6 @@ interpreter or modules that it uses. If your platform supports it you can enable it when configuring, e.g., './configure CFLAGS="-g3 -O2 -mmpx -fcheck-pointer-bounds"' on Intel MPX platforms. ---- ** Emacs now normally uses a C pointer type instead of a C integer type to implement Lisp_Object, which is the fundamental machine word type internal to the Emacs Lisp interpreter. This change aims to @@ -137,30 +119,24 @@ option '--enable-check-lisp-object-type' is therefore no longer as useful and so is no longer enabled by default in developer builds, to reduce differences between developer and production builds. ---- ** The distribution tarball now has test cases; 'make check' runs them. This is intended mostly to help developers. ---- ** Emacs now requires GTK 2.24 and GTK 3.10 for the GTK 2 and GTK 3 builds respectively. ---- ** New make target 'help' shows a summary of common make targets. ---- ** Emacs now builds with dynamic module support by default. Pass '--without-modules' to 'configure' to disable dynamic module support. ---- ** The ftx font backend driver is now obsolete and will be removed in Emacs 28. * Startup Changes in Emacs 27.1 -+++ ** Emacs can now use the XDG convention for init files. The 'XDG_CONFIG_HOME' environment variable (which defaults to "~/.config") specifies the XDG configuration parent directory. Emacs @@ -180,7 +156,6 @@ Emacs will never create "$XDG_CONFIG_HOME/emacs". Whichever directory Emacs decides to use, it will set 'user-emacs-directory' to point to it. -+++ ** Emacs can now be configured using an early init file. The file is called "early-init.el", in 'user-emacs-directory'. It is loaded very early in the startup process: before graphical elements @@ -196,7 +171,6 @@ process, and some important parts of the Emacs session, such as 'window-system' and other GUI features, are not yet set up, which could make some customization fail to work. -+++ ** Installed packages are now activated *before* loading the init file. As a result of this change, it is no longer necessary to call 'package-initialize' in your init file. @@ -218,7 +192,6 @@ it won't work right without some adjustment: does not need to pay attention to 'package-load-list' or 'package-user-dir' any more. ---- ** Emacs now notifies systemd when startup finishes or shutdown begins. Units that are ordered after 'emacs.service' will only be started after Emacs has finished initialization and is ready for use. @@ -229,10 +202,8 @@ the new version of the file again.) * Changes in Emacs 27.1 ---- ** Emacs now supports Unicode Standard version 13.0. -+++ ** Emacs now supports resizing and rotating images without ImageMagick. All modern systems support this feature. (On GNU and Unix systems, Cairo drawing or the XRender extension to X11 is required for this to @@ -242,12 +213,10 @@ enable scaling.) The new function 'image-transforms-p' can be used to test whether any given frame supports these capabilities. -+++ ** The Network Security Manager now allows more fine-grained control of what checks to run via the 'network-security-protocol-checks' user option. -+++ ** TLS connections have their security tightened by default. Most of the checks for outdated, believed-to-be-weak TLS algorithms and ciphers are now switched on by default. (In addition, several new @@ -259,7 +228,6 @@ issued), you can either set 'network-security-protocol-checks' to nil, or adjust the elements in that user option to only happen on the 'high' security level (assuming you use the 'medium' level). ---- ** New user option 'nsm-trust-local-network'. Allows skipping Network Security Manager checks for hosts on your local subnet(s). It defaults to nil. Usually, there should be no @@ -267,21 +235,18 @@ need to set this non-nil, and doing that risks opening your local network connections to attacks. So be sure you know what you are doing before changing the value. -+++ ** Native GnuTLS connections can now use client certificates. Previously, this support was only available when using the external 'gnutls-cli' or 'starttls' command. Call 'open-network-stream' with ':client-certificate t' to trigger looking up of per-server certificates via 'auth-source'. -+++ ** New user option 'network-stream-use-client-certificates'. When non-nil, 'open-network-stream' performs lookups of client certificates using 'auth-source' as if ':client-certificate t' were specified if there is no explicit ':client-certificate' parameter. Defaults to nil. -+++ ** 'next/previous-multiframe-window' have been renamed. The new names are as follows: @@ -292,12 +257,11 @@ The old function names are maintained as aliases for backward compatibility. ** emacsclient -+++ + *** emacsclient now supports the 'EMACS_SOCKET_NAME' environment variable. The command-line argument '--socket-name' overrides it. (The same behavior as for the pre-existing 'EMACS_SERVER_FILE' variable.) -+++ *** Emacs and emacsclient now default to "$XDG_RUNTIME_DIR/emacs". This is used as the directory for client/server sockets, if Emacs is running on a platform or environment that sets the 'XDG_RUNTIME_DIR' @@ -305,11 +269,9 @@ environment variable to indicate where session sockets should go. To get the old, less-secure behavior, you can set the 'EMACS_SOCKET_NAME' environment variable to an appropriate value. ---- *** When run by root, emacsclient no longer connects to non-root sockets. (Instead you can use Tramp methods to run root commands in a non-root Emacs.) ---- ** 'xft-ignore-color-fonts' now ignores even more color fonts. There are color fonts that managed to bypass the existing checks, causing XFT crashes, they are now filtered out. Setting @@ -317,45 +279,36 @@ causing XFT crashes, they are now filtered out. Setting require setting 'face-ignored-fonts' to filter out problematic fonts. Known problematic fonts are "Noto Color Emoji" and "Emoji One". ---- ** The GTK+ font chooser now respects 'face-ignored-fonts'. When using 'menu-set-font' under GTK3, the available fonts are now matched against 'face-ignored-fonts'. ---- ** The GTK+ font chooser now remembers the previously selected settings. It now remembers the name, size, style, etc. -+++ ** New user option 'what-cursor-show-names'. When non-nil, 'what-cursor-position' will show the name of the character in addition to the decimal/hex/octal representation. Default nil. -+++ ** New function 'network-lookup-address-info'. This does IPv4 and/or IPv6 address lookups on hostnames. -+++ ** 'network-interface-list' can now return IPv4 and IPv6 addresses. IPv4 and IPv6 addresses are now returned by default if available, optionally including netmask/broadcast address information. ---- ** Control of the threshold for using the 'distant-foreground' color. The threshold for color distance below which the 'distant-foreground' color of the face will be used instead of the foreground color can now be controlled via the new variable 'face-near-same-color-threshold'. The default value is 30000, as the previously hard-coded threshold. -+++ ** The function 'read-passwd' uses "*" as default character to hide passwords. -+++ ** The function 'read-answer' now accepts not only single character answers, but also function keys like 'F1', character events such as 'C-M-h', and control characters like 'C-h'. -+++ ** Lexical binding is now used by default when evaluating interactive Elisp. More specifically, 'lexical-binding' is now used by default for 'M-:' and '--eval' (including in evaluations invoked from 'emacsclient' via @@ -371,19 +324,16 @@ to work with lexical binding, or wrap it in an extra level of 'eval'. For example, --eval "FORM" becomes --eval "(eval 'FORM)" (note the extra quote in 'FORM). ---- ** The new user option 'tooltip-resize-echo-area' avoids truncating tooltip text on GUI frames when tooltips are displayed in the echo area. Instead, it resizes the echo area as needed to accommodate the full tool-tip text. ---- ** Show mode line tooltips only if the corresponding action applies. Customize the user option 'mode-line-default-help-echo' to restore the old behavior where the tooltip text is also shown when the corresponding action does not apply. -+++ ** New hook 'server-after-make-frame-hook'. This hook is a convenient place to perform initializations in daemon mode which require GUI features to be available. One example is @@ -392,15 +342,12 @@ the call to 'desktop-read' in this hook, if you want the GUI settings to be restored, or if desktop.el needs to interact with you during restoration of the session. -+++ ** The functions 'set-frame-height' and 'set-frame-width' are now commands, and will set the currently selected frame to the height/ width specified by the numeric prefix. -+++ ** New function 'logcount' calculates an integer's Hamming weight. -+++ ** New function 'libxml-available-p'. This function returns non-nil if libxml support is both compiled in and available at run time. Lisp programs should use this function to @@ -408,7 +355,6 @@ detect built-in libxml support, instead of testing for that indirectly, e.g., by checking that functions like 'libxml-parse-html-region' return nil. -+++ ** 'libxml-parse-xml-region' and 'libxml-parse-html-region' take a parameter that's called DISCARD-COMMENTS, but it really only discards the top-level comment. Therefore this parameter is now @@ -416,83 +362,67 @@ obsolete, and the new utility function 'xml-remove-comments' can be used to remove comments before calling the libxml functions to parse the data. -+++ ** A new DOM (the XML/HTML document structure returned by functions such as 'libxml-parse-html-region') traversal function has been added: 'dom-search', which takes a DOM and a predicate and returns all nodes that match. -+++ ** New function 'fill-polish-nobreak-p', to be used in 'fill-nobreak-predicate'. It blocks line breaking after a one-letter word, also in the case when this word is preceded by a non-space, but non-alphanumeric character. -+++ ** The limit on repetitions in regexps has been raised to 2^16-1. It was previously limited to 2^15-1. For example, the following regular expression was previously invalid, but is now accepted: x\{32768\} ---- ** The German prefix and postfix input methods now support Capital sharp S. ---- ** New input methods 'hawaiian-postfix' and 'hawaiian-prefix'. ---- ** New input methods 'georgian-qwerty' and 'georgian-nuskhuri'. ---- ** New input methods for several variants of the Sami language. The Sami input methods include: 'norwegian-sami-prefix', 'bergsland-hasselbrink-sami-prefix', 'southern-sami-prefix', 'ume-sami-prefix', 'northern-sami-prefix', 'inari-sami-prefix', 'skolt-sami-prefix', and 'kildin-sami-prefix'. -+++ ** Japanese environments use UTF-8 by default. In Japanese environments that do not specify encodings and are not based on MS-Windows, the default encoding is now utf-8 instead of japanese-iso-8bit. -+++ ** New function 'exec-path'. This function by default returns the value of the corresponding user option, but can optionally return the equivalent of 'exec-path' from a remote host. -+++ ** The function 'executable-find' supports an optional argument REMOTE. This triggers searching for the program on the remote host as indicated by 'default-directory'. -+++ ** New user option 'auto-save-no-message'. When set to t, no message will be shown when auto-saving (default value: nil). ---- ** The value of 'make-cursor-line-fully-visible' can now be a function. In addition to nil or non-nil, the value can now be a predicate function. Follow mode uses this to control scrolling of its windows when the last screen line in a window is not fully visible. -+++ ** New variable 'emacs-repository-branch'. It reports the git branch from which Emacs was built. -+++ ** New user option 'switch-to-buffer-obey-display-actions'. When non-nil, 'switch-to-buffer' uses 'pop-to-buffer-same-window' that respects display actions specified by 'display-buffer-alist' and 'display-buffer-overriding-action'. -+++ ** The user option 'switch-to-visible-buffer' is now obsolete. Customize 'switch-to-prev-buffer-skip' instead. -+++ ** New user option 'switch-to-prev-buffer-skip'. This user option allows specifying the set of buffers that may be shown by 'switch-to-prev-buffer' and 'switch-to-next-buffer' more @@ -504,10 +434,8 @@ matches strings where the pattern appears as a subsequence. Put simply, makes "foo" complete to both "barfoo" and "frodo". Add 'flex' to 'completion-styles' or 'completion-category-overrides' to use it. ---- ** The 'completion-common-part' face is now visible by default. -+++ ** New face attribute ':extend' to control face extension at EOL. The new face attribute ':extend' controls whether to use the face for displaying the empty space beyond end of line (EOL) till the edge of @@ -524,32 +452,25 @@ Consequently, a theme generally shouldn't specify this attribute unless it has a good reason to do so. ** Connection-local variables -+++ *** Connection-local variables are applied by default like file-local and directory-local variables. -+++ *** The macro 'with-connection-local-variables' has been renamed from 'with-connection-local-profiles'. No argument PROFILES needed any longer. ---- ** New user option 'next-error-verbose' controls when 'next-error' outputs a message about the error locus. ---- ** New user option 'grep-search-path' defines the directories searched for grep hits (this used to be controlled by 'compilation-search-path'). ---- ** New user option 'emacs-lisp-compilation-search-path' defines the directories searched for byte-compiler error messages (this used to be controlled by 'compilation-search-path'). ---- ** Multicolor fonts such as "Noto Color Emoji" can be displayed on Emacs configured with Cairo drawing and linked with cairo >= 1.16.0. -+++ ** Emacs now optionally displays a fill column indicator. This is similar to what 'fill-column-indicator' package provides, but much faster and compatible with 'show-trailing-whitespace'. @@ -564,46 +485,36 @@ in tooltips, as it is not useful there. There are 2 new buffer local variables and 1 face to customize this mode, they are described in the manual "(emacs) Display". -+++ ** 'progress-reporter-update' now accepts an optional suffix string to display. ---- ** New user option 'xref-file-name-display' controls the display of file names in xref buffers. ---- ** New user option 'byte-count-to-string-function'. It is used for displaying file sizes and disk space in some cases. -+++ ** Emacs now interprets RGB triplets like HTML, SVG, and CSS do. The X convention previously used differed slightly, particularly for RGB triplets with a single hexadecimal digit per component. ---- ** The toolbar now shows the equivalent key binding in its tooltips. ---- ** The File menu-bar menu was re-arranged. Print menu items moved to submenu, and also added the new entries for tabs. ---- ** 'scroll-lock-mode' is now bound to the 'Scroll_Lock' key globally. Note that this key binding will not work on MS-Windows systems if 'w32-scroll-lock-modifier' is non-nil. ---- ** 'global-set-key', called interactively, now no longer downcases a key binding with an upper case letter - if you can type it, you can bind it. -+++ ** 'read-from-minibuffer' now works with buffer-local history variables. The HIST argument of 'read-from-minibuffer' now works correctly with buffer-local variables. This means that different buffers can have their own separated input history list if desired. -+++ ** 'backup-by-copying-when-privileged-mismatch' applies to file gid, too. In addition to checking the file owner uid, Emacs also checks that the group gid is not greater than 'backup-by-copying-when-privileged-mismatch'; @@ -612,48 +523,39 @@ if so, 'backup-by-copying-when-mismatch' will be forced on. * Editing Changes in Emacs 27.1 -+++ ** When asked to visit a large file, Emacs now offers to visit it literally. Previously, Emacs would only ask for confirmation before visiting large files. Now it also offers a third alternative: to visit the file literally, as in 'find-file-literally', which speeds up navigation and editing of large files. -+++ ** 'zap-to-char' now uses the history of characters you used to zap to. 'zap-to-char' uses the new 'read-char-from-minibuffer' function to allow navigating through the history of characters that have been input. This is mostly useful for characters that have complex input methods where inputting the character again may involve many keystrokes. -+++ ** 'save-some-buffers' now has a new action in the prompt: 'C-f' will exit the command and switch to the buffer currently being asked about. ---- ** More commands support noncontiguous rectangular regions, namely 'upcase-dwim', 'downcase-dwim', 'capitalize-dwim', 'capitalize-region', 'upcase-initials-region', 'replace-string', 'replace-regexp', and 'delimit-columns-region'. -+++ ** The new 'amalgamating-undo-limit' variable can be used to control how many changes should be amalgamated when using the 'undo' command. ---- ** The 'newline-and-indent' command (commonly bound to 'RET' in many modes) now takes an optional numeric argument to specify how many times is should insert newlines (and indent). -+++ ** New command 'make-empty-file'. ---- ** New variable 'x-wait-for-event-timeout'. This controls how long Emacs will wait for updates to the graphical state to take effect (making a frame visible, for example). -+++ ** New user option 'electric-quote-replace-double'. This option controls whether '"' is replaced in 'electric-quote-mode', in addition to other quote characters. If non-nil, ASCII double-quote @@ -661,59 +563,48 @@ characters that quote text "like this" are replaced by double typographic quotes, “like this”, in text modes, and in comments in non-text modes. ---- ** New user option 'flyspell-case-fold-duplications'. This option controls whether Flyspell mode considers consecutive words to be duplicates if they are not in the same case. If non-nil, the default, words are considered to be duplicates even if their letters' case does not match. ---- ** 'write-abbrev-file' now includes special properties. 'write-abbrev-file' now writes special properties like ':case-fixed' for abbrevs that have them. -+++ ** 'write-abbrev-file' skips empty tables. 'write-abbrev-file' now skips inserting a 'define-abbrev-table' form for tables which do not have any non-system abbrevs to save. -+++ ** The new functions and commands 'text-property-search-forward' and 'text-property-search-backward' have been added. These provide an interface that's more like functions like 'search-forward'. ---- ** 'add-dir-local-variable' now uses dotted pair notation syntax to write alists of variables to ".dir-locals.el". This is the same syntax that you can see in the example of a ".dir-locals.el" file in the node "(emacs) Directory Variables" of the user manual. -+++ ** Network connections using 'local' can now use IPv6. 'make-network-process' now uses the correct loopback address when asked to use ':host 'local' and ':family 'ipv6'. -+++ ** The new function 'replace-region-contents' replaces the current region using a given replacement-function in a non-destructive manner (in terms of 'replace-buffer-contents'). -+++ ** The command 'replace-buffer-contents' now has two optional arguments mitigating performance issues when operating on huge buffers. -+++ ** Dragging 'C-M-mouse-1' now marks rectangular regions. -+++ ** The command 'delete-indentation' now operates on the active region. If the region is active, the command joins all the lines in the region. When there's no active region, the command works on the current and the previous or the next line, as before. -+++ ** You can now change the font size with the mouse wheel. Scrolling the mouse wheel with the Ctrl key pressed will now act the same as the 'C-x C-+' and 'C-x C--' commands. @@ -721,18 +612,15 @@ same as the 'C-x C-+' and 'C-x C--' commands. * Changes in Specialized Modes and Packages in Emacs 27.1 ---- ** New HTML mode skeleton 'html-id-anchor'. This new command (which inserts an _ skeleton) is bound to 'C-c C-c #'. -+++ ** New command 'font-lock-refontify'. This is an interactive convenience function to be used when developing font locking for a mode. It recomputes the font locking data and then re-fontifies the buffer. ---- ** Font Lock is smarter about fontifying unterminated strings and comments. When you type a quote that starts a string, or a comment delimiter that starts a comment, font-lock will not immediately refontify the @@ -743,28 +631,22 @@ comment. This is controlled by the new user option 'jit-lock-antiblink-grace', which specifies the delay in seconds. The default is 2 seconds; set to nil to get back the old behavior. ---- ** The 'C' command in 'tar-mode' will now preserve the timestamp of the extracted file if the new user option 'tar-copy-preserve-time' is non-nil. ---- ** 'autoconf-mode' is now used instead of 'm4-mode' for the "acinclude.m4" / "aclocal.m4" / "acsite.m4" files. ---- ** On GNU/Linux, 'M-x battery' will now list all batteries, no matter what they're named, and the 'battery-linux-sysfs-regexp' variable has been removed. ---- ** The 'list-processes' command now includes port numbers in the network connection information (in addition to the host name). ---- ** The 'cl' package is now officially deprecated in favor of 'cl-lib'. ---- ** desktop *** When called interactively with a prefix arg 'C-u', 'desktop-read' @@ -772,115 +654,94 @@ now prompts the user for the directory containing the desktop file. ** display-line-numbers-mode -+++ *** New faces 'line-number-major-tick' and 'line-number-minor-tick', and user options 'display-line-numbers-major-tick' and 'display-line-numbers-minor-tick' can be used to highlight the line numbers of lines multiple of certain numbers. -+++ *** New variable 'display-line-numbers-offset', when non-zero, adds an offset to absolute line numbers. ** winner -+++ *** A new user option, 'winner-boring-buffers-regexp', has been added. ** table -+++ *** 'table-generate-source' now supports wiki and mediawiki. This command can now output wiki and mediawiki format tables. ** telnet-mode ---- *** Reverting a buffer in 'telnet-mode' will restart a closed connection. ** goto-addr ---- *** A way to more conveniently specify what URI address schemes should be ignored has been added via the 'goto-address-uri-schemes-ignored' variable. ** tex-mode -+++ *** 'latex-noindent-commands' controls indentation of certain commands. You can use this new user option to control indentation of arguments of \emph, \footnote, and similar commands. ** byte compiler -+++ *** 'byte-compile-dynamic' is now obsolete. This is because on the one hand it suffers from misbehavior in corner cases that have plagued it for years, and on the other hand experience indicates that it doesn't bring any measurable benefit. ---- *** The 'g' keystroke in "*Compile-Log*" buffers has been bound to a new command that will recompile the file previously compiled with 'M-x byte-compile-file' and the like. ** compile.el ---- *** In 'compilation-error-regexp-alist', 'line' (and 'end-line') can be functions. -+++ *** 'compilation-context-lines' can now take the value t; this is like nil, but instead of scrolling the current line to the top of the screen when there is no left fringe, it inserts a visible arrow before column zero. ---- *** The new 'compilation-transform-file-match-alist' user option can be used to transform file name matches compilation output, and remove known false positives being recognized as warnings/errors. ** cl-lib.el -+++ *** 'cl-defstruct' has a new ':noinline' argument to prevent inlining its functions. -+++ *** 'cl-defstruct' slots accept a ':documentation' property. ---- *** 'cl-values-list' will now signal an error if its argument isn't a list. ** doc-view.el ---- *** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'. ---- *** Added support for password-protected PDF files. ---- *** A new user option 'doc-view-pdftotext-program-args' has been added to allow controlling how the conversion to text is done. -+++ *** The prefix key 's' was changed to 'c' for slicing commands to avoid conflicts with 'image-mode' key 's'. The new key 'c' still has good mnemonics of "cut", "clip", "crop". ** Ido ---- *** New user option 'ido-big-directories' to mark directories whose names match certain regular expressions as big. Ido won't attempt to list the contents of such directories when completing file names. ** Minibuffer -+++ *** New user option 'minibuffer-beginning-of-buffer-movement'. This option allows control of how the 'M-<' command works in the minibuffer. If non-nil, point will move to the end of the prompt @@ -888,7 +749,6 @@ the minibuffer. If non-nil, point will move to the end of the prompt preserves the original behavior of 'M-<' moving to the beginning of the prompt. -+++ *** When the minibuffer is active, echo-area messages are displayed at the end of the minibuffer instead of hiding the minibuffer by the echo area display. The new user option 'minibuffer-message-clear-timeout' @@ -898,19 +758,15 @@ temporarily overwrote the minibuffer contents until the user typed something, set 'set-message-function' and 'clear-message-function' to nil. ---- *** Minibuffer now uses 'minibuffer-message' to display error messages at the end of the active minibuffer. To disable this, remove 'minibuffer-error-initialize' from 'minibuffer-setup-hook'. -+++ *** 'y-or-n-p' now uses the minibuffer to read 'y' or 'n' answer. ---- *** Some commands that previously used 'read-char-choice' now read a character using the minibuffer by 'read-char-from-minibuffer'. ---- ** map.el *** Now also understands plists. @@ -919,10 +775,8 @@ a character using the minibuffer by 'read-char-from-minibuffer'. *** 'map-contains-key' now returns a boolean rather than the key. *** Deprecate the 'testfn' args of 'map-elt' and 'map-contains-key'. *** New generic function 'map-insert'. -+++ *** The 'type' arg can be a list '(hash-table :key1 VAL1 :key2 VAL2 ...)'. ---- ** seq.el New convenience functions 'seq-first' and 'seq-rest' give easy access to respectively the first and all but the first elements of sequences. @@ -930,22 +784,18 @@ to respectively the first and all but the first elements of sequences. The new predicate function 'seq-contains-p' should be used instead of the now obsolete 'seq-contains'. ---- ** Follow mode In the current follow group of windows, "ghost" cursors are no longer displayed in the non-selected follow windows. To get the old behavior back, customize 'follow-hide-ghost-cursors' to nil. -+++ ** New variable 'warning-fill-column' for 'display-warning'. ** Windmove ---- *** 'windmove-create-window' when non-nil makes a new window. This happens upon moving off the edge of the frame. -+++ *** Windmove supports directional window display and selection. The new command 'windmove-display-default-keybindings' binds default keys with provided modifiers (by default, Shift-Meta) to the commands @@ -959,7 +809,6 @@ display the buffer in the same window, for example, 'S-M-0 C-h e' displays the "*Messages*" buffer in the same window. 'S-M-t C-h r' displays the Emacs manual in a new tab. -+++ *** Windmove also supports directional window deletion. The new command 'windmove-delete-default-keybindings' binds default keys with provided prefix (by default, 'C-x') and modifiers (by default, @@ -969,12 +818,10 @@ With a prefix arg 'C-u', also kills the buffer in that window. With 'M-0', deletes the selected window and selects the window that was in the specified direction. -+++ *** New command 'windmove-swap-states-in-direction' binds default keys to the commands that swap the states of the selected window with the window in the specified direction. ---- *** Windmove code no longer used is now obsolete. That includes the user option 'windmove-window-distance-delta' and the functions 'windmove-coord-add', 'windmove-constrain-to-range', @@ -982,104 +829,82 @@ functions 'windmove-coord-add', 'windmove-constrain-to-range', 'windmove-constrain-loc-for-movement', 'windmove-wrap-loc-for-movement', 'windmove-reference-loc' and 'windmove-other-window-loc'. ---- ** Octave mode The mode is automatically enabled in files that start with the 'function' keyword. ** project.el -+++ *** New commands 'project-search' and 'project-query-replace-regexp'. ---- *** New user option 'project-read-file-name-function'. ** Etags -+++ *** 'next-file' is now an obsolete alias of 'tags-next-file'. ---- *** 'tags-loop-revert-buffers' is an obsolete alias of 'fileloop-revert-buffers'. -+++ *** The 'tags-loop-continue' function along with the 'tags-loop-operate' and 'tags-loop-scan' variables are now obsolete; use the new 'fileloop-initialize' and 'fileloop-continue' functions instead. -+++ *** etags is now able to read Zstandard-compressed files. ** bibtex ---- *** New commands 'bibtex-next-entry' and 'bibtex-previous-entry'. In 'bibtex-mode-map', 'forward-paragraph' and 'backward-paragraph' are remapped to these, respectively. ** Dired -+++ *** New command 'dired-create-empty-file'. -+++ *** New command 'dired-number-of-marked-files'. It is by default bound to '* N'. ---- *** The marking commands now report how many files were marked by the command itself, not how many files are marked in total. -+++ *** The new user option 'dired-create-destination-dirs' controls whether 'dired-do-copy' and 'dired-rename-file' should create non-existent directories in the destination. -+++ *** 'dired-dwim-target' can be customized to prefer either the next window, or one of the most recently visited windows with a Dired buffer. -+++ *** When the new user option 'dired-vc-rename-file' is non-nil, Dired performs file renaming using underlying version control system. ---- *** Zstandard compression is now supported for 'dired-do-compress' and 'dired-do-compress-to'. ---- *** On systems that support suid/guid files, Dired now fontifies the permissions of such files with a special face 'dired-set-id'. ---- *** A new face, 'dired-special', is used to highlight sockets, named pipes, block devices and character devices. ** Find-Dired ---- *** New user option 'find-dired-refine-function'. The default value is 'find-dired-sort-by-filename'. ---- *** New sorting options for the user option 'find-ls-option'. ** Change Logs and VC ---- *** New user option 'vc-tor'. When non-nil, this user option causes the VC commands to communicate with the repository via Tor's proxy, using the 'torsocks' wrapper script. The default is nil. -+++ *** New command 'log-edit-generate-changelog-from-diff', bound to 'C-c C-w'. This generates ChangeLog entries from the VC fileset diff. -+++ *** Recording ChangeLog entries doesn't require an actual file. If a ChangeLog file doesn't exist, and if the new user option 'add-log-dont-create-changelog-file' is non-nil (which is the @@ -1089,32 +914,26 @@ still be used if it exists.) Set the user option to nil to get the previous behavior of always creating a buffer that visits a ChangeLog file. -+++ *** The new 'd' command ('vc-dir-clean-files') in 'vc-dir-mode' buffers will delete the marked files (or if no files are marked, the file under point). This command does not notify the VC backend, and is mostly useful for unregistered files. ---- *** 'vc-dir-ignore' now takes a prefix argument to ignore all marked files. ---- *** New user option 'vc-git-grep-template'. This new user option allows customizing the default arguments passed to 'git-grep' when 'vc-git-grep' is used. ---- *** Command 'vc-git-stash' now respects marks in the "*vc-dir*" buffer. When some files are marked, only those are stashed. When no files are marked, all modified files are stashed, as before. ---- *** 'vc-dir' now shows a button allowing you to hide the stash list. Controlled by user option 'vc-git-show-stash'. Default t means show the entire list as before. An integer value limits the list length (but still allows you to show the entire list via the button). ---- *** 'vc-git-stash' is now bound to 'C' in the stash headers. -- @@ -1122,44 +941,35 @@ the entire list as before. An integer value limits the list length 'vc-git-stash' and 'vc-git-stash-snapshot' can now be run using 'C' and 'S' respectively, including when there are no stashes. ---- *** The new hook 'vc-retrieve-tag-hook' runs after retrieving a tag. ---- *** 'vc-hg' now invokes 'smerge-mode' when visiting files. Code that attempted to invoke 'smerge-mode' when visiting an Hg file with conflicts existed in earlier versions of Emacs, but incorrectly never detected a conflict due to invalid assumptions about cached values. -+++ *** The Hg (Mercurial) back-end now supports 'vc-region-history'. The 'C-x v h' command now works in buffers that visit files controlled by Hg. -+++ *** The Hg (Mercurial) back-end now prompts for revision to merge when you invoke 'C-x v m' ('vc-merge'). ---- *** The Hg (Mercurial) back-end now uses tags, branches and bookmarks instead of revision numbers as completion candidates when it prompts for a revision. ---- *** New user option 'vc-hg-revert-switches'. It specifies switches to pass to Hg's 'revert' command. -+++ *** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions and compares their entire trees. ---- *** 'C-x v M D' ('vc-diff-mergebase') and 'C-x v M L' ('vc-log-mergebase') print diffs and logs between the merge base (common ancestor) of two given revisions. -+++ *** New command 'vc-log-search' asks for a pattern, searches it in the revision log, and displays matched log entries in the log buffer. For example, 'M-x vc-log-search RET bug#36644 RET' @@ -1168,7 +978,6 @@ With a prefix argument asks for a command, so for example, 'C-u M-x vc-log-search RET git log -1 f302475 RET' will display just one log entry found by its revision number. -+++ *** It is now possible to display a specific revision given by its ID. If you invoke 'C-x v L' ('vc-print-root-log') with a numeric argument of 1, as in 'C-1 C-x v L' or 'C-u 1 C-x v L', it asks for a revision @@ -1176,56 +985,46 @@ ID, and shows its log entry together with the diffs introduced by the revision's commit. (For some less capable VCSes, only the log entry is shown.) ---- *** New user option 'vc-find-revision-no-save'. With non-nil, 'vc-find-revision' doesn't write the created buffer to file. ---- *** 'C-x v =' can now mimic Magit's diff format. Set the new user option 'diff-font-lock-prettify' to t for that, see below under "Diff mode". ---- *** The 'diff' function arguments OLD and NEW may each be a buffer rather than a file, in non-interactive calls. This change was made in Emacs 24.1, but wasn't documented until now. -+++ *** New command 'diff-buffers' interactively diffs two buffers. ** Diff mode -+++ *** Hunks are now automatically refined by font-lock. To disable refinement, set the new user option 'diff-refine' to nil. To get back the old behavior where hunks are refined as you navigate through a diff, set 'diff-refine' to the symbol 'navigate'. -+++ *** 'diff-auto-refine-mode' is deprecated in favor of 'diff-refine'. It is no longer enabled by default and binding it no longer has any effect. -+++ *** Better syntax highlighting of Diff hunks. Fragments of source in Diff hunks are now by default highlighted according to the appropriate major mode. Customize the new user option 'diff-font-lock-syntax' to nil to disable this. ---- *** File headers can be shortened, mimicking Magit's diff format. To enable it, set the new user option 'diff-font-lock-prettify' to t. On GUI frames, this option also displays the insertion and deletion indicators on the left fringe. -+++ *** Prefix arg of 'diff-goto-source' means jump to the old revision of the file under version control if point is on an old changed line, or to the new revision of the file otherwise. ** Texinfo -+++ *** New function for inserting '@pxref', '@xref', or '@ref' commands. The function 'texinfo-insert-dwim-@ref', bound to 'C-c C-c r' by default, inserts one of three types of references based on the text @@ -1234,35 +1033,29 @@ start of a sentence or at '(point-min)', else '@ref'. ** Browse-url ---- *** The function 'browse-url-emacs' can now visit a URL in selected window. It now treats the optional 2nd argument to mean that the URL should be shown in the currently selected window. ---- *** A new function, 'browse-url-add-buttons' can be used to add clickable links to most ordinary special-mode buffers that display text that have URLs embedded. 'browse-url-button-regexp' controls what's considered a button. ---- *** New user option 'browse-url-secondary-browser-function'. It can be set to a function that invokes an alternative browser. ** Comint -+++ *** 'send-invisible' is now an obsolete alias for 'comint-send-invisible'. Also, 'shell-strip-ctrl-m' is declared obsolete. -+++ *** 'C-c .' ('comint-insert-previous-argument') no longer interprets '&'. This feature caused problems when '&&' was present in the previous command. Since this command emulates 'M-.' in Bash and zsh, neither of which treats '&' specially, the feature was removed for compatibility with these shells. -+++ *** 'comint-insert-previous-argument' can now count arguments from the end. By default, invoking 'C-c .' with a numeric argument N would copy the Nth argument, counting from the first one. But if the new user option @@ -1272,11 +1065,9 @@ better emulate 'M-.' in both Bash and zsh, since the former counts from the beginning of the arguments, while the latter counts from the end. -+++ *** 'comint-run' can now accept a list of switches to pass to the program. 'C-u M-x comint-run' will prompt for the switches interactively. -+++ *** Abnormal hook 'comint-password-function' has been added. This hook permits a derived mode to supply a password for the underlying command interpreter without prompting the user. For @@ -1292,7 +1083,6 @@ if it had been supplied on the command line. ** SQL ---- *** SQL Indent Minor Mode SQL Mode now supports the ELPA 'sql-indent' package for assisting sophisticated SQL indenting rules. Note, however, that SQL is not @@ -1305,19 +1095,16 @@ prefer to rely upon existing Emacs facilities for formatting code but the 'sql-indent' package provides facilities to aid more casual SQL developers layout queries and complex expressions. ---- **** 'sql-use-indent-support' (default t) enables SQL indention support. The 'sql-indent' package from ELPA must be installed to get the indentation support in 'sql-mode' and 'sql-interactive-mode'. ---- **** 'sql-mode-hook' and 'sql-interactive-mode-hook' changed. Both hook variables have had 'sql-indent-enable' added to their default values. If you have existing customizations to these variables, you should make sure that the new default entry is included. ---- *** Connection Wallet Database passwords can now by stored in NETRC or JSON data files that may optionally be encrypted. When establishing an interactive session @@ -1336,48 +1123,39 @@ be encrypted with GPG by adding an additional ".gpg" suffix. ** Term ---- *** 'term-read-noecho' is now obsolete, use 'read-passwd' instead. -+++ *** 'serial-term' now takes an optional parameter to leave the emulator in line mode. ** Flymake -+++ *** The variable 'flymake-diagnostic-types-alist' is obsolete. You should instead set properties on known diagnostic symbols, like ':error' and ':warning', as demonstrated in the Flymake manual. -+++ *** New user option 'flymake-start-on-save-buffer'. Control whether Flymake starts checking the buffer on save. ---- *** Flymake and backend functions may exchange hints about buffer changes. This enables more efficient backends. See the docstring of 'flymake-diagnostic-functions' or the Flymake manual for details. -+++ *** 'flymake-start-syntax-check-on-newline' is now obsolete, use 'post-self-insert-hook' to check on newline. ** Ruby ---- *** The Rubocop Flymake diagnostic function will only run Lint cops if it can't find the config file. --- *** Rubocop is called with 'bundle exec' if Gemfile mentions it. ---- *** New command 'ruby-find-library-file' bound to 'C-c C-f'. ** Package ---- *** Warn if "footer line" is missing, but still install package. package.el used to refuse to install a package without the so-called "footer line", which appears at the very end of the file: @@ -1392,24 +1170,20 @@ Note that versions of Emacs older than 27.1 will not only refuse to install packages without such a line -- they will be unable to parse package data. It is therefore recommended to keep this line. -+++ *** Change of 'package-check-signature' for packages with multiple sigs. In previous Emacsen, t checked that all signatures are valid. Now t only checks that at least one signature is valid and the new 'all' value needs to be used if you want to enforce that all signatures are valid. This only affects packages with multiple signatures. -+++ *** The meaning of 'allow-unsigned' in 'package-check-signature' has changed slightly: If a usable OpenPGP configuration can't be found (for instance, if gpg isn't installed), it now has the same meaning as nil. ---- *** New function 'package-get-version' lets packages query their own version. Example use in auctex.el: '(defconst auctex-version (package-get-version))' ---- *** New 'package-quickstart' feature. When 'package-quickstart' is non-nil, package.el precomputes a big autoloads file so that activation of packages can be done much faster, @@ -1419,10 +1193,8 @@ It also causes user options like 'package-user-dir' and is run rather than at startup so you don't need to set them in your early init file. ---- *** New function 'package-activate-all'. -+++ *** New functions for filtering packages list. A new function has been added which allows users to filter the packages list by name: 'package-menu-filter-by-name'. By default, it @@ -1432,13 +1204,10 @@ is bound to '/ n'. Additionally, the function (from 'f'). To clear any of the two filters, the user can now call the 'package-menu-clear-filter' function, bound to '/ /' by default. ---- *** Imenu support has been added to 'package-menu-mode'. ---- *** The package list can now be sorted by version or description. -+++ *** In Package Menu, 'g' now updates package data from archives. Previously, 'g' invoked 'tabulated-list-revert' which did not update the cached archive data. It is now bound to 'revert-buffer', which @@ -1448,19 +1217,16 @@ will update the data. ** Info -+++ *** Clicking on the left/right arrow icon in the Info tool-bar while holding down the Ctrl key pops up a menu of previously visited Info nodes where you can select a node to go back (like in browsers). ---- *** Info can now follow 'file://' protocol URLs. The 'file://' URLs in Info documents can now be followed by passing them to the 'browse-url' function, like the other protocols: 'ftp', 'http', and 'https'. This allows having references to local HTML files, for example. ---- ** Display of man pages now limits the width for formatting pages. The new user option 'Man-width-max' (80 by default) limits the number of columns passed to the 'man' program for formatting man pages. This @@ -1469,40 +1235,32 @@ windows (which are customary with today's large displays). ** Xref -+++ *** New command 'xref-find-definitions-at-mouse'. This command finds definitions of the identifier at the place of a mouse click event, and is intended to be bound to a mouse event. -+++ *** Changing 'xref-marker-ring-length' works after xref.el is loaded. Previously, setting 'xref-marker-ring-length' would only take effect if set before xref.el was loaded. ---- *** 'xref-find-definitions' now sets the mark at the buffer position where it was invoked. ---- *** New xref faces 'xref-file-header', 'xref-line-number', 'xref-match'. ---- *** New user option 'xref-show-definitions-function'. It encapsulates the logic pertinent to showing the result of 'xref-find-definitions'. The user can change it to customize its behavior and the display of results. ---- *** Search results show the buffer even for one hit. The search-type Xref commands (e.g. 'xref-find-references' or 'project-find-regexp') now show the results buffer even when there is only one hit. This can be altered by changing 'xref-show-xrefs-function'. -+++ *** Xref buffers support refreshing the search results. A new command 'xref-revert-buffer' is bound to 'g'. ---- *** Imenu support has been added to 'xref--xref-buffer-mode'. *** New generic method 'xref-backend-identifier-completion-ignore-case'. @@ -1511,7 +1269,6 @@ identifier completion. ** Checkdoc ---- *** Checkdoc can now optionally spell-check doc strings. Invoking 'checkdoc-buffer' with a non-nil TAKE-NOTES argument (interactively, with a prefix arg) will now spell-check the doc @@ -1519,7 +1276,6 @@ strings and report all the spelling mistakes. ** Icomplete -+++ *** New minor mode Fido mode. This mode is based on Icomplete, and its name stands for "Fake Ido". The point of this mode is to be an 'ido-mode' workalike, providing @@ -1529,29 +1285,24 @@ completion facilities. ** Ecomplete ---- *** The Ecomplete sorting has changed to a decay-based algorithm. This can be controlled by the new 'ecomplete-sort-predicate' user option. ---- *** The 'ecomplete-database-file' file is now placed in "~/.emacs.d/ecompleterc" by default. Of course it will still find it if you have it in "~/.ecompleterc". ** Gnus ---- *** 'mm-uu-diff-groups-regexp' now defaults to matching all groups, which means that "git am" diffs are recognized everywhere. -+++ *** Two new Gnus summary mode navigation commands have been added, bound to the '[' and ']' keys: 'gnus-summary-prev-unseen-article' and 'gnus-summary-next-unseen-article'. These take you (respectively) to the previous unseen or next unseen article. (These are the ones that are marked with "." in the summary mode lines.) -+++ *** The Gnus user variable 'nnimap-expunge' supports three new values: 'never' for never expunging messages, 'immediately' for immediately expunging deleted messages, and 'on-exit' to expunge deleted articles @@ -1561,67 +1312,53 @@ result in Gnus expunging all messages that have been flagged as deleted by any IMAP client (rather than just those that have been deleted by Gnus). -+++ *** New user option 'gnus-use-atomic-windows' makes Gnus window layouts atomic. See the "(elisp) Atomic Windows" node of the Elisp manual for details. -+++ *** There's a new value for 'gnus-article-date-headers', 'combined-local-lapsed', which will show both the time (in the local timezone) and the lapsed time. ---- *** Gnus now maps imaps to 993 only on old MS-Windows versions. The nnimap backend used to do this unconditionally to work around problems on old versions of MS-Windows. This is now done only for Windows XP and older. -+++ *** The nnimap backend now has support for IMAP namespaces. This feature can be enabled by setting the new 'nnimap-use-namespaces' server variable to non-nil. -+++ *** A prefix argument to 'gnus-summary-limit-to-score' will limit in reverse. Limit to articles with score "at or below" the SCORE argument rather than "at or above". ---- *** The function 'gnus-score-find-favorite-words' has been renamed from 'gnus-score-find-favourite-words'. ---- *** Gmane has been removed as an nnir backend, since Gmane no longer has a search engine. -+++ *** Splitting mail on common mailing list headers has been added. See the concept index in the Gnus manual for the 'match-list' entry. -+++ *** nil is no longer an allowed value for 'mm-text-html-renderer'. -+++ *** The default value of 'mm-inline-large-images' has changed from nil to 'resize', which means that large images will be resized instead of displayed with an external program by default. -+++ *** A new Gnus summary mode command, 'S A' ('gnus-summary-attach-article') can be used to attach the current article(s) to a pre-existing Message buffer, or create a new Message buffer with the article(s) attached. -+++ *** A new Gnus summary mode command, 'w' ('gnus-summary-browse-url') scans the article buffer for URLs, and offers them to the user to open with 'browse-url'. ---- *** New user option 'nnir-notmuch-filter-group-names-function'. This option controls whether and how to use Gnus search groups as 'path:' search terms to 'notmuch'. ---- *** The buttons in the Gnus article buffer were formerly widgets (i.e., buttons from widget.el). This has now changed, and they are now buttons (from button.el), and commands like 'TAB' now search for @@ -1631,22 +1368,18 @@ fail. ** erc ---- *** New hook 'erc-insert-done-hook'. This hook is called after strings have been inserted into the buffer, and is free to alter point and window configurations, as it's not called from inside a 'save-excursion', as opposed to 'erc-insert-post-hook'. ---- *** 'erc-button-google-url' has been renamed to 'erc-button-search-url' and its value has been changed to Duck Duck Go. ---- *** 'erc-send-pre-hook' and 'erc-send-this' have been obsoleted. The user option to use instead to alter text to be sent is now 'erc-pre-send-functions'. ---- *** Improve matching/highlighting of nicknames. Open and close parenthesis and apostrophe are not considered valid nick characters anymore, matching the given grammar in RFC 2812 @@ -1654,43 +1387,35 @@ section 2.3.1. This enables correct matching and highlighting of nicks when they are surrounded by parentheses, like "(nick)", and when adjacent to an apostrophe, like "nick's". ---- *** Set 'erc-button-url-regexp' to 'browse-url-button-regexp' which better handles surrounding pair of parentheses. ---- *** New function 'erc-switch-to-buffer-other-window' which is like 'erc-switch-to-buffer', but opens the buffer in another window. ---- *** New function 'erc-track-switch-buffer-other-window' which is like 'erc-track-switch-buffer', but opens the buffer in another window. ** EUDC ---- *** XEmacs support has been removed. ** eww/shr -+++ *** The new user option 'shr-cookie-policy' can be used to control when to use cookies when fetching embedded images. The default is to use them when the images are from the same domain as the main HTML document. -+++ *** The 'eww' command can now create a new EWW buffer. Invoking the command with a prefix argument will cause it to create a new EWW buffer for the URL instead of reusing the default one. -+++ *** Clicking with the Ctrl key or 'C-u RET' on a link opens a new tab when tab-bar-mode is enabled. -+++ *** The 'd' ('eww-download') command now falls back to current page's URL. If this command is invoked with no URL at point, it now downloads the current page instead of signaling an error. @@ -1700,30 +1425,24 @@ current page instead of signaling an error. 'shr-selected-link' face to give the user feedback that the command has been executed. -+++ *** New user option 'shr-discard-aria-hidden'. If set, shr will not render tags with attribute 'aria-hidden="true"'. This attribute is meant to tell screen readers to ignore a tag. -+++ *** 'shr-external-browser' has been made into an obsolete alias of 'browse-url-secondary-browser-function'. ---- *** 'shr-tag-ol' now respects the ordered list 'start' attribute. ---- *** The following tags are now handled: '', '', and ''. ** Htmlfontify -+++ *** The functions 'hfy-color', 'hfy-color-vals' and 'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map' and 'hfy-rgb-txt-color-map' have been renamed from names that used 'colour' instead of 'color'. -+++ ** Enriched mode supports the 'charset' text property. You can add or modify the 'charset' text properties of text using the 'Edit->Text Properties->Special Properties' menu, or by invoking the @@ -1733,70 +1452,57 @@ restored when the file is visited. ** Smtpmail ---- *** Authentication mechanisms can be added via external packages, by defining new 'cl-defmethod' of 'smtpmail-try-auth-method'. -+++ *** To always force smtpmail to send credentials over on the first attempt when communicating with the SMTP server(s), the 'smtpmail-servers-requiring-authorization' user option can be used. -+++ *** smtpmail will now try resending mail when getting a transient "4xx" error message from the SMTP server. The new 'smtpmail-retries' user option says how many times to retry. ** Footnote mode ---- *** Support Hebrew-style footnotes. ---- *** Footnote text lines are now aligned. Can be controlled via the new user option 'footnote-align-to-fn-text'. ** CSS mode ---- *** A new command 'css-cycle-color-format' for cycling between color formats (e.g. "black" => "#000000" => "rgb(0, 0, 0)") has been added, bound to 'C-c C-f'. ---- *** CSS mode, SCSS mode, and Less CSS mode now have support for Imenu. ** SGML mode ---- *** 'sgml-quote' now handles double quotes and apostrophes when escaping text and in addition all numeric entities when unescaping text. ** Python mode ---- *** Python mode supports three different font lock decoration levels. The maximum level is used by default; customize 'font-lock-maximum-decoration' to tone down the decoration. ---- *** New user option 'python-pdbtrack-kill-buffers'. If non-nil, the default, buffers opened during pdbtracking session are killed when pdbtracking session is finished. ---- *** New function 'python-shell-send-statement. It sends the statement delimited by 'python-nav-beginning-of-statement' and 'python-nav-end-of-statement' to the inferior Python process. ** Help ---- *** Descriptions of variables and functions give an estimated first release where the variable or function appeared in Emacs. ---- *** Output format of 'C-h l' ('view-lossage') has changed. For convenience, 'view-lossage' now displays the last keystrokes and commands in the same format as the edit buffer of @@ -1804,23 +1510,19 @@ and commands in the same format as the edit buffer of the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer created by 'edit-last-kbd-macro', and to save the macro by 'C-c C-c'. ---- *** The list of help commands produced by 'C-h C-h' ('help-for-help') can now be searched via 'C-s'. ** Ibuffer ---- *** New filter 'ibuffer-filter-by-process'; bound to '/ E'. ---- *** All mode filters can now accept a list of symbols. This means you can now easily filter several major modes, as well as a single mode. ** Search and Replace -+++ *** Isearch supports a prefix argument for 'C-s' ('isearch-repeat-forward') and 'C-r' ('isearch-repeat-backward'). With a prefix argument, these commands repeat the search for the specified occurrence of the search string. @@ -1830,7 +1532,6 @@ This makes possible also to use a prefix argument for 'M-s .' Also a prefix argument is supported for 'isearch-yank-until-char', 'isearch-yank-word-or-char', 'isearch-yank-symbol-or-char'. -+++ *** To go to the first/last occurrence of the current search string is possible now with new commands 'isearch-beginning-of-buffer' and 'isearch-end-of-buffer' bound to 'M-s M-<' and 'M-s M->' in Isearch. @@ -1839,14 +1540,12 @@ counting from the beginning/end of the buffer. This complements 'C-s'/'C-r' that searches for the next Nth relative occurrence with a numeric argument. -+++ *** 'isearch-lazy-count' shows the current match number and total number of matches in the Isearch prompt. User options 'lazy-count-prefix-format' and 'lazy-count-suffix-format' define the format of the current and the total number of matches in the prompt's prefix and suffix, respectively. ---- *** 'lazy-highlight-buffer' highlights matches in the full buffer. It is useful in combination with 'lazy-highlight-cleanup' customized to nil to leave matches highlighted in the whole buffer after exiting isearch. @@ -1855,7 +1554,6 @@ navigation through the matches without flickering is more smooth. 'lazy-highlight-buffer-max-at-a-time' controls the number of matches to highlight in one iteration while processing the full buffer. -+++ *** New isearch bindings. 'C-M-z' invokes new function 'isearch-yank-until-char', which yanks everything from point up to but not including the specified @@ -1871,27 +1569,21 @@ string to highlight lines matching the search string. This is similar to the existing binding 'M-s h r' ('highlight-regexp') that highlights JUST the search string. -+++ *** New user option 'isearch-yank-on-move' provides options t and 'shift' to extend the search string by yanking text that ends at the new position after moving point in the current buffer. 'shift' extends the search string by motion commands while holding down the shift key. -+++ *** 'isearch-allow-scroll' provides a new option 'unlimited' to allow scrolling any distance off screen. ---- *** Isearch now remembers the regexp-based search mode for words/symbols and case-sensitivity together with search strings in the search ring. ---- *** Isearch now has its own tool-bar and menu-bar menu. -+++ *** 'flush-lines' prints and returns the number of deleted matching lines. ---- *** 'char-fold-to-regexp' now matches more variants of a base character. The table used to check for equivalence of characters is now built using the complete chain of unicode decompositions of a character, @@ -1899,7 +1591,6 @@ rather than stopping after one level, such that searching for e.g. "GREEK SMALL LETTER IOTA" will now also find "GREEK SMALL LETTER IOTA WITH OXIA". -+++ *** New char-folding options: 'char-fold-include' lets you add ad hoc foldings, 'char-fold-exclude' to remove foldings from default decomposition, and 'char-fold-symmetric' to search for any of an equivalence class of @@ -1910,7 +1601,6 @@ to find "e". ** Debugger -+++ *** The Lisp Debugger is now based on 'backtrace-mode'. Backtrace mode adds fontification and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -1918,45 +1608,37 @@ the Elisp manual for documentation of the new mode and its commands. ** Edebug -+++ *** 'edebug-eval-last-sexp' and 'edebug-eval-print-last-sexp' interactively now take a zero prefix analogously to the non-Edebug counterparts. -+++ *** New faces 'edebug-enabled-breakpoint' and 'edebug-disabled-breakpoint'. When setting breakpoints in Edebug, an overlay with these faces are placed over the point in question, depending on whether they are enabled or not. -+++ *** New command 'edebug-toggle-disable-breakpoint'. This command allows you to disable a breakpoint temporarily. This is mainly useful with breakpoints that are conditional and would take some time to recreate. -+++ *** New command 'edebug-unset-breakpoints'. To clear all breakpoints in the current form, the 'U' command in 'edebug-mode', or 'M-x edebug-unset-breakpoints' can be used. ---- *** Re-instrumenting a function with Edebug will now try to preserve previously-set breakpoints. However, if the code has changed substantially, this may not be possible. -+++ *** New command 'edebug-remove-instrumentation'. This command removes Edebug instrumentation from all functions that have been instrumented. -+++ *** The runtime behavior of Edebug's instrumentation can be changed using the new variables 'edebug-behavior-alist', 'edebug-after-instrumentation-function' and 'edebug-new-definition-function'. Edebug's behavior can be changed globally or for individual definitions. -+++ *** Edebug's backtrace buffer now uses 'backtrace-mode'. Backtrace mode adds fontification, links and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -1973,14 +1655,12 @@ been instrumented by Edebug. ** Enhanced xterm support ---- *** New user option 'xterm-set-window-title' controls whether Emacs sets the XTerm window title. This feature is experimental and is disabled by default. ** Grep -+++ *** 'rgrep', 'lgrep' and 'zrgrep' now hide part of the command line that contains a list of ignored directories and files. Clicking on the button with ellipsis unhides it. @@ -1988,16 +1668,13 @@ The abbreviation can be disabled by the new user option 'grep-find-abbreviate'. The new command 'grep-find-toggle-abbreviation' toggles it interactively. ---- *** 'grep-find-use-xargs' is now customizable with sorting options. ** ERT -+++ *** New variable 'ert-quiet' allows making ERT output in batch mode less verbose by removing non-essential information. -+++ *** ERT's backtrace buffer now uses 'backtrace-mode'. Backtrace mode adds fontification and commands for changing the appearance of backtrace frames. See the node "(elisp) Backtraces" in @@ -2005,73 +1682,61 @@ the Elisp manual for documentation of the new mode and its commands. ** Gamegrid ---- *** Gamegrid now determines its default glyph size based on display dimensions, instead of always using 16 pixels. As a result, Tetris, Snake and Pong are better playable on HiDPI displays. ---- *** 'gamegrid-add-score' can now sort scores from lower to higher. This is useful for games where lower scores are better, like time-based games. ** Filecache ---- *** Completing file names in the minibuffer via 'C-TAB' now uses the styles as configured by the user option 'completion-styles'. -+++ ** New macros 'thunk-let' and 'thunk-let*'. These macros are analogue to 'let' and 'let*', but create bindings that are evaluated lazily. ** next-error -+++ *** New user option 'next-error-find-buffer-function'. The value should be a function that determines how to find the next buffer to be used by 'next-error' and 'previous-error'. The default is to use the last buffer that navigated to the current error. -+++ *** New command 'next-error-select-buffer'. It can be used to set any buffer as the next one to be used by 'next-error' and 'previous-error'. ** nxml-mode ---- *** The default value of 'nxml-sexp-element-flag' is now t. This means that pressing 'C-M-SPACE' now selects the entire tree by default, and not just the opening element. ** Eshell ---- *** TAB completion uses the standard 'completion-at-point' rather than 'pcomplete'. Its UI is slightly different but can be customized to behave similarly, e.g. Pcomplete's default cycling can be obtained with '(setq completion-cycle-threshold 5)'. -+++ *** Expansion of history event designators is disabled by default. To restore the old behavior, use (add-hook 'eshell-expand-input-functions #'eshell-expand-history-references) ---- *** The function 'eshell-uniquify-list' has been renamed from 'eshell-uniqify-list'. ---- *** The function 'eshell/kill' is now able to handle signal switches. Previously 'eshell/kill' would fail if provided a kill signal to send to the process. It now accepts signals specified either by name or by its number. ---- *** Emacs now follows symlinks in history-related files. The files specified by 'eshell-history-file-name' and 'eshell-last-dir-ring-file-name' can include symlinks; these are now @@ -2079,16 +1744,13 @@ followed when Emacs writes the relevant history variables to the disk. ** Shell ---- *** Program name completion inside remote shells works now as expected. -+++ *** The user option 'shell-file-name' can be set now as connection-local variable for remote shells. It still defaults to "/bin/sh". ** Single shell commands -+++ *** New values of 'shell-command-dont-erase-buffer'. This user option can now have the value 'erase' to force to erase the output buffer before execution of the command, even if the output goes @@ -2096,42 +1758,34 @@ to the current buffer. Additional values 'beg-last-out', 'end-last-out', and 'save-point' control where to put point in the output buffer after inserting the 'shell-command' output. ---- *** The new functions 'shell-command-save-pos-or-erase' and 'shell-command-set-point-after-cmd' control how point is handled between two consecutive shell commands in the same output buffer. -+++ *** 'async-shell-command-width' defines the number of display columns available for output of asynchronous shell commands. -+++ *** Prompt for shell commands can now show the current directory. Customize the new user option 'shell-command-prompt-show-cwd' to enable it. ** Pcomplete ---- *** The 'pcomplete' command is now obsolete. The Pcomplete functionality can be obtained via 'completion-at-point' instead, by adding 'pcomplete-completions-at-point' to 'completion-at-point-functions'. ---- *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. ---- *** 'pcomplete/make' now completes on targets in included files, recursively. To recover the previous behavior, set new user option 'pcmpl-gnu-makefile-includes' to nil. ** Auth-source ---- *** The Secret Service backend supports the ':create' key now. ---- *** ".authinfo" and ".netrc" files now use a new mode: 'authinfo-mode'. This is just like 'fundamental-mode', except that it hides passwords under a "****" display property. When the cursor moves to this text, @@ -2140,110 +1794,89 @@ the real password is revealed (via 'reveal-mode'). The new ** Tramp -+++ *** New connection method "nextcloud", which allows accessing OwnCloud or NextCloud hosted files and directories. -+++ *** New connection method "rclone", which allows accessing system storages via the 'rclone' program. This feature is experimental. -+++ *** New connection method "sudoedit", which allows editing local files with different user credentials. Contrary to the "sudo" method, no session is run permanently in the background. This is for security reasons. -+++ *** Connection methods "obex" and "synce" have been removed, because they are obsoleted in GVFS. -+++ *** Validated passwords are saved by auth-source backends which support this. -+++ *** During user and host name completion in the minibuffer, results from auth-source search are taken into account. This can be disabled by setting the user option 'tramp-completion-use-auth-sources' to nil. -+++ *** The user option 'tramp-ignored-file-name-regexp' allows disabling Tramp for some look-alike remote file names. -+++ *** For some connection methods, like "su" or "sudo", the host name in multi-hop file names must match the previous hop. Default host names are adjusted to the host name from the previous hop. -+++ *** A timeout has been added for the connection methods "sudo" and "doas". The underlying session is disabled when the timeout expires. This is for security reasons. -+++ *** For some connection methods, like "sshx" or "plink", it is possible to configure the remote login shell. This avoids problems with remote hosts, where "/bin/sh" is a link to a shell which cooperates badly with Tramp. -+++ *** New commands 'tramp-rename-files' and 'tramp-rename-these-files'. They allow saving remote files somewhere else when the corresponding host is not reachable anymore. ** Rcirc ---- *** New user option 'rcirc-url-max-length'. Setting this option to an integer causes URLs displayed in Rcirc buffers to be truncated to that many characters. ---- *** The default '/quit' and '/part' reasons are now configurable. Two new user options are provided for this: 'rcirc-default-part-reason' and 'rcirc-default-quit-reason'. ** Register ---- *** The return value of method 'register-val-describe' includes the names of buffers shown by the windows of a window configuration. ** Message ---- *** Completion of email addresses can use the standard completion UI. This is controlled by 'message-expand-name-standard-ui'. With the standard UI the different sources (ecomplete, bbdb, and eudc) are matched together and try to obey 'completion-styles'. It should work for other completion front ends like Company. ---- *** 'message-mode' now supports highlighting citations of different depths. This can be customized via the new user option 'message-cite-level-function' and the new 'message-cited-text-*' faces. -+++ *** Messages can now be systematically encrypted when the PGP keyring contains a public key for every recipient. To achieve this, add 'message-sign-encrypt-if-all-keys-available' to 'message-send-hook'. ---- *** When replying a message that have addresses on the form '"foo@bar.com" ', Message will elide the repeated "name" from the address field in the response. ---- *** The default of 'message-forward-as-mime' has changed from t to nil as it has been reported that many recipients can't read forwards that are formatted as MIME digests. -+++ *** 'message-forward-included-headers' has changed its default to exclude most headers when forwarding. ---- *** 'mml-secure-openpgp-sign-with-sender' sets also "gpg --sender". When 'mml-secure-openpgp-sign-with-sender' is non-nil, message sender's email address (in addition to its old behavior) will also be used to @@ -2259,61 +1892,48 @@ The option is useful for two reasons when verifying the signature: 2.2.17 to fully benefit from this feature. See gpg(1) man page for "--auto-key-retrieve". -+++ *** The 'mail-from-style' variable is now obsolete. According to RFC 5322, only the 'angles' value is valid. ---- ** EasyPG ---- *** 'epa-pinentry-mode' is renamed to 'epg-pinentry-mode'. It now applies to epg functions as well as epa functions. ---- *** The alias functions 'epa--encode-coding-string', 'epa--decode-coding-string', and 'epa--select-safe-coding-system' have been removed. Use 'encode-coding-string', 'decode-coding-string', and 'select-safe-coding-system' instead. ---- *** 'epg-context' structure supports now 'sender' slot. The value of the new 'sender' slot (if a string) is used to set gpg's "--sender" option. This feature is used by 'mml-secure-openpgp-sign-with-sender'. See gpg(1) manual page about "--sender" for more information. ---- ** Rmail -+++ *** New user option 'rmail-output-reset-deleted-flag'. If this option is non-nil, messages appended to an output file by the 'rmail-output' command have their Deleted flag reset. ---- *** The command 'rmail-summary-by-senders' with an empty argument selects the messages to summarize with a regexp that matches the sender of the current message. ** Threads -+++ *** New variable 'main-thread' holds Emacs's main thread. This is handy in Lisp programs that run on a non-main thread and want to signal the main thread, e.g., when they encounter an error. -+++ *** 'thread-join' now returns the result of the finished thread. -+++ *** 'thread-signal' does not propagate errors to the main thread. Instead, error messages are just printed in the main thread. ---- *** 'thread-alive-p' is now obsolete, use 'thread-live-p' instead. -+++ *** New command 'list-threads' shows Lisp threads. See the current list of live threads in a tabulated-list buffer which automatically updates. In the buffer, you can use 's q' or 's e' to @@ -2322,42 +1942,35 @@ backtrace with 'b'. ** thingatpt.el ---- *** 'thing-at-point' supports a new "thing" called 'uuid'. A symbol 'uuid' can be passed to 'thing-at-point' and it returns the UUID at point. ---- *** 'number-at-point' will now recognize hex numbers like 0xAb09 and #xAb09 and return them as numbers. ---- *** 'word-at-point' and 'sentence-at-point' accept NO-PROPERTIES. Just like 'thing-at-point' itself. ** Interactive automatic highlighting -+++ *** 'highlight-regexp' can now highlight subexpressions. The new command accepts a prefix numeric argument to choose the subexpression. ** Mouse display of minor mode menu ---- *** 'minor-mode-menu-from-indicator' now displays full minor mode name. When there is no menu for a mode, display the mode name after the indicator instead of just the indicator (which is sometimes cryptic). ** rx ---- *** rx now handles raw bytes in character alternatives correctly, when given in a string. Previously, '(any "\x80-\xff")' would match characters U+0080...U+00FF. Now the expression matches raw bytes in the 128...255 range, as expected. ---- *** The rx 'or' and 'seq' forms no longer require any arguments. '(or)' produces a regexp that never matches anything, while '(seq)' matches the empty string, each being an identity for the operation. @@ -2365,31 +1978,25 @@ This also works for their aliases: '|' for 'or'; ':', 'and' and 'sequence' for 'seq'. The symbol 'unmatchable' can be used as an alternative to '(or)'. ---- *** 'regexp' and new 'literal' accept arbitrary lisp as arguments. In this case, 'rx' will generate code which produces a regexp string at run time, instead of a constant string. ---- *** New rx extension mechanism: 'rx-define', 'rx-let', 'rx-let-eval'. These macros add new forms to the rx notation. -+++ *** 'anychar' is now an alias for 'anything'. Both match any single character; 'anychar' is more descriptive. -+++ *** New 'intersection' form for character sets. With 'or' and 'not', it can be used to compose character-matching expressions from simpler parts. -+++ *** 'not' now accepts more argument types. The argument can now also be a character, a single-character string, an 'intersection' form, or an 'or' form whose arguments each match a single character. -+++ *** Nested 'or' forms of strings guarantee a longest match. For example, '(or (or "IN" "OUT") (or "INPUT" "OUTPUT"))' now matches the whole string "INPUT" if present, not just "IN". Previously, this @@ -2397,15 +2004,12 @@ was only guaranteed inside a single 'or' form of string literals. ** Frames -+++ *** New command 'make-frame-on-monitor' makes a frame on the specified monitor. -+++ *** New value of 'minibuffer' frame parameter 'child-frame'. This allows creating and immediately parenting a minibuffer-only child frame when making a frame. ---- *** New predicates 'display-blink-cursor-p' and 'display-symbol-keys-p'. These predicates are to be preferred over 'display-graphic-p' when testing for blinking cursor capability and the capability to have @@ -2413,7 +2017,6 @@ symbols (e.g., '[return]', '[tab]', '[backspace]') as keys respectively. ** Tabulated List mode -+++ *** New user options for tabulated list sort indicators. You can now customize which sorting indicator character to display near the current column in Tabulated Lists (see user options @@ -2422,52 +2025,42 @@ near the current column in Tabulated Lists (see user options 'tabulated-list-tty-sort-indicator-asc', and 'tabulated-list-tty-sort-indicator-desc'). -+++ *** Two new commands and keystrokes have been added to the tabulated list mode: 'w' (which widens the current column) and 'c' which makes the current column contract. -+++ *** New function 'tabulated-list-clear-all-tags'. This function clears all tags from the padding area in the current buffer. Tags are typically added by calling 'tabulated-list-put-tag'. ** Text mode -+++ *** 'text-mode-variant' is now obsolete, use 'derived-mode-p' instead. ** CUA mode ---- *** New user option 'cua-rectangle-terminal-modifier-key'. This user option allows for the customization of the modifier key used in a terminal frame. ** JS mode ---- *** JSX syntax is now automatically detected and enabled. If a file imports Facebook's 'React' library, or if the file uses the extension ".jsx", then various features supporting XML-like syntax will be supported in 'js-mode' and derivative modes. ('js-jsx-mode' no longer needs to be enabled.) ---- *** New user option 'js-jsx-detect-syntax' disables automatic detection. This is turned on by default. ---- *** New user option 'js-jsx-syntax' enables JSX syntax unconditionally. This is off by default. ---- *** New variable 'js-jsx-regexps' controls JSX detection. ---- *** JSX syntax is now highlighted like SGML. ---- *** JSX code is properly indented in many more scenarios. Previously, JSX indentation usually only worked when an element was wrapped in parenthesis (e.g. in a 'return' statement or a function @@ -2477,7 +2070,6 @@ supported; and, indentation conventions align more closely with those of the React developer community (see 'js-jsx-align->-with-<'), otherwise still adhering to SGML conventions. ---- *** New user option 'js-jsx-align->-with-<' controls '>' indents. Commonly in JSX code, a '>' on its own line is indented at the same level as its opening '<'. This is the new default for JSX. This @@ -2489,7 +2081,6 @@ This is turned on by default. To get back the old default indentation behavior of aligning '>' with attributes, set 'js-jsx-align->-with-<' to nil. ---- *** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'. Since JSX is a syntax extension of JavaScript, it makes the most sense for JSX expressions to be indented the same number of spaces as other @@ -2500,21 +2091,17 @@ be indented like JS, you won't need to change your config. The old behavior can be emulated by controlling JSX indentation independently of JS, by setting 'js-jsx-indent-level'. ---- *** New user option 'js-jsx-indent-level' for different JSX indentation. If you wish to indent JSX by a different number of spaces than JS, set this user option to the desired number. ---- *** New user option 'js-jsx-attribute-offset' for JSX attribute indents. ---- *** New variable 'js-syntactic-mode-name' controls mode name display. Previously, the mode name was simply 'JavaScript'. Now, when a syntax extension like JSX is enabled, the mode name is 'JavaScript[JSX]'. Set this variable to nil to disable the new behavior. ---- *** New function 'js-use-syntactic-mode-name' for deriving modes. Packages deriving from 'js-mode' with 'define-derived-mode' should call this function to add enabled syntax extensions to their mode @@ -2522,7 +2109,6 @@ name, too. ** Autorevert -+++ *** New user option 'auto-revert-avoid-polling' for saving power. When set to a non-nil value, buffers in Auto Revert mode are no longer polled for changes periodically. This reduces the power consumption @@ -2530,7 +2116,6 @@ of an idle Emacs, but may fail on some network file systems; set 'auto-revert-notify-exclude-dir-regexp' to match files where notification is not supported. The default value is nil. -+++ *** New variable 'buffer-auto-revert-by-notification'. A major mode can declare that notification on the buffer's default directory is sufficient to know when updates are required, by setting @@ -2538,41 +2123,33 @@ the new variable 'buffer-auto-revert-by-notification' to a non-nil value. Auto Revert mode can use this information to avoid polling the buffer periodically when 'auto-revert-avoid-polling' is non-nil. ---- *** 'global-auto-revert-ignore-buffer' can now also be a predicate function that can be used for more fine-grained control of which buffers to auto-revert. ** auth-source-pass -+++ *** New user option 'auth-source-pass-filename'. Allows setting the path to the password-store, defaults to "~/.password-store". -+++ *** New user option 'auth-source-pass-port-separator'. Specifies separator between host and port, defaults to colon ":". ---- *** Minimize the number of decryptions during password lookup. This makes the package usable with physical tokens requiring touching a sensor for every decryption. ---- *** 'auth-source-pass-get' is now autoloaded. ** Bookmarks ---- *** 'bookmark-file' and 'bookmark-old-default-file' are now obsolete aliases of 'bookmark-default-file'. ---- *** New user option 'bookmark-watch-bookmark-file'. When non-nil, watch whether the bookmark file has changed on disk. ---- *** The old bookmark file format is no longer supported. This bookmark file format has not been used in Emacs since at least version 19.34, released in 1996, and will no longer be automatically @@ -2584,14 +2161,12 @@ The following functions are now declared obsolete: 'bookmark-upgrade-file-format-from-0', and 'bookmark-upgrade-version-0-alist'. ---- ** The mantemp.el library is now marked obsolete. This library generates manual C++ template instantiations. It should no longer be useful on modern compilers, which do this automatically. ** Ispell ---- *** New hook 'ispell-change-dictionary-hook'. This runs after changing the dictionary and could be used to automatically spellcheck a buffer when changing language without @@ -2599,43 +2174,36 @@ needing to advice 'ispell-change-dictionary'. ** scroll-lock ---- *** New command 'scroll-lock-next-line-always-scroll'. This command is bound to 'S-down' and scrolls the buffer up in particular when the end of the buffer is visible in the window. ** mwheel.el ---- *** 'mwheel-install' is now obsolete. Use 'mouse-wheel-mode' instead. Note that 'mouse-wheel-mode' is already enabled by default on most graphical displays. ** Gravatar -+++ *** 'gravatar-cache-ttl' is now a number of seconds. The previously used timestamp format of a list of integers is still supported, but is deprecated. The default value has not changed. -+++ *** 'gravatar-size' can now be nil. This results in the use of Gravatar's default size of 80 pixels. -+++ *** The default fallback gravatar is now configurable. This is possible using the new user options 'gravatar-default-image' and 'gravatar-force-default'. ** ada-mode ---- *** The built-in ada-mode is now deleted. The GNU ELPA package is a good replacement, even in very large source files. ** time-stamp ---- *** New '%5z' conversion for 'time-stamp-format' gives time zone offset. Specifying '%5z' in 'time-stamp-format' or 'time-stamp-pattern' expands to the time zone offset, e.g., '+0100'. The time zone used is @@ -2645,7 +2213,6 @@ Because this feature is new in Emacs 27.1, do not use it in the local variables section of any file that might be edited by an older version of Emacs. ---- *** Some conversions recommended for 'time-stamp-format' have changed. The new documented/recommended %-conversions are closer to those used by 'format-time-string' and are compatible at least as far back @@ -2669,15 +2236,12 @@ file-local variable, you may need to update the value. ** mode-local ---- *** Declare 'define-overload' and 'define-child-mode' as obsolete. ---- *** Rename several internal functions to use a 'mode-local-' prefix. ** CC Mode -+++ *** You can now flag "wrong style" comments with 'font-lock-warning-face'. To do this, use 'c-toggle-comment-style', if needed, to set the desired default comment style (block or line); then set the user option @@ -2685,12 +2249,10 @@ default comment style (block or line); then set the user option ** Mailcap ---- *** The new function 'mailcap-file-name-to-mime-type' has been added. It's a simple convenience function for looking up MIME types based on file name extensions. ---- *** The default way the list of possible external viewers for MIME types is sorted and chosen has changed. Earlier, the most specific viewer was chosen, even if there was a general override in "~/.mailcap". @@ -2702,7 +2264,6 @@ method back, set 'mailcap-prefer-mailcap-viewers' to nil. ** MH-E -+++ *** The hook 'mh-show-mode-hook' is now called before the message is inserted. Functions that want to affect the message text (for example, to change highlighting) can no longer use 'mh-show-mode-hook', because the @@ -2711,7 +2272,6 @@ called. Such functions should now be attached to 'mh-show-hook'. ** URL ---- *** The 'file:' handler no longer looks for "index.html" in directories if you ask it for a "file:///dir" URL. Since this is a low-level library, such decisions (if they are to be made at all) are @@ -2722,7 +2282,6 @@ left to higher-level functions. ** Tab Bars -+++ *** Tab Bar mode The new command 'tab-bar-mode' enables the tab bar at the top of each frame (including TTY frames), where you can use tabs to switch between @@ -2751,7 +2310,6 @@ using completion on tab names, or using 'tab-switcher'. Read the new Info node "(emacs) Tab Bars" for full description of all related features. -+++ *** Tab Line mode The new command 'global-tab-line-mode' enables the tab line above each window, which you can use to switch buffers in the window. Selecting @@ -2765,16 +2323,13 @@ line scrolls tabs. Read the new Info node "(emacs) Tab Line" for full description of all related features. -+++ ** fileloop.el lets one setup multifile operations like search&replace. -+++ ** Emacs can now visit files in archives as if they were directories. This feature uses Tramp and works only on systems which support GVFS, i.e. GNU/Linux, roughly spoken. See the node "(tramp) Archive file names" in the Tramp manual for full documentation of these facilities. -+++ ** New library for writing JSONRPC applications (https://jsonrpc.org). The 'jsonrpc' library enables writing Emacs Lisp applications that rely on this protocol. Since the protocol is designed to be @@ -2783,14 +2338,12 @@ transport strategies as well as a separate API to use them. A transport implementation for process-based communication, such as is used by the Language Server Protocol (LSP), is readily available. -+++ ** Backtrace mode improves viewing of Elisp backtraces. Backtrace mode adds pretty printing, fontification and ellipsis expansion to backtrace buffers produced by the Lisp debugger, Edebug and ERT. See the node "(elisp) Backtraces" in the Elisp manual for documentation of the new mode and its commands. -+++ ** so-long.el helps to mitigate performance problems with long lines. When 'global-so-long-mode' has been enabled, visiting a file with very long lines will (subject to configuration) cause the user's preferred @@ -2802,7 +2355,6 @@ immediately. Type 'M-x so-long-commentary' for full documentation. * Incompatible Lisp Changes in Emacs 27.1 ---- ** Incomplete destructive splicing support has been removed. Support for Common Lisp style destructive splicing (",.") was incomplete and broken for a long time. It has now been removed. @@ -2815,11 +2367,9 @@ starting with a period ("."). Consider the following example: In the past, this would have incorrectly evaluated to '(\,\. foo)', but will now instead evaluate to '42'. ---- ** The REGEXP in 'magic-mode-alist' is now matched case-sensitively. Likewise for 'magic-fallback-mode-alist'. -+++ ** 'add-hook' does not always add to the front or the end any more. The replacement of 'append' with 'depth' implies that the function is not always added to the very front (when append/depth is nil) or the @@ -2828,15 +2378,12 @@ the hook may have specified higher/lower depths. This makes it possible to control the ordering of functions more precisely, as was already possible in 'add-function' and 'advice-add'. ---- ** In 'compilation-error-regexp-alist' the old undocumented feature where 'line' could be a function of 2 arguments has been dropped. ---- ** 'define-fringe-bitmap' is always defined, even when Emacs is built without any GUI support. ---- ** Just loading a theme's file no longer activates the theme's settings. Loading a theme with 'M-x load-theme' still activates the theme, as it did before. However, loading the theme's file with 'M-x load-file', @@ -2852,10 +2399,8 @@ default applied immediately. The variable 'custom--inhibit-theme-enable' controls this behavior; its default value changed in Emacs 27.1. ---- ** The REPETITIONS argument of 'benchmark-run' can now also be a variable. ---- ** Interpretation of relative 'HOME' directory has changed. If "$HOME" is set to a relative file name, 'expand-file-name' now interprets it relative to the directory where Emacs was started, not @@ -2863,15 +2408,12 @@ relative to the 'default-directory' of the current buffer. We recommend always setting "$HOME" to an absolute file name, so that its meaning is independent of where Emacs was started. ---- ** 'file-name-absolute-p' no longer considers "~foo" to be an absolute file name if there is no user named "foo". -+++ ** The FILENAME argument to 'file-name-base' is now mandatory and no longer defaults to 'buffer-file-name'. -+++ ** File metadata primitives now signal an error if I/O, access, or other serious errors prevent them from determining the result. Formerly, these functions often (though not always) silently returned @@ -2884,35 +2426,29 @@ file does not exist. The affected primitives are 'file-modes', 'file-newer-than-file-p', 'file-selinux-context', 'file-system-info', and 'set-visited-file-modtime'. ---- ** The function 'eldoc-message' now accepts a single argument. Programs that called it with multiple arguments before should pass them through 'format' first. Even that is discouraged: for ElDoc support, you should set 'eldoc-documentation-function' instead of calling 'eldoc-message' directly. ---- ** Old-style backquotes now generate an error. They have been generating warnings for a decade. To interpret old-style backquotes as new-style, bind the new variable 'force-new-style-backquotes' to t. ---- ** Defining a Common Lisp structure using 'cl-defstruct' or 'cl-struct-define' whose name clashes with a builtin type (e.g., 'integer' or 'hash-table') now signals an error. ---- ** When formatting a floating-point number as an octal or hexadecimal integer, Emacs now signals an error if the number is too large for the implementation to format. -+++ ** 'logb' now returns infinity when given an infinite or zero argument, and returns a NaN when given a NaN. Formerly, it returned an extreme fixnum for such arguments. ---- ** Some functions and variables obsolete since Emacs 22 have been removed: 'archive-mouse-extract', 'assoc-ignore-case', 'assoc-ignore-representation', 'backward-text-line', 'blink-cursor', 'bookmark-exit-hooks', @@ -2950,28 +2486,24 @@ fixnum for such arguments. 'vc-previous-comment', 'view-todo', 'x-lost-selection-hooks', 'x-sent-selection-hooks'. ---- ** Further functions and variables obsolete since Emacs 24 have been removed: 'default-directory-alist', 'dired-default-directory', 'dired-default-directory-alist', 'dired-enable-local-variables', 'dired-hack-local-variables', 'dired-local-variables-file', 'dired-omit-here-always'. -+++ ** Garbage collection no longer treats miscellaneous objects specially; they are now allocated like any other pseudovector. As a result, the 'garbage-collect' and 'memory-use-count' functions no longer return a 'misc' component, and the 'misc-objects-consed' variable has been removed. -+++ ** Reversed character ranges are no longer permitted in 'rx'. Previously, ranges where the starting character is greater than the ending character were silently omitted. For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only. Now, such 'rx' expressions generate an error. ---- ** Internal 'rx' functions and variables have been removed, as a consequence of an improved implementation. Packages using these should use the public 'rx' and 'rx-to-string' instead. @@ -2979,7 +2511,6 @@ these should use the public 'rx' and 'rx-to-string' instead. extension mechanism is preferred: 'rx-define', 'rx-let' and 'rx-let-eval'. -+++ ** 'text-mode' no longer sets the value of 'indent-line-function'. The global value of 'indent-line-function', which defaults to 'indent-relative', will no longer be reset locally when turning on @@ -2988,28 +2519,22 @@ The global value of 'indent-line-function', which defaults to To get back the old behavior, add a function to 'text-mode-hook' which performs '(setq-local indent-line-function #'indent-relative)'. ---- ** 'make-process' no longer accepts a non-nil ':stop' key. This has never worked reliably, and now causes an error. -+++ ** 'eventp' no longer returns non-nil for lists whose car is nil. This is consistent with the fact that nil, though a symbol, is not a valid event type. ---- ** The obsolete package xesam.el (since Emacs 24) has been removed. -+++ ** The XBM image handler now accepts a ':stride' argument, which should be specified in image specs representing the entire bitmap as a single bool vector. -+++ ** 'regexp-quote' may return its argument string. If the argument needs no quoting, it can be returned instead of a copy. -+++ ** Mouse scroll up and down with control key modifier changes font size. Previously, the control key modifier was used to scroll up or down by an amount which was close to near a full screen. This is now instead @@ -3026,24 +2551,19 @@ pointer is over. To change this behavior, you can customize the user option 'mouse-wheel-follow-mouse'. Note that this will also affect scrolling. -+++ ** Mouse scroll up and down with control key modifier also works on images where it scales the image under the mouse pointer. ---- ** 'help-follow-symbol' now signals 'user-error' if point (or the position pointed to by the argument POS) is not in a symbol. ---- ** The options.el library has been removed. It was obsolete since Emacs 22.1, replaced by customize. ---- ** The tls.el and starttls.el libraries are now marked obsolete. Use of built-in libgnutls based functionality (described in the Emacs GnuTLS manual) is recommended instead. ---- ** The url-ns.el library is now marked obsolete. This library is used to open configuration files for the long defunct web browser Netscape, and is no longer relevant. @@ -3051,7 +2571,6 @@ web browser Netscape, and is no longer relevant. * Lisp Changes in Emacs 27.1 -+++ ** Emacs Lisp integers can now be of arbitrary size. Emacs uses the GNU Multiple Precision (GMP) library to support integers whose size is too large to support natively. The integers @@ -3079,20 +2598,17 @@ like 'file-attributes' that compute file sizes and other attributes, functions like 'process-id' that compute process IDs, and functions like 'user-uid' and 'group-gid' that compute user and group IDs. -+++ ** 'overflow-error' is now documented as a subcategory of 'range-error'. Formerly it was undocumented, and was (incorrectly) a subcategory of 'domain-error'. ** Time values -+++ *** New function 'time-convert' converts Lisp time values to Lisp timestamps of various forms, including a new timestamp form '(TICKS . HZ)' where TICKS is an integer and HZ a positive integer denoting a clock frequency. -+++ *** Although the default timestamp format is still '(HI LO US PS)', it is planned to change in a future Emacs version, to exploit bignums. The documentation has been updated to mention that the timestamp @@ -3101,7 +2617,6 @@ format may change and that programs should use functions like probing the innards of a timestamp directly, or creating a timestamp by hand. -+++ *** Decoded (calendrical) timestamps now have subsecond resolution. This affects 'decode-time', which generates these timestamps, as well as functions like 'encode-time' that accept them. The subsecond info @@ -3118,11 +2633,9 @@ traditional behavior, this default may change in future Emacs versions, so callers requiring an integer should specify FORM explicitly. -+++ *** 'encode-time' supports a new API '(encode-time TIME)'. The old 'encode-time' API is still supported. -+++ *** A new package to parse ISO 8601 time, date, durations and intervals has been added. The main function to use is 'iso8601-parse', but there's also 'iso8601-parse-date', @@ -3131,30 +2644,25 @@ intervals has been added. The main function to use is structures, except the final one, which returns three of them (start, end and duration). -+++ *** 'time-add', 'time-subtract', and 'time-less-p' now accept infinities and NaNs too, and propagate them or return nil like floating-point operators do. If both arguments are finite, these functions now return exact results instead of rounding in some cases, and they also avoid excess precision when that is easy. -+++ *** New function 'time-equal-p' compares time values for equality. -+++ *** 'format-time-string' supports a new conversion specifier flag '+' that acts like the '0' flag but also puts a '+' before nonnegative years containing more than four digits. This is for compatibility with POSIX.1-2017. -+++ *** To access (or alter) the elements of a decoded time value, the 'decoded-time-second', 'decoded-time-minute', 'decoded-time-hour', 'decoded-time-day', 'decoded-time-month', 'decoded-time-year', 'decoded-time-weekday', 'decoded-time-dst' and 'decoded-time-zone' accessors can be used. -+++ *** The new functions 'date-days-in-month' (which will say how many days there are in a month in a specific year), 'date-ordinal-to-time' (that computes the date of an ordinal day), 'decoded-time-add' (for @@ -3163,7 +2671,6 @@ doing computations on a decoded time structure), 'make-decoded-time' filled out), and 'encoded-time-set-defaults' (which fills in nil elements as if it's midnight January 1st, 1970) have been added. -+++ *** In the DST slot, 'encode-time' and 'parse-time-string' now return -1 if it is not known whether daylight saving time is in effect. Formerly they were inconsistent: 'encode-time' returned t in this @@ -3171,38 +2678,31 @@ situation, whereas 'parse-time-string' returned nil. Now they consistently use nil to mean that DST is not in effect, and use -1 to mean that it is not known whether DST is in effect. -+++ ** New macro 'benchmark-progn'. This macro works like 'progn', but messages how long it takes to evaluate the body forms. The value of the last form is the return value. -+++ ** New function 'read-char-from-minibuffer'. This function works like 'read-char', but uses 'read-from-minibuffer' to read a character, so it maintains a history that can be navigated via usual minibuffer keystrokes 'M-p'/'M-n'. ---- ** New variables 'set-message-function' and 'clear-message-function' can be used to specify functions to show and clear messages that normally are displayed in the echo area. -+++ ** 'setq-local' can now set an arbitrary number of variables, which makes the syntax more like 'setq'. ---- ** 'reveal-mode' can now also be used for more than to toggle between invisible and visible: It can also toggle 'display' properties in overlays. This is only done on 'display' properties that have the 'reveal-toggle-invisible' property set. -+++ ** 'process-contact' now takes an optional NO-BLOCK argument to allow not waiting for a process to be set up. ---- ** New variable 'read-process-output-max' controls sub-process throughput. This variable determines how many bytes can be read from a sub-process in one read operation. The default, 4096 bytes, was previously a @@ -3210,118 +2710,94 @@ hard-coded constant. Setting it to a larger value might enhance throughput of reading from sub-processes that produces vast (megabytes) amounts of data in one go. -+++ ** The new user option 'quit-window-hook' is now run first when executing the 'quit-window' command. -+++ ** The user options 'help-enable-completion-auto-load', 'help-enable-auto-load' and 'vhdl-project-auto-load', as well as the function 'vhdl-auto-load-project' have been renamed to have "autoload" without the hyphen in their names. Obsolete aliases from the old names have been added. -+++ ** Buttons (created with 'make-button' and related functions) can now use the 'button-data' property. If present, the data in this property will be passed on to the 'action' function instead of the button itself in 'button-activate'. -+++ ** 'defcustom' now takes a ':local' keyword that can be either t or 'permanent', which mean that the variable should be automatically buffer-local. 'permanent' also sets the variable's 'permanent-local' property. -+++ ** The new macro 'with-suppressed-warnings' can be used to suppress specific byte-compile warnings. -+++ ** The new macro 'ignore-error' is like 'ignore-errors', but takes a specific error condition, and will only ignore that condition. (This can also be a list of conditions.) ---- ** The new function 'byte-compile-info-message' can be used to output informational messages that look pleasing during the Emacs build. ---- ** New 'help-fns-describe-variable-functions' hook. It makes it possible to add metadata information to 'describe-variable'. ** i18n (internationalization) ---- *** 'ngettext' can be used now to return the right plural form according to the given numeric value. -+++ ** 'inhibit-null-byte-detection' is renamed to 'inhibit-nul-byte-detection'. -+++ ** 'self-insert-command' takes the char to insert as (optional) argument. -+++ ** 'lookup-key' can take a list of keymaps as argument. -+++ ** 'condition-case' now accepts t to match any error symbol. -+++ ** New function 'proper-list-p'. Given a proper list as argument, this predicate returns its length; otherwise, it returns nil. 'format-proper-list-p' is now an obsolete alias for the new function. ---- ** 'define-minor-mode' automatically documents the meaning of ARG. -+++ ** The function 'recenter' now accepts an additional optional argument. By default, calling 'recenter' will not redraw the frame even if 'recenter-redisplay' is non-nil. Call 'recenter' with the new second argument non-nil to force redisplay per 'recenter-redisplay's value. -+++ ** New functions 'major-mode-suspend' and 'major-mode-restore'. Use them when switching temporarily to another major mode, e.g. for 'hexl-mode', or to switch between 'c-mode' and 'image-mode' in XPM. -+++ ** New macro 'dolist-with-progress-reporter'. This works like 'dolist', but reports progress similar to 'dotimes-with-progress-reporter'. -+++ ** New hook 'after-delete-frame-functions'. This works like 'delete-frame-functions', but runs after the frame to be deleted has been made dead and removed from the frame list. ---- ** The function 'provided-mode-derived-p' was extended to support aliases. The function now returns non-nil when the argument MODE is derived from any alias of any of MODES. -+++ ** New frame focus state inspection interface. The hooks 'focus-in-hook' and 'focus-out-hook' are now obsolete. Instead, attach to 'after-focus-change-function' using 'add-function' and inspect the focus state of each frame using 'frame-focus-state'. -+++ ** Emacs now requests and recognizes focus-change notifications from TTYs. On terminal emulators that support the feature, Emacs can now support 'focus-in-hook' and 'focus-out-hook' for TTY frames. -+++ ** Window-specific face remapping. Face specifications (of the kind used in 'face-remapping-alist') now support filters, allowing faces to vary between different windows displaying the same buffer. See the node "(elisp) Face Remapping" of the Emacs Lisp Reference manual for more detail. -+++ ** Window change functions have been redesigned. Hooks reacting to window changes run now only when redisplay detects that a change has actually occurred. Six hooks are now provided: @@ -3351,55 +2827,44 @@ Also 'run-window-configuration-change-hook' is declared obsolete. See the section "(elisp) Window Hooks" in the Elisp manual for a detailed explanation of the new behavior. -+++ ** Scroll bar and fringe settings can now be made persistent for windows. The functions 'set-window-scroll-bars' and 'set-window-fringes' now have a new optional argument that makes the settings they produce reliably survive subsequent invocations of 'set-window-buffer'. -+++ ** New user option 'resize-mini-frames'. This option allows automatically resizing minibuffer-only frames similarly to how minibuffer windows are resized on "normal" frames. -+++ ** New buffer display action function 'display-buffer-in-direction'. This function allows specifying the location of the window chosen by 'display-buffer' in various ways. -+++ ** New buffer display action alist entry 'dedicated'. Such an entry allows specifying the dedicated status of a window created by 'display-buffer'. -+++ ** New buffer display action alist entry 'window-min-height'. Such an entry allows specifying a minimum height of the window used for displaying a buffer. 'display-buffer-below-selected' is the only action function to respect it at the moment. -+++ ** New buffer display action alist entry 'direction'. This entry is used to specify the location of the window chosen by 'display-buffer-in-direction'. -+++ ** Additional meaning of display action alist entry 'window'. A 'window' entry can now also specify a reference window for 'display-buffer-in-direction'. -+++ ** The function 'assoc-delete-all' now takes an optional predicate argument. -+++ ** New function 'string-distance' to calculate the Levenshtein distance between two strings. -+++ ** 'print-quoted' now defaults to t, so if you want to see '(quote x)' instead of 'x you will have to bind it to nil where applicable. -+++ ** Numbers formatted via '%o' or '%x' are now formatted as signed integers. This avoids problems in calls like '(read (format "#x%x" -1))', and is more compatible with bignums. To get the traditional machine-dependent @@ -3408,12 +2873,10 @@ and if the new behavior breaks your code please email <32252@debbugs.gnu.org>. Because '%o' and '%x' can now format signed integers, they now support the '+' and space flags. -+++ ** In Emacs Lisp mode, symbols with confusable quotes are highlighted. For example, the first character in '‘foo' would be highlighted in 'font-lock-warning-face'. -+++ ** Omitting variables after '&optional' and '&rest' is now allowed. For example '(defun foo (&optional))' is no longer an error. This is sometimes convenient when writing macros. See the ChangeLog entry @@ -3421,7 +2884,6 @@ titled "Allow '&rest' or '&optional' without following variable (Bug#29165)" for a full listing of which arglists are accepted across versions. ---- ** Internal parsing commands now use 'syntax-ppss' and disregard 'open-paren-in-column-0-is-defun-start'. This affects mostly things like 'forward-comment', 'scan-sexps', and 'forward-sexp' when parsing backward. @@ -3432,7 +2894,6 @@ brackets at the start of a line inside documentation strings with a backslash, although there is no harm in doing so to make the code easier to edit with an older Emacs version. ---- ** New symbolic accessor functions for a parse state list. The new accessor functions 'ppss-depth', 'ppss-list-start', 'ppss-last-sexp-start', 'ppss-string-terminator', 'comment-depth', @@ -3440,37 +2901,30 @@ The new accessor functions 'ppss-depth', 'ppss-list-start', and 'two-character-syntax' can be used on the list value returned by 'parse-partial-sexp' and 'syntax-ppss'. ---- ** The 'server-name' and 'server-socket-dir' variables are set when a socket has been passed to Emacs. ---- ** The 'file-system-info' function is now available on all platforms. instead of just Microsoft platforms. This fixes a 'get-free-disk-space' bug on OS X 10.8 and later. ---- ** The function 'get-free-disk-space' returns now a non-nil value for remote systems, which support this check. -+++ ** 'memory-limit' now returns a better estimate of memory consumption. -+++ ** When interpreting 'gc-cons-percentage', Emacs now estimates the heap size more often and (we hope) more accurately. E.g., formerly '(progn (let ((gc-cons-percentage 0.8)) BODY1) BODY2)' continued to use the 0.8 value during BODY2 until the next garbage collection, but that is no longer true. Applications may need to re-tune their GC tricks. -+++ ** New macro 'combine-change-calls' arranges to call the change hooks ('before-change-functions' and 'after-change-functions') just once each around a sequence of lisp forms, given a region. This is useful when a function makes a possibly large number of repetitive changes and the change hooks are time consuming. -+++ ** 'eql', 'make-hash-table', etc. now treat NaNs consistently. Formerly, some of these functions ignored signs and significands of NaNs. Now, all these functions treat NaN signs and significands as @@ -3480,36 +2934,29 @@ Also, Emacs now reads and prints NaN significands; e.g., if X is a NaN, '(format "%s" X)' now returns "0.0e+NaN", "1.0e+NaN", etc., depending on X's significand. -+++ ** The function 'make-string' accepts an additional optional argument. If the optional third argument is non-nil, 'make-string' will produce a multibyte string even if its second argument is an ASCII character. ---- ** '(format "%d" X)' no longer mishandles a floating-point number X that does not fit in a machine integer. ---- ** New coding-system 'ibm038'. This is the International EBCDIC encoding, also available as aliases 'ebcdic-int' and 'cp038'. ---- ** New JSON parsing and serialization functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These are implemented in C using the Jansson library. -+++ ** New function 'ring-resize'. 'ring-resize' can be used to grow or shrink a ring. -+++ ** New function 'flatten-tree'. 'flatten-list' is provided as an alias. These functions take a tree and 'flatten' it such that the result is a list of all the terminal nodes. -+++ ** 'zlib-decompress-region' can partially decompress corrupted data. If the new optional ALLOW-PARTIAL argument is passed, then the data that was decompressed successfully before failing will be inserted @@ -3517,23 +2964,19 @@ into the buffer. ** Image mode ---- *** New library Exif. An Exif library has been added that can parse JPEG files and output data about creation times and orientation and the like. 'exif-parse-file' and 'exif-parse-buffer' are the main interface functions. ---- *** 'image-mode' now uses this library to automatically rotate images according to the orientation in the Exif data, if any. -+++ *** The command 'image-rotate' now accepts a prefix argument. With a prefix argument, 'image-rotate' now rotates the image at point 90 degrees counter-clockwise, instead of the default clockwise. -+++ *** In 'image-mode' the image is resized automatically to fit in window. By default, the image will resize upon first display and whenever the window's dimensions change. Two user options 'image-auto-resize' and @@ -3542,20 +2985,17 @@ window's dimensions change. Two user options 'image-auto-resize' and key 's' contains the commands that can be used to fit the image to the window manually. ---- *** Some 'image-mode' variables are now buffer-local. The image parameters 'image-transform-rotation', 'image-transform-scale' and 'image-transform-resize' are now declared buffer-local, so each buffer could have its own values for these parameters. -+++ *** Three new 'image-mode' commands have been added: 'm', which marks the file in the dired buffer(s) for the directory the file is in; 'u', which unmarks the file; and 'w', which pushes the current buffer's file name to the kill ring. ---- *** New library image-converter. If you need to view exotic image formats for which Emacs doesn't have native support, customize the new user option @@ -3563,12 +3003,10 @@ native support, customize the new user option GraphicsMagick, ImageMagick or 'ffmpeg' installed, they will then be used to convert images automatically before displaying them. ---- *** 'auto-mode-alist' now includes many of the types typically supported by the external image converters, like WEPB, BMP and ICO. These now default to using 'image-mode'. ---- *** 'imagemagick-types-inhibit' disables using ImageMagick by default. 'image-mode' started using ImageMagick by default for all images some years back. It now respects 'imagemagick-types-inhibit' as a way @@ -3576,66 +3014,53 @@ to disable that. ** Modules ---- *** The function 'load' now behaves correctly when loading modules. Specifically, it puts the module name into 'load-history', prints loading messages if requested, and protects against recursive loads. -+++ *** New module environment function 'process_input' to process user input while module code is running. -+++ *** New module environment functions 'make_time' and 'extract_time' to convert between timespec structures and Emacs Lisp time values. -+++ *** New module environment functions 'make_big_integer' and 'extract_big_integer' to create and extract arbitrary-size integer values. -+++ *** emacs-module.h now defines a macro 'EMACS_MAJOR_VERSION' that expands to the major version of the latest Emacs supported by the header. -+++ ** The function 'read-variable' now uses its own history list. The history of variable names read by 'read-variable' is recorded in the new variable 'custom-variable-history'. ---- ** The functions 'string-to-unibyte' and 'string-to-multibyte' are no longer declared obsolete. We have found that there are legitimate use cases for these functions, where there's no better alternative. We believe that the incorrect uses of these functions all but disappeared by now, so we are un-obsoleting them. -+++ ** New function 'group-name' returns a group name corresponding to GID. -+++ ** 'make-process' now takes a keyword argument ':file-handler'; if that is non-nil, it will look for a file name handler for the current buffer's 'default-directory' and invoke that file name handler to make the process. That way 'make-process' can start remote processes. -+++ ** '(locale-info 'paper)' now returns the paper size on systems that support it. This is currently supported on GNUish hosts and on modern versions of MS-Windows. -+++ ** The function 'regexp-opt', when given an empty list of strings, now returns a regexp that never matches anything, which is an identity for this operation. Previously, the empty string was returned in this case. -+++ ** New constant 'regexp-unmatchable' contains a never-matching regexp. It is a convenient and readable way to specify a regexp that should not match anything, and is as fast as any such regexp can be. -+++ ** New functions to handle the URL variant of base-64 encoding. New functions 'base64url-encode-string' and 'base64url-encode-region' implement the url-variant of base-64 encoding as defined in RFC4648. @@ -3644,7 +3069,6 @@ The functions 'base64-decode-string' and 'base64-decode-region' now accept an optional argument to decode the URL variant of base-64 encoding. -+++ ** The function 'file-size-human-readable' accepts more optional arguments. The new third argument is a string put between the number and unit; it defaults to the empty string. The new fourth argument is a string @@ -3653,82 +3077,68 @@ argument is 'iec' and the empty string otherwise. We recommend a space or non-breaking space as third argument, and "B" as fourth argument, circumstances allowing. -+++ ** 'format-spec' has been expanded with several modifiers to allow greater flexibility when customizing variables. The modifiers include zero-padding, upper- and lower-casing, and limiting the length of the interpolated strings. The function has now also been documented in the Emacs Lisp manual. -+++ ** 'directory-files-recursively' can now take an optional PREDICATE parameter to control descending into subdirectories, and a FOLLOW-SYMLINK parameter to say that symbolic links that point to other directories should be followed. -+++ ** New function 'xor' returns the boolean exclusive-or of its args. The function was previously defined in array.el, but has been moved to subr.el so that it is available by default. It now always returns the non-nil argument when the other is nil. Several duplicates of 'xor' in other packages are now obsolete aliases of 'xor'. -+++ ** 'define-globalized-minor-mode' now takes BODY forms. -+++ ** New text property 'help-echo-inhibit-substitution'. Setting this on the first character of a help string disables conversions via 'substitute-command-keys'. -+++ ** New text property 'minibuffer-message'. Setting this on a character of the minibuffer text will display the temporary echo messages before that character, when messages need to be displayed while minibuffer is active. -+++ ** 'undo' can be made to ignore the active region for a command by setting 'undo-inhibit-region' symbol property of that command to non-nil. This is used by 'mouse-drag-region' to make the effect easier to undo immediately afterwards. ---- ** When called interactively, 'next-buffer' and 'previous-buffer' now signal 'user-error' if there is no buffer to switch to. * Changes in Emacs 27.1 on Non-Free Operating Systems ---- ** Battery status is now supported in all Cygwin builds. Previously it was supported only in the Cygwin-w32 build. ---- ** Emacs now handles key combinations involving the macOS "command" and "option" modifier keys more correctly. -+++ ** MacOS modifier key behavior is now more adjustable. The behavior of the macOS "Option", "Command", "Control" and "Function" keys can now be specified separately for use with ordinary keys, function keys and mouse clicks. This allows using them in their standard macOS way for composing characters. -+++ ** The special handling of 'frame-title-format' on NS where setting it to t would enable the macOS proxy icon has been replaced with a separate variable, 'ns-use-proxy-icon'. 'frame-title-format' will now work as on other platforms. ---- ** New primitive 'w32-read-registry'. This primitive lets Lisp programs access the MS-Windows Registry by retrieving values stored under a given key. It is intended to be used for supporting features such as XDG-like location of important files and directories. -+++ ** The default value of 'w32-pipe-read-delay' is now zero. This speeds up reading output from sub-processes that produce a lot of data. @@ -3739,7 +3149,6 @@ versions of MS-Windows. Set this variable to 50 if for some reason you need the old behavior (and please report such situations to Emacs developers). ---- ** New variable 'w32-multibyte-code-page'. This variable holds the value of the multibyte code page used by the system. It is usually zero, which indicates that 'w32-ansi-code-page' @@ -3747,12 +3156,10 @@ is being used, except in Far Eastern locales. When this variable is non-zero, Emacs at startup sets 'locale-coding-system' to the corresponding encoding, instead of using 'w32-ansi-code-page'. ---- ** The default value of 'inhibit-compacting-font-caches' is t on MS-Windows. Experience shows that compacting font caches causes more trouble on MS-Windows than it helps. -+++ ** Font lookup on MS-Windows was improved to support rare scripts. To activate the improvement, run the new function 'w32-find-non-USB-fonts' once per Emacs session, or assign to the new @@ -3760,13 +3167,11 @@ variable 'w32-non-USB-fonts' the list of scripts and the corresponding fonts. See the documentation of this function and variable in the Emacs manual for more details. -+++ ** On NS the behavior of drag and drop can now be modified by use of modifier keys in line with Apples guidelines. This makes the drag and drop behavior more consistent, as previously the sending application was able to 'set' modifiers without the knowledge of the user. ---- ** On NS multicolor font display is enabled again since it is also implemented in Emacs on free operating systems via Cairo drawing. commit f9daa69547f1e91c9dabdf6b47b00e95e11c51e0 Author: Nicolas Petton Date: Tue Jul 28 19:05:56 2020 +0200 * etc/AUTHORS: Update. diff --git a/etc/AUTHORS b/etc/AUTHORS index aff24a8d8d..3e91efb570 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -127,84 +127,18 @@ Albert L. Ting: changed gnus-group.el mail-hist.el Aleksei Gusev: changed progmodes/compile.el -Alexander Becher: changed vc-annotate.el +Alexandru Harsanyi: changed soap-client.el soap-inspect.el emacs3.py + vc-hooks.el vc.el xml.el -Alexander Gramiak: changed w32term.c xterm.c nsterm.m dispextern.h - xdisp.c frame.c image.c nsgui.h w32gui.h xfns.c frame.el termhooks.h - w32fns.c w32term.h faces.el nsterm.h xfaces.c xterm.h frame.h xfont.c - configure.ac and 64 other files - -Alexander Haeckel: changed getset.el - -Alexander Klimov: changed files.el calc-graph.el files.texi man.el rx.el - sendmail.el - -Alexander Kreuzer: changed nnrss.el - -Alexander Kuleshov: changed dns-mode.el files.texi image-mode.el - keyboard.c ld-script.el xdisp.c - -Alexander L. Belikoff: wrote erc.el - -Alexander Pohoyda: co-wrote mail/rmailmm.el -and changed rmailsum.el man.el rmail.el sendmail.el - -Alexander Shopov: changed code-pages.el - -Alexander Vorobiev: changed org-compat.el - -Alexander Zhuckov: changed ebrowse.c - -Alexandre Garreau: changed message.el - -Alexandre Julliard: wrote vc-git.el -and changed vc.el ewoc.el - -Alexandre Oliva: wrote gnus-mlspl.el -and changed unexelf.c format.el iris4d.h iris5d.h regex.c unexsgi.c - -Alexandre Veyrenc: changed fr-refcard.tex - -Alexandru Harsanyi: wrote soap-client.el soap-inspect.el -and changed emacs3.py vc-hooks.el vc.el xml.el - -Alex Branham: changed checkdoc.el bibtex.el em-rebind.el esh-util.el - indent.el js.el lpr.el message.el subr.el text.texi .dir-locals.el - auth-source-pass.el bug-reference.el comint.el conf-mode-tests.el - conf-mode.el dired-x.el dired.el ediff-diff.el ediff-help.el - ediff-hook.el and 41 other files - -Alex Coventry: changed files.el - -Alex Dunn: changed subr-tests.el subr.el - -Alexei Khlebnikov: changed autorevert.el vc-git.el - -Alex Gramiak: changed prolog.el terminal.c - -Alex Kosorukoff: changed org-capture.el - -Alex Murray: changed erc-desktop-notifications.el network-stream.el - -Alex Ott: changed TUTORIAL.ru ede/files.el ru-refcard.tex base.el - cedet-files.el cpp-root.el ede.el ede/generic.el idle.el ispell.el - semantic/format.el - -Alex Reed: changed verilog-mode.el - -Alex Rezinsky: wrote which-func.el - -Alex Schroeder: wrote ansi-color.el cus-theme.el erc-compat.el - erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el master.el - spam-stat.el sql.el +Alex Gramiak: wrote ansi-color.el conf-mode-tests.el cus-theme.el + erc-compat.el erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el + erc.el gnus-mlspl.el master.el soap-client.el soap-inspect.el + spam-stat.el sql.el vc-git.el which-func.el and co-wrote longlines.el mail/rmailmm.el -and changed erc.el erc-track.el erc-button.el erc-stamp.el erc-match.el - erc-autoaway.el erc-nickserv.el rcirc.texi Makefile erc-autojoin.el - erc-fill.el erc-pcomplete.el erc-complete.el erc-ibuffer.el - erc-members.el rmail.el comint.el custom.el erc-bbdb.el erc-chess.el - erc-ezbounce.el and 35 other files - -Alex Shinn: changed files.el +and changed erc-track.el erc-button.el w32term.c xterm.c erc-stamp.el + nsterm.m xdisp.c dispextern.h frame.c image.c nsgui.h w32gui.h xfns.c + erc-match.el frame.el termhooks.h w32fns.c Makefile TUTORIAL.ru + erc-autoaway.el erc-nickserv.el and 215 other files Alfred Correira: changed generic-x.el @@ -1309,7 +1243,7 @@ Diane Murray: changed erc.el erc-backend.el erc-menu.el erc-button.el erc-goodies.el erc-ibuffer.el erc-log.el erc-nicklist.el url-http.el Makefile erc-dcc.el and 36 other files -Dick R. Chiang: changed checkdoc.el +Dick R. Chiang: changed checkdoc.el cl-macs-tests.el cl-macs.el Didier Verna: wrote gnus-diary.el nndiary.el and co-wrote nnml.el @@ -1445,7 +1379,7 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] and changed xdisp.c msdos.c w32.c display.texi w32fns.c simple.el files.el fileio.c keyboard.c w32term.c w32proc.c emacs.c files.texi text.texi dispnew.c frames.texi lisp.h dispextern.h window.c process.c - term.c and 1187 other files + term.c and 1188 other files Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el @@ -1767,6 +1701,8 @@ Fujii Hironori: changed w32fns.c Gábor Vida: changed gnus-demon.el auth-source.el ido.el +Gaby Launay: changed auth-source-pass.el + Gareth Jones: changed fns.c gnus-score.el Gareth Rees: changed NEWS.24 @@ -2145,8 +2081,6 @@ Jaesup Kwak: changed xwidget.c Jaeyoun Chung: changed hangul3.el hanja3.el gnus-mule.el hangul.el -J. Alexander Branham: wrote conf-mode-tests.el - Jambunathan K: wrote ox-odt.el and co-wrote ox-html.el and changed org-lparse.el org.el org.texi ox.el icomplete.el @@ -3133,8 +3067,8 @@ Luca Capello: changed mm-encode.el Lucas Werkmeister: changed emacs.c emacs.service Lucid, Inc.: changed byte-opt.el byte-run.el bytecode.c bytecomp.el - delsel.el disass.el faces.el font-lock.el lmenu.el mailabbrev.el - select.el xfaces.c xselect.c + delsel.el disass.el faces.el font-lock.el mailabbrev.el select.el + xfaces.c xselect.c Luc Teirlinck: wrote help-at-pt.el and changed files.el autorevert.el cus-edit.el subr.el simple.el @@ -3485,7 +3419,7 @@ Micah Anderson: changed spook.lines Michael Albinus: wrote autorevert-tests.el dbus-tests.el dbus.el filenotify-tests.el filenotify.el files-x-tests.el secrets-tests.el secrets.el shadowfile-tests.el tramp-archive-tests.el tramp-archive.el - tramp-cmds.el tramp-compat.el tramp-ftp.el tramp-gvfs.el + tramp-cmds.el tramp-compat.el tramp-crypt.el tramp-ftp.el tramp-gvfs.el tramp-integration.el tramp-rclone.el tramp-smb.el tramp-sudoedit.el tramp-tests.el url-tramp-tests.el url-tramp.el vc-tests.el zeroconf.el and co-wrote tramp-cache.el tramp-sh.el tramp.el @@ -3984,7 +3918,7 @@ and co-wrote cal-dst.el and changed lisp.h configure.ac alloc.c process.c fileio.c editfns.c xdisp.c sysdep.c image.c keyboard.c data.c emacs.c fns.c lread.c xterm.c eval.c callproc.c Makefile.in frame.c buffer.c gnulib-comp.m4 - and 1821 other files + and 1813 other files Paul Fisher: changed fns.c @@ -4166,7 +4100,7 @@ Philipp Rumpf: changed electric.el Philipp Stephani: wrote callint-tests.el checkdoc-tests.el cl-preloaded-tests.el ediff-diff-tests.el eval-tests.el ido-tests.el - lread-tests.el mouse-tests.el xt-mouse-tests.el + lread-tests.el mouse-tests.el startup-tests.el xt-mouse-tests.el and changed emacs-module.c emacs-module-tests.el json.c json-tests.el eval.c mod-test.c lisp.h lread.c nsterm.m configure.ac bytecomp.el internals.texi gtkutil.c emacs-module.h.in files.el alloc.c @@ -4255,8 +4189,7 @@ Rajappa Iyer: changed gnus-salt.el Raja R. Harinath: changed gnus-salt.el nnml.el -Rajesh Vaidheeswarran: wrote old-whitespace.el -and changed whitespace.el ffap.el +Rajesh Vaidheeswarran: changed whitespace.el ffap.el Ralf Angeli: wrote scroll-lock.el and changed w32fns.c reftex-cite.el gnus-art.el reftex-toc.el reftex.el @@ -4708,9 +4641,12 @@ Sidney Markowitz: changed doctor.el nsmenu.m Sigbjorn Finne: changed gnus-srvr.el -Simen Heggestøyl: wrote asm-mode-tests.el autoinsert-tests.el - color-tests.el css-mode-tests.el dom-tests.el makesum-tests.el - page-tests.el paren-tests.el ring-tests.el rot13-tests.el sql-tests.el +Simen Heggestøyl: wrote apropos-tests.el asm-mode-tests.el + autoconf-tests.el autoinsert-tests.el check-declare-tests.el + color-tests.el css-mode-tests.el dom-tests.el elide-head-tests.el + glasses-tests.el help-mode-tests.el makesum-tests.el page-tests.el + paren-tests.el po-tests.el ring-tests.el rot13-tests.el sql-tests.el + webjump-tests.el and changed css-mode.el css-mode.css json-tests.el json.el sgml-mode.el scss-mode.scss page.el ring.el rot13.el scheme.el sql.el asm-mode.el autoinsert.el color.el files.el js.el less-css-mode.el @@ -4720,8 +4656,9 @@ and changed css-mode.el css-mode.css json-tests.el json.el sgml-mode.el Simona Arizanova: changed help.el Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el - mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el - sieve.el smime.el starttls.el tls.el url-imap.el + mml-sec.el mml-smime.el password-cache.el rfc2104.el + sasl-scram-sha256.el sieve-mode.el sieve.el smime.el starttls.el tls.el + url-imap.el and co-wrote gnus-sieve.el gssapi.el mml1991.el nnfolder.el nnimap.el nnml.el sieve-manage.el and changed message.el gnus-sum.el gnus-art.el smtpmail.el pgg-gpg.el @@ -4769,9 +4706,11 @@ Stefan Bruda: co-wrote prolog.el Stefan Guath: changed find-dired.el -Stefan Kangas: wrote bookmark-tests.el delim-col-tests.el morse-tests.el - paragraphs-tests.el password-cache-tests.el studly-tests.el - tabify-tests.el timezone-tests.el underline-tests.el uudecode-tests.el +Stefan Kangas: wrote bookmark-tests.el cal-julian-tests.el + delim-col-tests.el lunar-tests.el misc-tests.el morse-tests.el + paragraphs-tests.el password-cache-tests.el qp-tests.el + rfc2045-tests.el studly-tests.el tabify-tests.el timezone-tests.el + underline-tests.el uudecode-tests.el and changed bookmark.el package.el efaq.texi package.texi ibuffer.el mwheel.el cperl-mode.el fns.c gud.el simple.el subr.el autoinsert.el comint-tests.el cus-edit.el delim-col.el dired-aux.el dired-x.el @@ -5298,8 +5237,6 @@ Valentin Gatien-Baron: changed emacs-module.c Valentin Wüstholz: changed org.el -Valery Alexeev: changed cyril-util.el cyrillic.el - Van L: changed subr.el Vasilij Schneidermann: changed cus-start.el eww.el cc-mode.el @@ -5359,8 +5296,6 @@ and changed erc-backend.el erc.el erc-services.el hexl.el emacs.c erc-button.el erc-capab.el erc-join.el htmlfontify.texi sh-script.el xterm.c xterm.h -Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el - Vladimir Kazanov: changed java.srt Vladimir Lomov: changed ox-html.el @@ -5535,6 +5470,8 @@ Yuan Fu: changed gdb-mi.el Yuanle Song: changed rng-xsd.el +Yue Daian: wrote cl-font-lock.el + Yu-ji Hosokawa: changed README.W32 Yukihiro Matsumoto: co-wrote ruby-mode.el commit 6c23b1a154bcf9e1ec85b484be83a4fb012a814b Author: Nicolas Petton Date: Tue Jul 28 18:59:57 2020 +0200 Update authors.el * admin/authors.el (authors-aliases): Add author aliases. (authors-ignored-files): (authors-valid-file-names): (authors-renamed-files-alist): Update file lists. diff --git a/admin/authors.el b/admin/authors.el index dc57c0a6b9..1c069173c8 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -212,6 +212,8 @@ files.") ("Carlos Pita" "memeplex") ("Vinicius Jose Latorre" "viniciusjl") ("Gaby Launay" "galaunay") + ("Alex Gramiak" "alex") + ("Dick R. Chiang" "dickmao") ) "Alist of author aliases. @@ -473,6 +475,9 @@ Changes to files matching one of the regexps in this list are not listed.") ;; Replaced by lisp/thread.el "lisp/emacs-lisp/thread-list.el" "etc/images/slash.bmp" + "src/mini-gmp-emacs.c" + "lib/dosname.h" + "lib/putenv.c" ) "List of files and directories to ignore. Changes to files in this list are not listed.") @@ -877,7 +882,9 @@ Changes to files in this list are not listed.") "library-of-babel.org" "flymake-elisp.el" "flymake-ui.el" - "pinentry.el") + "pinentry.el" + "ledit.el" + "lmenu.el") "File names which are valid, but no longer exist (or cannot be found) in the repository.") @@ -1119,6 +1126,8 @@ in the repository.") ("gnus-news.texi" . "doc/misc/gnus.texi") ("lisp/multifile.el". "lisp/fileloop.el") ("lisp/emacs-lisp/thread.el". "lisp/thread.el") + ("src/mini-gmp.c" . "lib/mini-gmp.c") + ("src/mini-gmp.h" . "lib/mini-gmp.h") ) "Alist of files which have been renamed during their lifetime. Elements are (OLDNAME . NEWNAME).") commit e5889c704f9351c2cb91d8db2b36af72d9ab4151 Author: Mattias Engdegård Date: Mon Jul 27 11:27:00 2020 +0200 Simplify and streamline optimizer clauses * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove clause for 'with-output-to-temp-buffer', since it is a macro and will have been expanded before reaching this point. Move clauses for 'lambda' and 'closure' to avoid splitting a cond jump table. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 6f801be545..48efff911f 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -391,13 +391,6 @@ (and (nth 1 form) (not for-effect) form)) - ((eq (car-safe fn) 'lambda) - (let ((newform (byte-compile-unfold-lambda form))) - (if (eq newform form) - ;; Some error occurred, avoid infinite recursion - form - (byte-optimize-form-code-walker newform for-effect)))) - ((eq (car-safe fn) 'closure) form) ((memq fn '(let let*)) ;; recursively enter the optimizer for the bindings and body ;; of a let or let*. This for depth-firstness: forms that @@ -444,13 +437,6 @@ ;; will be optimized away in the lap-optimize pass. (cons fn (byte-optimize-body (cdr form) for-effect))) - ((eq fn 'with-output-to-temp-buffer) - ;; this is just like the above, except for the first argument. - (cons fn - (cons - (byte-optimize-form (nth 1 form) nil) - (byte-optimize-body (cdr (cdr form)) for-effect)))) - ((eq fn 'if) (when (< (length form) 3) (byte-compile-warn "too few arguments for `if'")) @@ -530,6 +516,15 @@ ;; Needed as long as we run byte-optimize-form after cconv. ((eq fn 'internal-make-closure) form) + ((eq (car-safe fn) 'lambda) + (let ((newform (byte-compile-unfold-lambda form))) + (if (eq newform form) + ;; Some error occurred, avoid infinite recursion + form + (byte-optimize-form-code-walker newform for-effect)))) + + ((eq (car-safe fn) 'closure) form) + ((byte-code-function-p fn) (cons fn (mapcar #'byte-optimize-form (cdr form)))) commit 33ee3266286db00feef2839e172f613c4370fc1b Author: Basil L. Contovounesios Date: Tue Jul 28 13:44:58 2020 +0300 Fix uses of deprecated SELinux security_context_t SELinux has used 'char *' in place of its typedef 'security_context_t' since 2014 (v2.3) because the latter was inconvenient to use when paired with the 'const' qualifier. The typedef has been kept around for compatibility with legacy callers, but it is deprecated in SELinux v3.1. See the following URL for the relevant announcement: https://lore.kernel.org/selinux/20200710162034.GC1768200@localhost.localdomain/ * src/fileio.c (Fcopy_file, Ffile_selinux_context) (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Replace deprecated 'security_context_t' typedef with the equivalent 'char *'. diff --git a/src/fileio.c b/src/fileio.c index 2f1d2f8243..37072d9b6b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2031,7 +2031,7 @@ permissions. */) ptrdiff_t count = SPECPDL_INDEX (); Lisp_Object encoded_file, encoded_newname; #if HAVE_LIBSELINUX - security_context_t con; + char *con; int conlength = 0; #endif #ifdef WINDOWSNT @@ -3118,7 +3118,7 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */) #if HAVE_LIBSELINUX if (is_selinux_enabled ()) { - security_context_t con; + char *con; int conlength = lgetfilecon (SSDATA (ENCODE_FILE (absname)), &con); if (conlength > 0) { @@ -3163,7 +3163,7 @@ or if Emacs was not compiled with SELinux support. */) Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); - security_context_t con; + char *con; bool fail; int conlength; context_t parsed_con; commit 1b2fed81e1f79fd12bfb76adfa2a79d7ddbcaed0 Author: Michael Albinus Date: Tue Jul 28 09:21:01 2020 +0200 Apply simpler fix for Tramp bug#39399 * lisp/net/tramp-sh.el (tramp-open-shell): Remove "~/.editrc" editing. (tramp-open-connection-setup-interactive-shell): Move up "set +o vi +o emacs" command. (Bug#39399) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 0e55d603a3..4dc95b1bb0 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4093,79 +4093,53 @@ file exists and nonzero exit status otherwise." (defun tramp-open-shell (vec shell) "Open shell SHELL." + ;; Find arguments for this shell. (with-tramp-progress-reporter vec 5 (format-message "Opening remote shell `%s'" shell) - ;; Find arguments for this shell. - (let ((extra-args (tramp-get-sh-extra-args shell)) - (p (tramp-get-connection-process vec))) - ;; The readline library can disturb Tramp. For example, the - ;; very recent version of libedit, the *BSD implementation of - ;; readline, confuses Tramp. So we disable line editing. Since - ;; $EDITRC is not supported on all target systems, we must move - ;; ~/.editrc temporarily somewhere else. For bash and zsh we - ;; have disabled this already during shell invocation, see - ;; `tramp-sh-extra-args' (Bug#39399). - ;; The shell prompt might not be set yet, so we must read any - ;; prompt via `tramp-barf-if-no-shell-prompt'. - (unless extra-args - (tramp-send-command vec "rm -f ~/.editrc.tramp" t t) - (tramp-barf-if-no-shell-prompt p 10 "Couldn't find remote shell prompt") - (tramp-send-command - vec "test -e ~/.editrc && mv -f ~/.editrc ~/.editrc.tramp" t t) - (tramp-barf-if-no-shell-prompt p 10 "Couldn't find remote shell prompt") - (tramp-send-command vec "echo 'edit off' >~/.editrc" t t) - (tramp-barf-if-no-shell-prompt - p 10 "Couldn't find remote shell prompt")) - ;; It is useful to set the prompt in the following command - ;; because some people have a setting for $PS1 which /bin/sh - ;; doesn't know about and thus /bin/sh will display a strange - ;; prompt. For example, if $PS1 has "${CWD}" in the value, then - ;; ksh will display the current working directory but /bin/sh - ;; will display a dollar sign. The following command line sets - ;; $PS1 to a sane value, and works under Bourne-ish shells as - ;; well as csh-like shells. We also unset the variable $ENV - ;; because that is read by some sh implementations (eg, bash - ;; when called as sh) on startup; this way, we avoid the startup - ;; file clobbering $PS1. $PROMPT_COMMAND is another way to set - ;; the prompt in /bin/bash, it must be discarded as well. - ;; $HISTFILE is set according to `tramp-histfile-override'. - ;; $TERM and $INSIDE_EMACS set here to ensure they have the - ;; correct values when the shell starts, not just processes - ;; run within the shell. (Which processes include our - ;; initial probes to ensure the remote shell is usable.) - (tramp-send-command - vec (format - (concat - "exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' " - "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s") - tramp-terminal-type - (or (getenv "INSIDE_EMACS") emacs-version) tramp-version - (or (getenv-internal "ENV" tramp-remote-process-environment) "") - (if (stringp tramp-histfile-override) - (format "HISTFILE=%s" - (tramp-shell-quote-argument tramp-histfile-override)) - (if tramp-histfile-override - "HISTFILE='' HISTFILESIZE=0 HISTSIZE=0" - "")) - (tramp-shell-quote-argument tramp-end-of-output) - shell (or extra-args "")) - t) - ;; Reset ~/.editrc. - (unless extra-args - (tramp-send-command vec "rm -f ~/.editrc" t) - (tramp-send-command - vec "test -e ~/.editrc.tramp && mv -f ~/.editrc.tramp ~/.editrc" t)) - ;; Check proper HISTFILE setting. We give up when not working. - (when (and (stringp tramp-histfile-override) - (file-name-directory tramp-histfile-override)) - (tramp-barf-unless-okay - vec - (format - "(cd %s)" - (tramp-shell-quote-argument - (file-name-directory tramp-histfile-override))) - "`tramp-histfile-override' uses invalid file `%s'" - tramp-histfile-override))) + ;; It is useful to set the prompt in the following command because + ;; some people have a setting for $PS1 which /bin/sh doesn't know + ;; about and thus /bin/sh will display a strange prompt. For + ;; example, if $PS1 has "${CWD}" in the value, then ksh will + ;; display the current working directory but /bin/sh will display + ;; a dollar sign. The following command line sets $PS1 to a sane + ;; value, and works under Bourne-ish shells as well as csh-like + ;; shells. We also unset the variable $ENV because that is read + ;; by some sh implementations (eg, bash when called as sh) on + ;; startup; this way, we avoid the startup file clobbering $PS1. + ;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash, + ;; it must be discarded as well. $HISTFILE is set according to + ;; `tramp-histfile-override'. $TERM and $INSIDE_EMACS set here to + ;; ensure they have the correct values when the shell starts, not + ;; just processes run within the shell. (Which processes include + ;; our initial probes to ensure the remote shell is usable.) + (tramp-send-command + vec (format + (concat + "exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' " + "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s") + tramp-terminal-type + (or (getenv "INSIDE_EMACS") emacs-version) tramp-version + (or (getenv-internal "ENV" tramp-remote-process-environment) "") + (if (stringp tramp-histfile-override) + (format "HISTFILE=%s" + (tramp-shell-quote-argument tramp-histfile-override)) + (if tramp-histfile-override + "HISTFILE='' HISTFILESIZE=0 HISTSIZE=0" + "")) + (tramp-shell-quote-argument tramp-end-of-output) + shell (or (tramp-get-sh-extra-args shell) "")) + t) + ;; Check proper HISTFILE setting. We give up when not working. + (when (and (stringp tramp-histfile-override) + (file-name-directory tramp-histfile-override)) + (tramp-barf-unless-okay + vec + (format + "(cd %s)" + (tramp-shell-quote-argument + (file-name-directory tramp-histfile-override))) + "`tramp-histfile-override' uses invalid file `%s'" + tramp-histfile-override)) (tramp-set-connection-property (tramp-get-connection-process vec) "remote-shell" shell))) @@ -4236,9 +4210,16 @@ process to set up. VEC specifies the connection." (let ((tramp-end-of-output tramp-initial-end-of-output) (case-fold-search t)) (tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell)) + (tramp-message vec 5 "Setting up remote shell environment") + + ;; Disable line editing. + (tramp-send-command vec "set +o vi +o emacs" t) + + ;; Dump option settings in the traces. + (when (>= tramp-verbose 9) + (tramp-send-command vec "set -o" t)) ;; Disable echo expansion. - (tramp-message vec 5 "Setting up remote shell environment") (tramp-send-command vec "stty -inlcr -onlcr -echo kill '^U' erase '^H'" t) ;; Check whether the echo has really been disabled. Some @@ -4312,8 +4293,6 @@ process to set up. VEC specifies the connection." (tramp-message vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))) - (tramp-send-command vec "set +o vi +o emacs" t) - ;; Check whether the remote host suffers from buggy ;; `send-process-string'. This is known for FreeBSD (see comment ;; in `send_process', file process.c). I've tested sending 624 commit b2bb1135d81a533a578c51389831d6aecfa2a5b2 Author: Lars Ingebrigtsen Date: Tue Jul 28 00:51:29 2020 +0200 Fix thinko in previous nnmail.el patch * lisp/gnus/nnmail.el (nnmail-check-duplication): Fix thinko in previous patch -- group-art is a list of pairs, not a pair. diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 729f8e347c..b6308140fc 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1752,9 +1752,11 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;; We need to get the unique Gnus group name for this article ;; -- there may be identically named groups from several ;; backends. - (push (cons (gnus-group-prefixed-name (car group-art) - gnus-command-method) - (cdr group-art)) + (push (mapcar + (lambda (ga) + (cons (gnus-group-prefixed-name (car ga) gnus-command-method) + (cdr ga))) + group-art) nnmail-split-history) (delete-region (point-min) (point-max))))) commit 3bd748ebbaa2eef993a551cea1c7ddecc563f8d7 Author: Lars Ingebrigtsen Date: Tue Jul 28 00:46:30 2020 +0200 Fix problem with new-mail-mark in Gnus with non-unique names * lisp/gnus/gnus-group.el (gnus-group-new-mail): Call with Gnus group name. (gnus-group-catchup): Ditto. * lisp/gnus/gnus-sum.el (gnus-summary-exit): Ditto. * lisp/gnus/nnimap.el (nnimap-update-info): Store Gnus group name. * lisp/gnus/nnmail.el (nnmail-check-duplication): Store unique Gnus names in the history instead of backend-specific (possibly duplicated) group names (bug#41842). diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index b207c4f1e0..97e10a37a2 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1768,7 +1768,7 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated." (get-text-property (point-at-bol) 'gnus-unread)) (defun gnus-group-new-mail (group) - (if (nnmail-new-mail-p (gnus-group-real-name group)) + (if (nnmail-new-mail-p group) gnus-new-mail-mark ?\s)) @@ -3600,7 +3600,7 @@ or nil if no action could be taken." (marks (gnus-info-marks (nth 1 entry))) (unread (gnus-sequence-of-unread-articles group))) ;; Remove entries for this group. - (nnmail-purge-split-history (gnus-group-real-name group)) + (nnmail-purge-split-history group) ;; Do the updating only if the newsgroup isn't killed. (if (not (numberp (car entry))) (gnus-message 1 "Can't catch up %s; non-active group" group) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index d731893ece..c1216a0cc2 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -7311,7 +7311,7 @@ If FORCE (the prefix), also save the .newsrc file(s)." (when gnus-use-cache (gnus-cache-write-active)) ;; Remove entries for this group. - (nnmail-purge-split-history (gnus-group-real-name group)) + (nnmail-purge-split-history group) ;; Make all changes in this group permanent. (unless quit-config (gnus-run-hooks 'gnus-exit-group-hook) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3c4e75ede8..be8ad9a672 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1670,8 +1670,7 @@ If LIMIT, first try to limit the search to the N last articles." (when (and active recent (> (car (last recent)) (cdr active))) - (push (list (cons (gnus-group-real-name group) 0)) - nnmail-split-history))) + (push (list (cons group 0)) nnmail-split-history))) ;; Note the active level for the next run-through. (gnus-group-set-parameter info 'active (gnus-active group)) (gnus-group-set-parameter info 'uidvalidity uidvalidity) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 3be843c91f..729f8e347c 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1749,7 +1749,13 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (nreverse (nnmail-article-group artnum-func)))))) ;; Add the group-art list to the history list. (if group-art - (push group-art nnmail-split-history) + ;; We need to get the unique Gnus group name for this article + ;; -- there may be identically named groups from several + ;; backends. + (push (cons (gnus-group-prefixed-name (car group-art) + gnus-command-method) + (cdr group-art)) + nnmail-split-history) (delete-region (point-min) (point-max))))) ;;; Get new mail. commit 9903b391481a6e3c83ccb3d5325e210cfd3eb950 Author: Eric Abrahamsen Date: Mon Jul 27 15:36:09 2020 -0700 * doc/misc/gnus.texi: Add introductory section to Gnus manual "Don't Panic: Your first 20 minutes with Gnus." diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 2f4bc0cbf8..584c54674d 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -402,6 +402,7 @@ This manual corresponds to Gnus v5.13 @end iftex @menu +* Don't Panic:: Your first 20 minutes with Gnus. * Starting Up:: Finding news can be a pain. * Group Buffer:: Selecting, subscribing and killing groups. * Summary Buffer:: Reading, saving and posting articles. @@ -947,6 +948,140 @@ Emacs for Heathens @end detailmenu @end menu +@node Don't Panic +@chapter Don't Panic +@cindex don't panic +@cindex introduction to Gnus + +Welcome, gentle user, to the Gnus newsreader and email client! Gnus +is unlike most clients, in part because of its endless +configurability, in part because of its historical origins. Gnus is +now a fully-featured email client, but it began life as a Usenet-style +newsreader, and its genes are still newsreader genes. Thus it behaves +a little differently than most mail clients. + +The typical assumptions of a newsreader are: + +@enumerate +@item +The server offers a potentially enormous number of newsgroups on a +variety of subjects. The user may only be interested in some of those +groups, and more interested in some than others. +@item +Many groups see a high volume of articles, and the user won't want to +read all of them. Mechanisms are needed for foregrounding interesting +articles, and backgrounding uninteresting articles. +@item +Once a group has been scanned and dealt with by the user, it's +unlikely to be of further interest until new articles come in. +@end enumerate + +These assumptions lead to certain default Gnus behaviors: + +@enumerate +@item +Not all interesting groups are equally interesting, thus groups have +varying degrees of ``subscribedness'', with different behavior +depending on ``how subscribed'' a group is. +@item +There are many commands and tools for scoring and sorting articles, +or otherwise sweeping them under the rug. +@item +Gnus will only show you groups with unread or ticked articles; +groups with no new articles are hidden. +@item +When entering a group, only unread or ticked articles are shown, +all other articles are hidden. +@end enumerate + +If this seems draconian, think of it as Automatic Inbox Zero. This is +the way Gnus works by default. It is possible to make it work more +like an email client (always showing read groups and read articles), +but that takes some effort on the part of the user. + +The brief introduction below should be enough to get you off the +ground. + +@heading The Basics of Servers, Groups, and Articles +@cindex servers +@cindex groups +@cindex articles + +The fundamental building blocks of Gnus are @dfn{servers}, +@dfn{groups}, and @dfn{articles}. Servers can be local or remote. +Each server maintains a list of groups, and those groups contain +articles. Because Gnus presents a unified interface to a wide variety +of servers, the vocabulary doesn't always quite line up (see @ref{FAQ +- Glossary}, for a more complete glossary). Thus a local maildir is +referred to as a ``server'' (@pxref{Finding the News}) the same as a +Usenet or IMAP server is; ``groups'' (@pxref{Group Buffer}) might mean +an NNTP group, IMAP folder, or local mail directory; and an +``article'' (@pxref{Summary Buffer}) might elsewhere be known as a +message or an email. Gnus employs unified terms for all these things. + +Servers fall into two general categories: ``news-like'', meaning that +the articles are part of a public archive and can't be manipulated by +the user; and ``mail-like'', meaning that the articles are owned by +the user, who can freely edit them, move them around, and delete +them. + +For news-like servers, which typically offer hundreds or thousands of +groups, it's important to be able to subscribe to a subset of those +groups. For mail-like servers, the user is generally automatically +subscribed to all groups (though IMAP, for example, also allows +selective subscription). To change group subscription, enter the +Server buffer (with @kbd{^}) and press @kbd{@key{RET}} on the server +in question. From here, Gnus provides commands to change or toggle +your group subscriptions (@pxref{Browse Foreign Server}). + +A Gnus installation is basically just a list of one or more servers, +plus the user's subscribed groups from those servers, plus articles in +those groups. + +Servers can be added and configured in two places: in the user's +gnus.el startup file, using the @code{gnus-select-method} and +@code{gnus-secondary-select-methods} options, or within Gnus itself +using interactive commands in the Server buffer. @xref{Finding +the News}, for details. + + +@heading Fetching Mail + +New mail has to come from somewhere. Some servers, such as NNTP or +IMAP, are themselves responsible for fetching newly-arrived articles. +Others, such as maildir or mbox servers, only store articles and don't +fetch them from anywhere. + +In the latter case, Gnus provides for @code{mail sources}: places +where new mail is fetched from. A mail source might be a local spool, +or a remote POP server, or some other source of incoming articles. +Mail sources are usually configured globally, but can be specified +per-group (@pxref{Mail Sources} for more information). + +@xref{Scanning New Messages}, for details on fetching new mail. + +@heading Viewing Mail + +By default, Gnus's Group buffer only displays groups with unread +articles. It is always possible to display all the groups temporarily +with @kbd{L}, and to configure Gnus to always display some groups +(@pxref{Listing Groups}). + +@xref{Selecting a Group}, for how to enter a group, and @pxref{Summary +Buffer} for what to do once you're there. + +@heading Sending Mail + +New message composition can be initiated from the Group buffer +(@pxref{Misc Group Stuff}). If you're in a Summary buffer, you can +compose replies and forward emails in addition to starting new +messages, see @ref{Summary Mail Commands}, for details. + +For information about what happens once you've started composing a +message, see @ref{Composing Messages}. For information on setting up +@acronym{SMTP} servers in particular, see @ref{Mail Variables, ,Mail +Variables,message,Message manual}. + @node Starting Up @chapter Starting Gnus @cindex starting up commit 9d751aa82202a2e081531f004c1bb0c0dbd9a0d3 Author: João Távora Date: Mon Jul 27 22:07:38 2020 +0100 Make newer ElDoc versions are compatible with Emacs < 28 Fixes: bug#42563 For some time, Eldoc has has some Elisp-specific code that shouldn't live there, but in elisp-mode.el. This can be fixed in Emacs master, but since ElDoc is distributed in GNU Elpa and is meant to work with Emacs 26 and 27, this means that that elisp-specific code must still be distributed with eldoc.el and kept up to date. * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Ensure implementation is compatible with Emacs < 28. (Version): Bump to 1.8 diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index b30836cc0b..19b3bd78ae 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.7.0 +;; Version: 1.8.0 ;; Package-Requires: ((emacs "26.3")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -229,11 +229,15 @@ expression point is on." :lighter eldoc-minor-mode-string (defun eldoc--eval-expression-setup () ;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call ;; `emacs-lisp-mode' itself? - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-var-docstring nil t) - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-funcall nil t) - (setq eldoc-documentation-strategy 'eldoc-documentation-default) + (cond ((<= emacs-major-version 27) + (declare-function elisp-eldoc-documentation-function "elisp-mode") + (add-function :before-until (local 'eldoc-documentation-function) + #'elisp-eldoc-documentation-function)) + (t (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-var-docstring nil t) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-funcall nil t) + (setq eldoc-documentation-strategy 'eldoc-documentation-default))) (eldoc-mode +1)) ;;;###autoload commit 688c03f41278a33f580b56c2122d7f52c9a3ed67 Author: João Távora Date: Mon Jul 27 16:26:33 2020 +0100 Bring back ElDoc's eldoc-display-message-p, but obsolete it Like others, this is an implementation detail that third parties could be relying on. Better not remove it outright just now, since its implementation is very simple anyway. * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.7.0 (eldoc-display-message-p): Bring back, but obsolete. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index fcb104e547..b30836cc0b 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.6.0 +;; Version: 1.7.0 ;; Package-Requires: ((emacs "26.3")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -346,6 +346,12 @@ Also store it in `eldoc-last-message' and return that value." "Compute information to store in `eldoc--last-request-state'." (list (current-buffer) (buffer-modified-tick) (point))) +(defun eldoc-display-message-p () + (eldoc--request-docs-p (eldoc--request-state))) +(make-obsolete 'eldoc-display-message-p + "Use `eldoc-documentation-functions' instead." + "eldoc-1.6.0") + (defun eldoc--request-docs-p (request-state) "Return non-nil when it is appropriate to request docs. REQUEST-STATE is a candidate for `eldoc--last-request-state'" commit 4d195bb7d0beff4c5833401bd167851f8557d0ad Author: Dmitry Gutov Date: Mon Jul 27 03:05:16 2020 +0300 Fix argument reference * lisp/progmodes/project.el (project-display-buffer-other-frame): Fix argument reference. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 27974b28f1..da4a589c21 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -999,7 +999,7 @@ This function uses `display-buffer-other-frame' as a subroutine, which see for how it is determined where the buffer will be displayed." (interactive (list (project--read-project-buffer))) - (display-buffer-other-frame buffer)) + (display-buffer-other-frame buffer-or-name)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") commit 33667e02e6fa23a2933fe0a7de488db7015d896e Author: Dmitry Gutov Date: Mon Jul 27 03:04:09 2020 +0300 Move project--value-in-dir to a different section * lisp/progmodes/project.el (project--value-in-dir): Move closer to its uses. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index c0cb691b36..27974b28f1 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -568,6 +568,13 @@ DIRS must contain directory names." ;; Sidestep the issue of expanded/abbreviated file names here. (cl-set-difference files dirs :test #'file-in-directory-p)) +(defun project--value-in-dir (var dir) + (with-temp-buffer + (setq default-directory dir) + (let ((enable-local-variables :all)) + (hack-dir-local-variables-non-file-buffer)) + (symbol-value var))) + ;;; Project commands @@ -660,13 +667,6 @@ The following commands are available: ;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command) -(defun project--value-in-dir (var dir) - (with-temp-buffer - (setq default-directory dir) - (let ((enable-local-variables :all)) - (hack-dir-local-variables-non-file-buffer)) - (symbol-value var))) - (declare-function grep-read-files "grep") (declare-function xref--show-xrefs "xref") (declare-function xref--find-ignores-arguments "xref") commit 7551aff22cd81dbdf68fbd223f4a6ef7e842c2dd Author: Dmitry Gutov Date: Mon Jul 27 02:51:39 2020 +0300 Bind switch-to-buffer-obey-display-actions to t * lisp/progmodes/project.el (project--other-place-command): Bind switch-to-buffer-obey-display-actions to t, so that project-other-window-command and friends can affect project-switch-to-buffer. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 8363dffbed..c0cb691b36 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -613,6 +613,7 @@ DIRS must contain directory names." (let* ((key (read-key-sequence-vector nil t)) (place-cmd (lookup-key map key)) (generic-cmd (lookup-key project-prefix-map key)) + (switch-to-buffer-obey-display-actions t) (display-buffer-overriding-action (unless place-cmd action))) (if-let ((cmd (or place-cmd generic-cmd))) (call-interactively cmd) commit b63c5a7efc89c23230f53a346e29e72a9b4faafc Author: Sean Whitton Date: Thu Jul 23 18:55:42 2020 -0700 Add project other place commands * lisp/progmodes/project.el (project-other-window-map, project-other-frame-map, project--other-place-command, project-other-window-command, project-other-frame-command, project-other-tab-command): Add these functions and maps. * lisp/progmodes/project.el: Bind project-other-window-command to C-x 4 p, project-other-frame-command to C-x 5 p and project-other-tab-command to C-x t p (bug#42210). diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index da3ab4d1fb..8363dffbed 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -592,6 +592,73 @@ DIRS must contain directory names." ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;; We can't have these place-specific maps inherit from +;; project-prefix-map because project--other-place-command needs to +;; know which map the key binding came from, as if it came from one of +;; these maps, we don't want to set display-buffer-overriding-action + +(defvar project-other-window-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer) + map) + "Keymap for project commands that display buffers in other windows.") + +(defvar project-other-frame-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer-other-frame) + map) + "Keymap for project commands that display buffers in other frames.") + +(defun project--other-place-command (action &optional map) + (let* ((key (read-key-sequence-vector nil t)) + (place-cmd (lookup-key map key)) + (generic-cmd (lookup-key project-prefix-map key)) + (display-buffer-overriding-action (unless place-cmd action))) + (if-let ((cmd (or place-cmd generic-cmd))) + (call-interactively cmd) + (user-error "%s is undefined" (key-description key))))) + +;;;###autoload +(defun project-other-window-command () + "Run project command, displaying resultant buffer in another window. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-window-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-window) + (inhibit-same-window . t)) + project-other-window-map)) + +;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command) + +;;;###autoload +(defun project-other-frame-command () + "Run project command, displaying resultant buffer in another frame. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-frame-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-frame)) + project-other-frame-map)) + +;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command) + +;;;###autoload +(defun project-other-tab-command () + "Run project command, displaying resultant buffer in a new tab. + +The following commands are available: + +\\{project-prefix-map}" + (interactive) + (project--other-place-command '((display-buffer-in-new-tab)))) + +;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) commit e3614fcc622df1cf5fbae8db9e7013f96196443c Author: Sean Whitton Date: Fri Jul 24 13:54:49 2020 -0700 Add project-display-buffer and project-display-buffer-other-frame * lisp/progmodes/project.el (project-display-buffer, project-display-buffer-other-frame): Add commands. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2bccd3f0fe..da3ab4d1fb 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -904,7 +904,34 @@ current project. Two buffers belong to the same project if their project instances, as reported by `project-current' in each buffer, are identical." (interactive (list (project--read-project-buffer))) - (switch-to-buffer buffer)) + (switch-to-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer (buffer-or-name) + "Display BUFFER-OR-NAME in some window, without selecting it. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer' as a subroutine, which see +for how it is determined where the buffer will be displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer-other-frame (buffer-or-name) + "Display BUFFER-OR-NAME preferably in another frame. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer-other-frame' as a subroutine, +which see for how it is determined where the buffer will be +displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer-other-frame buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") commit 7479c11b4e73fcb9aa9d42788012b850ee3245c5 Author: Sean Whitton Date: Fri Jul 24 13:36:39 2020 -0700 Factor out project--read-project-buffer from project-switch-buffer * lisp/progmodes/project.el (project--read-project-buffer): New function extracted from project-switch-buffer. * lisp/progmodes/project.el (project-switch-buffer): Instead of unconditionally reading a project buffer from the user, add buffer-or-name argument, and populate it using project--read-project-buffer when called interactively. Update docstring. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5cfc6a2098..2bccd3f0fe 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -877,14 +877,7 @@ Arguments the same as in `compile'." (default-directory (project-root pr))) (compile command comint))) -;;;###autoload -(defun project-switch-to-buffer () - "Switch to another buffer belonging to the current project. -This function prompts for another buffer, offering as candidates -buffers that belong to the same project as the current buffer. -Two buffers belong to the same project if their project instances, -as reported by `project-current' in each buffer, are identical." - (interactive) +(defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) (other-buffer (other-buffer current-buffer)) @@ -896,13 +889,22 @@ as reported by `project-current' in each buffer, are identical." (equal pr (with-current-buffer (cdr buffer) (project-current))))))) - (switch-to-buffer - (read-buffer - "Switch to buffer: " - (when (funcall predicate (cons other-name other-buffer)) - other-name) - nil - predicate)))) + (read-buffer + "Switch to buffer: " + (when (funcall predicate (cons other-name other-buffer)) + other-name) + nil + predicate))) + +;;;###autoload +(defun project-switch-to-buffer (buffer-or-name) + "Display buffer BUFFER-OR-NAME in the selected window. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical." + (interactive (list (project--read-project-buffer))) + (switch-to-buffer buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") commit 7d9096b6ac5ffa836fa5a8ceec2d27edc482f7ae Author: Philipp Stephani Date: Sun Jul 26 20:34:30 2020 +0200 Small refactoring to simplify the interface of internal function. * src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter. (lisp_to_value): Adapt caller. diff --git a/src/emacs-module.c b/src/emacs-module.c index e4e7da088d..ac9ac824b7 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -190,7 +190,7 @@ struct emacs_runtime_private /* Forward declarations. */ static Lisp_Object value_to_lisp (emacs_value); -static emacs_value allocate_emacs_value (emacs_env *, struct emacs_value_storage *, Lisp_Object); +static emacs_value allocate_emacs_value (emacs_env *, Lisp_Object); static emacs_value lisp_to_value (emacs_env *, Lisp_Object); static enum emacs_funcall_exit module_non_local_exit_check (emacs_env *); static void module_assert_thread (void); @@ -1321,7 +1321,7 @@ lisp_to_value (emacs_env *env, Lisp_Object o) struct emacs_env_private *p = env->private_members; if (p->pending_non_local_exit != emacs_funcall_exit_return) return NULL; - return allocate_emacs_value (env, &p->storage, o); + return allocate_emacs_value (env, o); } /* Must be called for each frame before it can be used for allocation. */ @@ -1358,9 +1358,9 @@ finalize_storage (struct emacs_value_storage *storage) /* Allocate a new value from STORAGE and stores OBJ in it. Return NULL if allocation fails and use ENV for non local exit reporting. */ static emacs_value -allocate_emacs_value (emacs_env *env, struct emacs_value_storage *storage, - Lisp_Object obj) +allocate_emacs_value (emacs_env *env, Lisp_Object obj) { + struct emacs_value_storage *storage = &env->private_members->storage; eassert (storage->current); eassert (storage->current->offset < value_frame_size); eassert (! storage->current->next); commit dae97708ea41f54f2974b405555816ada393fb9a Author: João Távora Date: Sun Jul 26 10:54:09 2020 +0100 Correct order or eldoc-documentation-functions in Elisp mode Fixes: bug#42531 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Reverse order of eldoc-documentation-functions. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 6df5411191..2f44118edb 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -279,10 +279,10 @@ Blank lines separate paragraphs. Semicolons start comments. (append '((?\` . ?\') (?\‘ . ?\’)) electric-pair-text-pairs)) (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs)) - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-var-docstring nil t) (add-hook 'eldoc-documentation-functions #'elisp-eldoc-funcall nil t) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-var-docstring nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions commit 9f01ce6327af886f26399924a9aadf16cdd4fd9f Author: Philipp Stephani Date: Sat Jul 25 23:23:19 2020 +0200 Make checking for liveness of global values more precise. We can't just use a hash lookup because a global and a local reference might refer to the same Lisp object. * src/emacs-module.c (module_free_global_ref): More precise check for global liveness. * test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free): New test module function. (emacs_module_init): Export it. * test/src/emacs-module-tests.el (module--test-assertions--globref-invalid-free): New unit test. diff --git a/src/emacs-module.c b/src/emacs-module.c index 02563a4b8b..e4e7da088d 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -468,6 +468,14 @@ module_free_global_ref (emacs_env *env, emacs_value global_value) Lisp_Object obj = value_to_lisp (global_value); ptrdiff_t i = hash_lookup (h, obj, NULL); + if (module_assertions) + { + ptrdiff_t n = 0; + if (! module_global_reference_p (global_value, &n)) + module_abort ("Global value was not found in list of %"pD"d globals", + n); + } + if (i >= 0) { Lisp_Object value = HASH_VALUE (h, i); @@ -476,11 +484,6 @@ module_free_global_ref (emacs_env *env, emacs_value global_value) if (--ref->refcount == 0) hash_remove_from_table (h, obj); } - else if (module_assertions) - { - module_abort ("Global value was not found in list of %"pD"d globals", - h->count); - } } static enum emacs_funcall_exit diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index 437faaee2a..ed289d7a86 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c @@ -201,7 +201,19 @@ Fmod_test_globref_free (emacs_env *env, ptrdiff_t nargs, emacs_value args[], return env->intern (env, "ok"); } +/* Treat a local reference as global and free it. Module assertions + should detect this case even if a global reference representing the + same object also exists. */ +static emacs_value +Fmod_test_globref_invalid_free (emacs_env *env, ptrdiff_t nargs, + emacs_value *args, void *data) +{ + emacs_value local = env->make_integer (env, 9876); + env->make_global_ref (env, local); + env->free_global_ref (env, local); /* Not allowed. */ + return env->intern (env, "nil"); +} /* Return a copy of the argument string where every 'a' is replaced with 'b'. */ @@ -694,6 +706,8 @@ emacs_module_init (struct emacs_runtime *ert) 1, 1, NULL, NULL); DEFUN ("mod-test-globref-make", Fmod_test_globref_make, 0, 0, NULL, NULL); DEFUN ("mod-test-globref-free", Fmod_test_globref_free, 4, 4, NULL, NULL); + DEFUN ("mod-test-globref-invalid-free", Fmod_test_globref_invalid_free, 0, 0, + NULL, NULL); DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL); DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL); DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL); diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 7ed9ecf84e..8465fd02e1 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -301,6 +301,17 @@ during garbage collection." (mod-test-invalid-finalizer) (garbage-collect))) +(ert-deftest module--test-assertions--globref-invalid-free () + "Check that -module-assertions detects invalid freeing of a +local reference." + (skip-unless (or (file-executable-p mod-test-emacs) + (and (eq system-type 'windows-nt) + (file-executable-p (concat mod-test-emacs ".exe"))))) + (module--test-assertion + (rx "Global value was not found in list of " (+ digit) " globals") + (mod-test-globref-invalid-free) + (garbage-collect))) + (ert-deftest module/describe-function-1 () "Check that Bug#30163 is fixed." (with-temp-buffer commit 6355a3ec62f43c9b99d483982ff851d32dd78891 Author: Philipp Stephani Date: Sat Jul 25 23:04:05 2020 +0200 Fix subtle bug when checking liveness of module values. We can't simply look up the Lisp object in the global reference table because an invalid local and a valid global reference might refer to the same object. Instead, we have to test the address of the global reference against the stored references. * src/emacs-module.c (module_global_reference_p): New helper function. (value_to_lisp): Use it. * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store_copy): New test module function. (emacs_module_init): Export it. * test/src/emacs-module-tests.el (module--test-assertions--load-non-live-object-with-global-copy): New unit test. diff --git a/src/emacs-module.c b/src/emacs-module.c index c47ea9c195..02563a4b8b 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -78,6 +78,7 @@ To add a new module function, proceed as follows: #include "emacs-module.h" #include +#include #include #include #include @@ -400,6 +401,28 @@ XMODULE_GLOBAL_REFERENCE (Lisp_Object o) return XUNTAG (o, Lisp_Vectorlike, struct module_global_reference); } +/* Returns whether V is a global reference. Only used to check module + assertions. If V is not a global reference, increment *N by the + number of global references (for debugging output). */ + +static bool +module_global_reference_p (emacs_value v, ptrdiff_t *n) +{ + struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); + /* Note that we can't use `hash_lookup' because V might be a local + reference that's identical to some global reference. */ + for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (h); ++i) + { + if (!EQ (HASH_KEY (h, i), Qunbound) + && &XMODULE_GLOBAL_REFERENCE (HASH_VALUE (h, i))->value == v) + return true; + } + /* Only used for debugging, so we don't care about overflow, just + make sure the operation is defined. */ + INT_ADD_WRAPV (*n, h->count, n); + return false; +} + static emacs_value module_make_global_ref (emacs_env *env, emacs_value value) { @@ -1277,10 +1300,8 @@ value_to_lisp (emacs_value v) ++num_environments; } /* Also check global values. */ - struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); - if (hash_lookup (h, v->v, NULL) != -1) + if (module_global_reference_p (v, &num_values)) goto ok; - INT_ADD_WRAPV (num_values, h->count, &num_values); module_abort (("Emacs value not found in %"pD"d values " "of %"pD"d environments"), num_values, num_environments); diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index 1e64bcd65f..437faaee2a 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c @@ -306,6 +306,22 @@ Fmod_test_invalid_load (emacs_env *env, ptrdiff_t nargs, emacs_value *args, return invalid_stored_value; } +/* The next function works in conjunction with the two previous ones. + It stows away a copy of the object created by + `Fmod_test_invalid_store' in a global reference. Module assertions + should still detect the invalid load of the local reference. */ + +static emacs_value global_copy_of_invalid_stored_value; + +static emacs_value +Fmod_test_invalid_store_copy (emacs_env *env, ptrdiff_t nargs, + emacs_value *args, void *data) +{ + emacs_value local = Fmod_test_invalid_store (env, 0, NULL, NULL); + return global_copy_of_invalid_stored_value + = env->make_global_ref (env, local); +} + /* An invalid finalizer: Finalizers are run during garbage collection, where Lisp code can't be executed. -module-assertions tests for this case. */ @@ -684,6 +700,8 @@ emacs_module_init (struct emacs_runtime *ert) DEFUN ("mod-test-vector-fill", Fmod_test_vector_fill, 2, 2, NULL, NULL); DEFUN ("mod-test-vector-eq", Fmod_test_vector_eq, 2, 2, NULL, NULL); DEFUN ("mod-test-invalid-store", Fmod_test_invalid_store, 0, 0, NULL, NULL); + DEFUN ("mod-test-invalid-store-copy", Fmod_test_invalid_store_copy, 0, 0, + NULL, NULL); DEFUN ("mod-test-invalid-load", Fmod_test_invalid_load, 0, 0, NULL, NULL); DEFUN ("mod-test-invalid-finalizer", Fmod_test_invalid_finalizer, 0, 0, NULL, NULL); diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 411b4505da..7ed9ecf84e 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -272,6 +272,24 @@ must evaluate to a regular expression string." (mod-test-invalid-store) (mod-test-invalid-load))) +(ert-deftest module--test-assertions--load-non-live-object-with-global-copy () + "Check that -module-assertions verify that non-live objects aren't accessed. +This differs from `module--test-assertions-load-non-live-object' +in that it stows away a global reference. The module assertions +should nevertheless detect the invalid load." + (skip-unless (or (file-executable-p mod-test-emacs) + (and (eq system-type 'windows-nt) + (file-executable-p (concat mod-test-emacs ".exe"))))) + ;; This doesn't yet cause undefined behavior. + (should (eq (mod-test-invalid-store-copy) 123)) + (module--test-assertion (rx "Emacs value not found in " + (+ digit) " values of " + (+ digit) " environments\n") + ;; Storing and reloading a local value causes undefined behavior, + ;; which should be detected by the module assertions. + (mod-test-invalid-store-copy) + (mod-test-invalid-load))) + (ert-deftest module--test-assertions--call-emacs-from-gc () "Check that -module-assertions prevents calling Emacs functions during garbage collection." commit 609cbd63c31a21ca521507695abeda1203134c99 Author: Mattias Engdegård Date: Sat Jul 25 19:12:26 2020 +0200 Optimise 3-arg +, - and * Turn (+ a b c) into (+ (+ a b) c), and do the same for - and *. The 2-arg operations have their own bytecode which results in a 1.5× speed-up. Furthermore, the transform enables other optimisations; for example, (+ a 1 b) -> (+ (1+ a) b). * lisp/emacs-lisp/byte-opt.el (byte-optimize-plus, byte-optimize-minus) (byte-optimize-multiply): Transform (OP a b c) into (OP (OP a b) c). diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 194ceee176..6f801be545 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -709,6 +709,9 @@ (integer (if integer-is-first arg1 arg2)) (other (if integer-is-first arg2 arg1))) (list (if (eq integer 1) '1+ '1-) other))) + ;; (+ x y z) -> (+ (+ x y) z) + ((= (length args) 3) + `(+ ,(byte-optimize-plus `(+ ,(car args) ,(cadr args))) ,@(cddr args))) ;; not further optimized ((equal args (cdr form)) form) (t (cons '+ args))))) @@ -737,6 +740,9 @@ ((and (null (cdr args)) (numberp (car args))) (- (car args))) + ;; (- x y z) -> (- (- x y) z) + ((= (length args) 3) + `(- ,(byte-optimize-minus `(- ,(car args) ,(cadr args))) ,@(cddr args))) ;; not further optimized ((equal args (cdr form)) form) (t (cons '- args)))))) @@ -764,6 +770,10 @@ ((null args) 1) ;; (* n) -> n, where n is a number ((and (null (cdr args)) (numberp (car args))) (car args)) + ;; (* x y z) -> (* (* x y) z) + ((= (length args) 3) + `(* ,(byte-optimize-multiply `(* ,(car args) ,(cadr args))) + ,@(cddr args))) ;; not further optimized ((equal args (cdr form)) form) (t (cons '* args))))) commit 3b44829823f43d3736b8ec9db2258eeff7f6c16a Author: Eli Zaretskii Date: Sat Jul 25 12:28:05 2020 +0300 Update and improve documentation of project.el commands * doc/emacs/custom.texi (Prefix Keymaps): Document 'project-prefix-map'. * doc/emacs/maintaining.texi (Project File Commands) (Switching Projects): Describe key bindings for the commands described in the sections. Document 'project-list-file'. (Project Buffer Commands): New section. * doc/emacs/emacs.texi (Top): Add Project sections to the detailed menu. * etc/NEWS: Add entries for project.el, and mark documented entries as appropriate. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 00c8ee4f98..acd7fb13ae 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1630,6 +1630,10 @@ characters are actually defined by this map. @item @vindex mode-specific-map @code{mode-specific-map} is for characters that follow @kbd{C-c}. +@item +@vindex project-prefix-map +@code{project-prefix-map} is for characters that follow @kbd{C-x p}, +used for project-related commands (@pxref{Projects}). @end itemize @node Local Keymaps diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 6b82aeb823..5b6b7b7e93 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -857,6 +857,12 @@ Customizing VC * CVS Options:: Options for CVS. @end ifnottex +Projects + +* Project File Commands:: Commands for handling project files. +* Project Buffer Commands:: Commands for handling project buffers. +* Switching Projects:: Switching between projects. + Change Logs * Change Log Commands:: Commands for editing change log files. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index cc7415e7ad..43ec2d4e9f 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1657,12 +1657,43 @@ the project back-end. For example, the VC back-end doesn't consider ``ignored'' files (@pxref{VC Ignore}) to be part of the project. @menu -* Project File Commands:: Commands for handling project files. -* Switching Projects:: Switching between projects. +* Project File Commands:: Commands for handling project files. +* Project Buffer Commands:: Commands for handling project buffers. +* Switching Projects:: Switching between projects. @end menu @node Project File Commands -@subsection Project File Commands +@subsection Project Commands That Operate on Files + +@table @kbd +@item C-x p f +Visit a file that belongs to the current project +(@code{project-find-file}). +@item C-x p g +Find matches for a regexp in all files that belong to the current +project (@code{project-find-regexp}). +@item M-x project-search +Interactively search for regexp matches in all files that belong to +the current project. +@item C-x p r +Perform query-replace for a regexp in all files that belong to the +current project (@code{project-query-replace-regexp}). +@item C-x p d +Run Dired in the current project's root directory +(@code{project-dired}). +@item C-x p v +Run @code{vc-dir} in the current project's root directory +(@code{project-vc-dir}). +@item C-x p s +Start an inferior shell in the current project's root directory +(@code{project-shell}). +@item C-x p e +Start Eshell in the current project's root directory +(@code{project-eshell}). +@item C-x p c +Run compilation in the current project's root directory +(@code{project-compile}). +@end table Emacs provides commands for handling project files conveniently. This subsection describes these commands. @@ -1676,25 +1707,26 @@ doesn't seem to belong to a recognizable project, these commands prompt you for the project directory. @findex project-find-file - The command @code{project-find-file} is a convenient way of visiting -files (@pxref{Visiting}) that belong to the current project. Unlike -@kbd{C-x C-f}, this command doesn't require to type the full file name -of the file to visit, you can type only the file's base name (i.e., -omit the leading directories). In addition, the completion candidates -considered by the command include only the files belonging to the -current project, and nothing else. If there's a file name at point, -this command offers that file as the default to visit. + The command @kbd{C-x p f} (@code{project-find-file}) is a convenient +way of visiting files (@pxref{Visiting}) that belong to the current +project. Unlike @kbd{C-x C-f}, this command doesn't require to type +the full file name of the file to visit, you can type only the file's +base name (i.e., omit the leading directories). In addition, the +completion candidates considered by the command include only the files +belonging to the current project, and nothing else. If there's a file +name at point, this command offers that file as the default to visit. @findex project-find-regexp - The command @code{project-find-regexp} is similar to @code{rgrep} -(@pxref{Grep Searching}), but it searches only the files that belong -to the current project. The command prompts for the regular -expression to search, and pops up an Xref mode buffer with the search -results, where you can select a match using the Xref mode commands -(@pxref{Xref Commands}). When invoked with a prefix argument, this -command additionally prompts for the base directory from which to -start the search; this allows, for example, to limit the search only -to project files under a certain subdirectory of the project root. + The command @kbd{C-x p g} (@code{project-find-regexp}) is similar to +@code{rgrep} (@pxref{Grep Searching}), but it searches only the files +that belong to the current project. The command prompts for the +regular expression to search, and pops up an Xref mode buffer with the +search results, where you can select a match using the Xref mode +commands (@pxref{Xref Commands}). When invoked with a prefix +argument, this command additionally prompts for the base directory +from which to start the search; this allows, for example, to limit the +search only to project files under a certain subdirectory of the +project root. @findex project-search @kbd{M-x project-search} is an interactive variant of @@ -1706,7 +1738,7 @@ matched file. To find the rest of the matches, type @w{@kbd{M-x fileloop-continue @key{RET}}}. @findex project-query-replace-regexp - @kbd{M-x project-query-replace-regexp} is similar to + @kbd{C-x p r} (@code{project-query-replace-regexp}) is similar to @code{project-search}, but it prompts you for whether to replace each match it finds, like @code{query-replace} does (@pxref{Query Replace}), and continues to the next match after you respond. If your @@ -1714,40 +1746,85 @@ response causes Emacs to exit the query-replace loop, you can later continue with @w{@kbd{M-x fileloop-continue @key{RET}}}. @findex project-dired - The command @code{project-dired} opens a Dired buffer -(@pxref{Dired}) listing the files in the current project's root + The command @kbd{C-x p d} (@code{project-dired}) opens a Dired +buffer (@pxref{Dired}) listing the files in the current project's root directory. @findex project-vc-dir - The command @code{project-vc-dir} opens a VC Directory buffer -(@pxref{VC Directory Mode}) listing the version control statuses of -the files in a directory tree under the current project's -root directory. + The command @kbd{C-x p v} (@code{project-vc-dir}) opens a VC +Directory buffer (@pxref{VC Directory Mode}) listing the version +control statuses of the files in a directory tree under the current +project's root directory. @findex project-shell - The command @code{project-shell} starts a shell session -(@pxref{Shell}) in a new buffer with the current project's root as the -working directory. + The command @kbd{C-x p s} (@code{project-shell}) starts a shell +session (@pxref{Shell}) in a new buffer with the current project's +root as the working directory. @findex project-eshell - The command @code{project-eshell} starts an Eshell session in a new -buffer with the current project's root as the working directory. -@xref{Top,Eshell,Eshell, eshell, Eshell: The Emacs Shell}. + The command @kbd{C-x p e} (@code{project-eshell}) starts an Eshell +session in a new buffer with the current project's root as the working +directory. @xref{Top,Eshell,Eshell, eshell, Eshell: The Emacs Shell}. + +@findex project-compile + The command @kbd{C-x p c} (@code{project-compile}) runs compilation +(@pxref{Compilation}) in the current project's root directory. + +@node Project Buffer Commands +@subsection Project Commands That Operate on Buffers + +@table @kbd +@item C-x p b +Switch to another buffer belonging to the current project +(@code{project-switch-to-buffer}). +@item C-x p k +Kill all live buffers that belong to the current project +(@code{project-kill-buffers}). +@end table + +@findex project-switch-to-buffer + Working on a project could potentially involve having many buffers +visiting files that belong to the project, and also buffers that +belong to the project, but don't visit any files (like the +@file{*compilation*} buffer created by @code{project-compile}). The +command @kbd{C-x p b} (@code{project-switch-to-buffer}) helps you +switch between buffers that belong to the current project by prompting +for a buffer to switch and considering only the current project's +buffers as candidates for completion. + +@findex project-kill-buffers +@vindex project-kill-buffers-ignores + When you finish working on the project, you may wish to kill all the +buffers that belong to the project, to keep your Emacs session +smaller. The command @kbd{C-x p k} (@code{project-kill-buffers}) +accomplishes that: it kills all the buffers that belong to the current +project, except if @code{project-kill-buffers-ignores} tells +otherwise. @node Switching Projects @subsection Switching Projects +@table @kbd +@item C-x p p +Run an Emacs command for another project (@code{project-switch-project}). +@end table + +@findex project-switch-project +@vindex project-switch-commands Commands that operate on project files (@pxref{Project File Commands}) will conveniently prompt you for a project directory when -no project is current. When you are inside a project but you want to -operate on a different project, the command -@code{project-switch-project} can be used. - - This command prompts you to choose a directory among known project -roots, and then displays the menu of available commands to operate on -the chosen project. The variable @code{project-switch-commands} -controls which commands are available in the menu, and by which keys -they are invoked. +no project is current. When you are inside some project, but you want +to operate on a different project, use the @kbd{C-x p p} command +(@code{project-switch-project}). This command prompts you to choose a +directory among known project roots, and then displays the menu of +available commands to operate on the project you choose. The variable +@code{project-switch-commands} controls which commands are available +in the menu, and which key invokes each command. + +@vindex project-list-file + The variable @code{project-list-file} names the file in which Emacs +records the list of known projects. It defaults to the file +@file{projects} in @code{user-emacs-directory} (@pxref{Find Init}). @node Change Log @section Change Logs diff --git a/etc/NEWS b/etc/NEWS index c93057e24d..650b95867f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -502,21 +502,31 @@ information, see the related entry about 'shr-browse-url' above. *** New user option 'project-vc-merge-submodules'. -*** Previously used project directories are now suggested by -all commands that prompt for a project directory. +*** Project commands now have their own history. +Previously used project directories are now suggested by all commands +that prompt for a project directory. + ++++ +*** New prefix keymap 'project-prefix-map'. +Key sequences that invoke project-related commands start with the +prefix 'C-x p'. Type "C-x p C-h" to show the full list. +++ *** New commands 'project-dired', 'project-vc-dir', 'project-shell', 'project-eshell'. These commands run Dired/VC-Dir and Shell/Eshell in a project's root directory, respectively. -*** New command 'project-compile', which runs compilation. ++++ +*** New command 'project-compile'. +This command runs compilation in the current project's root +directory. +++ *** New command 'project-switch-project'. This command lets you "switch" to another project and run a project command chosen from a dispatch menu. ++++ *** New user option 'project-list-file'. ** json.el commit eaad6eac0018c2f3b35af7c522f9d02618918a3a Author: Eli Zaretskii Date: Sat Jul 25 10:15:07 2020 +0300 Fix display of man pages after killing the 'man' process * lisp/man.el (Man-bgproc-filter, Man-bgproc-sentinel): Use 'buffer-live-p' instead of just testing the buffer's name. (Bug#42160) diff --git a/lisp/man.el b/lisp/man.el index 8a36f3ac25..3121334c6f 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1396,7 +1396,7 @@ synchronously, PROCESS is the name of the buffer where the manpage command is run. Second argument STRING is the entire string of output." (save-excursion (let ((Man-buffer (process-buffer process))) - (if (null (buffer-name Man-buffer)) ;; deleted buffer + (if (not (buffer-live-p Man-buffer)) ;; deleted buffer (set-process-buffer process nil) (with-current-buffer Man-buffer @@ -1430,7 +1430,7 @@ manpage command." (delete-buff nil) message) - (if (null (buffer-name Man-buffer)) ;; deleted buffer + (if (not (buffer-live-p Man-buffer)) ;; deleted buffer (or (stringp process) (set-process-buffer process nil)) commit 19064761ad2b17b13bdf3c8bd35e9ff58fe2e4fc Author: Dmitry Gutov Date: Sat Jul 25 03:17:47 2020 +0300 project-remember-project: New public function * lisp/progmodes/project.el (project-remember-project): Rename from project--add-to-project-list-front (bug#42332). And autoload it. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a0930553bd..5cfc6a2098 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -197,7 +197,7 @@ of the project instance object." pr (project--find-in-directory directory)))) (when maybe-prompt (if pr - (project--add-to-project-list-front pr) + (project-remember-project pr) (project--remove-from-project-list directory) (setq pr (cons 'transient directory)))) pr)) @@ -987,7 +987,8 @@ With some possible metadata (to be decided).") (pp project--list (current-buffer)) (write-region nil nil filename nil 'silent)))) -(defun project--add-to-project-list-front (pr) +;;;###autoload +(defun project-remember-project (pr) "Add project PR to the front of the project list. Save the result in `project-list-file' if the list of projects has changed." (project--ensure-read-project-list) commit bca8686f552a93010b130e392ecd92d179260e24 Author: Juri Linkov Date: Fri Jul 24 02:29:12 2020 +0300 * lisp/vc/vc-git.el (vc-git-log-view-mode): Fix commit regexp (bug#40248) The regexp 'log-view-message-re' should match e.g. "commit 123456789", not "CommitDate". diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b5cb842aee..7f6e1db1ed 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1237,7 +1237,7 @@ log entries." (set (make-local-variable 'log-view-message-re) (if (not (memq vc-log-view-type '(long log-search with-diff))) (cadr vc-git-root-log-format) - "^commit *\\([0-9a-z]+\\)")) + "^commit +\\([0-9a-z]+\\)")) ;; Allow expanding short log entries. (when (memq vc-log-view-type '(short log-outgoing log-incoming mergebase)) (setq truncate-lines t) commit f7ebba5724ef5bd52af02371b4ad3f0851958a3e Author: Tassilo Horn Date: Thu Jul 23 22:05:26 2020 +0200 Don't call undefined function elisp-eldoc-documentation-function (bug#42493) * lisp/ielm.el (inferior-emacs-lisp-mode): Add `elisp-eldoc-var-docstring' and `elisp-eldoc-funcall' as `eldoc-documentation-functions' instead of the undefined elisp-eldoc-documentation-function (bug#42493). diff --git a/lisp/ielm.el b/lisp/ielm.el index 47c5158ce4..b3654b91d3 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -537,7 +537,9 @@ Customized bindings may be defined in `ielm-map', which currently contains: '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-documentation-function nil t) + #'elisp-eldoc-var-docstring nil t) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-funcall nil t) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) (setq comint-get-old-input 'ielm-get-old-input) commit 0d7d422b767cdfa1278235ea914ec78252d04a40 Author: Tassilo Horn Date: Thu Jul 23 19:03:25 2020 +0200 bug-reference auto-setup for IRC, implementation for ERC * lisp/progmodes/bug-reference.el (bug-reference-setup-from-irc-alist): Change SERVER-REGEXP to NETWORK-REGEXP in docstring. * lisp/progmodes/bug-reference.el (bug-reference--maybe-setup-from-irc): Change semantics from requiring a match of channel OR server to requiring a match of both (if both are configured). * lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-erc): New defun doing the auto-setup for ERC. (bug-reference--run-auto-setup): Run bug-reference-try-setup-from-erc. * etc/NEWS: Extend entry describing bug-reference auto-setup. diff --git a/etc/NEWS b/etc/NEWS index 7c6c9fe262..c93057e24d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -566,8 +566,8 @@ appropriate values for those two variables. There are three guessing mechanisms so far: based on version control information of the current buffer's file, based on newsgroup/mail-folder name and several news and mail message headers in Gnus buffers, and based on IRC channel and -server in rcirc buffers. All mechanisms are extensible with custom -rules, see the variables 'bug-reference-setup-from-vc-alist', +network in rcirc and ERC buffers. All mechanisms are extensible with +custom rules, see the variables 'bug-reference-setup-from-vc-alist', 'bug-reference-setup-from-mail-alist', and 'bug-reference-setup-from-irc-alist'. diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index b88ea0af82..c52331f84f 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -353,38 +353,45 @@ and set it if applicable." This takes action if `bug-reference-mode' is enabled in IRC channels using one of Emacs' IRC clients (rcirc and ERC). -Currently, only rcirc is supported. +Currently, rcirc and ERC are supported. Each element has the form - (CHANNEL-REGEXP SERVER-REGEXP BUG-REGEXP URL-FORMAT) + (CHANNEL-REGEXP NETWORK-REGEXP BUG-REGEXP URL-FORMAT) -CHANNEL-REGEXP is a regexp matched against the current mail IRC -channel name. SERVER-REGEXP is matched against the IRC server -name. If any of those matches, BUG-REGEXP is set as +CHANNEL-REGEXP is a regexp matched against the current IRC +channel name (e.g. #emacs). NETWORK-REGEXP is matched against +the IRC network name (e.g. freenode). Both entries are optional. +If all given entries match, BUG-REGEXP is set as `bug-reference-bug-regexp' and URL-FORMAT is set as `bug-reference-url-format'.") -(defun bug-reference--maybe-setup-from-irc (channel server) - "Set up according to IRC CHANNEL or SERVER. -CHANNEL is an IRC channel name and SERVER is that channel's -server name. +(defun bug-reference--maybe-setup-from-irc (channel network) + "Set up according to IRC CHANNEL or NETWORK. +CHANNEL is an IRC channel name (or generally a target, i.e., it +could also be a user name) and NETWORK is that channel's network +name. -If any CHANNEL-REGEXP or SERVER-REGEXP of -`bug-reference-setup-from-irc-alist' matches CHANNEL or SERVER, -the corresponding BUG-REGEXP and URL-FORMAT are set." +If any `bug-reference-setup-from-irc-alist' entry's +CHANNEL-REGEXP and NETWORK-REGEXP match CHANNEL and NETWORK, the +corresponding BUG-REGEXP and URL-FORMAT are set." (catch 'setup-done (dolist (config bug-reference-setup-from-irc-alist) - (when (or - (and channel - (car config) - (string-match-p (car config) channel)) - (and server - (nth 1 config) - (string-match-p (car config) server))) - (setq-local bug-reference-bug-regexp (nth 2 config)) - (setq-local bug-reference-url-format (nth 3 config)) - (throw 'setup-done t))))) + (let ((channel-rx (car config)) + (network-rx (nth 1 config))) + (when (and + ;; One of both has to be given. + (or channel-rx network-rx) + ;; The args have to be set. + channel network) + (when (and + (or (null channel-rx) + (string-match-p channel-rx channel)) + (or (null network-rx) + (string-match-p network-rx network))) + (setq-local bug-reference-bug-regexp (nth 2 config)) + (setq-local bug-reference-url-format (nth 3 config)) + (throw 'setup-done t))))))) (defvar rcirc-target) (defvar rcirc-server-buffer) @@ -402,6 +409,18 @@ and set it if applicable." (with-current-buffer rcirc-server-buffer rcirc-server))))) +(declare-function erc-format-target "erc") +(declare-function erc-network-name "erc-networks") + +(defun bug-reference-try-setup-from-erc () + "Try setting up `bug-reference-mode' based on ERC channel and server. +Test each configuration in `bug-reference-setup-from-irc-alist' +and set it if applicable." + (when (derived-mode-p 'erc-mode) + (bug-reference--maybe-setup-from-irc + (erc-format-target) + (erc-network-name)))) + (defun bug-reference--run-auto-setup () (when (or bug-reference-mode bug-reference-prog-mode) @@ -414,7 +433,8 @@ and set it if applicable." (catch 'setup (dolist (f (list #'bug-reference-try-setup-from-vc #'bug-reference-try-setup-from-gnus - #'bug-reference-try-setup-from-rcirc)) + #'bug-reference-try-setup-from-rcirc + #'bug-reference-try-setup-from-erc)) (when (funcall f) (throw 'setup t)))))))) commit 84ec57fe06e187f41a3546131d5dae3b185c3511 Author: Lars Ingebrigtsen Date: Thu Jul 23 17:12:33 2020 +0200 Fix viewing of encrypted S/MIME messages * lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Don't add a content-type header if there already is one (bug#41659). diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 96695aabfd..587c4e01b9 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1680,8 +1680,14 @@ If RECURSIVE, search recursively." (t (y-or-n-p (format "Decrypt (S/MIME) part? ")))) (mm-view-pkcs7 parts from)) - (goto-char (point-min)) - (insert "Content-type: text/plain\n\n") + ;; Normally there will be a Content-type header here, but + ;; some mailers don't add that to the encrypted part, which + ;; makes the subsequent re-dissection fail here. + (save-restriction + (mail-narrow-to-head) + (unless (mail-fetch-field "content-type") + (goto-char (point-max)) + (insert "Content-type: text/plain\n\n"))) (setq parts (mm-dissect-buffer t))))) ((equal subtype "signed") (unless (and (setq protocol commit 5c5eb9790898e4ab10bcbbdb6871947ed3018569 Author: Philipp Stephani Date: Thu Jul 23 13:48:43 2020 +0200 Fix memory leak for global module objects (Bug#42482). Instead of storing the global values in a global 'emacs_value_storage' object, store them as hash values alongside the reference counts. That way the garbage collector takes care of cleaning them up. * src/emacs-module.c (global_storage): Remove. (struct module_global_reference): New pseudovector type. (XMODULE_GLOBAL_REFERENCE): New helper function. (module_make_global_ref, module_free_global_ref): Use 'module_global_reference' struct for global reference values. (value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of 'global_storage'. diff --git a/src/emacs-module.c b/src/emacs-module.c index 3d1827c7da..c47ea9c195 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -154,11 +154,11 @@ struct emacs_value_frame /* A structure that holds an initial frame (so that the first local values require no dynamic allocation) and keeps track of the current frame. */ -static struct emacs_value_storage +struct emacs_value_storage { struct emacs_value_frame initial; struct emacs_value_frame *current; -} global_storage; +}; /* Private runtime and environment members. */ @@ -371,10 +371,35 @@ module_get_environment (struct emacs_runtime *runtime) } /* To make global refs (GC-protected global values) keep a hash that - maps global Lisp objects to reference counts. */ + maps global Lisp objects to 'struct module_global_reference' + objects. We store the 'emacs_value' in the hash table so that it + is automatically garbage-collected (Bug#42482). */ static Lisp_Object Vmodule_refs_hash; +/* Pseudovector type for global references. The pseudovector tag is + PVEC_OTHER since these values are never printed and don't need to + be special-cased for garbage collection. */ + +struct module_global_reference { + /* Pseudovector header, must come first. */ + union vectorlike_header header; + + /* Holds the emacs_value for the object. The Lisp_Object stored + therein must be the same as the hash key. */ + struct emacs_value_tag value; + + /* Reference count, always positive. */ + ptrdiff_t refcount; +}; + +static struct module_global_reference * +XMODULE_GLOBAL_REFERENCE (Lisp_Object o) +{ + eassert (PSEUDOVECTORP (o, PVEC_OTHER)); + return XUNTAG (o, Lisp_Vectorlike, struct module_global_reference); +} + static emacs_value module_make_global_ref (emacs_env *env, emacs_value value) { @@ -383,21 +408,30 @@ module_make_global_ref (emacs_env *env, emacs_value value) Lisp_Object new_obj = value_to_lisp (value), hashcode; ptrdiff_t i = hash_lookup (h, new_obj, &hashcode); + /* Note: This approach requires the garbage collector to never move + objects. */ + if (i >= 0) { Lisp_Object value = HASH_VALUE (h, i); - EMACS_INT refcount = XFIXNAT (value) + 1; - if (MOST_POSITIVE_FIXNUM < refcount) + struct module_global_reference *ref = XMODULE_GLOBAL_REFERENCE (value); + bool overflow = INT_ADD_WRAPV (ref->refcount, 1, &ref->refcount); + if (overflow) overflow_error (); - value = make_fixed_natnum (refcount); - set_hash_value_slot (h, i, value); + return &ref->value; } else { - hash_put (h, new_obj, make_fixed_natnum (1), hashcode); + struct module_global_reference *ref + = ALLOCATE_PLAIN_PSEUDOVECTOR (struct module_global_reference, + PVEC_OTHER); + ref->value.v = new_obj; + ref->refcount = 1; + Lisp_Object value; + XSETPSEUDOVECTOR (value, ref, PVEC_OTHER); + hash_put (h, new_obj, value, hashcode); + return &ref->value; } - - return allocate_emacs_value (env, &global_storage, new_obj); } static void @@ -413,23 +447,16 @@ module_free_global_ref (emacs_env *env, emacs_value global_value) if (i >= 0) { - EMACS_INT refcount = XFIXNAT (HASH_VALUE (h, i)) - 1; - if (refcount > 0) - set_hash_value_slot (h, i, make_fixed_natnum (refcount)); - else - { - eassert (refcount == 0); - hash_remove_from_table (h, obj); - } + Lisp_Object value = HASH_VALUE (h, i); + struct module_global_reference *ref = XMODULE_GLOBAL_REFERENCE (value); + eassert (0 < ref->refcount); + if (--ref->refcount == 0) + hash_remove_from_table (h, obj); } - - if (module_assertions) + else if (module_assertions) { - ptrdiff_t count = 0; - if (value_storage_contains_p (&global_storage, global_value, &count)) - return; module_abort ("Global value was not found in list of %"pD"d globals", - count); + h->count); } } @@ -1250,8 +1277,10 @@ value_to_lisp (emacs_value v) ++num_environments; } /* Also check global values. */ - if (value_storage_contains_p (&global_storage, v, &num_values)) + struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); + if (hash_lookup (h, v->v, NULL) != -1) goto ok; + INT_ADD_WRAPV (num_values, h->count, &num_values); module_abort (("Emacs value not found in %"pD"d values " "of %"pD"d environments"), num_values, num_environments); @@ -1467,10 +1496,7 @@ module_handle_nonlocal_exit (emacs_env *env, enum nonlocal_exit type, void init_module_assertions (bool enable) { - /* If enabling module assertions, use a hidden environment for - storing the globals. This environment is never freed. */ module_assertions = enable; - initialize_storage (&global_storage); } /* Return whether STORAGE contains VALUE. Used to check module commit fcd43287b3d36a5706760d68b7d88502ebe43a47 Author: João Távora Date: Sun Jul 19 00:48:43 2020 +0100 Don't needlessly request docs from ElDoc functions Fixes: bug#42421 Do this conservatively for now: if the ElDoc helper buffer (as returned by eldoc--doc-buffer) is visible and showing documentation for the very same "situation" (as computed by the the new eldoc--request-state helper), don't request that documentation from sources again. Before this change, not only was that request inefficient but if the user invoked scroll-other-window to see more of the helper buffer, that would eventually cause it to be reformatted and unexpectedly recentered. Later on, when a customizable list of documentation "sinks" is offered to the user, say, something like eldoc-display-functions, this process must be consolidated. In those circumstances, as soon as one of those sinks signals that it doesn't have up-to-date documentation for the state computed by eldoc--request-state, documentation will have to be requested anew from eldoc-documentation-functions via eldoc--invoke-strategy. * lisp/emacs-lisp/eldoc.el (eldoc--request-docs-p): Rework from eglot-display-message-p. (eldoc--last-request-state): New variable. (eldoc--request-state): New helper. (eldoc--handle-docs): Memorize state of request in doc buffer. (eldoc-print-current-symbol-info): Pass a token to eldoc--request-docs-p. (Version): Bump to 1.6.0 diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 6ed5bff9f4..fcb104e547 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.5.0 +;; Version: 1.6.0 ;; Package-Requires: ((emacs "26.3")) ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -340,16 +340,32 @@ Also store it in `eldoc-last-message' and return that value." ;; for us, but do note that the last-message will be gone. (setq eldoc-last-message nil)))) -;; Decide whether now is a good time to display a message. -(defun eldoc-display-message-p () - "Return non-nil when it is appropriate to display an ElDoc message." - (and (eldoc-display-message-no-interference-p) - ;; 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. - (not this-command) - (eldoc--message-command-p last-command))) +(defvar-local eldoc--last-request-state nil + "Tuple containing information about last ElDoc request.") +(defun eldoc--request-state () + "Compute information to store in `eldoc--last-request-state'." + (list (current-buffer) (buffer-modified-tick) (point))) + +(defun eldoc--request-docs-p (request-state) + "Return non-nil when it is appropriate to request docs. +REQUEST-STATE is a candidate for `eldoc--last-request-state'" + (and + ;; FIXME: The original idea behind this function is to protect the + ;; Echo area from ElDoc interference, but since that is only one of + ;; the possible outlets of ElDoc, this must soon be reworked. + (eldoc-display-message-no-interference-p) + (not (and eldoc--doc-buffer + (get-buffer-window eldoc--doc-buffer) + (equal request-state + (with-current-buffer + eldoc--doc-buffer + eldoc--last-request-state)))) + ;; 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. + (not this-command) + (eldoc--message-command-p last-command))) ;; Check various conditions about the current environment that might make @@ -400,7 +416,8 @@ so that the global value (i.e. the default value of the hook) is taken into account if the major mode specific function does not return any documentation.") -(defvar eldoc--doc-buffer nil "Buffer holding latest eldoc-produced docs.") +(defvar eldoc--doc-buffer nil "Buffer displaying latest ElDoc-produced docs.") + (defun eldoc-doc-buffer (&optional interactive) "Get latest *eldoc* help buffer. Interactively, display it." (interactive (list t)) @@ -410,6 +427,7 @@ return any documentation.") (setq eldoc--doc-buffer (get-buffer-create "*eldoc*"))) (when interactive (display-buffer eldoc--doc-buffer)))) + (defun eldoc--handle-docs (docs) "Display multiple DOCS in echo area. DOCS is a list of (STRING PLIST...). It is already sorted. @@ -429,9 +447,12 @@ Honor most of `eldoc-echo-area-use-multiline-p'." (integer val) (t 1))) (things-reported-on) + (request eldoc--last-request-state) single-doc single-doc-sym) ;; Then, compose the contents of the `*eldoc*' buffer. (with-current-buffer (eldoc-doc-buffer) + ;; Set doc-buffer's `eldoc--last-request-state', too + (setq eldoc--last-request-state request) (let ((inhibit-read-only t)) (erase-buffer) (setq buffer-read-only t) (local-set-key "q" 'quit-window) @@ -741,14 +762,16 @@ should endeavour to display the docstrings eventually produced." (defun eldoc-print-current-symbol-info (&optional interactive) "Document thing at point." (interactive '(t)) - (cond (interactive - (eldoc--invoke-strategy)) - (t - (if (not (eldoc-display-message-p)) - ;; Erase the last message if we won't display a new one. - (when eldoc-last-message - (eldoc--message nil)) + (let ((token (eldoc--request-state))) + (cond (interactive + (eldoc--invoke-strategy)) + ((not (eldoc--request-docs-p token)) + ;; Erase the last message if we won't display a new one. + (when eldoc-last-message + (eldoc--message nil))) + (t (let ((non-essential t)) + (setq eldoc--last-request-state token) ;; Only keep looking for the info as long as the user hasn't ;; requested our attention. This also locally disables ;; inhibit-quit. commit 1bae7ba53b8239201853ce755e9e21a96ad279c0 Merge: 496ee0911a 8bc8565721 Author: Glenn Morris Date: Wed Jul 22 07:50:47 2020 -0700 ; Merge from origin/emacs-27 The following commits were skipped: 8bc8565721 (origin/emacs-27) Revert "Rectify allout-widgets region un... db479d6354 Revert "Resolve missing button-region keymap bindings." 259dc75c23 Revert "Provide missing let definition to prevent backgrou... 56422a6366 Revert "Don't let item decoration be disrupted by too-shal... 8e4eae0ce3 Revert "Fix allout-widgets-mode handling of edits to item ... commit 496ee0911a427a43ee544d324caeadbf45e5c564 Merge: 0a71a7380f 4db3235fd8 Author: Glenn Morris Date: Wed Jul 22 07:50:47 2020 -0700 Merge from origin/emacs-27 4db3235fd8 Run custom-magic-reset in the customize buffer 3c9c3f04de ; spelling fix commit 0a71a7380fc5f364ccad64a89a2d4f962012dfd9 Merge: 687a9d3e2f bc10e467f1 Author: Glenn Morris Date: Wed Jul 22 07:50:47 2020 -0700 ; Merge from origin/emacs-27 The following commits were skipped: bc10e467f1 Backport: Rectify allout-widgets region undecoration so it... 82742e295d Backport: Resolve missing button-region keymap bindings. 2035ecca57 Backport: Provide missing let definition to prevent backgr... 3071cecda0 Backport: Don't let item decoration be disrupted by too-sh... 044960ead2 Backport: Fix allout-widgets-mode handling of edits to ite... commit 687a9d3e2fca5f207ec3bd6acf744d0c0cd96962 Author: Mattias Engdegård Date: Wed Jul 22 11:27:15 2020 +0200 Calc: fix interval entry snag (bug#42438) * lisp/calc/calc.el (calcDigit-key): Don't signal a 'Bad format' error when entering '..' after pushing an incomplete interval. Reported by Allen Li. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 4e4fb67173..09b4962107 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -2429,7 +2429,7 @@ the United States." (if (and (memq last-command-event '(?@ ?o ?h ?\' ?m)) (string-match " " calc-hms-format)) (insert " ")) - (if (and (eq this-command last-command) + (if (and (memq last-command '(calcDigit-start calcDigit-key)) (eq last-command-event ?.)) (progn (require 'calc-ext) commit 8bc8565721739510b3286838f1534f29b8869fc4 Author: Ken Manheimer Date: Tue Jul 21 10:57:29 2020 -0400 Revert "Rectify allout-widgets region undecoration so item at start is not missed." This reverts commit 33d85cb768b40794bffcd9ab22fbdec1211a74e5. Backporting it to emacs-27 was not appropriate. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index bdfcaa2e55..fbdddca7d7 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -2050,22 +2050,19 @@ Optional FORCE means force reassignment of the region property." ;;;_ > allout-widgets-undecorate-region (start end) (defun allout-widgets-undecorate-region (start end) "Eliminate widgets and decorations for all items in region from START to END." - (let (done next widget - (end (or end (point-max)))) + (let ((next start) + widget) (save-excursion (goto-char start) - (while (not done) - (when (and (allout-on-current-heading-p) - (setq widget (allout-get-item-widget))) - (if widget - (allout-widgets-undecorate-item widget t))) - (goto-char (setq next - (next-single-char-property-change (point) - 'display - (current-buffer) - end))) - (if (>= next end) - (setq done t)))))) + (while (< (setq next (next-single-char-property-change next + 'display + (current-buffer) + end)) + end) + (goto-char next) + (when (setq widget (allout-get-item-widget)) + ;; if the next-property/overly progression got us to a widget: + (allout-widgets-undecorate-item widget t)))))) ;;;_ > allout-widgets-undecorate-text (text) (defun allout-widgets-undecorate-text (text) "Eliminate widgets and decorations for all items in TEXT." commit db479d635411e352529cb9378f0455b2abb2637f Author: Ken Manheimer Date: Tue Jul 21 10:56:55 2020 -0400 Revert "Resolve missing button-region keymap bindings." This reverts commit dd7c191291c8eb1afeac0f1512745491c5c7a317. Backporting it to emacs-27 was not appropriate. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 629f6762dd..bdfcaa2e55 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -415,17 +415,15 @@ not altered with an escape sequence.") ;;;_ , Widget element formatting ;;;_ = allout-item-icon-keymap (defvar allout-item-icon-keymap - (let ((km (make-sparse-keymap)) - (as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - ;; The keymap parent is reset on the each local var when mode starts. - (set-keymap-parent km as-parent) + (let ((km (make-sparse-keymap))) (dolist (digit '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")) (define-key km digit 'digit-argument)) (define-key km "-" 'negative-argument) +;; (define-key km [(return)] 'allout-tree-expand-command) +;; (define-key km [(meta return)] 'allout-toggle-torso-command) +;; (define-key km [(down-mouse-1)] 'allout-item-button-click) +;; (define-key km [(down-mouse-2)] 'allout-toggle-torso-event-command) ;; Override underlying mouse-1 and mouse-2 bindings in icon territory: (define-key km [(mouse-1)] (lambda () (interactive) nil)) (define-key km [(mouse-2)] (lambda () (interactive) nil)) @@ -435,16 +433,17 @@ not altered with an escape sequence.") km) "General tree-node key bindings.") -(make-variable-buffer-local 'allout-item-icon-keymap) ;;;_ = allout-item-body-keymap (defvar allout-item-body-keymap (let ((km (make-sparse-keymap)) - (as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - ;; The keymap parent is reset on the each local var when mode starts. - (set-keymap-parent km as-parent) + (local-map (current-local-map))) +;; (define-key km [(control return)] 'allout-tree-expand-command) +;; (define-key km [(meta return)] 'allout-toggle-torso-command) + ;; XXX We need to reset this per buffer's mode; we do so in + ;; allout-widgets-mode. + (if local-map + (set-keymap-parent km local-map)) + km) "General key bindings for the text content of outline items.") (make-variable-buffer-local 'allout-item-body-keymap) @@ -457,7 +456,6 @@ not altered with an escape sequence.") (set-keymap-parent km allout-item-icon-keymap) km) "Keymap used in the item cue area - the space between the icon and headline.") -(make-variable-buffer-local 'allout-cue-span-keymap) ;;;_ = allout-escapes-category (defvar allout-escapes-category nil "Symbol for category of text property used to hide escapes of prefix-like @@ -568,13 +566,8 @@ outline hot-spot navigation (see `allout-mode')." (add-to-invisibility-spec '(allout-torso . t)) (add-to-invisibility-spec 'allout-escapes) - (let ((as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - (set-keymap-parent allout-item-body-keymap as-parent) - ;; allout-cue-span-keymap uses allout-item-icon-keymap as parent. - (set-keymap-parent allout-item-icon-keymap as-parent)) + (if (current-local-map) + (set-keymap-parent allout-item-body-keymap (current-local-map))) (add-hook 'allout-exposure-change-functions 'allout-widgets-exposure-change-recorder nil 'local) commit 259dc75c231faf83c771dbd0b3472592c06d64b0 Author: Ken Manheimer Date: Tue Jul 21 10:55:35 2020 -0400 Revert "Provide missing let definition to prevent background void-variable error." This reverts commit 3c410b6b4753e02269bb36914e7534eb124150dd. Backporting it to emacs-27 was not appropriate. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index f817876d71..629f6762dd 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -995,7 +995,6 @@ Generally invoked via `allout-exposure-change-functions'." ;; have to distinguish between concealing and exposing so that, eg, ;; `allout-expose-topic's mix is handled properly. handled-expose - handled-conceal covered deactivate-mark) commit 56422a6366ed6a76cb9f52d9be315483d0506760 Author: Ken Manheimer Date: Tue Jul 21 10:55:08 2020 -0400 Revert "Don't let item decoration be disrupted by too-shallow items." This reverts commit 8684216542889fa57daa32072104afc69785907f. Backporting it to emacs-27 was not appropriate. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index aac4a89fad..f817876d71 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1602,10 +1602,7 @@ We return the item-widget corresponding to the item at point." (if is-container (progn (widget-put item-widget :is-container t) (setq reverse-siblings-chart (list 1))) - (let ((parent-position (widget-apply parent - :actual-position :from))) - (when parent-position - (goto-char parent-position))) + (goto-char (widget-apply parent :actual-position :from)) (if (widget-get parent :is-container) ;; `allout-goto-prefix' will go to first non-container item: (allout-goto-prefix) @@ -2403,7 +2400,7 @@ The elements of LIST are not copied, just the list structure itself." ;;;_ : provide (provide 'allout-widgets) -;;;_ . Local emacs vars. -;;;_ , Local variables: -;;;_ , allout-layout: (-1 : 0) -;;;_ , End: +;;;_. Local emacs vars. +;;;_ , Local variables: +;;;_ , allout-layout: (-1 : 0) +;;;_ , End: commit 8e4eae0ce3702d3dc2dc36f9f144f11c98f02339 Author: Ken Manheimer Date: Tue Jul 21 10:52:50 2020 -0400 Revert "Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)" This reverts commit 8e13d332481551e4c8c1c66dd0c69dd09256dffc. Backporting it to emacs-27 was not appropriate. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 2a8dced5e9..aac4a89fad 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -684,7 +684,7 @@ outline hot-spot navigation (see `allout-mode')." (setplist 'allout-cue-span-category nil) (put 'allout-cue-span-category 'evaporate t) (put 'allout-cue-span-category - 'modification-hooks '(allout-graphics-modification-handler)) + 'modification-hooks '(allout-body-modification-handler)) (put 'allout-cue-span-category 'local-map allout-cue-span-keymap) (put 'allout-cue-span-category 'mouse-face widget-button-face) (put 'allout-cue-span-category 'pointer 'arrow) @@ -2005,7 +2005,8 @@ reapplying this method will rectify the glyphs." ;; NOTE: most of the cue-area (when (not (widget-get item-widget :is-container)) - (let* ((cue-start (widget-get item-widget :icon-end)) + (let* ((cue-start (or (widget-get item-widget :distinctive-end) + (widget-get item-widget :icon-end))) (body-start (widget-get item-widget :body-start)) ;(expanded (widget-get item-widget :expanded)) ;(has-subitems (widget-get item-widget :has-subitems)) commit 4db3235fd8a99f20de414372524948982b23d1fc Author: Robert Pluim Date: Tue Jul 21 16:37:59 2020 +0200 Run custom-magic-reset in the customize buffer If the user has navigated away from the customize buffer, then clicking on a widget in the customize buffer applies changes in the selected buffer rather than in the customize buffer. Pass the customize buffer to 'custom-magic-reset' to avoid this. * lisp/cus-edit.el (custom-magic-reset): Add optional buffer argument, apply changes in that buffer. (custom-notify): Pass the buffer containing the widget to 'custom-magic-reset'. (Bug#40788) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d3d17fda7a..490d9055ec 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2102,11 +2102,12 @@ and `face'." (insert " ")) (widget-put widget :children children)))) -(defun custom-magic-reset (widget) +(defun custom-magic-reset (widget &optional buffer) "Redraw the :custom-magic property of WIDGET." (let ((magic (widget-get widget :custom-magic))) (when magic - (widget-value-set magic (widget-value magic))))) + (with-current-buffer (or buffer (current-buffer)) + (widget-value-set magic (widget-value magic)))))) ;;; The `custom' Widget. @@ -2217,7 +2218,7 @@ and `face'." ;; commands like `M-u' (that work on a region in the buffer) ;; will upcase the wrong part of the buffer, since more text has ;; been inserted before point. - (run-with-idle-timer 0.0 nil #'custom-magic-reset widget) + (run-with-idle-timer 0.0 nil #'custom-magic-reset widget (current-buffer)) (apply 'widget-default-notify widget args)))) (defun custom-redraw (widget) commit 3c9c3f04dec596da22aadefaafa4e6ff3687aa4d Author: Robert Pluim Date: Tue Jul 21 09:54:58 2020 +0200 ; spelling fix diff --git a/CONTRIBUTE b/CONTRIBUTE index 26efbd7e5a..4e42c7aafc 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -63,7 +63,7 @@ also possible to use a command like However, we prefer the 'git format-patch' method with attachment, as doing so delivers patches in the correct and easily-recognizable format more reliably, and makes the job of applying the patches easier and less -error-prone. It also allows to send patches whose author is someone +error-prone. It also allows sending patches whose author is someone other than the email sender. Once the cumulative amount of your submissions exceeds about 15 lines commit bc10e467f1c2b885637ef734afc331e6b2127373 Author: Ken Manheimer Date: Sun Jul 5 16:38:13 2020 -0400 Backport: Rectify allout-widgets region undecoration so item at start is not missed. * lisp/allout-widgets.el (allout-widgets-undecorate-region): Reorganize the loop so an item at the start is not skipped. (cherry picked from commit 33d85cb768b40794bffcd9ab22fbdec1211a74e5) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 5460551106..2a8dced5e9 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -2060,19 +2060,22 @@ Optional FORCE means force reassignment of the region property." ;;;_ > allout-widgets-undecorate-region (start end) (defun allout-widgets-undecorate-region (start end) "Eliminate widgets and decorations for all items in region from START to END." - (let ((next start) - widget) + (let (done next widget + (end (or end (point-max)))) (save-excursion (goto-char start) - (while (< (setq next (next-single-char-property-change next - 'display - (current-buffer) - end)) - end) - (goto-char next) - (when (setq widget (allout-get-item-widget)) - ;; if the next-property/overly progression got us to a widget: - (allout-widgets-undecorate-item widget t)))))) + (while (not done) + (when (and (allout-on-current-heading-p) + (setq widget (allout-get-item-widget))) + (if widget + (allout-widgets-undecorate-item widget t))) + (goto-char (setq next + (next-single-char-property-change (point) + 'display + (current-buffer) + end))) + (if (>= next end) + (setq done t)))))) ;;;_ > allout-widgets-undecorate-text (text) (defun allout-widgets-undecorate-text (text) "Eliminate widgets and decorations for all items in TEXT." commit 82742e295d2907bb2f56090296f7a128f1f3d6aa Author: Ken Manheimer Date: Tue Jul 7 10:32:03 2020 -0400 Backport: Resolve missing button-region keymap bindings. * lisp/allout-widgets.el (allout-item-icon-keymap, allout-item-body-keymap, allout-cue-span-keymap, allout-widgets-mode): Inherit from both (current-local-map) and (current-global-map). This provides for missing global bindings when inheriting from just (current-local-map), eg Esc-<. (cherry picked from commit dd7c191291c8eb1afeac0f1512745491c5c7a317) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 64f2ba500d..5460551106 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -415,15 +415,17 @@ not altered with an escape sequence.") ;;;_ , Widget element formatting ;;;_ = allout-item-icon-keymap (defvar allout-item-icon-keymap - (let ((km (make-sparse-keymap))) + (let ((km (make-sparse-keymap)) + (as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + ;; The keymap parent is reset on the each local var when mode starts. + (set-keymap-parent km as-parent) (dolist (digit '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")) (define-key km digit 'digit-argument)) (define-key km "-" 'negative-argument) -;; (define-key km [(return)] 'allout-tree-expand-command) -;; (define-key km [(meta return)] 'allout-toggle-torso-command) -;; (define-key km [(down-mouse-1)] 'allout-item-button-click) -;; (define-key km [(down-mouse-2)] 'allout-toggle-torso-event-command) ;; Override underlying mouse-1 and mouse-2 bindings in icon territory: (define-key km [(mouse-1)] (lambda () (interactive) nil)) (define-key km [(mouse-2)] (lambda () (interactive) nil)) @@ -433,17 +435,16 @@ not altered with an escape sequence.") km) "General tree-node key bindings.") +(make-variable-buffer-local 'allout-item-icon-keymap) ;;;_ = allout-item-body-keymap (defvar allout-item-body-keymap (let ((km (make-sparse-keymap)) - (local-map (current-local-map))) -;; (define-key km [(control return)] 'allout-tree-expand-command) -;; (define-key km [(meta return)] 'allout-toggle-torso-command) - ;; XXX We need to reset this per buffer's mode; we do so in - ;; allout-widgets-mode. - (if local-map - (set-keymap-parent km local-map)) - + (as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + ;; The keymap parent is reset on the each local var when mode starts. + (set-keymap-parent km as-parent) km) "General key bindings for the text content of outline items.") (make-variable-buffer-local 'allout-item-body-keymap) @@ -456,6 +457,7 @@ not altered with an escape sequence.") (set-keymap-parent km allout-item-icon-keymap) km) "Keymap used in the item cue area - the space between the icon and headline.") +(make-variable-buffer-local 'allout-cue-span-keymap) ;;;_ = allout-escapes-category (defvar allout-escapes-category nil "Symbol for category of text property used to hide escapes of prefix-like @@ -566,8 +568,13 @@ outline hot-spot navigation (see `allout-mode')." (add-to-invisibility-spec '(allout-torso . t)) (add-to-invisibility-spec 'allout-escapes) - (if (current-local-map) - (set-keymap-parent allout-item-body-keymap (current-local-map))) + (let ((as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + (set-keymap-parent allout-item-body-keymap as-parent) + ;; allout-cue-span-keymap uses allout-item-icon-keymap as parent. + (set-keymap-parent allout-item-icon-keymap as-parent)) (add-hook 'allout-exposure-change-functions 'allout-widgets-exposure-change-recorder nil 'local) commit 2035ecca578f3cbcc96c314e16e21be51ddea98d Author: Ken Manheimer Date: Mon Jul 6 13:19:11 2020 -0400 Backport: Provide missing let definition to prevent background void-variable error. * lisp/allout-widgets.el (allout-widgets-exposure-change-processor) Let-declare handled-conceal, for reference through `(symbol-value)' within the let body. (Because the error happens in an after-change-functions hook, so it is caught and reported as a message by allout-widgets-hook-error-handler.) (cherry picked from commit 3c410b6b4753e02269bb36914e7534eb124150dd) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index e7750b3606..64f2ba500d 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -988,6 +988,7 @@ Generally invoked via `allout-exposure-change-functions'." ;; have to distinguish between concealing and exposing so that, eg, ;; `allout-expose-topic's mix is handled properly. handled-expose + handled-conceal covered deactivate-mark) commit 3071cecda070b0a4808eeca8009a5dc088606ec6 Author: Ken Manheimer Date: Mon Jul 6 14:18:57 2020 -0400 Backport: Don't let item decoration be disrupted by too-shallow items. * lisp/allout-widgets.el (allout-decorate-item-and-context): Check for parent-position having value before using it. Also, shift local emacs vars topic deeper so it doesn't constitute an instance of that particular aberrant case. (cherry picked from commit 8684216542889fa57daa32072104afc69785907f) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 3c6a05cbbc..e7750b3606 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1594,7 +1594,10 @@ We return the item-widget corresponding to the item at point." (if is-container (progn (widget-put item-widget :is-container t) (setq reverse-siblings-chart (list 1))) - (goto-char (widget-apply parent :actual-position :from)) + (let ((parent-position (widget-apply parent + :actual-position :from))) + (when parent-position + (goto-char parent-position))) (if (widget-get parent :is-container) ;; `allout-goto-prefix' will go to first non-container item: (allout-goto-prefix) @@ -2388,7 +2391,7 @@ The elements of LIST are not copied, just the list structure itself." ;;;_ : provide (provide 'allout-widgets) -;;;_. Local emacs vars. -;;;_ , Local variables: -;;;_ , allout-layout: (-1 : 0) -;;;_ , End: +;;;_ . Local emacs vars. +;;;_ , Local variables: +;;;_ , allout-layout: (-1 : 0) +;;;_ , End: commit 044960ead25e5e7a9da9ebcd2103e39d4142e1e4 Author: Ken Manheimer Date: Sun Jul 5 16:27:52 2020 -0400 Backport: Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312) * lisp/allout-widgets.el (allout-decorate-item-cue): Properly decorate item cue span. (allout-setup-text-properties): use allout-graphics-modification-handler as allout-cue-span-category modification hook. (cherry picked from commit 8e13d332481551e4c8c1c66dd0c69dd09256dffc) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index fbdddca7d7..3c6a05cbbc 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -677,7 +677,7 @@ outline hot-spot navigation (see `allout-mode')." (setplist 'allout-cue-span-category nil) (put 'allout-cue-span-category 'evaporate t) (put 'allout-cue-span-category - 'modification-hooks '(allout-body-modification-handler)) + 'modification-hooks '(allout-graphics-modification-handler)) (put 'allout-cue-span-category 'local-map allout-cue-span-keymap) (put 'allout-cue-span-category 'mouse-face widget-button-face) (put 'allout-cue-span-category 'pointer 'arrow) @@ -1994,8 +1994,7 @@ reapplying this method will rectify the glyphs." ;; NOTE: most of the cue-area (when (not (widget-get item-widget :is-container)) - (let* ((cue-start (or (widget-get item-widget :distinctive-end) - (widget-get item-widget :icon-end))) + (let* ((cue-start (widget-get item-widget :icon-end)) (body-start (widget-get item-widget :body-start)) ;(expanded (widget-get item-widget :expanded)) ;(has-subitems (widget-get item-widget :has-subitems)) commit 33d85cb768b40794bffcd9ab22fbdec1211a74e5 Author: Ken Manheimer Date: Sun Jul 5 16:38:13 2020 -0400 Rectify allout-widgets region undecoration so item at start is not missed. * lisp/allout-widgets.el (allout-widgets-undecorate-region): Reorganize the loop so an item at the start is not skipped. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 5460551106..2a8dced5e9 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -2060,19 +2060,22 @@ Optional FORCE means force reassignment of the region property." ;;;_ > allout-widgets-undecorate-region (start end) (defun allout-widgets-undecorate-region (start end) "Eliminate widgets and decorations for all items in region from START to END." - (let ((next start) - widget) + (let (done next widget + (end (or end (point-max)))) (save-excursion (goto-char start) - (while (< (setq next (next-single-char-property-change next - 'display - (current-buffer) - end)) - end) - (goto-char next) - (when (setq widget (allout-get-item-widget)) - ;; if the next-property/overly progression got us to a widget: - (allout-widgets-undecorate-item widget t)))))) + (while (not done) + (when (and (allout-on-current-heading-p) + (setq widget (allout-get-item-widget))) + (if widget + (allout-widgets-undecorate-item widget t))) + (goto-char (setq next + (next-single-char-property-change (point) + 'display + (current-buffer) + end))) + (if (>= next end) + (setq done t)))))) ;;;_ > allout-widgets-undecorate-text (text) (defun allout-widgets-undecorate-text (text) "Eliminate widgets and decorations for all items in TEXT." commit dd7c191291c8eb1afeac0f1512745491c5c7a317 Author: Ken Manheimer Date: Tue Jul 7 10:32:03 2020 -0400 Resolve missing button-region keymap bindings. * lisp/allout-widgets.el (allout-item-icon-keymap, allout-item-body-keymap, allout-cue-span-keymap, allout-widgets-mode): Inherit from both (current-local-map) and (current-global-map). This provides for missing global bindings when inheriting from just (current-local-map), eg Esc-<. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 64f2ba500d..5460551106 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -415,15 +415,17 @@ not altered with an escape sequence.") ;;;_ , Widget element formatting ;;;_ = allout-item-icon-keymap (defvar allout-item-icon-keymap - (let ((km (make-sparse-keymap))) + (let ((km (make-sparse-keymap)) + (as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + ;; The keymap parent is reset on the each local var when mode starts. + (set-keymap-parent km as-parent) (dolist (digit '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")) (define-key km digit 'digit-argument)) (define-key km "-" 'negative-argument) -;; (define-key km [(return)] 'allout-tree-expand-command) -;; (define-key km [(meta return)] 'allout-toggle-torso-command) -;; (define-key km [(down-mouse-1)] 'allout-item-button-click) -;; (define-key km [(down-mouse-2)] 'allout-toggle-torso-event-command) ;; Override underlying mouse-1 and mouse-2 bindings in icon territory: (define-key km [(mouse-1)] (lambda () (interactive) nil)) (define-key km [(mouse-2)] (lambda () (interactive) nil)) @@ -433,17 +435,16 @@ not altered with an escape sequence.") km) "General tree-node key bindings.") +(make-variable-buffer-local 'allout-item-icon-keymap) ;;;_ = allout-item-body-keymap (defvar allout-item-body-keymap (let ((km (make-sparse-keymap)) - (local-map (current-local-map))) -;; (define-key km [(control return)] 'allout-tree-expand-command) -;; (define-key km [(meta return)] 'allout-toggle-torso-command) - ;; XXX We need to reset this per buffer's mode; we do so in - ;; allout-widgets-mode. - (if local-map - (set-keymap-parent km local-map)) - + (as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + ;; The keymap parent is reset on the each local var when mode starts. + (set-keymap-parent km as-parent) km) "General key bindings for the text content of outline items.") (make-variable-buffer-local 'allout-item-body-keymap) @@ -456,6 +457,7 @@ not altered with an escape sequence.") (set-keymap-parent km allout-item-icon-keymap) km) "Keymap used in the item cue area - the space between the icon and headline.") +(make-variable-buffer-local 'allout-cue-span-keymap) ;;;_ = allout-escapes-category (defvar allout-escapes-category nil "Symbol for category of text property used to hide escapes of prefix-like @@ -566,8 +568,13 @@ outline hot-spot navigation (see `allout-mode')." (add-to-invisibility-spec '(allout-torso . t)) (add-to-invisibility-spec 'allout-escapes) - (if (current-local-map) - (set-keymap-parent allout-item-body-keymap (current-local-map))) + (let ((as-parent (if (current-local-map) + (make-composed-keymap (current-local-map) + (current-global-map)) + (current-global-map)))) + (set-keymap-parent allout-item-body-keymap as-parent) + ;; allout-cue-span-keymap uses allout-item-icon-keymap as parent. + (set-keymap-parent allout-item-icon-keymap as-parent)) (add-hook 'allout-exposure-change-functions 'allout-widgets-exposure-change-recorder nil 'local) commit 3c410b6b4753e02269bb36914e7534eb124150dd Author: Ken Manheimer Date: Mon Jul 6 13:19:11 2020 -0400 Provide missing let definition to prevent background void-variable error. * lisp/allout-widgets.el (allout-widgets-exposure-change-processor) Let-declare handled-conceal, for reference through `(symbol-value)' within the let body. (Because the error happens in an after-change-functions hook, so it is caught and reported as a message by allout-widgets-hook-error-handler.) diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index e7750b3606..64f2ba500d 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -988,6 +988,7 @@ Generally invoked via `allout-exposure-change-functions'." ;; have to distinguish between concealing and exposing so that, eg, ;; `allout-expose-topic's mix is handled properly. handled-expose + handled-conceal covered deactivate-mark) commit 8684216542889fa57daa32072104afc69785907f Author: Ken Manheimer Date: Mon Jul 6 14:18:57 2020 -0400 Don't let item decoration be disrupted by too-shallow items. * lisp/allout-widgets.el (allout-decorate-item-and-context): Check for parent-position having value before using it. Also, shift local emacs vars topic deeper so it doesn't constitute an instance of that particular aberrant case. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 3c6a05cbbc..e7750b3606 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1594,7 +1594,10 @@ We return the item-widget corresponding to the item at point." (if is-container (progn (widget-put item-widget :is-container t) (setq reverse-siblings-chart (list 1))) - (goto-char (widget-apply parent :actual-position :from)) + (let ((parent-position (widget-apply parent + :actual-position :from))) + (when parent-position + (goto-char parent-position))) (if (widget-get parent :is-container) ;; `allout-goto-prefix' will go to first non-container item: (allout-goto-prefix) @@ -2388,7 +2391,7 @@ The elements of LIST are not copied, just the list structure itself." ;;;_ : provide (provide 'allout-widgets) -;;;_. Local emacs vars. -;;;_ , Local variables: -;;;_ , allout-layout: (-1 : 0) -;;;_ , End: +;;;_ . Local emacs vars. +;;;_ , Local variables: +;;;_ , allout-layout: (-1 : 0) +;;;_ , End: commit 8e13d332481551e4c8c1c66dd0c69dd09256dffc Author: Ken Manheimer Date: Sun Jul 5 16:27:52 2020 -0400 Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312) * lisp/allout-widgets.el (allout-decorate-item-cue): Properly decorate item cue span. (allout-setup-text-properties): use allout-graphics-modification-handler as allout-cue-span-category modification hook. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index fbdddca7d7..3c6a05cbbc 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -677,7 +677,7 @@ outline hot-spot navigation (see `allout-mode')." (setplist 'allout-cue-span-category nil) (put 'allout-cue-span-category 'evaporate t) (put 'allout-cue-span-category - 'modification-hooks '(allout-body-modification-handler)) + 'modification-hooks '(allout-graphics-modification-handler)) (put 'allout-cue-span-category 'local-map allout-cue-span-keymap) (put 'allout-cue-span-category 'mouse-face widget-button-face) (put 'allout-cue-span-category 'pointer 'arrow) @@ -1994,8 +1994,7 @@ reapplying this method will rectify the glyphs." ;; NOTE: most of the cue-area (when (not (widget-get item-widget :is-container)) - (let* ((cue-start (or (widget-get item-widget :distinctive-end) - (widget-get item-widget :icon-end))) + (let* ((cue-start (widget-get item-widget :icon-end)) (body-start (widget-get item-widget :body-start)) ;(expanded (widget-get item-widget :expanded)) ;(has-subitems (widget-get item-widget :has-subitems)) commit fe2d0ede2874a5411d14e1cad3d72883823719c1 Merge: 0cbafc236b cd93debc60 Author: Glenn Morris Date: Mon Jul 20 07:50:44 2020 -0700 Merge from origin/emacs-27 cd93debc60 (origin/emacs-27) Merge branch 'emacs-27' of git.savannah.... 2c0c613ec5 Document prefix arg effects for 'epa-mail-{sign,encrypt}' 551123e0b2 * etc/NEWS: Correct description of :client-certificate change 05c4329cf5 Revert "Fix filename completion in shell mode buffers" de68572742 Improve documentation of 'bookmark-bmenu-mode' fd85e70be7 Update systems using GnuTLS certificate files 0d4ba1c2b2 Improve documentation of 'kill-emacs' b3bbd4fd00 Improve documentation of 'display-raw-bytes-as-hex' f50d79af6b Correct descriptions of init file e325d2638c Fix interrupt-process on MS-Windows d24e56a5e4 Revert "* doc/misc/flymake.texi (An annotated example back... # Conflicts: # etc/NEWS commit cd93debc600b31ec7d257ba0195ae7132df83816 Merge: 05c4329cf5 2c0c613ec5 Author: Eli Zaretskii Date: Mon Jul 20 17:31:50 2020 +0300 Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27 commit 0cbafc236bde83ff1600c1e51408e5d0dd3d1a92 Author: Michael Albinus Date: Mon Jul 20 16:29:38 2020 +0200 Fix problem with Tramp progress reporter * lisp/net/tramp.el (with-tramp-progress-reporter): Do not span a new progress reporter if there's already another one. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cd35e3f5dc..19cf333450 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2012,9 +2012,11 @@ without a visible progress reporter." (tramp-message ,vec ,level "%s..." ,message) (let ((cookie "failed") (tm - ;; We start a pulsing progress reporter after 3 - ;; seconds. Display only when there is a minimum level. - (when-let ((pr (and (<= ,level (min tramp-verbose 3)) + ;; We start a pulsing progress reporter after 3 seconds. + ;; Start only when there is no other progress reporter + ;; running, and when there is a minimum level. + (when-let ((pr (and (null tramp-inhibit-progress-reporter) + (<= ,level (min tramp-verbose 3)) (make-progress-reporter ,message nil nil)))) (run-at-time 3 0.1 #'tramp-progress-reporter-update pr)))) (unwind-protect commit 2c0c613ec55051f7e7ecb2301a8d10a5a077590b Author: Robert Pluim Date: Mon Jul 20 14:47:43 2020 +0200 Document prefix arg effects for 'epa-mail-{sign,encrypt}' * doc/misc/epa.texi (Mail-mode integration): Describe effect of prefix arg to 'epa-mail-encrypt' and 'epa-mail-sign'. * lisp/epa-mail.el (epa-mail-sign): Describe effect of prefix arg. diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 49b6b53c0c..fa1833a3da 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -337,7 +337,8 @@ Verify OpenPGP cleartext signed messages in the current buffer. @kindex C-c C-e C-s @kindex C-c C-e s @findex epa-mail-sign -Compose a signed message from the current buffer. +Compose a signed message from the current buffer, using your default +key. With a prefix argument, select the key to use interactively. @item C-c C-e C-e and C-c C-e e @kindex C-c C-e C-e @@ -352,6 +353,8 @@ key in the recipient list, use @samp{encrypt-to} option in addresses using the @code{epa-mail-aliases} list. You can also use that option to ignore specific recipients for encryption purposes. +With prefix argument, asks you to select the recipients interactively, +whether to sign, and which key(s) to sign with. @end table @node Encrypting/decrypting gpg files, , Mail-mode integration, Commands diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 00f560af0b..63475256ca 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -85,7 +85,10 @@ The buffer is expected to contain a mail message." ;;;###autoload (defun epa-mail-sign (start end signers mode) "Sign the current buffer. -The buffer is expected to contain a mail message." +The buffer is expected to contain a mail message, and signing is +performed with your default key. +With prefix argument, asks you to select interactively the key to +use from your key ring." (declare (interactive-only t)) (interactive (save-excursion commit 551123e0b272c967b8cd042df39947c0f8ad4b40 Author: Robert Pluim Date: Mon Jul 20 14:39:25 2020 +0200 * etc/NEWS: Correct description of :client-certificate change diff --git a/etc/NEWS b/etc/NEWS index 10a6e3946e..2c8fa9dd39 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -270,7 +270,7 @@ doing before changing the value. +++ ** Native GnuTLS connections can now use client certificates. Previously, this support was only available when using the external -'gnutls-cli' command. Call 'open-network-stream' with +'gnutls-cli' or 'starttls' command. Call 'open-network-stream' with ':client-certificate t' to trigger looking up of per-server certificates via 'auth-source'. commit 44d2368ca12b4de8ee67a92cb20a115fe955d819 Author: Lars Ingebrigtsen Date: Mon Jul 20 12:21:39 2020 +0200 Make xwidget-webkit-browse-url slightly more DWIM * lisp/xwidget.el (xwidget-webkit-browse-url): Prepend "https" to URLs that don't have a protocol (bug#31369). diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 775dddf8ef..aed6c09122 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -92,6 +92,9 @@ Interactively, URL defaults to the string looking like a url around point." (or (featurep 'xwidget-internal) (user-error "Your Emacs was not compiled with xwidgets support")) (when (stringp url) + ;; If it's a "naked url", just try adding https: to it. + (unless (string-match "\\`[A-Za-z]+:" url) + (setq url (concat "https://" url))) (if new-session (xwidget-webkit-new-session url) (xwidget-webkit-goto-url url)))) commit 1da5b3abd5e8b7c9b97f8ef3b472d3d724894d8b Author: Mattias Engdegård Date: Sun Jul 19 17:13:35 2020 +0200 Suppress relint false positive in gnus-start.el * lisp/gnus/gnus-start.el (gnus-active-to-gnus-format): Add suppressive comment. Prepending "^to\\.\\|" is redundant when 'gnus-ignored-newsgroups' already matches that pattern, but adding logic here is not worth the trouble. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 78e07498de..ba8b91be5c 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2111,6 +2111,7 @@ The info element is shared with the same element of ((string= gnus-ignored-newsgroups "") (delete-matching-lines "^to\\.")) (t + ;; relint suppression: Duplicated alternative branch (delete-matching-lines (concat "^to\\.\\|" gnus-ignored-newsgroups)))) (goto-char (point-min)) commit 4c08c2f45b9bb0265f6d7c3529011dee1b18e843 Author: Dmitry Gutov Date: Mon Jul 20 04:07:11 2020 +0300 ; project.el: Talk about equality diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 49a773539c..a0930553bd 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -95,8 +95,11 @@ ;; ;; - Choose the format of the value that represents a project for your ;; backend (we call it project instance). Don't use any of the -;; formats from other backends. The value can be arbitrary, as long -;; as the datatype is something `cl-defmethod' can dispatch on. +;; formats from other backends. The format can be arbitrary, as long +;; as the datatype is something `cl-defmethod' can dispatch on. The +;; value should be stable (when compared with `equal') across +;; invocations, meaning calls to that function from buffers belonging +;; to the same project should return equal values. ;; ;; - Write a new function that will determine the current project ;; based on the directory and add it to `project-find-functions' commit 7259377d70252ac013ec64acc01ad74b628e30d8 Author: Dmitry Gutov Date: Mon Jul 20 03:58:08 2020 +0300 project.el: Add more docs and two new key bindings * lisp/progmodes/project.el: Add a longer description of the package and how to use it. (project-prefix-map): Add entries for 'project-or-external-find-file' and 'project-or-external-find-regexp'. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index db8e54b332..49a773539c 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -37,11 +37,29 @@ ;; current project, without having to know which package handles ;; detection of that project type, parsing its config files, etc. ;; -;; Infrastructure: +;; This file consists of following parts: ;; -;; Function `project-current', to determine the current project -;; instance, and 4 (at the moment) generic functions that act on it. -;; This list is to be extended in future versions. +;; Infrastructure (the public API): +;; +;; Function `project-current' that returns the current project +;; instance based on the value of the hook `project-find-functions', +;; and several generic functions that act on it. +;; +;; `project-root' must be defined for every project. +;; `project-files' can be overridden for performance purposes. +;; `project-ignores' and `project-external-roots' describe the project +;; files and its relations to external directories. `project-files' +;; should be consistent with `project-ignores'. +;; +;; This list can change in future versions. +;; +;; VC project: +;; +;; Originally conceived as an example implementation, now it's a +;; relatively fast backend that delegates to 'git ls-files' or 'hg +;; status' to list the project's files. It honors the VC ignore +;; files, but supports additions to the list using the user option +;; `project-vc-ignores' (usually through .dir-locals.el). ;; ;; Utils: ;; @@ -50,9 +68,46 @@ ;; ;; Commands: ;; -;; `project-find-file', `project-find-regexp' and -;; `project-or-external-find-regexp' use the current API, and thus -;; will work in any project that has an adapter. +;; `project-prefix-map' contains the full list of commands defined in +;; this package. This map uses the prefix `C-x p' by default. +;; Type `C-x p f' to find file in the current project. +;; Type `C-x p C-h' to see all available commands and bindings. +;; +;; All commands defined in this package are implemented using the +;; public API only. As a result, they will work with any project +;; backend that follows the protocol. +;; +;; Any third-party code that wants to use this package should likewise +;; target the public API. Use any of the built-in commands as the +;; example. +;; +;; How to create a new backend: +;; +;; - Consider whether you really should, or whether there are other +;; ways to reach your goals. If the backend's performance is +;; significantly lower than that of the built-in one, and it's first +;; in the list, it will affect all commands that use it. Unless you +;; are going to be using it only yourself or in special circumstances, +;; you will probably want it to be fast, and it's unlikely to be a +;; trivial endeavor. `project-files' is the method to optimize (the +;; default implementation gets slower the more files the directory +;; has, and the longer the list of ignores is). +;; +;; - Choose the format of the value that represents a project for your +;; backend (we call it project instance). Don't use any of the +;; formats from other backends. The value can be arbitrary, as long +;; as the datatype is something `cl-defmethod' can dispatch on. +;; +;; - Write a new function that will determine the current project +;; based on the directory and add it to `project-find-functions' +;; (which see) using `add-hook'. It is a good idea to depend on the +;; directory only, and not on the current major mode, for example. +;; Because the usual expectation is that all files in the directory +;; belong to the same project (even if some/most of them are ignored). +;; +;; - Define new methods for some or all generic functions for this +;; backend using `cl-defmethod'. A `project-root' method is +;; mandatory, `project-files' is recommended, the rest are optional. ;;; TODO: @@ -517,6 +572,7 @@ DIRS must contain directory names." (defvar project-prefix-map (let ((map (make-sparse-keymap))) (define-key map "f" 'project-find-file) + (define-key map "F" 'project-or-external-find-file) (define-key map "b" 'project-switch-to-buffer) (define-key map "s" 'project-shell) (define-key map "d" 'project-dired) @@ -526,6 +582,7 @@ DIRS must contain directory names." (define-key map "k" 'project-kill-buffers) (define-key map "p" 'project-switch-project) (define-key map "g" 'project-find-regexp) + (define-key map "G" 'project-or-external-find-regexp) (define-key map "r" 'project-query-replace-regexp) map) "Keymap for project commands.") commit 7a24cff1b2be9068a7c578360f6b51236105d98b Author: Lars Ingebrigtsen Date: Sun Jul 19 23:12:54 2020 +0200 Only kill url-retrieve-synchronously connections when we have a timeout * lisp/url/url.el (url-retrieve-synchronously): Only kill the connections when we have a timeout (bug#34607). diff --git a/lisp/url/url.el b/lisp/url/url.el index 367af1b5a9..321e79c019 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -238,7 +238,8 @@ how long to wait for a response before giving up." (let ((retrieval-done nil) (start-time (current-time)) (url-asynchronous nil) - (asynch-buffer nil)) + (asynch-buffer nil) + (timed-out nil)) (setq asynch-buffer (url-retrieve url (lambda (&rest ignored) (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer)) @@ -261,7 +262,9 @@ how long to wait for a response before giving up." ;; process output. (while (and (not retrieval-done) (or (not timeout) - (time-less-p (time-since start-time) timeout))) + (not (setq timed-out + (time-less-p timeout + (time-since start-time)))))) (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)" retrieval-done asynch-buffer) @@ -303,11 +306,12 @@ how long to wait for a response before giving up." (get-buffer-process asynch-buffer)))))) ;; On timeouts, make sure we kill any pending processes. ;; There may be more than one if we had a redirect. - (when (process-live-p proc) - (delete-process proc)) - (when-let ((aproc (get-buffer-process asynch-buffer))) - (when (process-live-p aproc) - (delete-process aproc))))) + (when timed-out + (when (process-live-p proc) + (delete-process proc)) + (when-let ((aproc (get-buffer-process asynch-buffer))) + (when (process-live-p aproc) + (delete-process aproc)))))) asynch-buffer)) ;; url-mm-callback called from url-mm, which requires mm-decode. commit 5d2bc1543925960009167988523d76fc6d4c805a Author: Lars Ingebrigtsen Date: Sun Jul 19 22:41:28 2020 +0200 Make timeouts work more reliably in url-retrieve-synchronously * lisp/url/url.el (url-retrieve-synchronously): Ensure that the processes have been killed on timeouts before returning the buffer (bug#34607). diff --git a/lisp/url/url.el b/lisp/url/url.el index 12a8a9c2e2..367af1b5a9 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -300,8 +300,15 @@ how long to wait for a response before giving up." (when quit-flag (delete-process proc)) (setq proc (and (not quit-flag) - (get-buffer-process asynch-buffer))))))) - asynch-buffer))) + (get-buffer-process asynch-buffer)))))) + ;; On timeouts, make sure we kill any pending processes. + ;; There may be more than one if we had a redirect. + (when (process-live-p proc) + (delete-process proc)) + (when-let ((aproc (get-buffer-process asynch-buffer))) + (when (process-live-p aproc) + (delete-process aproc))))) + asynch-buffer)) ;; url-mm-callback called from url-mm, which requires mm-decode. (declare-function mm-dissect-buffer "mm-decode" commit 5d2a83ea0e79308f85d06553483001b7cb2e3a14 Author: Daniele Nicolodi Date: Sun Jul 19 21:16:55 2020 +0200 url-http: Fix handling of redirect locations * lisp/url/url-http.el (url-http-parse-headers): Parse redirect URIs more like other web browsers (bug#42382). RFC 7231 the Location header is defined to carry a URI-reference. According to RFC 3986 it should be percent-encoded and thus should not contain spaces. However, there are HTTP server implementation (notably nginx) that do not do that. This makes Emacs url-http.el behave like most other HTTP client implementatios. Also remove the stripping of angle bracket quotes as they are not valid according to the RFCs. Copyright-paperwork-exempt: yes diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index c8a2da0546..8532da1d1f 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -702,15 +702,7 @@ should be shown to the user." ;; Treat everything like '300' nil)) (when redirect-uri - ;; Clean off any whitespace and/or <...> cruft. - (if (string-match "\\([^ \t]+\\)[ \t]" redirect-uri) - (setq redirect-uri (match-string 1 redirect-uri))) - (if (string-match "^<\\(.*\\)>$" redirect-uri) - (setq redirect-uri (match-string 1 redirect-uri))) - - ;; Some stupid sites (like sourceforge) send a - ;; non-fully-qualified URL (ie: /), which royally confuses - ;; the URL library. + ;; Handle relative redirect URIs. (if (not (string-match url-nonrelative-link redirect-uri)) ;; Be careful to use the real target URL, otherwise we may ;; compute the redirection relative to the URL of the proxy. commit f8f3e77fa83a3a97e5a0de8a7c75092cadf82627 Author: Satoshi Nakagawa Date: Sun Jul 19 21:12:08 2020 +0200 Support Proxy-Authorization in HTTPS CONNECT proxies * lisp/url/url-http.el (url-https-proxy-connect): Support CONNECT with Proxy-Authorization header (bug#42422). Copyright-paperwork-exempt: yes diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 669c24571f..c8a2da0546 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1404,13 +1404,22 @@ The return value of this function is the retrieval buffer." (defun url-https-proxy-connect (connection) (setq url-http-after-change-function 'url-https-proxy-after-change-function) - (process-send-string connection (format (concat "CONNECT %s:%d HTTP/1.1\r\n" - "Host: %s\r\n" - "\r\n") - (url-host url-current-object) - (or (url-port url-current-object) - url-https-default-port) - (url-host url-current-object)))) + (process-send-string + connection + (format + (concat "CONNECT %s:%d HTTP/1.1\r\n" + "Host: %s\r\n" + (let ((proxy-auth (let ((url-basic-auth-storage + 'url-http-proxy-basic-auth-storage)) + (url-get-authentication url-http-proxy nil + 'any nil)))) + (and proxy-auth + (concat "Proxy-Authorization: " proxy-auth "\r\n"))) + "\r\n") + (url-host url-current-object) + (or (url-port url-current-object) + url-https-default-port) + (url-host url-current-object)))) (defun url-https-proxy-after-change-function (_st _nd _length) (let* ((process-buffer (current-buffer)) commit 13ca719a68e02fa0901546f1de7b0a4331a75f9e Author: Michael Albinus Date: Sun Jul 19 19:34:16 2020 +0200 * lisp/net/tramp-adb.el (tramp-adb-prompt): Further simplification. Suggested by Mattias Engdegård . diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 25e4097a80..c1eb36e340 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -55,7 +55,7 @@ It is used for TCP/IP devices." "When this method name is used, forward all calls to Android Debug Bridge.") ;;;###tramp-autoload -(defcustom tramp-adb-prompt "^[^#\\$]*[#\\$][[:space:]]" +(defcustom tramp-adb-prompt "^[^#$\n\r]*[#$][[:space:]]" "Regexp used as prompt in almquist shell." :type 'regexp :version "28.1" commit abe9497d74d8b12cd21e278ffbb90e3c29f5bfa7 Author: Eric Abrahamsen Date: Sun Jul 19 16:15:33 2020 +0200 Complete over the MIME types in gnus-summary-save-parts * lisp/gnus/gnus-sum.el (gnus-summary-save-parts): Allow completing over the parts in the first article in the list of the process-marked articles (bug#39543). diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c5036c32d5..d731893ece 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12509,10 +12509,15 @@ save those articles instead." "Save parts matching TYPE to DIR. If REVERSE, save parts that do not match TYPE." (interactive - (list (read-string "Save parts of type: " - (or (car gnus-summary-save-parts-type-history) - gnus-summary-save-parts-default-mime) - 'gnus-summary-save-parts-type-history) + (list (completing-read "Save parts of type: " + (progn + (gnus-summary-select-article nil t) + (gnus-eval-in-buffer-window gnus-article-buffer + (delete-dups + (mapcar (lambda (h) + (mm-handle-media-type (cdr h))) + gnus-article-mime-handle-alist)))) + nil nil nil 'gnus-summary-save-parts-type-history) (setq gnus-summary-save-parts-last-directory (read-directory-name "Save to directory: " gnus-summary-save-parts-last-directory commit b89af662093939a8e852a7402d162d97135192c6 Author: Štěpán Němec Date: Sun Jul 19 16:05:11 2020 +0200 gnus-button-alist: Prefer URL links to Elisp library links * lisp/gnus/gnus-art.el (gnus-button-alist): Move the URL clauses higher up the list before library link setup to prevent URLs ending in ".el" from failing to be recognized (and invalid library links being created instead) (bug#39781). diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 3cba4ecead..cb20d7102b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -7725,6 +7725,15 @@ positives are possible." 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1) + ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)... + ("]*\\)>" + 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) + ;; RFC 2396 (2.4.3., delims) ... + ("\"URL: *\\([^\n\"]*\\)\"" + 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) + ;; Raw URLs. + (gnus-button-url-regexp + 0 (>= gnus-button-browse-level 0) browse-url-button-open-url 0) ;; The following entries may lead to many false positives so don't enable ;; them by default (use a high button level). ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" @@ -7748,15 +7757,6 @@ positives are possible." ;; Unlike the other regexps we really have to require quoting ;; here to determine where it ends. 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) - ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)... - ("]*\\)>" - 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) - ;; RFC 2396 (2.4.3., delims) ... - ("\"URL: *\\([^\n\"]*\\)\"" - 1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1) - ;; Raw URLs. - (gnus-button-url-regexp - 0 (>= gnus-button-browse-level 0) browse-url-button-open-url 0) ;; man pages ("\\b\\([a-z][a-z]+([1-9])\\)\\W" 0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3)) commit b2eec81fcdd6811953c082ff34f813160a721cf3 Author: Lars Ingebrigtsen Date: Sun Jul 19 15:46:17 2020 +0200 Do window configuration change before killing Gnus buffers on exit * lisp/gnus/gnus-sum.el (gnus-summary-exit): Do window configuration changes before killing off the summary buffer, so that the window conf machinery can return to a group-only configuration (bug#40069). diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 1b0220a0f0..c5036c32d5 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -7332,6 +7332,8 @@ If FORCE (the prefix), also save the .newsrc file(s)." (gnus-group-next-unread-group 1)) (setq group-point (point)) (gnus-article-stop-animations) + (unless leave-hidden + (gnus-configure-windows 'group 'force)) (if temporary nil ;Nothing to do. (set-buffer buf) @@ -7351,8 +7353,6 @@ If FORCE (the prefix), also save the .newsrc file(s)." (if quit-config (gnus-handle-ephemeral-exit quit-config) (goto-char group-point) - (unless leave-hidden - (gnus-configure-windows 'group 'force)) ;; If gnus-group-buffer is already displayed, make sure we also move ;; the cursor in the window that displays it. (let ((win (get-buffer-window (current-buffer) 0))) commit 00a97124203258fcbd08bdc9b719f15ab777f887 Author: Lars Ingebrigtsen Date: Sun Jul 19 15:18:23 2020 +0200 Allow adjusting the `W Q' Gnus summary command interactively * doc/misc/gnus.texi (Article Washing): Document it. * lisp/gnus/gnus-art.el (article-fill-long-lines): Take a numeric prefix as the fill width (bug#38698). diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 294d9590bc..2f4bc0cbf8 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -9060,6 +9060,9 @@ when filling. @findex gnus-article-fill-long-lines Fill long lines (@code{gnus-article-fill-long-lines}). +You can give the command a numerical prefix to specify the width to use +when filling. + @item W C @kindex W C @r{(Summary)} @findex gnus-article-capitalize-sentences diff --git a/etc/NEWS b/etc/NEWS index 7fbe63013e..7c6c9fe262 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -213,6 +213,10 @@ The names of the commands 'gnus-slave', 'gnus-slave-no-server' and 'gnus-slave-unplugged' have changed to 'gnus-child', 'gnus-child-no-server' and 'gnus-child-unplugged' respectively. ++++ +*** The 'W Q' summary mode command now takes a numerical prefix to +allow adjusting the fill width. + --- *** Change to default value of 'message-draft-headers' user option. The 'Date' symbol has been removed from the default value, meaning that diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 0c0c1bd0c0..3cba4ecead 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2303,21 +2303,27 @@ long lines if and only if arg is positive." "\n") (put-text-property start (point) 'gnus-decoration 'header))))) -(defun article-fill-long-lines () - "Fill lines that are wider than the window width or `fill-column'." - (interactive) +(defun article-fill-long-lines (&optional width) + "Fill lines that are wider than the window width or `fill-column'. +If WIDTH (interactively, the numeric prefix), use that as the +fill width." + (interactive "P") (save-excursion - (let ((inhibit-read-only t) - (width (window-width (get-buffer-window (current-buffer))))) + (let* ((inhibit-read-only t) + (window-width (window-width (get-buffer-window (current-buffer)))) + (width (if width + (prefix-numeric-value width) + (min fill-column window-width)))) (save-restriction (article-goto-body) (let ((adaptive-fill-mode nil)) ;Why? -sm (while (not (eobp)) (end-of-line) - (when (>= (current-column) (min fill-column width)) + (when (>= (current-column) width) (narrow-to-region (min (1+ (point)) (point-max)) (point-at-bol)) - (let ((goback (point-marker))) + (let ((goback (point-marker)) + (fill-column width)) (fill-paragraph nil) (goto-char (marker-position goback))) (widen)) commit 1fc9d0a79049bfbc18937fa3a3fb90f5103a2446 Author: Alan Mackenzie Date: Sun Jul 19 10:55:48 2020 +0000 Remove redundant code from c-font-lock-fontify-region * lisp/progmodes/cc-mode.el (c-font-lock-fontify-region): Remove variables string-fence-beg and lim, and the code used to calculate them. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 92c1ce89b8..81bcd101fe 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -2337,68 +2337,48 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") ;; line was fouled up by context fontification. (save-restriction (widen) - (let (new-beg new-end new-region case-fold-search string-fence-beg lim) - ;; Check how far back we need to extend the region where we reapply the - ;; string fence syntax-table properties. These must be in place for the - ;; coming fontification operations. - (save-excursion - (goto-char (if c-in-after-change-fontification - (min beg c-new-BEG) - beg)) - (setq lim (max (- (point) 500) (point-min))) - (while + (let (new-beg new-end new-region case-fold-search) + (c-save-buffer-state nil + ;; Temporarily reapply the string fence syntax-table properties. + (unwind-protect (progn - (skip-chars-backward "^\"" lim) - (or (bobp) (backward-char)) - (save-excursion - (eq (logand (skip-chars-backward "\\\\") 1) 1)))) - (setq string-fence-beg - (cond ((c-get-char-property (point) 'c-fl-syn-tab) - (point)) - (c-in-after-change-fontification - c-new-BEG) - (t beg))) - (c-save-buffer-state nil - ;; Temporarily reapply the string fence syntax-table properties. - (unwind-protect - (progn - (c-restore-string-fences) - (if (and c-in-after-change-fontification - (< beg c-new-END) (> end c-new-BEG)) - ;; Region and the latest after-change fontification region overlap. - ;; Determine the upper and lower bounds of our adjusted region - ;; separately. - (progn - (if (<= beg c-new-BEG) - (setq c-in-after-change-fontification nil)) - (setq new-beg - (if (and (>= beg (c-point 'bol c-new-BEG)) - (<= beg c-new-BEG)) - ;; Either jit-lock has accepted `c-new-BEG', or has - ;; (probably) extended the change region spuriously - ;; to BOL, which position likely has a - ;; syntactically different position. To ensure - ;; correct fontification, we start at `c-new-BEG', - ;; assuming any characters to the left of - ;; `c-new-BEG' on the line do not require - ;; fontification. - c-new-BEG - (setq new-region (c-before-context-fl-expand-region beg end) - new-end (cdr new-region)) - (car new-region))) - (setq new-end - (if (and (>= end (c-point 'bol c-new-END)) - (<= end c-new-END)) - c-new-END - (or new-end - (cdr (c-before-context-fl-expand-region beg end)))))) - ;; Context (etc.) fontification. - (setq new-region (c-before-context-fl-expand-region beg end) - new-beg (car new-region) new-end (cdr new-region))) - ;; Finally invoke font lock's functionality. - (funcall (default-value 'font-lock-fontify-region-function) - new-beg new-end verbose)) - (c-clear-string-fences))))))) + (c-restore-string-fences) + (if (and c-in-after-change-fontification + (< beg c-new-END) (> end c-new-BEG)) + ;; Region and the latest after-change fontification region overlap. + ;; Determine the upper and lower bounds of our adjusted region + ;; separately. + (progn + (if (<= beg c-new-BEG) + (setq c-in-after-change-fontification nil)) + (setq new-beg + (if (and (>= beg (c-point 'bol c-new-BEG)) + (<= beg c-new-BEG)) + ;; Either jit-lock has accepted `c-new-BEG', or has + ;; (probably) extended the change region spuriously + ;; to BOL, which position likely has a + ;; syntactically different position. To ensure + ;; correct fontification, we start at `c-new-BEG', + ;; assuming any characters to the left of + ;; `c-new-BEG' on the line do not require + ;; fontification. + c-new-BEG + (setq new-region (c-before-context-fl-expand-region beg end) + new-end (cdr new-region)) + (car new-region))) + (setq new-end + (if (and (>= end (c-point 'bol c-new-END)) + (<= end c-new-END)) + c-new-END + (or new-end + (cdr (c-before-context-fl-expand-region beg end)))))) + ;; Context (etc.) fontification. + (setq new-region (c-before-context-fl-expand-region beg end) + new-beg (car new-region) new-end (cdr new-region))) + ;; Finally invoke font lock's functionality. + (funcall (default-value 'font-lock-fontify-region-function) + new-beg new-end verbose)) + (c-clear-string-fences)))))) (defun c-after-font-lock-init () ;; Put on `font-lock-mode-hook'. This function ensures our after-change commit f700fc14822acf551dd2f8559a672991474b8358 Author: Philipp Stephani Date: Sun Jul 19 10:32:51 2020 +0200 Add missing 'require'. * lisp/progmodes/project.el: Require seq.el explicitly as 'seq-every-p' isn't autoloaded in Emacs 26.3. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 67ce3dc7d9..db8e54b332 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -91,6 +91,7 @@ ;;; Code: (require 'cl-generic) +(require 'seq) (eval-when-compile (require 'subr-x)) (defgroup project nil commit af5861569bf84572c318a630eca07ad657868612 Author: Kévin Le Gouguec Date: Sun Jul 19 04:34:22 2020 +0200 Simplify dummy root subject before comparing it to the current article * lisp/gnus/gnus-sum.el (gnus-summary-prepare-threads): Simplify both the dummy root and the following article before comparing them, otherwise both the former and the latter might display the thread's subject even when gnus-summary-line-format contains "%s" (bug#40520). diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 341f04ad77..1b0220a0f0 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5352,7 +5352,8 @@ or a straight list of headers." ;; We remember that we probably want to output a dummy ;; root. (setq gnus-tmp-dummy-line gnus-tmp-header) - (setq gnus-tmp-prev-subject gnus-tmp-header)) + (setq gnus-tmp-prev-subject + (gnus-simplify-subject-fully gnus-tmp-header))) (t ;; We do not make a root for the gathered ;; sub-threads at all. commit e68a455afbdf8f316b7f5259b0758ffae511fa52 Author: Lars Ingebrigtsen Date: Sun Jul 19 04:28:46 2020 +0200 Fix C-c C-f in the Gnus article buffer * lisp/gnus/gnus-art.el (gnus-article-mode-map): Make the C-c C-f command work in the article buffer, too (bug#40548). diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 925e48fd5c..0c0c1bd0c0 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4406,6 +4406,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is "e" gnus-article-read-summary-keys "\C-d" gnus-article-read-summary-keys + "\C-c\C-f" gnus-summary-mail-forward "\M-*" gnus-article-read-summary-keys "\M-#" gnus-article-read-summary-keys "\M-^" gnus-article-read-summary-keys @@ -6674,7 +6675,7 @@ not have a face in `gnus-article-boring-faces'." (interactive "P") (gnus-article-check-buffer) (let ((nosaves - '("q" "Q" "r" "\C-c\C-f" "m" "a" "f" "WDD" "WDW" + '("q" "Q" "r" "m" "a" "f" "WDD" "WDW" "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" "=" "^" "\M-^" "|")) (nosave-but-article commit e9d359af41b4b55390e36ea0aea1031f7029c9dd Author: Lars Ingebrigtsen Date: Sun Jul 19 03:49:16 2020 +0200 Mention the Emacs bug tracker in the bug reporting doc strings * lisp/gnus/gnus-msg.el (gnus-bug): Mention the Emacs bug tracker. * lisp/mail/emacsbug.el (report-emacs-bug): Link directly to the Emacs portion of the bug reports (bug#41109). diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index daaea3980b..cdfbf16db5 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1510,7 +1510,11 @@ If YANK is non-nil, include the original article." (gnus-inews-yank-articles (list (cdr gnus-article-current))))))) (defun gnus-bug (subject) - "Send a bug report to the Emacs maintainers." + "Send a bug report to the Emacs maintainers. + +Already submitted bugs can be found in the Emacs bug tracker: + + https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1" (interactive "sBug Subject: ") (report-emacs-bug subject) (save-excursion diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 7f3dc4454a..efbc066855 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -208,7 +208,11 @@ This requires either the macOS \"open\" command, or the freedesktop ;;;###autoload (defun report-emacs-bug (topic &optional unused) "Report a bug in GNU Emacs. -Prompts for bug subject. Leaves you in a mail buffer." +Prompts for bug subject. Leaves you in a mail buffer. + +Already submitted bugs can be found in the Emacs bug tracker: + + https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1" (declare (advertised-calling-convention (topic) "24.5")) (interactive "sBug Subject: ") ;; The syntax `version;' is preferred to `[version]' because the @@ -270,7 +274,7 @@ Prompts for bug subject. Leaves you in a mail buffer." 'face 'link 'help-echo (concat "mouse-2, RET: Follow this link") 'action (lambda (button) - (browse-url "https://debbugs.gnu.org/")) + (browse-url "https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1")) 'follow-link t) (insert ". Please check that commit 468b02a5dabe2413e7dcb0378000f3aa1d7e61fe Author: Lars Ingebrigtsen Date: Sun Jul 19 03:20:13 2020 +0200 Doc fix for article-fill-long-lines * lisp/gnus/gnus-art.el (article-fill-long-lines): Mention that it also respects `fill-column' (bug#41534). diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 614651afff..925e48fd5c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2304,7 +2304,7 @@ long lines if and only if arg is positive." (put-text-property start (point) 'gnus-decoration 'header))))) (defun article-fill-long-lines () - "Fill lines that are wider than the window width." + "Fill lines that are wider than the window width or `fill-column'." (interactive) (save-excursion (let ((inhibit-read-only t) commit 17f646128f04e9e8590f0371026a14d516f21c63 Author: Lars Ingebrigtsen Date: Sun Jul 19 02:56:40 2020 +0200 Allow open-network-stream to use different TLS capability commands * doc/lispref/processes.texi (Network): Document non-string capability command. * lisp/gnus/nntp.el (nntp-open-connection): Use HELP for Typhoon and CAPABILITIES for everything else (bug#41960). * lisp/net/network-stream.el (open-network-stream): Document function variety of :capability-command. (network-stream-open-starttls): Use it. (network-stream-open-tls): Ditto. (network-stream-open-shell): Ditto. (network-stream--capability-command): New helper function. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 22c5093618..4002004cd6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -2511,7 +2511,10 @@ If non-@code{nil}, always ask for the server's capabilities, even when doing a @samp{plain} connection. @item :capability-command @var{capability-command} -Command string to query the host capabilities. +Command to query the host capabilities. This can either be a string +(which will then be sent verbatim to the server), or a function +(called with a single parameter; the "greeting" from the server when +connecting), and should return a string. @item :end-of-command @var{regexp} @itemx :end-of-capability @var{regexp} diff --git a/etc/NEWS b/etc/NEWS index 7e6be00861..7fbe63013e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -686,6 +686,12 @@ This allows specifying the coding systems used by a network process for encoding and decoding without having to bind 'coding-system-for-{read,write}' or call 'set-process-coding-system'. ++++ +** 'open-network-stream' can now take a :capability-command that's a function. +The function is called with the greeting from the server as its only +parameter, and allows sending different TLS capability commands to the +server based on that greeting. + +++ ** 'open-gnutls-stream' now also accepts a ':coding' argument. diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 02d90603b4..a5c8244792 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1263,7 +1263,17 @@ If SEND-IF-FORCE, only send authinfo to the server if the "nntpd" pbuffer nntp-address nntp-port-number :type (cadr (assoc nntp-open-connection-function map)) :end-of-command "^\\([2345]\\|[.]\\).*\n" - :capability-command "HELP\r\n" + :capability-command + (lambda (greeting) + (if (and greeting + (string-match "Typhoon" greeting)) + ;; Certain versions of the Typhoon server + ;; doesn't understand the CAPABILITIES + ;; command, but includes the capability + ;; data in the HELP command instead. + "HELP\r\n" + ;; Use the correct command for everything else. + "CAPABILITIES\r\n")) :success "^3" :starttls-function (lambda (capabilities) diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 1c371f5987..e86426d466 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -139,7 +139,10 @@ writes. See `make-network-process' for details. :capability-command specifies a command used to query the HOST for its capabilities. For instance, for IMAP this should be - \"1 CAPABILITY\\r\\n\". + \"1 CAPABILITY\\r\\n\". This can either be a string (which will + then be sent verbatim to the server), or a function (called with + a single parameter; the \"greeting\" from the server when connecting), + and should return a string to send to the server. :starttls-function specifies a function for handling STARTTLS. This function should take one parameter, the response to the @@ -280,8 +283,11 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." :coding (plist-get parameters :coding))) (greeting (and (not (plist-get parameters :nogreeting)) (network-stream-get-response stream start eoc))) - (capabilities (network-stream-command stream capability-command - eo-capa)) + (capabilities + (network-stream-command + stream + (network-stream--capability-command capability-command greeting) + eo-capa)) (resulting-type 'plain) starttls-available starttls-command error) @@ -329,7 +335,10 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." ;; Requery capabilities for protocols that require it; i.e., ;; EHLO for SMTP. (when (plist-get parameters :always-query-capabilities) - (network-stream-command stream capability-command eo-capa))) + (network-stream-command + stream + (network-stream--capability-command capability-command greeting) + eo-capa))) (when (let ((response (network-stream-command stream starttls-command eoc))) (and response (string-match success-string response))) @@ -365,7 +374,10 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." host service)) ;; Re-get the capabilities, which may have now changed. (setq capabilities - (network-stream-command stream capability-command eo-capa)))) + (network-stream-command + stream + (network-stream--capability-command capability-command greeting) + eo-capa)))) ;; If TLS is mandatory, close the connection if it's unencrypted. (when (and require-tls @@ -428,7 +440,8 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." parameters) (require 'tls) (open-tls-stream name buffer host service))) - (eoc (plist-get parameters :end-of-command))) + (eoc (plist-get parameters :end-of-command)) + greeting) (if (plist-get parameters :nowait) (list stream nil nil 'tls) ;; Check certificate validity etc. @@ -440,17 +453,22 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." ;; openssl/gnutls-cli. (when (and (not (gnutls-available-p)) eoc) - (network-stream-get-response stream start eoc) + (setq greeting (network-stream-get-response stream start eoc)) (goto-char (point-min)) (when (re-search-forward eoc nil t) (goto-char (match-beginning 0)) (delete-region (point-min) (line-beginning-position)))) - (let ((capability-command (plist-get parameters :capability-command)) + (let ((capability-command + (plist-get parameters :capability-command)) (eo-capa (or (plist-get parameters :end-of-capability) eoc))) (list stream (network-stream-get-response stream start eoc) - (network-stream-command stream capability-command eo-capa) + (network-stream-command + stream + (network-stream--capability-command + capability-command greeting) + eo-capa) 'tls))))))) (defun network-stream-open-shell (name buffer host service parameters) @@ -464,21 +482,29 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." (format-spec (plist-get parameters :shell-command) `((?s . ,host) - (?p . ,service))))))) + (?p . ,service)))))) + greeting) (when coding (if (consp coding) - (set-process-coding-system stream - (car coding) - (cdr coding)) (set-process-coding-system stream - coding - coding))) + (car coding) + (cdr coding)) + (set-process-coding-system stream + coding + coding))) (list stream - (network-stream-get-response stream start eoc) - (network-stream-command stream capability-command - (or (plist-get parameters :end-of-capability) - eoc)) + (setq greeting (network-stream-get-response stream start eoc)) + (network-stream-command + stream + (network-stream--capability-command capability-command greeting) + (or (plist-get parameters :end-of-capability) + eoc)) 'plain))) +(defun network-stream--capability-command (command greeting) + (if (functionp command) + (funcall command greeting) + command)) + (provide 'network-stream) ;;; network-stream.el ends here commit 42b33405c2c5aef43439ec7e9e9e690b948cc4b1 Author: Eric Abrahamsen Date: Sun Jul 19 02:19:21 2020 +0200 Narrow to headers in gnus-registry before getting data * lisp/gnus/gnus-registry.el (gnus-registry-spool-action): Narrow to the headers before getting data from them (bug#42029). diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index f306889a7f..1ac1d05e03 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -449,19 +449,21 @@ This is not required after changing `gnus-registry-cache-file'." to subject sender recipients))) (defun gnus-registry-spool-action (id group &optional subject sender recipients) - (let ((to (gnus-group-guess-full-name-from-command-method group)) - (recipients (or recipients - (gnus-registry-sort-addresses - (or (message-fetch-field "cc") "") - (or (message-fetch-field "to") "")))) - (subject (or subject (message-fetch-field "subject"))) - (sender (or sender (message-fetch-field "from")))) - (when (and (stringp id) (string-match "\r$" id)) - (setq id (substring id 0 -1))) - (gnus-message 7 "Gnus registry: article %s spooled to %s" - id - to) - (gnus-registry-handle-action id nil to subject sender recipients))) + (save-restriction + (message-narrow-to-headers-or-head) + (let ((to (gnus-group-guess-full-name-from-command-method group)) + (recipients (or recipients + (gnus-registry-sort-addresses + (or (message-fetch-field "cc") "") + (or (message-fetch-field "to") "")))) + (subject (or subject (message-fetch-field "subject"))) + (sender (or sender (message-fetch-field "from")))) + (when (and (stringp id) (string-match "\r$" id)) + (setq id (substring id 0 -1))) + (gnus-message 7 "Gnus registry: article %s spooled to %s" + id + to) + (gnus-registry-handle-action id nil to subject sender recipients)))) (defun gnus-registry-handle-action (id from to subject sender &optional recipients) commit c77731e824bbc219561cb9af0d3724e7b6cef789 Author: João Távora Date: Sat Jul 18 23:15:28 2020 +0100 Fix ElDoc bugs around eldoc-echo-area-use-multiline-p. If the value is 'truncate-sym-name-if-fit andthe single docstring doesn't fit in the echo area even when the symbol name is elided, that step shouldn't be attempted. Also if the value is nil, really ensure that only the first line is shown. * lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): Rework 'truncate-sym-name-if-fit case of eldoc-echo-area-use-multiline-p. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 5741c524d6..6ed5bff9f4 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -429,7 +429,7 @@ Honor most of `eldoc-echo-area-use-multiline-p'." (integer val) (t 1))) (things-reported-on) - single-sym-name) + single-doc single-doc-sym) ;; Then, compose the contents of the `*eldoc*' buffer. (with-current-buffer (eldoc-doc-buffer) (let ((inhibit-read-only t)) @@ -454,20 +454,24 @@ Honor most of `eldoc-echo-area-use-multiline-p'." (mapconcat (lambda (s) (format "%s" s)) things-reported-on ", "))))) - ;; Finally, output to the echo area. We handle the - ;; `truncate-sym-name-if-fit' special case first, by selecting a - ;; top-section of the `*eldoc' buffer. I'm pretty sure nicer + ;; Finally, output to the echo area. I'm pretty sure nicer ;; strategies can be used here, probably by splitting this ;; function into some `eldoc-display-functions' special hook. (let ((echo-area-message (cond - ((and + (;; We handle the `truncate-sym-name-if-fit' special + ;; case first, by checking if for a lot of special + ;; conditions. + (and (eq 'truncate-sym-name-if-fit eldoc-echo-area-use-multiline-p) (null (cdr docs)) - (setq single-sym-name + (setq single-doc (caar docs)) + (setq single-doc-sym (format "%s" (plist-get (cdar docs) :thing))) - (> (+ (length (caar docs)) (length single-sym-name) 2) width)) - (caar docs)) + (< (length single-doc) width) + (not (string-match "\n" single-doc)) + (> (+ (length single-doc) (length single-doc-sym) 2) width)) + single-doc) ((> available 1) (with-current-buffer (eldoc-doc-buffer) (cl-loop @@ -497,7 +501,7 @@ Honor most of `eldoc-echo-area-use-multiline-p'." ;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too? (with-current-buffer (eldoc-doc-buffer) (truncate-string-to-width - (buffer-substring (point-min) (line-end-position 1)) width)))))) + (buffer-substring (goto-char (point-min)) (line-end-position 1)) width)))))) (when echo-area-message (eldoc--message echo-area-message)))))) commit 4a7ecaaee06579e582b8560fc495eafd375b1f3b Author: João Távora Date: Sat Jul 18 23:50:00 2020 +0100 ; Reword bits of ElDoc internal documentation * lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Rewrite docstring. (eldoc--invoke-strategy): Fix formatting and rewrite comments diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 510dff9ed0..5741c524d6 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -664,75 +664,75 @@ have the following values: "Invoke `eldoc-documentation-strategy' function. That function's job is to run the `eldoc-documentation-functions' -special hook, using the `run-hook' family of functions. The way -we invoke it here happens in a way strategy function can itself -call `eldoc--make-callback' to produce values to give to the -elements of the special hook `eldoc-documentation-functions'. - -For each element of `eldoc-documentation-functions' invoked a -corresponding call to `eldoc--make-callback' must be made. See -docstring of `eldoc--make-callback' for the types of callback -that can be produced. - -If the strategy function does not use `eldoc--make-callback', it -must find some alternate way to produce callbacks to feed to -`eldoc-documentation-function', and those callbacks should -endeavour to display the docstrings given to them." - (let* (;; how many docstrings callbaks have been +special hook, using the `run-hook' family of functions. ElDoc's +built-in strategy functions play along with the +`eldoc--make-callback' protocol, using it to produce callback to +feed to the functgions of `eldoc-documentation-functions'. + +Other third-party strategy functions do not use +`eldoc--make-callback'. They must find some alternate way to +produce callbacks to feed to `eldoc-documentation-function' and +should endeavour to display the docstrings eventually produced." + (let* (;; How many callbacks have been created by the strategy + ;; fucntion and passed to elements of + ;; `eldoc-documentation-functions'. (howmany 0) - ;; how many calls to callbacks we're waiting on. Used by - ;; `:patient'. + ;; How many calls to callbacks we're still waiting on. Used + ;; by `:patient'. (want 0) - ;; how many doc strings and corresponding options have been - ;; registered it. + ;; The doc strings and corresponding options registered so + ;; far. (docs-registered '())) - (cl-labels - ((register-doc (pos string plist) - (when (and string (> (length string) 0)) - (push (cons pos (cons string plist)) docs-registered))) - (display-doc () - (eldoc--handle-docs - (mapcar #'cdr - (setq docs-registered - (sort docs-registered - (lambda (a b) (< (car a) (car b)))))))) - (make-callback (method) - (let ((pos (prog1 howmany (cl-incf howmany)))) - (cl-ecase method - (:enthusiast - (lambda (string &rest plist) - (when (and string (cl-loop for (p) in docs-registered - never (< p pos))) - (setq docs-registered '()) - (register-doc pos string plist) - (when (and (timerp eldoc--enthusiasm-curbing-timer) - (memq eldoc--enthusiasm-curbing-timer - timer-list)) - (cancel-timer eldoc--enthusiasm-curbing-timer)) - (setq eldoc--enthusiasm-curbing-timer - (run-at-time (unless (zerop pos) 0.3) - nil #'display-doc))) - t)) - (:patient - (cl-incf want) - (lambda (string &rest plist) - (register-doc pos string plist) - (when (zerop (cl-decf want)) (display-doc)) - t)) - (:eager - (lambda (string &rest plist) - (register-doc pos string plist) - (display-doc) - t)))))) - (let* ((eldoc--make-callback #'make-callback) - (res (funcall eldoc-documentation-strategy))) - ;; Observe the old and the new protocol: - (cond (;; Old protocol: got string, output immediately; - (stringp res) (register-doc 0 res nil) (display-doc)) - (;; Old protocol: got nil, clear the echo area; - (null res) (eldoc--message nil)) - (;; New protocol: trust callback will be called; - t)))))) + (cl-labels + ((register-doc + (pos string plist) + (when (and string (> (length string) 0)) + (push (cons pos (cons string plist)) docs-registered))) + (display-doc + () + (eldoc--handle-docs + (mapcar #'cdr + (setq docs-registered + (sort docs-registered + (lambda (a b) (< (car a) (car b)))))))) + (make-callback + (method) + (let ((pos (prog1 howmany (cl-incf howmany)))) + (cl-ecase method + (:enthusiast + (lambda (string &rest plist) + (when (and string (cl-loop for (p) in docs-registered + never (< p pos))) + (setq docs-registered '()) + (register-doc pos string plist) + (when (and (timerp eldoc--enthusiasm-curbing-timer) + (memq eldoc--enthusiasm-curbing-timer + timer-list)) + (cancel-timer eldoc--enthusiasm-curbing-timer)) + (setq eldoc--enthusiasm-curbing-timer + (run-at-time (unless (zerop pos) 0.3) + nil #'display-doc))) + t)) + (:patient + (cl-incf want) + (lambda (string &rest plist) + (register-doc pos string plist) + (when (zerop (cl-decf want)) (display-doc)) + t)) + (:eager + (lambda (string &rest plist) + (register-doc pos string plist) + (display-doc) + t)))))) + (let* ((eldoc--make-callback #'make-callback) + (res (funcall eldoc-documentation-strategy))) + ;; Observe the old and the new protocol: + (cond (;; Old protocol: got string, output immediately; + (stringp res) (register-doc 0 res nil) (display-doc)) + (;; Old protocol: got nil, clear the echo area; + (null res) (eldoc--message nil)) + (;; New protocol: trust callback will be called; + t)))))) (defun eldoc-print-current-symbol-info (&optional interactive) "Document thing at point." commit 8d05f21946fa846edf8d9c2c77e9e6cc066bbae5 Author: Juri Linkov Date: Sun Jul 19 02:43:18 2020 +0300 * lisp/window.el (display-buffer-override-next-command): Add ECHO arg. * lisp/frame.el (other-frame-prefix): * lisp/tab-bar.el (other-tab-prefix): * lisp/windmove.el (windmove-display-in-direction): * lisp/window.el (other-window-prefix, same-window-prefix): Use new ECHO arg of display-buffer-override-next-command. https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00819.html diff --git a/lisp/frame.el b/lisp/frame.el index 77080b76e4..081d3010e9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1083,7 +1083,8 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (cons (display-buffer-pop-up-frame buffer (append '((inhibit-same-window . t)) alist)) - 'frame))) + 'frame)) + nil "[other-frame]") (message "Display next command buffer in a new frame...")) (defun iconify-or-deiconify-frame () diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 04f4bca166..cee88cb427 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1581,7 +1581,8 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (display-buffer-in-tab buffer (append alist '((inhibit-same-window . nil)))) (selected-window)) - 'tab))) + 'tab)) + nil "[other-tab]") (message "Display next command buffer in a new tab...")) (define-key tab-prefix-map "2" 'tab-new) diff --git a/lisp/windmove.el b/lisp/windmove.el index 341c739d92..6557960064 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -491,8 +491,8 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (cons window type))) (lambda (old-window new-window) (when (window-live-p (if no-select old-window new-window)) - (select-window (if no-select old-window new-window)))))) - (message "[display-%s]" dir)) + (select-window (if no-select old-window new-window)))) + (format "[display-%s]" dir)))) ;;;###autoload (defun windmove-display-left (&optional arg) diff --git a/lisp/window.el b/lisp/window.el index 675aff041b..f20940fa0e 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4021,7 +4021,8 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (setq type 'window) (setq window (display-buffer-use-some-window buffer alist) type 'reuse)) - (cons window type)))) + (cons window type))) + nil "[other-window]") (message "Display next command buffer in a new window...")) (defun same-window-prefix () @@ -4039,7 +4040,8 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (cons (or (display-buffer-same-window buffer alist) (display-buffer-use-some-window buffer alist)) - 'reuse))) + 'reuse)) + nil "[same-window]") (message "Display next command buffer in the same window...")) ;; This should probably return non-nil when the selected window is part @@ -8616,14 +8618,16 @@ documentation for additional customization information." (list (read-buffer-to-switch "Switch to buffer in other frame: "))) (pop-to-buffer buffer-or-name display-buffer--other-frame-action norecord)) -(defun display-buffer-override-next-command (pre-function &optional post-function) +(defun display-buffer-override-next-command (pre-function &optional post-function echo) "Set `display-buffer-overriding-action' for the next command. `pre-function' is called to prepare the window where the buffer should be displayed. This function takes two arguments `buffer' and `alist', and should return a cons with the displayed window and its type. See the meaning of these values in `window--display-buffer'. Optional `post-function' is called after the buffer is displayed in the -window; the function takes two arguments: an old and new window." +window; the function takes two arguments: an old and new window. +Optional string argument `echo' can be used to add a prefix to the +command echo keystrokes that should describe the current prefix state." (let* ((old-window (or (minibuffer-selected-window) (selected-window))) (new-window nil) (minibuffer-depth (minibuffer-depth)) @@ -8641,11 +8645,13 @@ window; the function takes two arguments: an old and new window." (setq post-function nil) new-window)))) (command this-command) + (echofun (when echo (lambda () echo))) (exitfun (lambda () (setcar display-buffer-overriding-action (delq action (car display-buffer-overriding-action))) (remove-hook 'post-command-hook clearfun) + (remove-hook 'prefix-command-echo-keystrokes-functions echofun) (when (functionp post-function) (funcall post-function old-window new-window))))) (fset clearfun @@ -8661,6 +8667,8 @@ window; the function takes two arguments: an old and new window." ;; Reset display-buffer-overriding-action ;; after the next command finishes (add-hook 'post-command-hook clearfun) + (when echofun + (add-hook 'prefix-command-echo-keystrokes-functions echofun)) (push action (car display-buffer-overriding-action)))) commit 77d35f28e5d8d45a00350bfc32d17bc4446e28dc Author: Lars Ingebrigtsen Date: Sat Jul 18 19:59:19 2020 +0200 Don't have shr kill random buffers on network failures * lisp/url/url-queue.el (url-queue-callback-function): Don't kill off random buffers on HTTP failures (bug#40976). diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index ff18cf1fe4..46cdff0f72 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -123,17 +123,24 @@ The variable `url-queue-timeout' sets a timeout." (setq url-queue-progress-timer nil)))) (defun url-queue-callback-function (status job) - (setq url-queue (delq job url-queue)) - (when (and (eq (car status) :error) - (eq (cadr (cadr status)) 'connection-failed)) - ;; If we get a connection error, then flush all other jobs from - ;; the host from the queue. This particularly makes sense if the - ;; error really is a DNS resolver issue, which happens - ;; synchronously and totally halts Emacs. - (url-queue-remove-jobs-from-host - (plist-get (nthcdr 3 (cadr status)) :host))) - (url-queue-run-queue) - (apply (url-queue-callback job) (cons status (url-queue-cbargs job)))) + (let ((buffer (current-buffer))) + (setq url-queue (delq job url-queue)) + (when (and (eq (car status) :error) + (eq (cadr (cadr status)) 'connection-failed)) + ;; If we get a connection error, then flush all other jobs from + ;; the host from the queue. This particularly makes sense if the + ;; error really is a DNS resolver issue, which happens + ;; synchronously and totally halts Emacs. + (url-queue-remove-jobs-from-host + (plist-get (nthcdr 3 (cadr status)) :host))) + (url-queue-run-queue) + ;; Somehow something deep in the bowels in the URL library may + ;; have killed off the current buffer. So check that it's still + ;; alive before doing anything, and if not, just create a dummy + ;; buffer and do the callback anyway. + (unless (buffer-live-p buffer) + (set-buffer (generate-new-buffer " *temp*"))) + (apply (url-queue-callback job) (cons status (url-queue-cbargs job))))) (defun url-queue-remove-jobs-from-host (host) (let ((jobs nil)) commit c45c1e8c4376cbbe68cec997a5ef686732377ca6 Author: Lars Ingebrigtsen Date: Sat Jul 18 18:02:43 2020 +0200 Make eww-open-file work with Tramp file names * lisp/net/eww.el (eww-open-file): Allow opening non-local Tramp files (bug#40425). (eww): Adjust calling convention to allow passing in data directly via a buffer. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 5fc0b08823..f4e3aa36c5 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -263,13 +263,17 @@ This list can be customized via `eww-suggest-uris'." (nreverse uris))) ;;;###autoload -(defun eww (url &optional arg) +(defun eww (url &optional arg buffer) "Fetch URL and render the page. If the input doesn't look like an URL or a domain name, the word(s) will be searched for via `eww-search-prefix'. If called with a prefix ARG, use a new buffer instead of reusing -the default EWW buffer." +the default EWW buffer. + +If BUFFER, the data to be rendered is in that buffer. In that +case, this function doesn't actually fetch URL. BUFFER will be +killed after rendering." (interactive (let* ((uris (eww-suggested-uris)) (prompt (concat "Enter URL or keywords" @@ -307,8 +311,12 @@ the default EWW buffer." (insert (format "Loading %s..." url)) (goto-char (point-min))) (let ((url-mime-accept-string eww-accept-content-types)) - (url-retrieve url #'eww-render - (list url nil (current-buffer))))) + (if buffer + (let ((eww-buffer (current-buffer))) + (with-current-buffer buffer + (eww-render nil url nil eww-buffer))) + (url-retrieve url #'eww-render + (list url nil (current-buffer)))))) (function-put 'eww 'browse-url-browser-kind 'internal) @@ -361,7 +369,19 @@ the default EWW buffer." (eww (concat "file://" (and (memq system-type '(windows-nt ms-dos)) "/") - (expand-file-name file)))) + (expand-file-name file)) + nil + ;; The file name may be a non-local Tramp file. The URL + ;; library doesn't understand these file names, so use the + ;; normal Emacs machinery to load the file. + (with-current-buffer (generate-new-buffer " *eww file*") + (set-buffer-multibyte nil) + (insert "Content-type: " (or (mailcap-extension-to-mime + (url-file-extension file)) + "application/octet-stream") + "\n\n") + (insert-file-contents file) + (current-buffer)))) ;;;###autoload (defun eww-search-words () commit 58c7dc69db07130519ff2e1f818eb5422f6225d8 Author: Eli Zaretskii Date: Sat Jul 18 17:40:44 2020 +0300 Fix documentation of a recent change in shr.el * lisp/net/shr.el (shr-max-width, shr-width): Fix typo and wording of the doc strings. * etc/NEWS: Fix the wording of the 'shr-max-width's entry, and move it to the SHR section. diff --git a/etc/NEWS b/etc/NEWS index b8cb22c7f7..7e6be00861 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -476,15 +476,17 @@ This is still the case by default, but if you customize 'browse-url-mailto-function' or 'browse-url-handlers' to call some other function, it will now be called instead of the default. -** EWW - +++ -*** New variable 'shr-max-width' -This defaults to 120 characters, which means that even if you have -very wide frames, HTML text will be rendered more narrowly, which -usually leads to a more readable text. If nil, 'shr-width' is adhered -to as before, and as that defaults to nil, the window width is always -used. +*** New variable 'shr-max-width'. +If this variable is non-nil, and 'shr-width' is nil, then SHR will use +the value of 'shr-max-width' to limit the width of the rendered HTML. +The default is 120 characters, so even if you have very wide frames, +HTML text will be rendered more narrowly, which usually leads to a +more readable text. Set this variable to nil to get the previous +behavior of rendering as wide as the window-width allows. If +'shr-width' is non-nil, it overrides this variable. + +** EWW --- *** The command 'eww-follow-link' now supports custom mailto handlers. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d6bdb4c17e..ddd8112721 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -95,11 +95,11 @@ If nil, don't draw horizontal table lines." :type 'character) (defcustom shr-width nil - "Frame width to use for rendering. + "Window width to use for HTML rendering. May either be an integer specifying a fixed width in characters, -or nil, meaning that the full width of the window should be used. -If `shr-use-fonts' is set, the mean character width is used to -compute the pixel width, which is used instead. +or nil, meaning use the full width of the window. +If `shr-use-fonts' is set, the value is interpreted as a multiple +of the mean character width of the default face's font. Also see `shr-max-width'." :version "25.1" @@ -107,19 +107,18 @@ Also see `shr-max-width'." (const :tag "Use the width of the window" nil))) (defcustom shr-max-width 120 - "Maximum text width to use for rendering. -May either be an intereger specifying a fixed width in characters, -or nil, meaning that there is no maximum width. + "Maximum text width to use for HTML rendering. +May either be an integer specifying a fixed width in characters, +or nil, meaning that there is no width limit. -If `shr-use-fonts' is set, the mean character width is used to -compute the pixel width, which is used instead. +If `shr-use-fonts' is set, the value of this variable is +interpreted as a multiple of the mean character width of the +default face's font. -Also see `shr-width'. If `shr-width' is set, it overrides -`shr-max-width', and if `shr-width' is nil, the frame width is -used to compute the width to use." +If `shr-width' is non-nil, it overrides this variable." :version "28.1" :type '(choice (integer :tag "Fixed width in characters") - (const :tag "No maximum width" nil))) + (const :tag "No width limit" nil))) (defcustom shr-bullet "* " "Bullet used for unordered lists. commit 05c4329cf59f8bde98e33952c1f26551de83e400 Author: Eli Zaretskii Date: Sat Jul 18 11:17:31 2020 +0300 Revert "Fix filename completion in shell mode buffers" This reverts commit e4d17d8cb479ffeeb7dfb7320a1432722ac8df75. Per bug#42383 discussions, the fix for bug#34330 probably just works around the real issue, which is in pcomplete.el. diff --git a/lisp/shell.el b/lisp/shell.el index ecebf937e2..dc1198b7ba 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -184,16 +184,13 @@ shell buffer. The value may depend on the operating system or shell." shell-environment-variable-completion shell-command-completion shell-c-a-p-replace-by-expanded-directory + pcomplete-completions-at-point shell-filename-completion - comint-filename-completion - ;; Put `pcomplete-completions-at-point' last so that other - ;; functions can run before it does, see bug#34330. - pcomplete-completions-at-point) + comint-filename-completion) "List of functions called to perform completion. This variable is used to initialize `comint-dynamic-complete-functions' in the shell buffer." :type '(repeat function) - :version "27.1" :group 'shell) (defcustom shell-command-regexp "[^;&|\n]+" commit de68572742f37f70c128c7192576182347eb8f4b Author: Eli Zaretskii Date: Sat Jul 18 10:53:20 2020 +0300 Improve documentation of 'bookmark-bmenu-mode' * lisp/bookmark.el (bookmark-bmenu-mode): Add `bookmark-bmenu-search' to the doc string. (Bug#42325) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 6cd624cb33..e69d9f529c 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1772,7 +1772,8 @@ Bookmark names preceded by a \"*\" have annotations. \\[bookmark-bmenu-show-annotation] -- show the annotation, if it exists, for the current bookmark in another buffer. \\[bookmark-bmenu-show-all-annotations] -- show the annotations of all bookmarks in another buffer. -\\[bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark." +\\[bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark. +\\[bookmark-bmenu-search] -- incrementally search for bookmarks." (setq truncate-lines t) (setq buffer-read-only t)) commit fd85e70be70d7ca945cb0f7ec2eff7b2b3a6b5ec Author: Eli Zaretskii Date: Sat Jul 18 10:02:28 2020 +0300 Update systems using GnuTLS certificate files * lisp/net/gnutls.el (gnutls-trustfiles): Update the names of the systems in the comments. Reported by Richard Stallman in https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00455.html. diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 459156e6d2..5212bf6a3f 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -105,12 +105,13 @@ Security'." (defcustom gnutls-trustfiles '( - "/etc/ssl/certs/ca-certificates.crt" ; Debian, Ubuntu, Gentoo and Arch Linux + "/etc/ssl/certs/ca-certificates.crt" ; Debian, Ubuntu, Gentoo, + ; Arch, Guix, Parabola "/etc/pki/tls/certs/ca-bundle.crt" ; Fedora and RHEL "/etc/ssl/ca-bundle.pem" ; Suse "/usr/ssl/certs/ca-bundle.crt" ; Cygwin "/usr/local/share/certs/ca-root-nss.crt" ; FreeBSD - "/etc/ssl/cert.pem" ; macOS + "/etc/ssl/cert.pem" ; macOS, Dragora, Parabola "/etc/certs/ca-certificates.crt" ; OpenIndiana ) "List of CA bundle location filenames or a function returning said list. commit 1cb14d0ce4acb83c29f4da493a1060e152dfef10 Author: Tassilo Horn Date: Fri Jul 17 21:05:32 2020 +0200 ; Add defvars for rcirc vars in order to silence the byte-compiler * lisp/progmodes/bug-reference.el: Add rcirc defvars for silencing the byte-compiler. diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 4f56c04d2c..b88ea0af82 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -386,6 +386,10 @@ the corresponding BUG-REGEXP and URL-FORMAT are set." (setq-local bug-reference-url-format (nth 3 config)) (throw 'setup-done t))))) +(defvar rcirc-target) +(defvar rcirc-server-buffer) +(defvar rcirc-server) + (defun bug-reference-try-setup-from-rcirc () "Try setting up `bug-reference-mode' based on rcirc channel and server. Test each configuration in `bug-reference-setup-from-irc-alist' commit beaad910c2d1b188ee73084cf2a7efc3160d6b17 Author: Tassilo Horn Date: Fri Jul 17 20:59:04 2020 +0200 bug-reference auto-setup for IRC, implementation for rcirc * lisp/progmodes/bug-reference.el (bug-reference-setup-from-irc-alist): New defvar for configuring bug regexp and URL based on IRC channel and server names. (bug-reference--maybe-setup-from-irc): New defun doing the setup given channel and server. (bug-reference-try-setup-from-rcirc): New defun calling the above for rcirc buffers. (bug-reference--run-auto-setup): Enable the auto-setup for rcirc. * etc/NEWS: Extend entry describing bug-reference auto-setup. diff --git a/etc/NEWS b/etc/NEWS index b3ad5623c8..b8cb22c7f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -556,13 +556,14 @@ truncation, amongst other things. 'bug-reference-prog-mode' have been activated, their respective hook has been run and still 'bug-reference-bug-regexp' and 'bug-reference-url-format' aren't both set, it tries to guess -appropriate values for those two variables. There are two guessing +appropriate values for those two variables. There are three guessing mechanisms so far: based on version control information of the current -buffer's file, and based on newsgroup/mail-folder name and several -news and mail message headers in Gnus buffers. Both mechanisms are -extensible with custom rules, see the variables -'bug-reference-setup-from-vc-alist' and -'bug-reference-setup-from-mail-alist'. +buffer's file, based on newsgroup/mail-folder name and several news +and mail message headers in Gnus buffers, and based on IRC channel and +server in rcirc buffers. All mechanisms are extensible with custom +rules, see the variables 'bug-reference-setup-from-vc-alist', +'bug-reference-setup-from-mail-alist', and +'bug-reference-setup-from-irc-alist'. * New Modes and Packages in Emacs 28.1 diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index b151e87f1c..4f56c04d2c 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -229,7 +229,6 @@ and apply it if applicable." url config) (throw 'found t))))))))) -;; TODO: Implement something similar for IRC with rcirc/ERC. (defvar bug-reference-setup-from-mail-alist `((,(regexp-opt '("emacs" "auctex" "gnus" "tramp" "orgmode") 'words) ,(regexp-opt '("@debbugs.gnu.org" "-devel@gnu.org" @@ -344,6 +343,61 @@ and set it if applicable." (push val header-values)))))) (bug-reference--maybe-setup-from-mail nil header-values))))))) +(defvar bug-reference-setup-from-irc-alist + `((,(concat "#" (regexp-opt '("emacs" "gnus" "org-mode" "rcirc" + "erc") 'words)) + "freenode" + "\\([Bb]ug ?#?\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)" + "https://debbugs.gnu.org/%s")) + "An alist for setting up `bug-reference-mode' in IRC modes. + +This takes action if `bug-reference-mode' is enabled in IRC +channels using one of Emacs' IRC clients (rcirc and ERC). +Currently, only rcirc is supported. + +Each element has the form + + (CHANNEL-REGEXP SERVER-REGEXP BUG-REGEXP URL-FORMAT) + +CHANNEL-REGEXP is a regexp matched against the current mail IRC +channel name. SERVER-REGEXP is matched against the IRC server +name. If any of those matches, BUG-REGEXP is set as +`bug-reference-bug-regexp' and URL-FORMAT is set as +`bug-reference-url-format'.") + +(defun bug-reference--maybe-setup-from-irc (channel server) + "Set up according to IRC CHANNEL or SERVER. +CHANNEL is an IRC channel name and SERVER is that channel's +server name. + +If any CHANNEL-REGEXP or SERVER-REGEXP of +`bug-reference-setup-from-irc-alist' matches CHANNEL or SERVER, +the corresponding BUG-REGEXP and URL-FORMAT are set." + (catch 'setup-done + (dolist (config bug-reference-setup-from-irc-alist) + (when (or + (and channel + (car config) + (string-match-p (car config) channel)) + (and server + (nth 1 config) + (string-match-p (car config) server))) + (setq-local bug-reference-bug-regexp (nth 2 config)) + (setq-local bug-reference-url-format (nth 3 config)) + (throw 'setup-done t))))) + +(defun bug-reference-try-setup-from-rcirc () + "Try setting up `bug-reference-mode' based on rcirc channel and server. +Test each configuration in `bug-reference-setup-from-irc-alist' +and set it if applicable." + (when (derived-mode-p 'rcirc-mode) + (bug-reference--maybe-setup-from-irc + rcirc-target + (and rcirc-server-buffer + (buffer-live-p rcirc-server-buffer) + (with-current-buffer rcirc-server-buffer + rcirc-server))))) + (defun bug-reference--run-auto-setup () (when (or bug-reference-mode bug-reference-prog-mode) @@ -355,7 +409,8 @@ and set it if applicable." "Error during bug-reference auto-setup: %S" (catch 'setup (dolist (f (list #'bug-reference-try-setup-from-vc - #'bug-reference-try-setup-from-gnus)) + #'bug-reference-try-setup-from-gnus + #'bug-reference-try-setup-from-rcirc)) (when (funcall f) (throw 'setup t)))))))) commit ba12555fda9cdd781b50e60d933aa6b8ba4464b9 Author: Lars Ingebrigtsen Date: Fri Jul 17 18:44:49 2020 +0200 Fix NOT-CURRENT behaviour in text-property-search-backward * lisp/emacs-lisp/text-property-search.el (text-property-search-backward): Fix inconsistent behaviour of S-TAB in eww (and other callers that use the NOT-CURRENT behaviour) when there are adjacent elements (bug#39239). diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index b6e98f59a7..61bd98d3cf 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -137,11 +137,19 @@ and if a matching region is found, moves point to its beginning." nil) ;; We're standing in the property we're looking for, so find the ;; end. - ((and (text-property--match-p - value (get-text-property (1- (point)) property) - predicate) - (not not-current)) - (text-property--find-end-backward (1- (point)) property value predicate)) + ((text-property--match-p + value (get-text-property (1- (point)) property) + predicate) + (let ((origin (point)) + (match (text-property--find-end-backward + (1- (point)) property value predicate))) + ;; When we want to ignore the current element, then repeat the + ;; search if we haven't moved out of it yet. + (if (and not-current + (equal (get-text-property (point) property) + (get-text-property origin property))) + (text-property-search-backward property value predicate) + match))) (t (let ((origin (point)) (ended nil) commit 0d4ba1c2b27cb36423400e697a19d7cf80352a54 Author: Eli Zaretskii Date: Fri Jul 17 17:54:00 2020 +0300 Improve documentation of 'kill-emacs' * doc/lispref/os.texi (Killing Emacs): * src/emacs.c (Fkill_emacs): Document what non-integer, non-string argument to 'kill-emacs' means. (Bug#42400) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 1c3be1c7ef..b31ab87ff1 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -707,6 +707,10 @@ the Emacs process. (This is useful primarily in batch operation; see If @var{exit-data} is a string, its contents are stuffed into the terminal input buffer so that the shell (or whatever program next reads input) can read them. + +If @var{exit-data} is neither an integer nor a string, or is omitted, +that means to use the (system-specific) exit status which indicates +successful program termination. @end deffn @cindex SIGTERM diff --git a/src/emacs.c b/src/emacs.c index 6118ad3445..1dcf195891 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2352,6 +2352,8 @@ DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", doc: /* Exit the Emacs job and kill it. If ARG is an integer, return ARG as the exit program code. If ARG is a string, stuff it as keyboard input. +Any other value of ARG, or ARG omitted, means return an +exit code that indicates successful program termination. This function is called upon receipt of the signals SIGTERM or SIGHUP, and upon SIGINT in batch mode. commit 92609aad38e5ec6175078b52bf6ecc5653a84170 Author: Xu Chunyang Date: Fri Jul 17 16:43:57 2020 +0200 Fix