commit 5247a72aecb417e2f71e37af40ebacdfc26158b7 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Wed Oct 19 08:02:36 2022 +0200 * lib-src/rcs2log: Add fallback for $TMPDIR. diff --git a/lib-src/rcs2log b/lib-src/rcs2log index bc7875cfdd..2a72404d9e 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -209,7 +209,7 @@ month_data=' if type mktemp >/dev/null 2>&1; then logdir=`mktemp -d` else - logdir=$TMPDIR/rcs2log$$ + logdir="${TMPDIR-/tmp}/rcs2log$$" (umask 077 && mkdir "$logdir") fi || exit case $logdir in commit e42a68720efdbb4b8741a420a15e08b14671c1d1 Merge: 620f18c489 efd3ef3ceb Author: Stefan Kangas Date: Wed Oct 19 06:31:16 2022 +0200 Merge from origin/emacs-28 efd3ef3ceb ; * src/window.c: Fix some comments. (Bug#58550) commit 620f18c489ff9ce3d0a4afe04d438a1bc0525e73 Author: Randy Taylor Date: Mon Oct 17 21:29:30 2022 -0400 ; * src/xterm.c (mark_xterm): Fix x11 with i18n build diff --git a/src/xterm.c b/src/xterm.c index 7c3ab87e87..3075b5af23 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -30281,7 +30281,7 @@ mark_xterm (void) { Lisp_Object val; #if defined HAVE_XINPUT2 || defined USE_TOOLKIT_SCROLL_BARS \ - || defined HAVE_XRANDR || defined USE_GTK + || defined HAVE_XRANDR || defined USE_GTK || defined HAVE_X_I18N struct x_display_info *dpyinfo; #if defined HAVE_XINPUT2 || defined USE_TOOLKIT_SCROLL_BARS int i; commit 155ddde4dd3f6246814ab76bc2f54f4d571bbd15 Author: Stefan Monnier Date: Tue Oct 18 18:43:50 2022 -0400 (sit-for): Add compiler-macro to warn about obsolete calling convention * lisp/subr.el (sit-for): Add compiler-macro. * lisp/eshell/esh-util.el (eshell-redisplay): * lisp/play/zone.el (zone, zone-pgm-jitter, zone-pgm-whack-chars): (zone-remove-text): Avoid obsolete calling convention. diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 9b464a0a13..f47373c115 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -455,7 +455,7 @@ list." ;; runs while point is in the minibuffer and the users attempt ;; to use completion. Don't ask me. (condition-case nil - (sit-for 0 0) + (sit-for 0) (error nil))) (defun eshell-read-passwd-file (file) diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 5ea5bbc926..e3a9507f1c 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -139,7 +139,7 @@ run a specific program. The program must be a member of (untabify (point-min) (point-max)) (set-window-start (selected-window) (point-min)) (set-window-point (selected-window) wp) - (sit-for 0 500) + (sit-for 0.500) (let ((ct (and f (frame-parameter f 'cursor-type))) (show-trailing-whitespace nil) restore) @@ -249,7 +249,7 @@ run a specific program. The program must be a member of (while (not (input-pending-p)) (funcall (elt ops (random (length ops)))) (goto-char (point-min)) - (sit-for 0 10)))) + (sit-for 0.01)))) ;;;; whacking chars @@ -262,7 +262,7 @@ run a specific program. The program must be a member of (aset tbl i (+ 48 (random (- 123 48)))) (setq i (1+ i))) (translate-region (point-min) (point-max) tbl) - (sit-for 0 2))))) + (sit-for 0.002))))) (put 'zone-pgm-whack-chars 'wc-tbl (let ((tbl (make-string 128 ?x)) @@ -290,7 +290,7 @@ run a specific program. The program must be a member of (delete-char 1) (insert " "))) (forward-char 1)))) - (sit-for 0 2)))) + (sit-for 0.002)))) (defun zone-pgm-dissolve () (zone-remove-text) diff --git a/lisp/subr.el b/lisp/subr.el index 08dfe7aa43..e49c22158f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3270,7 +3270,14 @@ An obsolete, but still supported form is where the optional arg MILLISECONDS specifies an additional wait period, in milliseconds; this was useful when Emacs was built without floating point support." - (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")) + (declare (advertised-calling-convention (seconds &optional nodisp) "22.1") + (compiler-macro + (lambda (form) + (if (not (or (numberp nodisp) obsolete)) form + (macroexp-warn-and-return + "Obsolete calling convention for 'sit-for'" + `(,(car form) (+ ,seconds (/ (or ,nodisp 0) 1000.0)) ,obsolete) + '(obsolete sit-for)))))) ;; This used to be implemented in C until the following discussion: ;; https://lists.gnu.org/r/emacs-devel/2006-07/msg00401.html ;; Then it was moved here using an implementation based on an idle timer, commit 2cca6408fde59e57a0937e561675d181f7fa226e Author: Lars Ingebrigtsen Date: Tue Oct 18 22:17:12 2022 +0200 Fix functions.texi syntax error * doc/lispref/functions.texi (Function Documentation): Fix syntax error. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index e110283252..7ffde7d43d 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -534,7 +534,7 @@ compiler emit a warning message when it compiles Lisp programs which use the deprecated calling convention. @cindex computed documentation string -@kindex{:documentation} +@kindex :documentation Documentation strings are usually static, but occasionally it can be necessary to generate them dynamically. In some cases you can do so by writing a macro which generates at compile time the code of the commit 254f4766e6ef5370f75530752db5640895b9066a Author: Stefan Monnier Date: Tue Oct 18 16:06:42 2022 -0400 functions.texi: Fix bug#58602 * doc/lispref/functions.texi (Function Documentation): Document `:documentation` and `function-documentation`. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 8b858e0aa0..e110283252 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -533,6 +533,44 @@ Instead, use the @code{advertised-calling-convention} declaration compiler emit a warning message when it compiles Lisp programs which use the deprecated calling convention. +@cindex computed documentation string +@kindex{:documentation} +Documentation strings are usually static, but occasionally it can be +necessary to generate them dynamically. In some cases you can do so +by writing a macro which generates at compile time the code of the +function, including the desired documentation string. But you can +also generate the docstring dynamically by writing +@code{(:documentation @var{form})} instead of the documentation +string. This will evaluate @var{form} at run-time when the function +is defined and use it as the documentation string@footnote{This only +works in code using @code{lexical-binding}.}. You can also compute +the documentation string on the fly when it is requested, by setting +the @code{function-documentation} property of the function's symbol to +a Lisp form that evaluates to a string. + +For example: +@example +@group +(defun adder (x) + (lambda (y) + (:documentation (format "Add %S to the argument Y." x)) + (+ x y))) +(defalias 'adder5 (adder 5)) +(documentation 'adder5) + @result{} "Add 5 to the argument Y." +@end group + +@group +(put 'adder5 'function-documentation + '(concat (documentation (symbol-function 'adder5) 'raw) + " Consulted at " (format-time-string "%H:%M:%S"))) +(documentation 'adder5) + @result{} "Add 5 to the argument Y. Consulted at 15:52:13" +(documentation 'adder5) + @result{} "Add 5 to the argument Y. Consulted at 15:52:18" +@end group +@end example + @node Function Names @section Naming a Function @cindex function definition commit ab1b491f8373742a051aaf554c4604f2b976b414 Author: Juri Linkov Date: Tue Oct 18 21:13:29 2022 +0300 * lisp/outline.el (outline-minor-mode-insert-buttons): New defvar-local. (outline--make-button-overlay, outline--insert-open-button) (outline--insert-close-button): Insert button when outline-minor-mode-insert-buttons is non-nil, otherwise put an overlay with before-string. (bug#57813) * lisp/help.el (describe-bindings): Set buffer-local outline-minor-mode-insert-buttons to t. * lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common): Set buffer-local outline-minor-mode-use-margins to t. Don't set outline-regexp for leading spaces because now spaces are not added in the NEWS buffer. diff --git a/lisp/help.el b/lisp/help.el index 1cfd044db8..0f5342b77d 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -744,7 +744,8 @@ or a buffer name." (setq-local outline-heading-end-regexp ":\n") (setq-local outline-level (lambda () 1)) (setq-local outline-minor-mode-cycle t - outline-minor-mode-highlight t) + outline-minor-mode-highlight t + outline-minor-mode-insert-buttons t) (outline-minor-mode 1) (save-excursion (goto-char (point-min)) diff --git a/lisp/outline.el b/lisp/outline.el index 0d0974b5a9..2209964577 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -295,6 +295,9 @@ buffers (yet) -- that will be amended in a future version." (defvar-local outline--use-buttons nil "Non-nil when buffer displays clickable buttons on the headings.") +(defvar-local outline-minor-mode-insert-buttons nil + "Non-nil when it's allowed to modify buffer to insert buttons.") + (defvar-local outline--use-rtl nil "Non-nil when direction of clickable buttons is right-to-left.") @@ -1668,18 +1671,24 @@ With a prefix argument, show headings up to that LEVEL." (if outline--use-rtl 'outline-close-rtl 'outline-close) - 'outline-open))) - (inhibit-read-only t)) + 'outline-open)))) ;; In editing buffers we use overlays only, but in other buffers ;; we use a mix of text properties, text and overlays to make ;; movement commands work more logically. - (when (derived-mode-p 'special-mode) - (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face))) - (if-let ((image (plist-get icon 'image))) - (overlay-put o 'display image) - (overlay-put o 'display (concat (plist-get icon 'string) - (string (char-after (point))))) - (overlay-put o 'face (plist-get icon 'face)))) + (if outline-minor-mode-insert-buttons + (let ((inhibit-read-only t)) + (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face)) + (if-let ((image (plist-get icon 'image))) + (overlay-put o 'display image) + (overlay-put o 'display (concat (plist-get icon 'string) + (string (char-after (point))))) + (overlay-put o 'face (plist-get icon 'face)))) + (overlay-put + o 'before-string + (propertize " " + 'display + (or (plist-get icon 'image) + (plist-get icon 'string)))))) o)) (defun outline--make-margin-overlay (type) @@ -1710,7 +1719,7 @@ With a prefix argument, show headings up to that LEVEL." (beginning-of-line) (if use-margins (outline--make-margin-overlay 'open) - (when (derived-mode-p 'special-mode) + (when outline-minor-mode-insert-buttons (let ((inhibit-read-only t)) (insert " ") (beginning-of-line))) @@ -1727,7 +1736,7 @@ With a prefix argument, show headings up to that LEVEL." (beginning-of-line) (if use-margins (outline--make-margin-overlay 'close) - (when (derived-mode-p 'special-mode) + (when outline-minor-mode-insert-buttons (let ((inhibit-read-only t)) (insert " ") (beginning-of-line))) diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index d9decae4df..d57d053a7a 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -73,12 +73,9 @@ (defun emacs-news--mode-common () (setq-local font-lock-defaults '(emacs-news-mode-font-lock-keywords t)) - ;; This `outline-regexp' matches leading spaces inserted - ;; by the current implementation of `outline-minor-mode-use-buttons'. - (setq-local outline-regexp "\\(?: +\\)?\\(\\*+\\) " - outline-level (lambda () (length (match-string 1))) - outline-minor-mode-cycle t - outline-minor-mode-highlight 'append) + (setq-local outline-minor-mode-cycle t + outline-minor-mode-highlight 'append + outline-minor-mode-use-margins t) (outline-minor-mode) (setq-local imenu-generic-expression outline-imenu-generic-expression) (emacs-etc--hide-local-variables)) commit a9f183c760082af5978a8f76df60ca507cb39fea Author: Juri Linkov Date: Tue Oct 18 21:05:15 2022 +0300 * lisp/outline.el: Use one character wide strings for margins (bug#57813) (outline-open-in-margins, outline-close-in-margins) (outline-close-rtl-in-margins): Add 1-char emoji, symbol, text for margins that are 1-column wide. (outline-minor-mode): Force display of margins only for the selected buffer. diff --git a/lisp/outline.el b/lisp/outline.el index b87d3ac5e7..0d0974b5a9 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -339,17 +339,26 @@ Note that this feature is meant to be used in editing buffers." :version "29.1") (define-icon outline-open-in-margins outline-open - '((image "outline-open.svg" "outline-open.pbm" :height 10)) + '((image "outline-open.svg" "outline-open.pbm" :height 10) + (emoji "🔽") + (symbol "▼") + (text "v")) "Icon used for buttons for opened sections in margins." :version "29.1") (define-icon outline-close-in-margins outline-close - '((image "outline-open.svg" "outline-open.pbm" :height 10 :rotation -90)) + '((image "outline-open.svg" "outline-open.pbm" :height 10 :rotation -90) + (emoji "▶️") + (symbol "▶") + (text ">")) "Icon used for buttons for closed sections in margins." :version "29.1") (define-icon outline-close-rtl-in-margins outline-close-rtl - '((image "outline-open.svg" "outline-open.pbm" :height 10 :rotation 90)) + '((image "outline-open.svg" "outline-open.pbm" :height 10 :rotation 90) + (emoji "◀️") + (symbol "◀") + (text "<")) "Right-to-left icon used for closed sections in margins." :version "29.1") @@ -513,7 +522,8 @@ See the command `outline-mode' for more information on this mode." (setq-local left-margin-width (1+ left-margin-width))) (setq-local fringes-outside-margins t) ;; Force display of margins - (set-window-buffer nil (window-buffer))) + (when (eq (current-buffer) (window-buffer)) + (set-window-buffer nil (window-buffer)))) (when (or outline--use-buttons outline--use-margins) (add-hook 'after-change-functions #'outline--fix-buttons-after-change nil t)) @@ -551,7 +561,8 @@ See the command `outline-mode' for more information on this mode." (setq-local left-margin-width (1- left-margin-width))) (setq-local fringes-outside-margins nil) ;; Force removal of margins - (set-window-buffer nil (window-buffer))))) + (when (eq (current-buffer) (window-buffer)) + (set-window-buffer nil (window-buffer)))))) (defvar-local outline-heading-alist () "Alist associating a heading for every possible level. commit 40d2ed9bab2d1c060f50f0c23b3dda47a846f764 Author: Michael Albinus Date: Tue Oct 18 19:39:34 2022 +0200 * lisp/net/tramp.el (tramp-file-name-equal-p): Fix docstring. diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 4be019edd9..78107e1a03 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -125,6 +125,8 @@ been set up by `rfn-eshadow-setup-minibuffer'." ;; eshell.el keeps the path in `eshell-path-env'. We must change it ;; when `default-directory' points to another host. +;; This is fixed in Eshell with Emacs 29.1. + (defun tramp-eshell-directory-change () "Set `eshell-path-env' to $PATH of the host related to `default-directory'." ;; Remove last element of `(exec-path)', which is `exec-directory'. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4ff57e5d56..c06adb01e8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1526,7 +1526,8 @@ same connection. Make a copy in order to avoid side effects." ;; Comparison of file names is performed by `tramp-equal-remote'. (defun tramp-file-name-equal-p (vec1 vec2) - "Check, whether VEC1 and VEC2 denote the same `tramp-file-name'." + "Check, whether VEC1 and VEC2 denote the same `tramp-file-name'. +LOCALNAME and HOP do not count." (and (tramp-file-name-p vec1) (tramp-file-name-p vec2) (equal (tramp-file-name-unify vec1) (tramp-file-name-unify vec2)))) commit cd1a81e572d96c93a1c58b8f85f6105f380342c8 Author: Michael Albinus Date: Tue Oct 18 19:39:23 2022 +0200 * etc/NEWS: Adapt connection-local variables entries. diff --git a/etc/NEWS b/etc/NEWS index b48aeee008..dbc8971e41 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -820,22 +820,6 @@ This means Emacs built with GNUstep or built on macOS is now able to display different faces and images inside tooltips when the 'use-system-tooltips' user option is nil. -** Connection-local variables - -+++ -*** Some connection-local variables are now user options. -The variables 'connection-local-profile-alist' and -'connection-local-criteria-alist' are now user options, in order to -make it more convenient to inspect and modify them. - -+++ -*** The default connection-local application can be changed temporarily. -Running 'with-connection-local-variables' defaults to application -'tramp'. This can be changed by let-binding -'connection-local-default-application' to another symbol. This is -useful when running code in a buffer where Tramp has already set some -connection-local variables. - --- ** New minor mode 'pixel-scroll-precision-mode'. When enabled, and if your mouse supports it, you can scroll the @@ -2853,8 +2837,8 @@ normal. --- ** Themes have special autoload cookies. -All build-in themes are scraped for ;;;###theme-autoload cookies that -are loaded along with the regular auto-loaded code. +All build-in themes are scraped for ';;;###theme-autoload' cookies +that are loaded along with the regular auto-loaded code. +++ ** 'buffer-modified-p' has been extended. @@ -3224,12 +3208,32 @@ TIMEOUT is the idle time after which to deactivate the transient map. The default timeout value can be defined by the new variable 'set-transient-map-timeout'. +** Connection-local variables + ++++ +*** Some connection-local variables are now user options. +The variables 'connection-local-profile-alist' and +'connection-local-criteria-alist' are now user options, in order to +make it more convenient to inspect and modify them. + ++++ +*** New function 'connection-local-update-profile-variables'. +This function allows to modify the settings of an existing +connection-local profile. + ++++ +*** New macro 'with-connection-local-application-variables'. +This macro works like 'with-connection-local-variables', but it allows +to use another application but 'tramp'. This is useful when running +code in a buffer where Tramp has already set some connection-local +variables. + +++ -** New macro 'setq-connection-local'. +*** New macro 'setq-connection-local'. This allows dynamically setting variable values for a particular -connection within the body of 'with-connection-local-variables'. See -the "(elisp) Connection Local Variables" node in the Lisp Reference -manual for more information. +connection within the body of 'with-connection-local-{application-}variables'. +See the "(elisp) Connection Local Variables" node in the Lisp +Reference manual for more information. +++ ** 'plist-get', 'plist-put' and 'plist-member' are no longer limited to 'eq'. commit 59fc77ee523d2c925ed5dfc993a57c3c574ca5d5 Author: Matt Armstrong Date: Tue Oct 18 08:29:49 2022 -0700 * .gitignore: Unignore the tests/manual directory. (Bug#58611) diff --git a/.gitignore b/.gitignore index c10b3b33d3..a7828d3386 100644 --- a/.gitignore +++ b/.gitignore @@ -324,7 +324,7 @@ lib-src/seccomp-filter-exec.pfc /etc/*.gschema.valid # Ignore directory made by admin/make-manuals. -manual/ +/manual/ # Ignore Finder files on MacOS. .DS_Store commit c5e256677402b8f8745df503476a210bbf84a258 Author: Stefan Monnier Date: Tue Oct 18 10:49:43 2022 -0400 (byte-compile--first-symbol-with-pos): Fix bug#58601 * lisp/emacs-lisp/bytecomp.el: Require `subr-x`. (byte-compile--first-symbol-with-pos): Avoid inf-loops on circular data. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 692a87f6d5..f026568217 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -129,6 +129,7 @@ ;; us from emitting warnings when compiling files which use cl-lib without ;; requiring it! (bug#30635) (eval-when-compile (require 'cl-lib)) +(eval-when-compile (require 'subr-x)) ;; The feature of compiling in a specific target Emacs version ;; has been turned off because compile time options are a bad idea. @@ -1185,27 +1186,22 @@ message buffer `default-directory'." (defun byte-compile--first-symbol-with-pos (form) "Return the first symbol with position in form, or nil if none. Order is by depth-first search." - (cond - ((symbol-with-pos-p form) form) - ((consp form) - (or (byte-compile--first-symbol-with-pos (car form)) - (let ((sym nil)) - (setq form (cdr form)) - (while (and (consp form) - (not (setq sym (byte-compile--first-symbol-with-pos - (car form))))) - (setq form (cdr form))) - (or sym - (and form (byte-compile--first-symbol-with-pos form)))))) - ((or (vectorp form) (recordp form)) - (let ((len (length form)) - (i 0) - (sym nil)) - (while (and (< i len) - (not (setq sym (byte-compile--first-symbol-with-pos - (aref form i))))) - (setq i (1+ i))) - sym)))) + (named-let loop ((form form) + (depth 10)) ;Arbitrary limit. + (cond + ((<= depth 0) nil) ;Avoid cycles (bug#58601). + ((symbol-with-pos-p form) form) + ((consp form) + (or (loop (car form) (1- depth)) + (loop (cdr form) (1- depth)))) + ((or (vectorp form) (recordp form)) + (let ((len (length form)) + (i 0) + (sym nil)) + (while (and (< i len) + (not (setq sym (loop (aref form i) (1- depth))))) + (setq i (1+ i))) + sym))))) (defun byte-compile--warning-source-offset () "Return a source offset from `byte-compile-form-stack' or nil if none." commit 254536e41bf5fb62263206edb3c2d734f9cd50ef Author: Lars Ingebrigtsen Date: Tue Oct 18 13:17:59 2022 +0200 Regenerated ldefs-boot.el diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 357a29258b..b992846b0b 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -18748,7 +18748,7 @@ This scans for ;;;###autoload forms and related things. The first element on the command line should be the (main) loaddefs.el output file, and the rest are the directories to use.") - (load "theme-loaddefs.el") + (load "theme-loaddefs.el" t) (register-definition-prefixes "loaddefs-gen" '("autoload-" "generated-autoload-" "loaddefs-generate--" "no-update-autoloads")) commit 6cabef8799eb053c593f0a5241503ccbfb616c8a Author: Lars Ingebrigtsen Date: Tue Oct 18 13:17:52 2022 +0200 Fix previous loaddefs-gen fix diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index a76bcf604f..ecc5f7e47b 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -738,13 +738,12 @@ rules for built-in packages and excluded files." (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) output-file))) (let ((lisp-mode-autoload-regexp - ;; Avoid autoloads detection from loaddefs-gen. - (concat "^;;;###\\(\\(noexist\\)-\\)?\\(theme" "-autoload\\)"))) + "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) (loaddefs-generate (expand-file-name "../etc/themes/" lisp-directory) (expand-file-name "theme-loaddefs.el" lisp-directory)))) -;;;###autoload (load "theme-loaddefs.el") +;;;###autoload (load "theme-loaddefs.el" t) (provide 'loaddefs-gen) commit 86581698acc1a0991592e018c1ba749f3ded21be Author: Lars Ingebrigtsen Date: Tue Oct 18 13:14:08 2022 +0200 Fix faulty loaddefs detection * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch): Fix faulty loaddefs detection. diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index a1c4f91579..a76bcf604f 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -738,7 +738,8 @@ rules for built-in packages and excluded files." (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) output-file))) (let ((lisp-mode-autoload-regexp - "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) + ;; Avoid autoloads detection from loaddefs-gen. + (concat "^;;;###\\(\\(noexist\\)-\\)?\\(theme" "-autoload\\)"))) (loaddefs-generate (expand-file-name "../etc/themes/" lisp-directory) (expand-file-name "theme-loaddefs.el" lisp-directory)))) commit baa39e48495e100af6704af9287b544e612c245a Author: Alan Mackenzie Date: Tue Oct 18 10:00:26 2022 +0000 * lisp/progmodes/cc-defs.el Remove setting of inhibit-point-motion-hooks diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 4f1a08cfa0..81aac2ec27 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -60,7 +60,6 @@ (cc-bytecomp-defun region-active-p) ; XEmacs (cc-bytecomp-defvar mark-active) ; Emacs (cc-bytecomp-defvar deactivate-mark) ; Emacs -(cc-bytecomp-defvar inhibit-point-motion-hooks) ; Emacs (cc-bytecomp-defvar parse-sexp-lookup-properties) ; Emacs (cc-bytecomp-defvar text-property-default-nonsticky) ; Emacs 21 (cc-bytecomp-defun string-to-syntax) ; Emacs 21 commit 9c67e8e56d40926454e00b5652c2b519ae0b507b Author: Lars Ingebrigtsen Date: Tue Oct 18 11:18:16 2022 +0200 Regenerate ldefs-boot.el diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 517b23b1ea..357a29258b 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -4702,14 +4702,13 @@ Search happens in `native-comp-eln-load-path'. (autoload 'native-compile "comp" "\ Compile FUNCTION-OR-FILE into native code. This is the synchronous entry-point for the Emacs Lisp native -compiler. -FUNCTION-OR-FILE is a function symbol, a form, or the filename of -an Emacs Lisp source file. -If OUTPUT is non-nil, use it as the filename for the compiled -object. -If FUNCTION-OR-FILE is a filename, return the filename of the -compiled object. If FUNCTION-OR-FILE is a function symbol or a -form, return the compiled function. +compiler. FUNCTION-OR-FILE is a function symbol, a form, or the +filename of an Emacs Lisp source file. If OUTPUT is non-nil, use +it as the filename for the compiled object. If FUNCTION-OR-FILE +is a filename, if the compilation was successful return the +filename of the compiled object. If FUNCTION-OR-FILE is a +function symbol or a form, if the compilation was successful +return the compiled function. (fn FUNCTION-OR-FILE &optional OUTPUT)") (autoload 'batch-native-compile "comp" "\ @@ -4960,8 +4959,6 @@ evaluate `compilation-shell-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{compilation-shell-minor-mode-map} - (fn &optional ARG)" t) (autoload 'compilation-minor-mode "compile" "\ Toggle Compilation minor mode. @@ -4985,8 +4982,6 @@ evaluate `compilation-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{compilation-minor-mode-map} - (fn &optional ARG)" t) (autoload 'compilation-next-error-function "compile" "\ Advance to the next error message and visit the file where the error was. @@ -8371,7 +8366,7 @@ A second call of this function without changing point inserts the next match. A call with prefix PREFIX reads the symbol to insert from the minibuffer with completion. -(fn PREFIX)" t) +(fn PREFIX)" '("P")) (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ Repeat last operation on files in tree. FIRST-TIME non-nil means this is not a repetition, but the first time. @@ -9920,7 +9915,7 @@ When present, ID should be an opaque object used to identify the connection unequivocally. This is rarely needed and not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" t) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" '((erc-select-read-args))) (defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ ERC is a powerful, modular, and extensible IRC client. @@ -9967,7 +9962,7 @@ symbol composed of letters from the Latin alphabet.) This option is generally unneeded, however. See info node `(erc) Connecting' for use cases. Not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" t) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls)) (erc-select-read-args)))) (autoload 'erc-handle-irc-url "erc" "\ Use ERC to IRC on HOST:PORT in CHANNEL as USER with PASSWORD. If ERC is already connected to HOST:PORT, simply /join CHANNEL. @@ -10183,9 +10178,7 @@ it has to be wrapped in `(eval (quote ...))'. If NAME is already defined as a test and Emacs is running in batch mode, an error is signalled. -(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) -(function-put 'ert-deftest 'doc-string-elt 3) -(function-put 'ert-deftest 'lisp-indent-function 2) +(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) (autoload 'ert-run-tests-batch "ert" "\ Run the tests specified by SELECTOR, printing results to the terminal. @@ -11719,6 +11712,17 @@ variables are set in the server's process buffer according to the VARIABLES list of the connection profile. The list is processed in order. +(fn PROFILE VARIABLES)") +(autoload 'connection-local-update-profile-variables "files-x" "\ +Update the variable settings for PROFILE in-place. +VARIABLES is a list that declares connection-local variables for +the connection profile. An element in VARIABLES is an alist +whose elements are of the form (VAR . VALUE). + +Unlike `connection-local-set-profile-variables' (which see), this +function preserves the values of any existing variable +definitions that aren't listed in VARIABLES. + (fn PROFILE VARIABLES)") (autoload 'hack-connection-local-variables-apply "files-x" "\ Apply connection-local variables identified by CRITERIA. @@ -11731,11 +11735,38 @@ Apply connection-local variables according to `default-directory'. Execute BODY, and unwind connection-local variables. (fn &rest BODY)" nil t) +(autoload 'with-connection-local-application-variables "files-x" "\ +Apply connection-local variables for APPLICATION in `default-directory'. +Execute BODY, and unwind connection-local variables. + +(fn APPLICATION &rest BODY)" nil t) +(function-put 'with-connection-local-application-variables 'lisp-indent-function 1) (autoload 'with-connection-local-variables-1 "files-x" "\ Apply connection-local variables according to `default-directory'. Call BODY-FUN with no args, and then unwind connection-local variables. (fn BODY-FUN)") +(autoload 'setq-connection-local "files-x" "\ +Set each VARIABLE connection-locally to VALUE. + +When `connection-local-profile-name-for-setq' is set, assign each +variable's value on that connection profile, and set that profile +for `connection-local-criteria'. You can use this in combination +with `with-connection-local-variables', as in + + (with-connection-local-variables + (setq-connection-local VARIABLE VALUE)) + +If there's no connection-local profile to use, just set the +variables normally, as with `setq'. + +The variables are literal symbols and should not be quoted. The +second VALUE is not computed until after the first VARIABLE is +set, and so on; each VALUE can use the new value of variables set +earlier in the `setq-connection-local'. The return value of the +`setq-connection-local' form is the value of the last VALUE. + +(fn [VARIABLE VALUE]...)" nil t) (autoload 'path-separator "files-x" "\ The connection-local value of `path-separator'.") (autoload 'null-device "files-x" "\ @@ -12261,8 +12292,6 @@ evaluate `flymake-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{flymake-mode-map} - (fn &optional ARG)" t) (autoload 'flymake-mode-on "flymake" "\ Turn Flymake mode on.") @@ -15888,8 +15917,7 @@ inlined into the compiled format versions. This means that if you change its definition, you should explicitly call `ibuffer-recompile-formats'. -(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t) -(function-put 'define-ibuffer-column 'lisp-indent-function 'defun) +(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-sorter "ibuf-macs" "\ Define a method of sorting named NAME. DOCUMENTATION is the documentation of the function, which will be called @@ -15900,9 +15928,7 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one buffer object, and `b' bound to another. BODY should return a non-nil value if and only if `a' is \"less than\" `b'. -(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t) -(function-put 'define-ibuffer-sorter 'lisp-indent-function 1) -(function-put 'define-ibuffer-sorter 'doc-string-elt 2) +(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-op "ibuf-macs" "\ Generate a function which operates on a buffer. OP becomes the name of the function; if it doesn't begin with @@ -15941,9 +15967,7 @@ BODY define the operation; they are forms to evaluate per each marked buffer. BODY is evaluated with `buf' bound to the buffer object. -(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t) -(function-put 'define-ibuffer-op 'lisp-indent-function 2) -(function-put 'define-ibuffer-op 'doc-string-elt 3) +(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-filter "ibuf-macs" "\ Define a filter named NAME. DOCUMENTATION is the documentation of the function. @@ -15958,9 +15982,7 @@ not a particular buffer should be displayed or not. The forms in BODY will be evaluated with BUF bound to the buffer object, and QUALIFIER bound to the current value of the filter. -(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t) -(function-put 'define-ibuffer-filter 'lisp-indent-function 2) -(function-put 'define-ibuffer-filter 'doc-string-elt 2) +(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro) (register-definition-prefixes "ibuf-macs" '("ibuffer-")) @@ -18726,6 +18748,7 @@ This scans for ;;;###autoload forms and related things. The first element on the command line should be the (main) loaddefs.el output file, and the rest are the directories to use.") + (load "theme-loaddefs.el") (register-definition-prefixes "loaddefs-gen" '("autoload-" "generated-autoload-" "loaddefs-generate--" "no-update-autoloads")) @@ -25598,8 +25621,6 @@ evaluate `rectangle-mark-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{rectangle-mark-mode-map} - (fn &optional ARG)" t) (register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-")) commit 1a8015b83761f27d299b1ffa45fc045bb76daf8a Author: Andrea Corallo Date: Sat Oct 15 00:59:55 2022 +0200 * Prevent potential native compilation infinite recursions * lisp/emacs-lisp/comp.el (comp-no-spawn): New var. (comp-subr-trampoline-install, comp-final, comp-run-async-workers) (comp--native-compile): Update. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b7c792e64b..2c9b79334b 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -687,6 +687,9 @@ Useful to hook into pass checkers.") 'native-compiler-error) +(defvar comp-no-spawn nil + "Non-nil don't spawn native compilation processes.") + ;; Moved early to avoid circularity when comp.el is loaded and ;; `macroexpand' needs to be advised (bug#47049). ;;;###autoload @@ -696,12 +699,9 @@ Useful to hook into pass checkers.") (memq subr-name native-comp-never-optimize-functions) (gethash subr-name comp-installed-trampolines-h)) (cl-assert (subr-primitive-p (symbol-function subr-name))) - (comp--install-trampoline - subr-name - (or (comp-trampoline-search subr-name) - (comp-trampoline-compile subr-name) - ;; Should never happen. - (cl-assert nil))))) + (when-let ((trampoline (or (comp-trampoline-search subr-name) + (comp-trampoline-compile subr-name)))) + (comp--install-trampoline subr-name trampoline)))) (cl-defstruct (comp-vec (:copier nil)) @@ -3689,7 +3689,8 @@ Prepare every function for final compilation and drive the C back-end." (print-circle t) (print-escape-multibyte t) (expr `((require 'comp) - (setf native-comp-verbose ,native-comp-verbose + (setf comp-no-spawn t + native-comp-verbose ,native-comp-verbose comp-libgccjit-reproducer ,comp-libgccjit-reproducer comp-ctxt ,comp-ctxt native-comp-eln-load-path ',native-comp-eln-load-path @@ -3945,8 +3946,9 @@ display a message." (file-newer-than-file-p source-file (comp-el-to-eln-filename source-file)))) do (let* ((expr `((require 'comp) - (setq comp-async-compilation t) - (setq warning-fill-column most-positive-fixnum) + (setq comp-async-compilation t + comp-no-spawn t + warning-fill-column most-positive-fixnum) ,(let ((set (list 'setq))) (dolist (var '(comp-file-preloaded-p native-compile-target-directory @@ -4046,72 +4048,73 @@ the deferred compilation mechanism." (stringp function-or-file)) (signal 'native-compiler-error (list "Not a function symbol or file" function-or-file))) - (catch 'no-native-compile - (let* ((print-symbols-bare t) - (data function-or-file) - (comp-native-compiling t) - (byte-native-qualities nil) - (symbols-with-pos-enabled t) - ;; Have byte compiler signal an error when compilation fails. - (byte-compile-debug t) - (comp-ctxt (make-comp-ctxt :output output - :with-late-load with-late-load))) - (comp-log "\n \n" 1) - (unwind-protect - (progn - (condition-case err - (cl-loop - with report = nil - for t0 = (current-time) - for pass in comp-passes - unless (memq pass comp-disabled-passes) - do - (comp-log (format "(%s) Running pass %s:\n" - function-or-file pass) - 2) - (setf data (funcall pass data)) - (push (cons pass (float-time (time-since t0))) report) - (cl-loop for f in (alist-get pass comp-post-pass-hooks) - do (funcall f data)) - finally - (when comp-log-time-report - (comp-log (format "Done compiling %s" data) 0) - (cl-loop for (pass . time) in (reverse report) - do (comp-log (format "Pass %s took: %fs." - pass time) 0)))) - (native-compiler-skip) - (t - (let ((err-val (cdr err))) - ;; If we are doing an async native compilation print the - ;; error in the correct format so is parsable and abort. - (if (and comp-async-compilation - (not (eq (car err) 'native-compiler-error))) - (progn - (message (if err-val - "%s: Error: %s %s" - "%s: Error %s") - function-or-file - (get (car err) 'error-message) - (car-safe err-val)) - (kill-emacs -1)) - ;; Otherwise re-signal it adding the compilation input. - (signal (car err) (if (consp err-val) - (cons function-or-file err-val) - (list function-or-file err-val))))))) - (if (stringp function-or-file) - data - ;; So we return the compiled function. - (native-elisp-load data))) - ;; We may have created a temporary file when we're being - ;; called with something other than a file as the argument. - ;; Delete it. - (when (and (not (stringp function-or-file)) - (not output) - comp-ctxt - (comp-ctxt-output comp-ctxt) - (file-exists-p (comp-ctxt-output comp-ctxt))) - (message "Deleting %s" (comp-ctxt-output comp-ctxt)) - (delete-file (comp-ctxt-output comp-ctxt))))))) + (unless comp-no-spawn + (catch 'no-native-compile + (let* ((print-symbols-bare t) + (data function-or-file) + (comp-native-compiling t) + (byte-native-qualities nil) + (symbols-with-pos-enabled t) + ;; Have byte compiler signal an error when compilation fails. + (byte-compile-debug t) + (comp-ctxt (make-comp-ctxt :output output + :with-late-load with-late-load))) + (comp-log "\n \n" 1) + (unwind-protect + (progn + (condition-case err + (cl-loop + with report = nil + for t0 = (current-time) + for pass in comp-passes + unless (memq pass comp-disabled-passes) + do + (comp-log (format "(%s) Running pass %s:\n" + function-or-file pass) + 2) + (setf data (funcall pass data)) + (push (cons pass (float-time (time-since t0))) report) + (cl-loop for f in (alist-get pass comp-post-pass-hooks) + do (funcall f data)) + finally + (when comp-log-time-report + (comp-log (format "Done compiling %s" data) 0) + (cl-loop for (pass . time) in (reverse report) + do (comp-log (format "Pass %s took: %fs." + pass time) 0)))) + (native-compiler-skip) + (t + (let ((err-val (cdr err))) + ;; If we are doing an async native compilation print the + ;; error in the correct format so is parsable and abort. + (if (and comp-async-compilation + (not (eq (car err) 'native-compiler-error))) + (progn + (message (if err-val + "%s: Error: %s %s" + "%s: Error %s") + function-or-file + (get (car err) 'error-message) + (car-safe err-val)) + (kill-emacs -1)) + ;; Otherwise re-signal it adding the compilation input. + (signal (car err) (if (consp err-val) + (cons function-or-file err-val) + (list function-or-file err-val))))))) + (if (stringp function-or-file) + data + ;; So we return the compiled function. + (native-elisp-load data))) + ;; We may have created a temporary file when we're being + ;; called with something other than a file as the argument. + ;; Delete it. + (when (and (not (stringp function-or-file)) + (not output) + comp-ctxt + (comp-ctxt-output comp-ctxt) + (file-exists-p (comp-ctxt-output comp-ctxt))) + (message "Deleting %s" (comp-ctxt-output comp-ctxt)) + (delete-file (comp-ctxt-output comp-ctxt)))))))) (defun native-compile-async-skip-p (file load selector) "Return non-nil if FILE's compilation should be skipped. @@ -4240,14 +4243,13 @@ Search happens in `native-comp-eln-load-path'." (defun native-compile (function-or-file &optional output) "Compile FUNCTION-OR-FILE into native code. This is the synchronous entry-point for the Emacs Lisp native -compiler. -FUNCTION-OR-FILE is a function symbol, a form, or the filename of -an Emacs Lisp source file. -If OUTPUT is non-nil, use it as the filename for the compiled -object. -If FUNCTION-OR-FILE is a filename, return the filename of the -compiled object. If FUNCTION-OR-FILE is a function symbol or a -form, return the compiled function." +compiler. FUNCTION-OR-FILE is a function symbol, a form, or the +filename of an Emacs Lisp source file. If OUTPUT is non-nil, use +it as the filename for the compiled object. If FUNCTION-OR-FILE +is a filename, if the compilation was successful return the +filename of the compiled object. If FUNCTION-OR-FILE is a +function symbol or a form, if the compilation was successful +return the compiled function." (comp--native-compile function-or-file nil output)) ;;;###autoload commit efd3ef3ceb799fa26be8f84d54d4a21ebc4a5d31 (refs/remotes/origin/emacs-28) Author: Manuel Giraud Date: Sat Oct 15 18:58:56 2022 +0200 ; * src/window.c: Fix some comments. (Bug#58550) diff --git a/src/window.c b/src/window.c index ed30544ff8..51fd2abc5b 100644 --- a/src/window.c +++ b/src/window.c @@ -5403,12 +5403,13 @@ window_wants_mode_line (struct window *w) * Return 1 if window W wants a header line and is high enough to * accommodate it, 0 otherwise. * - * W wants a header line if it's a leaf window and neither a minibuffer - * nor a pseudo window. Moreover, its 'window-mode-line-format' - * parameter must not be 'none' and either that parameter or W's - * buffer's 'mode-line-format' value must be non-nil. Finally, W must - * be higher than its frame's canonical character height and be able to - * accommodate a mode line too if necessary (the mode line prevails). + * W wants a header line if it's a leaf window and neither a + * minibuffer nor a pseudo window. Moreover, its + * 'window-header-line-format' parameter must not be 'none' and either + * that parameter or W's buffer's 'header-line-format' value must be + * non-nil. Finally, W must be higher than its frame's canonical + * character height and be able to accommodate a mode line too if + * necessary (the mode line prevails). */ bool window_wants_header_line (struct window *w) @@ -5436,9 +5437,9 @@ window_wants_header_line (struct window *w) * accommodate it, 0 otherwise. * * W wants a tab line if it's a leaf window and neither a minibuffer - * nor a pseudo window. Moreover, its 'window-mode-line-format' + * nor a pseudo window. Moreover, its 'window-tab-line-format' * parameter must not be 'none' and either that parameter or W's - * buffer's 'mode-line-format' value must be non-nil. Finally, W must + * buffer's 'tab-line-format' value must be non-nil. Finally, W must * be higher than its frame's canonical character height and be able * to accommodate a mode line and a header line too if necessary (the * mode line and a header line prevail).