commit 5640b055d6962bbf54958e9c2355bd21f763967d (HEAD, refs/remotes/origin/master) Merge: 9ce0fe5ef4 9bd3f78645 Author: Stefan Kangas Date: Mon Dec 13 06:30:58 2021 +0100 Merge from origin/emacs-28 9bd3f78645 Make `M-x run-python' select the window again 62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ... ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files. b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer... 64ea1a178c Fix eshell for systems that do not have subprocesses commit 9ce0fe5ef4d6e9c3dcd69237e0b5bb3fd46ee7da Author: Lars Ingebrigtsen Date: Mon Dec 13 06:08:09 2021 +0100 Add a new `sqlite-pragma' command * doc/lispref/text.texi (Database): Document it. * src/sqlite.c (Fsqlite_pragma): Add a separate command for pragmas. These can be done via sqlite-execute, but it's less confusing to have them in a separate command. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index b8d92f7fdc..5ab5e5715f 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5286,6 +5286,21 @@ Like @code{progn} (@pxref{Sequencing}), but executes @var{body} with a transaction held, and commits the transaction at the end. @end defmac +@defun sqlite-pragma db pragma +Execute @var{pragma} in @var{db}. A @dfn{pragma} is usually a command +that affects the database overall, instead of any particular table. +For instance, to make SQLite automatically garbage collect data that's +no longer needed, you can say: + +@lisp +(sqlite-pragma db "auto_vacuum = FULL") +@end lisp + +This function returns non-@code{nil} on success and @code{nil} if the +pragma failed. Many pragmas can only be issued when the database is +brand new and empty. +@end defun + @defun sqlite-load-extension db module Load the named extension @var{module} into the database @var{db}. Extensions are usually shared-library files; on GNU and Unix systems, diff --git a/src/sqlite.c b/src/sqlite.c index 38e939cd84..4968ce3f69 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -574,6 +574,17 @@ DEFUN ("sqlite-rollback", Fsqlite_rollback, Ssqlite_rollback, 1, 1, 0, return sqlite_exec (XSQLITE (db)->db, "rollback"); } +DEFUN ("sqlite-pragma", Fsqlite_pragma, Ssqlite_pragma, 2, 2, 0, + doc: /* Execute PRAGMA in DB. */) + (Lisp_Object db, Lisp_Object pragma) +{ + check_sqlite (db, false); + CHECK_STRING (pragma); + + return sqlite_exec (XSQLITE (db)->db, + SSDATA (concat2 (build_string ("PRAGMA "), pragma))); +} + #ifdef HAVE_SQLITE3_LOAD_EXTENSION DEFUN ("sqlite-load-extension", Fsqlite_load_extension, Ssqlite_load_extension, 2, 2, 0, @@ -689,6 +700,7 @@ syms_of_sqlite (void) defsubr (&Ssqlite_transaction); defsubr (&Ssqlite_commit); defsubr (&Ssqlite_rollback); + defsubr (&Ssqlite_pragma); #ifdef HAVE_SQLITE3_LOAD_EXTENSION defsubr (&Ssqlite_load_extension); #endif commit c86b86f9a9ee3c42aed9ede794e8c3e19ce35ec5 Author: Lars Ingebrigtsen Date: Mon Dec 13 05:38:29 2021 +0100 Introduce a new sqlite-locked-error * src/sqlite.c (Fsqlite_execute): Use it. (syms_of_sqlite): Introduce a new error for locked databases so that we can catch that condition on higher levels. diff --git a/src/sqlite.c b/src/sqlite.c index d92dcf723c..38e939cd84 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -400,7 +400,9 @@ Value is the number of affected rows. */) exit: if (errmsg != NULL) - xsignal1 (Qerror, build_string (errmsg)); + xsignal1 (ret == SQLITE_LOCKED || ret == SQLITE_BUSY? + Qsqlite_locked_error: Qerror, + build_string (errmsg)); return retval; } @@ -698,8 +700,15 @@ syms_of_sqlite (void) DEFSYM (Qfull, "full"); #endif defsubr (&Ssqlitep); - DEFSYM (Qsqlitep, "sqlitep"); defsubr (&Ssqlite_available_p); + + DEFSYM (Qsqlite_locked_error, "sqlite-locked-error"); + Fput (Qsqlite_locked_error, Qerror_conditions, + Fpurecopy (list2 (Qsqlite_locked_error, Qerror))); + Fput (Qsqlite_locked_error, Qerror_message, + build_pure_c_string ("Database locked")); + + DEFSYM (Qsqlitep, "sqlitep"); DEFSYM (Qfalse, "false"); DEFSYM (Qsqlite, "sqlite"); DEFSYM (Qsqlite3, "sqlite3"); commit 9bd3f78645e14fdbaf3a569df5e0a52249c4f90e (refs/remotes/origin/emacs-28) Author: Kévin Le Gouguec Date: Mon Dec 13 05:17:00 2021 +0100 Make `M-x run-python' select the window again Interactively, we want M-x run-python to focus the interpreter buffer. The previous code failed in two ways: - the call to 'display-buffer' was not reached if an interpreter was already running, - set-buffer is ineffectual if the interpreter's window is not selected: once Emacs returns to the command loop, the current buffer will revert back to what the selected window contains. * lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW argument regardless of whether an interpreter buffer exists, and use pop-to-buffer to select the window. (run-python): Delegate buffer management to 'python-shell-make-comint'. * test/lisp/progmodes/python-tests.el (python-tests--run-python-selects-window): Rename from 'python-tests--bug31398', and adjust assertions (bug#52380). diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f1c3e75bb7..6357c4f2d3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2994,8 +2994,9 @@ killed." (mapconcat #'identity args " "))) (with-current-buffer buffer (inferior-python-mode)) - (when show (display-buffer buffer)) (and internal (set-process-query-on-exit-flag process nil)))) + (when show + (pop-to-buffer proc-buffer-name)) proc-buffer-name)))) ;;;###autoload @@ -3027,7 +3028,6 @@ process buffer for a list of commands.)" (python-shell-make-comint (or cmd (python-shell-calculate-command)) (python-shell-get-process-name dedicated) show))) - (set-buffer buffer) (get-buffer-process buffer))) (defun run-python-internal () diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 6ab9c62746..752a4f0113 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -5448,15 +5448,21 @@ buffer with overlapping strings." (python-nav-end-of-statement))) (should (eolp)))) -;; After call `run-python' the buffer running the python process is current. -(ert-deftest python-tests--bug31398 () - "Test for https://debbugs.gnu.org/31398 ." +;; Interactively, `run-python' focuses the buffer running the +;; interpreter. +(ert-deftest python-tests--run-python-selects-window () + "Test for bug#31398. See also bug#44421 and bug#52380." (skip-unless (executable-find python-tests-shell-interpreter)) - (let ((buffer (process-buffer (run-python nil nil 'show)))) - (should (eq buffer (current-buffer))) + (let* ((buffer (process-buffer (run-python nil nil 'show))) + (window (get-buffer-window buffer))) + ;; We look at `selected-window' rather than `current-buffer' + ;; because as `(elisp)Current buffer' says, the latter will only + ;; be synchronized with the former when returning to the "command + ;; loop"; until then, `current-buffer' can change arbitrarily. + (should (eq window (selected-window))) (pop-to-buffer (other-buffer)) (run-python nil nil 'show) - (should (eq buffer (current-buffer))))) + (should (eq window (selected-window))))) (ert-deftest python-tests--fill-long-first-line () (should commit 2f6601054940e698184f4c9c60a47c16e5baa880 Author: Po Lu Date: Mon Dec 13 09:59:39 2021 +0800 Work around pixel scrolling issues when org-indent-mode is on * lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line): Subtract line height of window start when it doesn't appear at the 0th pixel of the line. diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 0e22ef2a6a..142ebf9c65 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -416,6 +416,12 @@ window, and the pixel height of that line." ;; restore initial position (set-window-start nil pos0 t) (set-window-vscroll nil vscroll0 t) + (when (and line-height + (> (car (posn-x-y (posn-at-point pos0))) 0)) + (setq line-height (- line-height + (save-excursion + (goto-char pos0) + (line-pixel-height))))) (cons pos line-height))) (defun pixel-point-at-unseen-line () commit 5181276b4362b25cd91818bc0b4e6fbd985b5882 Author: Po Lu Date: Mon Dec 13 09:17:55 2021 +0800 Stop using XI focus events on non-GTK builds * src/xfns.c (setup_xi_event_mask): Stop setting XI_FocusIn and XI_FocusOut. * src/xterm.c (x_detect_focus_change) : Don't handle XI_FocusIn and XI_FocusOut events when not on GTK. diff --git a/src/xfns.c b/src/xfns.c index 5eff9f5b0f..b5694829ae 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2936,8 +2936,10 @@ setup_xi_event_mask (struct frame *f) XISetMask (m, XI_Motion); XISetMask (m, XI_Enter); XISetMask (m, XI_Leave); +#if 0 XISetMask (m, XI_FocusIn); XISetMask (m, XI_FocusOut); +#endif XISelectEvents (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &mask, 1); diff --git a/src/xterm.c b/src/xterm.c index 9d60292756..1f377f838b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5144,19 +5144,23 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame, int focus_state = focus_frame ? focus_frame->output_data.x->focus_state : 0; - if (((((xi_event->evtype == XI_Enter - || xi_event->evtype == XI_Leave) - && (((XIEnterEvent *) xi_event)->detail - != XINotifyInferior) - && !(focus_state & FOCUS_EXPLICIT)) - || xi_event->evtype == XI_FocusIn - || xi_event->evtype == XI_FocusOut))) +#ifdef USE_GTK + if (xi_event->evtype == XI_FocusIn + || xi_event->evtype == XI_FocusOut) + x_focus_changed ((xi_event->evtype == XI_FocusIn + ? FocusIn : FocusOut), + FOCUS_EXPLICIT, + dpyinfo, frame, bufp); + else +#endif + if ((xi_event->evtype == XI_Enter + || xi_event->evtype == XI_Leave) + && (((XIEnterEvent *) xi_event)->detail + != XINotifyInferior) + && !(focus_state & FOCUS_EXPLICIT)) x_focus_changed ((xi_event->evtype == XI_Enter - || xi_event->evtype == XI_FocusIn ? FocusIn : FocusOut), - (xi_event->evtype == XI_Enter - || xi_event->evtype == XI_Leave - ? FOCUS_IMPLICIT : FOCUS_EXPLICIT), + FOCUS_IMPLICIT, dpyinfo, frame, bufp); break; } commit a07d954fe254ae408c9d35f3714620b0e0cd07a9 Author: Juri Linkov Date: Sun Dec 12 21:58:53 2021 +0200 ; * etc/NEWS: Add 'char-fold-override' (bug#52394). diff --git a/etc/NEWS b/etc/NEWS index 807751ae12..b55b30665b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -331,6 +331,10 @@ received. * Changes in Specialized Modes and Packages in Emacs 29.1 +** Isearch and Replace + +*** New user option 'char-fold-override' omits the default character-folding. + ** New minor mode 'glyphless-display-mode'. This allows an easy way to toggle seeing all glyphless characters in the current buffer. commit 986ce367dba77caeedf865db79d1b347bf1b735a Author: Eli Zaretskii Date: Sun Dec 12 21:34:57 2021 +0200 * lisp/char-fold.el (char-fold-override): Doc fix. diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 4fb2643d1f..b8e3d2f679 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -249,13 +249,13 @@ Exceptionally for the space character (32), ALIST is ignored.") char-fold--previous new)))) (defcustom char-fold-override char-fold--default-override - "Non-nil means to override all default folding characters. -When nil (the default value), the equivalence table is populated -with the default set of equivalent chars, and you can remove unneeded -characters using `char-fold-exclude', and add own characters using -`char-fold-include'. But when this variable is customized to non-nil, -you start with an empty table where you can add only own characters -using `char-fold-include'." + "Non-nil means to override the default definitions of equivalent characters. +When nil (the default), the table of character equivalences used +for character-folding is populated with the default set of equivalent +characters; customize `char-fold-exclude' to remove unneeded equivalences, +and `char-fold-include' to add your own. +When this variable is non-nil, the table of equivalences starts empty, +and you can add your own equivalences by customizing `char-fold-include'." :type 'boolean :initialize #'custom-initialize-default :set (lambda (sym val) commit 242cdac3ad8ec5427c3e2d32600e4917eec188cc Author: Juri Linkov Date: Sun Dec 12 21:11:47 2021 +0200 * lisp/char-fold.el (char-fold-override): New defcustom (bug#52394). (char-fold--default-override): New defconst with the default value nil. (char-fold--previous): Add char-fold--default-override. (char-fold--make-table): Don't populate the table with default chars when char-fold-override or char-fold--default-override is non-nil. (char-fold-update-table): Add char-fold--default-override. diff --git a/lisp/char-fold.el b/lisp/char-fold.el index e3ab7d5b64..4fb2643d1f 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -26,6 +26,7 @@ (eval-and-compile (put 'char-fold-table 'char-table-extra-slots 1) + (defconst char-fold--default-override nil) (defconst char-fold--default-include '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»") (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "󠀢" "❮" "❯" "‹" "›") @@ -40,7 +41,8 @@ )) (defconst char-fold--default-symmetric nil) (defvar char-fold--previous - (list char-fold--default-include + (list char-fold--default-override + char-fold--default-include char-fold--default-exclude char-fold--default-symmetric))) @@ -67,48 +69,50 @@ ;; - A single char of the decomp might be allowed to match the ;; character. ;; Some examples in the comments below. - (map-char-table - (lambda (char decomp) - (when (consp decomp) - ;; Skip trivial cases like ?a decomposing to (?a). - (unless (and (not (cdr decomp)) - (eq char (car decomp))) - (if (symbolp (car decomp)) - ;; Discard a possible formatting tag. - (setq decomp (cdr decomp)) - ;; If there's no formatting tag, ensure that char matches - ;; its decomp exactly. This is because we want 'ä' to - ;; match 'ä', but we don't want '¹' to match '1'. - (aset equiv char - (cons (apply #'string decomp) - (aref equiv char)))) - - ;; Allow the entire decomp to match char. If decomp has - ;; multiple characters, this is done by adding an entry - ;; to the alist of the first character in decomp. This - ;; allows 'ff' to match 'ff', 'ä' to match 'ä', and '1' to - ;; match '¹'. - (let ((make-decomp-match-char - (lambda (decomp char) - (if (cdr decomp) - (aset equiv-multi (car decomp) - (cons (cons (apply #'string (cdr decomp)) - (regexp-quote (string char))) - (aref equiv-multi (car decomp)))) - (aset equiv (car decomp) - (cons (char-to-string char) - (aref equiv (car decomp)))))))) - (funcall make-decomp-match-char decomp char) - ;; Check to see if the first char of the decomposition - ;; has a further decomposition. If so, add a mapping - ;; back from that second decomposition to the original - ;; character. This allows e.g. 'ι' (GREEK SMALL LETTER - ;; IOTA) to match both the Basic Greek block and - ;; Extended Greek block variants of IOTA + - ;; diacritical(s). Repeat until there are no more - ;; decompositions. - (let ((dec decomp) - next-decomp) + (unless (or (bound-and-true-p char-fold-override) + char-fold--default-override) + (map-char-table + (lambda (char decomp) + (when (consp decomp) + ;; Skip trivial cases like ?a decomposing to (?a). + (unless (and (not (cdr decomp)) + (eq char (car decomp))) + (if (symbolp (car decomp)) + ;; Discard a possible formatting tag. + (setq decomp (cdr decomp)) + ;; If there's no formatting tag, ensure that char matches + ;; its decomp exactly. This is because we want 'ä' to + ;; match 'ä', but we don't want '¹' to match '1'. + (aset equiv char + (cons (apply #'string decomp) + (aref equiv char)))) + + ;; Allow the entire decomp to match char. If decomp has + ;; multiple characters, this is done by adding an entry + ;; to the alist of the first character in decomp. This + ;; allows 'ff' to match 'ff', 'ä' to match 'ä', and '1' to + ;; match '¹'. + (let ((make-decomp-match-char + (lambda (decomp char) + (if (cdr decomp) + (aset equiv-multi (car decomp) + (cons (cons (apply #'string (cdr decomp)) + (regexp-quote (string char))) + (aref equiv-multi (car decomp)))) + (aset equiv (car decomp) + (cons (char-to-string char) + (aref equiv (car decomp)))))))) + (funcall make-decomp-match-char decomp char) + ;; Check to see if the first char of the decomposition + ;; has a further decomposition. If so, add a mapping + ;; back from that second decomposition to the original + ;; character. This allows e.g. 'ι' (GREEK SMALL LETTER + ;; IOTA) to match both the Basic Greek block and + ;; Extended Greek block variants of IOTA + + ;; diacritical(s). Repeat until there are no more + ;; decompositions. + (let ((dec decomp) + next-decomp) (while dec (setq next-decomp (char-table-range table (car dec))) (when (consp next-decomp) @@ -118,24 +122,24 @@ (car next-decomp))) (funcall make-decomp-match-char (list (car next-decomp)) char))) (setq dec next-decomp))) - ;; Do it again, without the non-spacing characters. - ;; This allows 'a' to match 'ä'. - (let ((simpler-decomp nil) - (found-one nil)) - (dolist (c decomp) - (if (> (get-char-code-property c 'canonical-combining-class) 0) - (setq found-one t) - (push c simpler-decomp))) - (when (and simpler-decomp found-one) - (funcall make-decomp-match-char simpler-decomp char) - ;; Finally, if the decomp only had one spacing - ;; character, we allow this character to match the - ;; decomp. This is to let 'a' match 'ä'. - (unless (cdr simpler-decomp) - (aset equiv (car simpler-decomp) - (cons (apply #'string decomp) - (aref equiv (car simpler-decomp))))))))))) - table) + ;; Do it again, without the non-spacing characters. + ;; This allows 'a' to match 'ä'. + (let ((simpler-decomp nil) + (found-one nil)) + (dolist (c decomp) + (if (> (get-char-code-property c 'canonical-combining-class) 0) + (setq found-one t) + (push c simpler-decomp))) + (when (and simpler-decomp found-one) + (funcall make-decomp-match-char simpler-decomp char) + ;; Finally, if the decomp only had one spacing + ;; character, we allow this character to match the + ;; decomp. This is to let 'a' match 'ä'. + (unless (cdr simpler-decomp) + (aset equiv (car simpler-decomp) + (cons (apply #'string decomp) + (aref equiv (car simpler-decomp))))))))))) + table)) ;; Add some entries to default decomposition (dolist (it (or (bound-and-true-p char-fold-include) @@ -232,7 +236,9 @@ Exceptionally for the space character (32), ALIST is ignored.") (defun char-fold-update-table () "Update char-fold-table only when one of the options changes its value." - (let ((new (list (or (bound-and-true-p char-fold-include) + (let ((new (list (or (bound-and-true-p char-fold-override) + char-fold--default-override) + (or (bound-and-true-p char-fold-include) char-fold--default-include) (or (bound-and-true-p char-fold-exclude) char-fold--default-exclude) @@ -242,6 +248,22 @@ Exceptionally for the space character (32), ALIST is ignored.") (setq char-fold-table (char-fold--make-table) char-fold--previous new)))) +(defcustom char-fold-override char-fold--default-override + "Non-nil means to override all default folding characters. +When nil (the default value), the equivalence table is populated +with the default set of equivalent chars, and you can remove unneeded +characters using `char-fold-exclude', and add own characters using +`char-fold-include'. But when this variable is customized to non-nil, +you start with an empty table where you can add only own characters +using `char-fold-include'." + :type 'boolean + :initialize #'custom-initialize-default + :set (lambda (sym val) + (custom-set-default sym val) + (char-fold-update-table)) + :group 'isearch + :version "29.1") + (defcustom char-fold-include char-fold--default-include "Additional character foldings to include. Each entry is a list of a character and the strings that fold into it." commit 62139aeb42e286b51afe7dd6045ba7f5519593fc Author: Juri Linkov Date: Sun Dec 12 20:25:54 2021 +0200 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' for precautions. https://lists.gnu.org/archive/html/emacs-devel/2021-11/msg01149.html diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index cfd766d549..68d28306dd 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1175,7 +1175,7 @@ which means the last tab on the tab bar. For example, `C-u 2 -9' selects the tab before the last tab." (interactive "p") (tab-bar-select-tab (- (length (funcall tab-bar-tabs-function)) - (1- (or arg 1))))) + (1- (abs (or arg 1)))))) (defun tab-bar-switch-to-recent-tab (&optional arg) "Switch to ARGth most recently visited tab. commit ea8422204f1fbd354e4d25b8c99fd4916db87296 Author: Eli Zaretskii Date: Sun Dec 12 20:20:51 2021 +0200 * make-dist (manifest): Filter out msdos/autogen/* files. diff --git a/make-dist b/make-dist index eb040150d9..b069130ca6 100755 --- a/make-dist +++ b/make-dist @@ -392,9 +392,11 @@ manifest=MANIFEST # other way when adding or deleting a distributed file while not using Git. # TODO: maybe this should ignore $update, and always update MANIFEST # if .git is present. +# Filter out the files in msdos/autogen/, as they aren't useful in the +# tarball, and get in the way during the build of the MSDOS port. if ( [ $update = yes ] || [ ! -f $manifest ] ) && [ -r .git ]; then echo "Updating $manifest" - git ls-files > $manifest || exit + git ls-files | sed -e '/^msdos\/autogen\//d' > $manifest || exit printf '%s\n' $possibly_non_vc_files $info_files >>$manifest || exit sort -u -o $manifest $manifest || exit fi commit e4e9a7ce436c6ccbf4e2f474d31abd032842d079 Author: Juri Linkov Date: Sun Dec 12 19:48:40 2021 +0200 * lisp/startup.el: Let-bind browse-url-browser-function instead of setq-local * lisp/startup.el (fancy-startup-text, fancy-about-text) (fancy-splash-head, normal-about-screen): Let-bind browse-url-browser-function to eww-browse-url around functions that use browse-url. (fancy-startup-screen, fancy-about-screen): Don't set buffer-local browse-url-browser-function. https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00939.html diff --git a/lisp/startup.el b/lisp/startup.el index 3ac7532053..a46a3a0233 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1570,17 +1570,22 @@ If this is nil, no message will be displayed." `((:face (variable-pitch font-lock-comment-face) "Welcome to " :link ("GNU Emacs" - ,(lambda (_button) (browse-url "https://www.gnu.org/software/emacs/")) + ,(lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/software/emacs/"))) "Browse https://www.gnu.org/software/emacs/") ", one component of the " :link ,(lambda () (if (eq system-type 'gnu/linux) `("GNU/Linux" - ,(lambda (_button) (browse-url "https://www.gnu.org/gnu/linux-and-gnu.html")) + ,(lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/gnu/linux-and-gnu.html"))) "Browse https://www.gnu.org/gnu/linux-and-gnu.html") `("GNU" ,(lambda (_button) - (browse-url "https://www.gnu.org/gnu/thegnuproject.html")) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/gnu/thegnuproject.html"))) "Browse https://www.gnu.org/gnu/thegnuproject.html"))) " operating system.\n\n" :face variable-pitch @@ -1613,7 +1618,8 @@ If this is nil, no message will be displayed." "\n" :link ("Emacs Guided Tour" ,(lambda (_button) - (browse-url "https://www.gnu.org/software/emacs/tour/")) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/software/emacs/tour/"))) "Browse https://www.gnu.org/software/emacs/tour/") "\tOverview of Emacs features at gnu.org\n" :link ("View Emacs Manual" ,(lambda (_button) (info-emacs-manual))) @@ -1637,7 +1643,8 @@ Each element in the list should be a list of strings or pairs "This is " :link ("GNU Emacs" ,(lambda (_button) - (browse-url "https://www.gnu.org/software/emacs/")) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/software/emacs/"))) "Browse https://www.gnu.org/software/emacs/") ", a text editor and more.\nIt's a component of the " :link @@ -1645,9 +1652,12 @@ Each element in the list should be a list of strings or pairs (if (eq system-type 'gnu/linux) `("GNU/Linux" ,(lambda (_button) - (browse-url "https://www.gnu.org/gnu/linux-and-gnu.html")) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/gnu/linux-and-gnu.html"))) "Browse https://www.gnu.org/gnu/linux-and-gnu.html") - `("GNU" ,(lambda (_button) (describe-gnu-project)) + `("GNU" ,(lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (describe-gnu-project))) "Display info on the GNU project."))) " operating system.\n" :face (variable-pitch font-lock-builtin-face) @@ -1671,7 +1681,9 @@ Each element in the list should be a list of strings or pairs ,(lambda (_button) (info "(emacs)Contributing"))) "\tHow to report bugs and contribute improvements to Emacs\n" "\n" - :link ("GNU and Freedom" ,(lambda (_button) (describe-gnu-project))) + :link ("GNU and Freedom" ,(lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (describe-gnu-project)))) "\tWhy we developed GNU Emacs, and the GNU operating system\n" :link ("Absence of Warranty" ,(lambda (_button) (describe-no-warranty))) "\tGNU Emacs comes with " @@ -1709,7 +1721,8 @@ Each element in the list should be a list of strings or pairs "\n" :link ("Emacs Guided Tour" ,(lambda (_button) - (browse-url "https://www.gnu.org/software/emacs/tour/")) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/software/emacs/tour/"))) "Browse https://www.gnu.org/software/emacs/tour/") "\tSee an overview of Emacs features at gnu.org\n" :link ("Emacs Manual" ,(lambda (_button) (info-emacs-manual))) @@ -1831,7 +1844,9 @@ a face or button specification." (make-button (prog1 (point) (insert-image img)) (point) 'face 'default 'help-echo "mouse-2, RET: Browse https://www.gnu.org/" - 'action (lambda (_button) (browse-url "https://www.gnu.org/")) + 'action (lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (browse-url "https://www.gnu.org/"))) 'follow-link t) (insert "\n\n"))))) @@ -1952,7 +1967,6 @@ splash screen in another window." (insert "\n") (fancy-startup-tail concise)) (use-local-map splash-screen-keymap) - (setq-local browse-url-browser-function 'eww-browse-url) (setq tab-width 22 buffer-read-only t) (set-buffer-modified-p nil) @@ -1990,7 +2004,6 @@ splash screen in another window." (goto-char (point-min)) (force-mode-line-update)) (use-local-map splash-screen-keymap) - (setq-local browse-url-browser-function 'eww-browse-url) (setq tab-width 22) (setq buffer-read-only t) ;; Place point somewhere it doesn't cover a character. @@ -2276,7 +2289,9 @@ Type \\[describe-distribution] for information on ")) (insert "\tHow to report bugs and contribute improvements to Emacs\n\n") (insert-button "GNU and Freedom" - 'action (lambda (_button) (describe-gnu-project)) + 'action (lambda (_button) + (let ((browse-url-browser-function 'eww-browse-url)) + (describe-gnu-project))) 'follow-link t) (insert "\t\tWhy we developed GNU Emacs and the GNU system\n") commit 0ee1a46e6c7fa159584a9c04f5ab9bf694d6de3b Author: Po Lu Date: Sun Dec 12 21:33:56 2021 +0800 Fix overline display over stretch glyphs with box on NS * src/nsterm.m (ns_dumpglyphs_stretch): Don't draw text decorations when there is a box. (ns_draw_glyph_string): Draw text decorations after the box in stretch glyph that have one. diff --git a/src/nsterm.m b/src/nsterm.m index 5d39be3a87..4e5ce5ef70 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3858,10 +3858,14 @@ Function modeled after x_draw_glyph_string_box (). NSRectFill (glyphRect); - /* Draw overlining, etc. on the stretch glyph (or the part - of the stretch glyph after the cursor). */ - ns_draw_text_decoration (s, face, fgCol, NSWidth (glyphRect), - NSMinX (glyphRect)); + /* Draw overlining, etc. on the stretch glyph (or the part of + the stretch glyph after the cursor). If the glyph has a box, + then decorations will be drawn after drawing the box in + ns_draw_glyph_string, in order to prevent them from being + overwritten by the box. */ + if (s->face->box != FACE_NO_BOX) + ns_draw_text_decoration (s, face, fgCol, NSWidth (glyphRect), + NSMinX (glyphRect)); s->background_filled_p = 1; } @@ -4105,6 +4109,16 @@ Function modeled after x_draw_glyph_string_box (). if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX) ns_dumpglyphs_box_or_relief (s); + if (s->face->box != FACE_NO_BOX + && s->first_glyph->type == STRETCH_GLYPH) + { + NSColor *fg_color; + + fg_color = ns_lookup_indexed_color (NS_FACE_FOREGROUND (s->face), s->f); + ns_draw_text_decoration (s, s->face, fg_color, + s->background_width, s->x); + } + ns_unfocus (s->f); /* Draw surrounding overhangs. */ commit 5bc785d81c01e00e187bd129d86f47fc89ff3b3b Author: Po Lu Date: Sun Dec 12 21:05:35 2021 +0800 Fix overline display when there is a box * src/w32term.c (w32_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Draw box before any text decorations. diff --git a/src/w32term.c b/src/w32term.c index 5c6a9fef3a..fdb088deda 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2540,6 +2540,10 @@ w32_draw_glyph_string (struct glyph_string *s) if (!s->for_overlaps) { + /* Draw relief if not yet drawn. */ + if (!relief_drawn_p && s->face->box != FACE_NO_BOX) + w32_draw_glyph_string_box (s); + /* Draw underline. */ if (s->face->underline) { @@ -2683,10 +2687,6 @@ w32_draw_glyph_string (struct glyph_string *s) } } - /* Draw relief if not yet drawn. */ - if (!relief_drawn_p && s->face->box != FACE_NO_BOX) - w32_draw_glyph_string_box (s); - if (s->prev) { struct glyph_string *prev; diff --git a/src/xterm.c b/src/xterm.c index 0dc944fd81..9d60292756 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4045,6 +4045,10 @@ x_draw_glyph_string (struct glyph_string *s) if (!s->for_overlaps) { + /* Draw relief if not yet drawn. */ + if (!relief_drawn_p && s->face->box != FACE_NO_BOX) + x_draw_glyph_string_box (s); + /* Draw underline. */ if (s->face->underline) { @@ -4200,10 +4204,6 @@ x_draw_glyph_string (struct glyph_string *s) } } - /* Draw relief if not yet drawn. */ - if (!relief_drawn_p && s->face->box != FACE_NO_BOX) - x_draw_glyph_string_box (s); - if (s->prev) { struct glyph_string *prev; commit b5354e989d8ec590ef6160f9241333a7d73628e3 Author: Richard Stallman Date: Tue Dec 7 23:35:31 2021 -0500 Rewrite the "Quitting Windows" section of Emacs Lisp Reference * doc/lispref/windows.texi (Quitting Windows): Rewrite for clarity. (Bug#52328) diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index afb9dfcb9e..c8f3b12080 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1648,9 +1648,10 @@ function will be interactive and will use the interactive spec of @var{function}. One exception: if the interactive spec of @var{function} is a function (i.e., a @code{lambda} expression or an @code{fbound} symbol rather than an expression or a string), then the interactive -spec of the combined function will be a call to that function with as sole -argument the interactive spec of the original function. To interpret the spec -received as argument, use @code{advice-eval-interactive-spec}. +spec of the combined function will be a call to that function with +the interactive spec of the original function as sole argument. To +interpret the spec received as argument, use +@code{advice-eval-interactive-spec}. Note: The interactive spec of @var{function} will apply to the combined function and should hence obey the calling convention of the combined function diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 54a5bce96c..d988a0ff11 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -4185,97 +4185,48 @@ action alist entry (@pxref{Buffer Display Action Alists}). @node Quitting Windows @section Quitting Windows - -When you want to get rid of a window used for displaying a buffer, you -can call @code{delete-window} or @code{delete-windows-on} -(@pxref{Deleting Windows}) to remove that window from its frame. If the -buffer is shown on a separate frame, you might want to call -@code{delete-frame} (@pxref{Deleting Frames}) instead. If, on the other -hand, a window has been reused for displaying the buffer, you might -prefer showing the buffer previously shown in that window, by calling the -function @code{switch-to-prev-buffer} (@pxref{Window History}). -Finally, you might want to either bury (@pxref{Buffer List}) or kill -(@pxref{Killing Buffers}) the window's buffer. - - The following command uses information on how the window for -displaying the buffer was obtained in the first place, thus attempting -to automate the above decisions for you. +@cindex quitting windows + +After a command uses @code{display-buffer} to put a buffer on the +screen, the user may decide to hide it and return to the previous +configuration of the Emacs display. We call that @dfn{quitting the +window}. The way to do this is to call @code{quit-window} while the +window used by @code{display-buffer} is the selected window. + +The right way to restore the previous configuration of the display +depends on what was done to the window where the buffer now appears. +It might be right to delete that window, or delete its frame, or just +display another buffer in that window. One complication is that the +user may have changed the window configuration since the act of +displaying that buffer, and it would be undesirable to undo the user's +explicitly requested changes. + +To enable @code{quit-window} to do the right thing, +@code{display-buffer} saves information about what it did in the +window's @code{quit-restore} parameter (@pxref{Window Parameters}). @deffn Command quit-window &optional kill window This command quits @var{window} and buries its buffer. The argument @var{window} must be a live window and defaults to the selected one. With prefix argument @var{kill} non-@code{nil}, it kills the buffer -instead of burying it. It calls the function @code{quit-restore-window} -described next to deal with the window and its buffer. +instead of burying it. @vindex quit-window-hook -The functions in @code{quit-window-hook} are run before doing anything -else. +The function @code{quit-window} first runs @code{quit-window-hook}. +Then it calls the function @code{quit-restore-window}, described next, +which does the hard work. @end deffn +You can get more control by calling @code{quit-restore-window} instead. + @defun quit-restore-window &optional window bury-or-kill This function handles @var{window} and its buffer after quitting. The optional argument @var{window} must be a live window and defaults to -the selected one. The function's behavior is determined by the four -elements of the list specified by @var{window}'s @code{quit-restore} -parameter (@pxref{Window Parameters}). - -The first element of the @code{quit-restore} parameter is one of the -symbols @code{window}, meaning that the window has been specially -created by @code{display-buffer}; @code{frame}, a separate frame has -been created; @code{same}, the window has only ever displayed this -buffer; or @code{other}, the window showed another buffer before. -@code{frame} and @code{window} affect how the window is quit, while -@code{same} and @code{other} affect the redisplay of buffers -previously shown in @var{window}. - -The parameter's second element is either one of the symbols -@code{window} or @code{frame}, or a list whose elements are the buffer -shown in @var{window} before, that buffer's window start and window -point positions, and @var{window}'s height at that time. If that -buffer is still live when @var{window} is quit, then this function may -reuse @var{window} to display it. - -The third element is the window selected at the time the parameter was -created. If this function deletes @var{window}, it subsequently tries -to reselect the window named by that element. - -The fourth element is the buffer whose display caused the creation of -this parameter. This function may delete @var{window} if and only if -it still shows that buffer. - -This function will try to delete @var{window} if and only if (1) the -first element of its @code{quit-restore} parameter is either -@code{window} or @code{frame}, (2) the window has no history of -previously-displayed buffers and (3) the fourth element of the -@code{quit-restore} parameter specifies the buffer currently displayed -in @var{window}. If @var{window} is part of an atomic window -(@pxref{Atomic Windows}), it will try to delete the root of that -atomic window instead. In either case, it tries to avoid signaling an -error when @var{window} cannot be deleted. - -If @var{window} shall be deleted, is the only window on its frame and -there are other frames on that frame's terminal, the value of the -optional argument @var{bury-or-kill} determines how to proceed with -the window. If @var{bury-or-kill} equals @code{kill}, the frame is -deleted unconditionally. Otherwise, the fate of the frame is -determined by calling @code{frame-auto-hide-function} (see below) with -that frame as sole argument. - -If the second element of the @code{quit-restore} parameter is a list -of a buffer, a window start (@pxref{Window Start and End}) and a -window point (@pxref{Window Point}), and that buffer is still live, -the buffer will be displayed, and start and point set accordingly. -If, in addition, @var{window}'s buffer was temporarily resized, this -function will also try to restore the original height of @var{window}. - -Otherwise, if @var{window} was previously used for displaying other -buffers (@pxref{Window History}), the most recent buffer in that -history will be displayed. In either case, if @var{window} is not -deleted, its @code{quit-restore} parameter is reset to @code{nil}. +the selected one. The function takes account of the @var{window}'s +@code{quit-restore} parameter. The optional argument @var{bury-or-kill} specifies how to deal with -@var{window}'s buffer. The following values are handled: +@var{window}'s buffer. The following values are meaningful: @table @code @item nil @@ -4285,25 +4236,106 @@ consequence, if @var{window} is not deleted, invoking @item append This means that if @var{window} is not deleted, its buffer is moved to -the end of @var{window}'s list of previous buffers, so it's less likely -that a future invocation of @code{switch-to-prev-buffer} will switch to -it. Also, it moves the buffer to the end of the frame's buffer list. +the end of @var{window}'s list of previous buffers (@pxref{Window +History}), so it's less likely that future invocations of +@code{switch-to-prev-buffer} will switch to it. Also, it moves the +buffer to the end of the frame's buffer list (@pxref{Buffer List}). @item bury This means that if @var{window} is not deleted, its buffer is removed -from @var{window}'s list of previous buffers. Also, it moves the buffer -to the end of the frame's buffer list. This value provides the most -reliable remedy to not have @code{switch-to-prev-buffer} switch to this -buffer again without killing the buffer. +from @var{window}'s list of previous buffers. Also, it moves the +buffer to the end of the frame's buffer list. This is the most +reliable way to prevent @code{switch-to-prev-buffer} from switching to +this buffer again, short of killing the buffer. @item kill This means to kill @var{window}'s buffer. @end table +The argument @var{bury-or-kill} also specifies what to do with +@var{window}'s frame when @var{window} should be deleted, if it is the +only window on its frame, and there are other frames on that frame's +terminal. If @var{bury-or-kill} equals @code{kill}, it means to +delete the frame. Otherwise, the fate of the frame is determined by +calling @code{frame-auto-hide-function} (see below) with that frame as +sole argument. + +This function always sets @var{window}'s @code{quit-restore} parameter +to @code{nil} unless it deletes the window. +@end defun + +The window @var{window}'s @code{quit-restore} parameter (@pxref{Window +Parameters}) should be @code{nil} or a list of four elements: +@c FIXME: describe what quit-restore-window does if this is nil. + +@lisp +(@var{method} @var{obuffer} @var{owindow} @var{this-buffer}) +@end lisp + +The first element, @var{method}, is one of the four symbols +@code{window}, @code{frame}, @code{same} and @code{other}. +@code{frame} and @code{window} control how to delete @var{window}, +while @code{same} and @code{other} control displaying some other +buffer in it. + +Specifically, @code{window} means that the window has been specially +created by @code{display-buffer}; @code{frame} means that a separate +frame has been created; @code{same}, that the window has only ever +displayed this buffer; @code{other}, that the window showed another +buffer before. + +The second element, @var{obuffer}, is either one of the symbols +@code{window} or @code{frame}, or a list of the form + +@lisp +(@var{prev-buffer} @var{prev-window-start} @var{prev-window-point} @var{height}) +@end lisp + +@noindent +which says which buffer was shown in @var{window} before, that +buffer's window start (@pxref{Window Start and End}) and window point +(@pxref{Window Point}) positions at that time, and +@var{window}'s height at that time. If @var{prev-buffer} is still +live when quitting @var{window}, quitting the window may reuse +@var{window} to display @var{prev-buffer}. + +The third element, @var{owindow}, is the window that was selected +just before the displaying was done. If quitting deletes +@var{window}, it tries to select @var{owindow}. + +The fourth element, @var{this-buffer}, is the buffer whose displaying +set the @code{quit-restore} parameter. Quitting @var{window} may delete +that window only if it still shows that buffer. + +Quitting @var{window} tries to delete it if and only if (1) +@var{method} is either @code{window} or @code{frame}, (2) the window +has no history of previously-displayed buffers and (3) +@var{this-buffer} equals the buffer currently displayed in +@var{window}. If @var{window} is part of an atomic window +(@pxref{Atomic Windows}), quitting will try to delete the root of that +atomic window instead. In either case, it tries to avoid signaling an +error when @var{window} cannot be deleted. + +If @var{obuffer} is a list, and @var{prev-buffer} is still live, +quitting displays @var{prev-buffer} in @var{window} according to the +rest of the elements of @var{obuffer}. This includes resizing the +window to @var{height} if it was temporarily resized to display +@var{this-buffer}. + +Otherwise, if @var{window} was previously used for displaying other +buffers (@pxref{Window History}), the most recent buffer in that +history will be displayed. + +@ignore +@c FIXME: Should we document display-buffer-reuse-window? +If we document display-buffer-record-window, it should be with @defun. +And maybe not here. + + Typically, the display routines run by @code{display-buffer} will set -the @code{quit-restore} window parameter correctly. It's also -possible to set it manually, using the following code for displaying -@var{buffer} in @var{window}: +the @code{quit-restore} window parameter correctly. You can also set +it manually, using the following code for displaying @var{buffer} in +@var{window}: @example @group @@ -4317,11 +4349,10 @@ possible to set it manually, using the following code for displaying Setting the window history to @code{nil} ensures that a future call to @code{quit-window} can delete the window altogether. +@end ignore -@end defun - -The following option specifies how to deal with a frame containing just -one window that should be either quit, or whose buffer should be buried. +The following option specifies a function to do the right thing with a +frame containing one window when quitting that window. @defopt frame-auto-hide-function The function specified by this option is called to automatically hide @@ -4350,7 +4381,6 @@ that frame's @code{auto-hide-function} frame parameter (@pxref{Frame Interaction Parameters}). @end defopt - @node Side Windows @section Side Windows @cindex side windows commit 194556425f140b8599467959b73d5954a59128e3 Author: Lars Ingebrigtsen Date: Sun Dec 12 11:45:11 2021 +0100 Really fix the etags TEX parsing * lib-src/etags.c (TEX_decode_env): Re-fix off-by-one parsing of TEXTAGS environment variable (bug#52438). diff --git a/lib-src/etags.c b/lib-src/etags.c index af142b0b3d..71f3464661 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -5782,9 +5782,9 @@ TEX_decode_env (const char *evarname, const char *defenv) else env = concat (env, defenv, ""); - /* If the environment variable starts with a colon, increase the - length of the token table. */ - if (*env == ':') + /* If the environment variable doesn't start with a colon, increase + the length of the token table. */ + if (*env != ':') len++; /* Allocate a token table */ commit bdfd83e42d0044db7e99cec452427c0b76d46f20 Author: Lars Ingebrigtsen Date: Sun Dec 12 11:26:22 2021 +0100 Fix an off-by-one error in TEX parsing in etags * lib-src/etags.c (TEX_decode_env): Fix off-by-one parsing of TEXTAGS environment variable (bug#52438). Based on a patch by David Fussner and amended by Andreas Schwab . diff --git a/lib-src/etags.c b/lib-src/etags.c index bd4d4fcf53..af142b0b3d 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -5773,7 +5773,7 @@ static void TEX_decode_env (const char *evarname, const char *defenv) { const char *env, *p; - ptrdiff_t len; + ptrdiff_t len = 1; /* Append default string to environment. */ env = getenv (evarname); @@ -5782,8 +5782,13 @@ TEX_decode_env (const char *evarname, const char *defenv) else env = concat (env, defenv, ""); + /* If the environment variable starts with a colon, increase the + length of the token table. */ + if (*env == ':') + len++; + /* Allocate a token table */ - for (len = 1, p = env; (p = strchr (p, ':')); ) + for (p = env; (p = strchr (p, ':')); ) if (*++p) len++; TEX_toktab = xnew (len, linebuffer); commit 6c9adafa93193a5f80d1254e04de478b145add89 Author: Lars Ingebrigtsen Date: Sun Dec 12 10:22:52 2021 +0100 Check for support in sqlite-mode-open-file * lisp/sqlite-mode.el (sqlite-mode-open-file): Error out earlier when we don't have sqlite support. diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index 43d76c4fd7..082eb8276e 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -52,6 +52,8 @@ (defun sqlite-mode-open-file (file) "Browse the contents of an sqlite file." (interactive "fSQLite file name: ") + (unless (sqlite-available-p) + (error "This Emacs doesn't have SQLite support, so it can't view SQLite files")) (pop-to-buffer (get-buffer-create (format "*SQLite %s*" (file-name-nondirectory file)))) (sqlite-mode) commit 8faada1f5acdd3139c3aaf606176c38389031d55 Author: Stefan Kangas Date: Sun Dec 12 09:12:14 2021 +0100 eshell: Prefer octal number for file modes * lisp/eshell/esh-util.el (eshell-private-file-modes) (eshell-private-directory-modes): Prefer octal number for file modes. diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 72de6b13e2..0eef45e0ef 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -63,11 +63,11 @@ has no effect." Setting this to nil is offered as an aid to debugging only." :type 'boolean) -(defcustom eshell-private-file-modes 384 ; umask 177 +(defcustom eshell-private-file-modes #o600 ; umask 177 "The file-modes value to use for creating \"private\" files." :type 'integer) -(defcustom eshell-private-directory-modes 448 ; umask 077 +(defcustom eshell-private-directory-modes #o700 ; umask 077 "The file-modes value to use for creating \"private\" directories." :type 'integer) commit 64ea1a178c6cb3a436eeb6783237bd603be4f5e4 Author: Po Lu Date: Sun Dec 12 15:50:28 2021 +0800 Fix eshell for systems that do not have subprocesses * lisp/eshell/esh-cmd.el (eshell-eval-command): Use `eshell-processp' instead of `processp'. diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index a2464ad4a9..213b7ab289 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -945,12 +945,12 @@ at the moment are: ;; In that case, unwrap the value before checking the delimiter ;; value. (if (and val - (not (processp val)) + (not (eshell-processp val)) (not (eq val t))) (error "Unmatched delimiter: %S" val) ;; Eshell-command expect a list like () to know if the ;; command should be async or not. - (or (and (processp val) delim) val))))) + (or (and (eshell-processp val) delim) val))))) (defun eshell-resume-command (proc status) "Resume the current command when a process ends."