commit 8081c08ff1b4fd5e948058be7067136e11ac0ecb (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sun Sep 8 09:46:42 2024 +0300 ; Update NEWS for last change. diff --git a/etc/NEWS b/etc/NEWS index d2c3c321375..c6f8b0062e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -280,6 +280,16 @@ according to diffs in the current buffer, but without applying the diffs to the original text. If the selected range extends a hunk, the command attempts to look up and copy the text in-between the hunks. +** php-ts-mode + +--- +*** 'php-ts-mode-run-php-webserver' can now accept a custom php.ini file. +You can use the new optional argument CONFIG when calling +'php-ts-mode-run-php-webserver' to pass an alternative php.ini file to +the built-in Web server. Interactively, when invoked with a prefix +argument, 'php-ts-mode-run-php-webserver' prompts for the config file as +well as for other connection parameters. + * New Modes and Packages in Emacs 31.1 commit bb239841670f9bf87576c8196c41fdf295d5eac2 Author: Vincenzo Pupillo Date: Mon Sep 2 14:11:01 2024 +0200 Support for custom php.ini for the built-in PHP web server. A new CONFIG attribute, which defaults to 'php-ts-mode-php-config', allows an alternative php.ini file to be specified for the built-in web server. The 'php-ts-mode-run-php-webserver' function, when called interactively with a prefix argument, also requires this new attribute. * lisp/progmodes/php-ts-mode.el (php-ts-mode--parent-html-bol): Fix docstring. * lisp/progmodes/php-ts-mode.el (php-ts-mode-run-php-webserver): New CONFIG attribute. Update docstring. * lisp/progmodes/php-ts-mode.el (php-ts-mode--webserver-read-args): Support the new TYPE. Update docstring. (Bug#72966) diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el index 3f89de14075..f8d240b746b 100644 --- a/lisp/progmodes/php-ts-mode.el +++ b/lisp/progmodes/php-ts-mode.el @@ -490,7 +490,7 @@ characters of the current line." (treesit-node-start parent))))) (defun php-ts-mode--parent-html-heuristic (node parent _bol &rest _) - "Returns position based on html indentation. + "Return position based on html indentation. Returns 0 if the NODE is after the , otherwise returns the indentation point of the last word before the NODE, plus the @@ -1469,8 +1469,12 @@ Depends on `c-ts-common-comment-setup'." ;;;###autoload -(defun php-ts-mode-run-php-webserver (&optional port hostname document-root - router-script num-of-workers) +(defun php-ts-mode-run-php-webserver (&optional port + hostname + document-root + router-script + num-of-workers + config) "Run PHP built-in web server. PORT: Port number of built-in web server, default `php-ts-mode-ws-port'. @@ -1484,10 +1488,12 @@ ROUTER-SCRIPT: Path of the router PHP script, see `https://www.php.net/manual/en/features.commandline.webserver.php' NUM-OF-WORKERS: Before run the web server set the PHP_CLI_SERVER_WORKERS env variable useful for testing code against -multiple simultaneous requests. +multiple simultaneous requests +CONFIG: Alternative php.ini config, default `php-ts-mode-php-config'. -Interactively, when invoked with prefix argument, always prompt -for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT." +Interactively, when invoked with prefix argument, always prompt for +PORT, HOSTNAME, DOCUMENT-ROOT, ROUTER-SCRIPT, NUM-OF-WORKERS and +CONFIG." (interactive (when current-prefix-arg (php-ts-mode--webserver-read-args))) (let* ((port (or @@ -1502,6 +1508,9 @@ for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT." document-root php-ts-mode-ws-document-root (php-ts-mode--webserver-read-args 'document-root))) + (config (or config + (when php-ts-mode-php-config + (expand-file-name php-ts-mode-php-config)))) (host (format "%s:%d" hostname port)) (name (format "PHP web server on: %s" host)) (buf-name (format "*%s*" name)) @@ -1509,12 +1518,18 @@ for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT." nil (list "-S" host "-t" document-root + (when config + (format "-c %s" config)) router-script))) (process-environment - (cons (cond - (num-of-workers (format "PHP_CLI_SERVER_WORKERS=%d" num-of-workers)) - (php-ts-mode-ws-workers (format "PHP_CLI_SERVER_WORKERS=%d" php-ts-mode-ws-workers))) - process-environment))) + (nconc (cond + (num-of-workers + (list + (format "PHP_CLI_SERVER_WORKERS=%d" num-of-workers))) + (php-ts-mode-ws-workers + (list + (format "PHP_CLI_SERVER_WORKERS=%d" php-ts-mode-ws-workers)))) + process-environment))) (if (get-buffer buf-name) (message "Switch to already running web server into buffer %s" buf-name) (message "Run PHP built-in web server with args %s into buffer %s" @@ -1529,12 +1544,17 @@ for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT." (defun php-ts-mode--webserver-read-args (&optional type) "Helper for `php-ts-mode-run-php-webserver'. -The optional TYPE can be the symbol \"port\", \"hostname\", \"document-root\" or -\"router-script\", otherwise it requires all of them." +The optional TYPE can be the symbol \"port\", \"hostname\", \"document-root\", +\"router-script\", \"num-workers\" or \"config\", otherwise it requires all of them." (let ((ask-port (lambda () - (read-number "Port: " 3000))) + (read-number "Port: " (or + php-ts-mode-ws-port + 3000)))) (ask-hostname (lambda () - (read-string "Hostname: " "localhost"))) + (read-string "Hostname: " + (or + php-ts-mode-ws-hostname + "localhost")))) (ask-document-root (lambda () (expand-file-name (read-directory-name "Document root: " @@ -1546,17 +1566,40 @@ The optional TYPE can be the symbol \"port\", \"hostname\", \"document-root\" or (read-file-name "Router script: " (file-name-directory (or (buffer-file-name) - default-directory))))))) + default-directory)))))) + (ask-num-workers (lambda () + (let ((num-workers + (read-number + "Number of workers (less then 2 means no workers): " + (or php-ts-mode-ws-workers 0)))) + ;; num-workers must be >= 2 or nil + ;; otherwise PHP's built-in web server will not start. + (if (> num-workers 1) + num-workers + nil)))) + (ask-config (lambda() + (let ((file-name (expand-file-name + (read-file-name "Alternative php.ini: " + (file-name-directory + (or (buffer-file-name) + default-directory)))))) + (if (string= "" (file-name-directory file-name)) + nil + file-name))))) (cl-case type (port (funcall ask-port)) (hostname (funcall ask-hostname)) (document-root (funcall ask-document-root)) (router-script (funcall ask-router-script)) + (num-of-workers (funcall ask-num-workers)) + (config (funcall ask-config)) (t (list (funcall ask-port) (funcall ask-hostname) (funcall ask-document-root) - (funcall ask-router-script)))))) + (funcall ask-router-script) + (funcall ask-num-workers) + (funcall ask-config)))))) (define-derived-mode inferior-php-ts-mode comint-mode "Inferior PHP" "Major mode for PHP inferior process." commit 2ce0d397b12cafcb3e1ac5630bc3fbca61bd6b87 Author: Eli Zaretskii Date: Sun Sep 8 09:19:34 2024 +0300 Improve diagnostic of type mismatch in 'setopt' * lisp/cus-edit.el (setopt--set): Name the variable in the warning message. (Bug#73084) * test/lisp/cus-edit-tests.el (test-setopt): Adjust test. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 9f5ac47490c..3ab5f11532e 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1072,7 +1072,8 @@ plain variables. This means that `setopt' will execute any ;; Check that the type is correct. (when-let ((type (get variable 'custom-type))) (unless (widget-apply (widget-convert type) :match value) - (warn "Value `%S' does not match type %s" value type))) + (warn "Value `%S' for variable `%s' does not match its type \"%s\"" + value variable type))) (put variable 'custom-check-value (list value)) (funcall (or (get variable 'custom-set) #'set-default) variable value)) diff --git a/test/lisp/cus-edit-tests.el b/test/lisp/cus-edit-tests.el index 535711e02cf..ecef4c35b47 100644 --- a/test/lisp/cus-edit-tests.el +++ b/test/lisp/cus-edit-tests.el @@ -90,7 +90,7 @@ (erase-buffer)) (setopt cus-edit-test-foo1 :foo) (buffer-substring-no-properties (point-min) (point-max))))) - (should (string-search "Value `:foo' does not match type number" + (should (string-search "Value `:foo' for variable `cus-edit-test-foo1' does not match its type \"number\"" warn-txt)))) (defcustom cus-edit-test-bug63290-option nil commit 79805652af1dd881b77f75fc1e32eb6487f03da5 Author: Dmitry Gutov Date: Sun Sep 8 05:14:02 2024 +0300 ; Edit the latest NEWS entry diff --git a/etc/NEWS b/etc/NEWS index e257721f5b4..d2c3c321375 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -110,8 +110,9 @@ This hook allows you to control which tab-bar tabs are auto-resized. ** Project -New command `project-find-file-in-root` which is equivalent to running -‘project-any-command’ with ‘find-file’. +--- +*** New command `project-find-file-in-root`. +It is equivalent to running ‘project-any-command’ with ‘find-file’. * Editing Changes in Emacs 31.1 commit 2aef1acc4d2e34fc63b4d9cfd2b0a6a9c08602fb Author: James Thomas Date: Fri Aug 23 10:43:39 2024 +0530 Keep local keymap out of vc-git-stash-get-at-point * lisp/vc/vc-git.el (vc-git-stash-get-at-point): Return the substring without text properties (bug#72768). diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 76388211545..2a7c8ae5fc4 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -2142,7 +2142,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (goto-char point) (beginning-of-line) (if (looking-at "^ +\\({[0-9]+}\\):") - (match-string 1) + (match-string-no-properties 1) (error "Cannot find stash at point")))) ;; vc-git-stash-delete-at-point must be called from a vc-dir buffer. commit 6dcd3d24045113fb0afec0d7f43e322c9baa06ab Merge: 358208dfaa3 b420e149b1e Author: Eli Zaretskii Date: Sat Sep 7 06:25:15 2024 -0400 Merge from origin/emacs-30 b420e149b1e Fix a typo in ediff-init.el e1304e9b1bb Fix 'chart-space-usage' on MS-Windows 04c44405bf6 Fix alignment and documentation of vtable.el 4d6fadb8d21 ; * lisp/which-key.el: Fix ':package-version' (bug#73072). 54071b9cef2 ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode' 87a8b12a0c4 Fix test failure in erc-networks-tests dad0935cfcb ; * doc/emacs/building.texi (Lisp Libraries): Update (bug... e4dc6711b02 Fix :hook in 'use-package' c1cd036d27a ; * doc/lispref/modes.texi (Mode Line Data): Fox wording. ae2463796f2 ; Caveats about using :eval in 'mode-line-format' 4047072c7d8 Update FSF's address 24f12bdd77e Support the new option in ruby-ts-mode too 6c15b7710d4 Add new option ruby-bracketed-args-indent 7799ef43354 Fix Rmail base64 and qp decoding of MIME payloads 0def396fa8f Update to Org 9.7.11 8c044bd9726 ; Fix recent changes in documentation e0d8879bcd5 * test/lisp/emacs-lisp/tabulated-list-tests.el: Add missi... 4ff4b78f922 ; Small doc fixes da980ad838e ; Reword some "allows Xing" 2ca7d5649c6 ; More accurate text about how `equal` compares various o... # Conflicts: # etc/NEWS commit b420e149b1ebc41dd183ab460930d78321e2e339 Author: Eli Zaretskii Date: Sat Sep 7 12:41:29 2024 +0300 Fix a typo in ediff-init.el * lisp/vc/ediff-init.el (ediff-nonempty-string-p): Fix typo. Reported by Jurgen De Backer (bug#73042). diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 1b478d3f9b7..72dae9b678f 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1451,7 +1451,7 @@ This default should work without changes." (ediff-abbreviate-file-name (file-name-directory dir)))) (defsubst ediff-nonempty-string-p (string) - (and (stringp string) (string-empty-p string))) + (and (stringp string) (not (string-empty-p string)))) (defun ediff-abbrev-jobname (jobname) (cond ((eq jobname 'ediff-directories) commit e1304e9b1bbb62ff3e3680c84bd1fad4922b41eb Author: Eli Zaretskii Date: Sat Sep 7 12:17:24 2024 +0300 Fix 'chart-space-usage' on MS-Windows * lisp/emacs-lisp/chart.el (chart--file-size) (chart--directory-size): New functions. (chart-space-usage): Invoke 'du' correctly on MS-Windows. Provide alternative implementation in Lisp when 'du' is not installed, using 'chart--directory-size' and 'chart--file-size'. (Bug#72919) diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el index da61e45213d..2ca9b64be33 100644 --- a/lisp/emacs-lisp/chart.el +++ b/lisp/emacs-lisp/chart.el @@ -641,27 +641,68 @@ SORT-PRED if desired." (lambda (a b) (> (cdr a) (cdr b)))) )) +;; This assumes 4KB blocks +(defun chart--file-size (size) + (* (/ (+ size 4095) 4096) 4096)) + +(defun chart--directory-size (dir) + "Compute total size of files in directory DIR and its subdirectories. +DIR is assumed to be a directory, verified by the caller." + (let ((size 0)) + (dolist (file (directory-files-recursively dir "." t)) + (let ((fsize (nth 7 (file-attributes file)))) + (if (> fsize 0) + (setq size + (+ size (chart--file-size fsize)))))) + size)) + (defun chart-space-usage (d) "Display a top usage chart for directory D." (interactive "DDirectory: ") (message "Collecting statistics...") (let ((nmlst nil) (cntlst nil) - (b (get-buffer-create " *du-tmp*"))) - (set-buffer b) - (erase-buffer) - (insert "cd " d ";du -sk * \n") - (message "Running `cd %s;du -sk *'..." d) - (call-process-region (point-min) (point-max) shell-file-name t - (current-buffer) nil) - (goto-char (point-min)) - (message "Scanning output ...") - (while (re-search-forward "^\\([0-9]+\\)[ \t]+\\([^ \n]+\\)$" nil t) - (let* ((nam (buffer-substring (match-beginning 2) (match-end 2))) - (num (buffer-substring (match-beginning 1) (match-end 1)))) - (setq nmlst (cons nam nmlst) - ;; * 1000 to put it into bytes - cntlst (cons (* (string-to-number num) 1000) cntlst)))) + b) + (if (executable-find "du") + (progn + (setq b (get-buffer-create " *du-tmp*")) + (set-buffer b) + (erase-buffer) + (if (and (memq system-type '(windows-nt ms-dos)) + (fboundp 'w32-shell-dos-semantics) + (w32-shell-dos-semantics)) + (progn + ;; With Windows shells, 'cd' does not change the drive, + ;; and ';' is not reliable for running multiple + ;; commands, so use alternatives. We quote the + ;; directory because otherwise pushd will barf on a + ;; directory with forward slashes. Note that * will not + ;; skip dotfiles with Windows shells, unlike on Unix. + (insert "pushd \"" d "\" && du -sk * \n") + (message "Running `pushd \"%s\" && du -sk *'..." d)) + (insert "cd " d ";du -sk * \n") + (message "Running `cd %s;du -sk *'..." d)) + (call-process-region (point-min) (point-max) shell-file-name t + (current-buffer) nil) + (goto-char (point-min)) + (message "Scanning output ...") + (while (re-search-forward "^\\([0-9]+\\)[ \t]+\\([^ \n]+\\)$" nil t) + (let* ((nam (buffer-substring (match-beginning 2) (match-end 2))) + (num (buffer-substring (match-beginning 1) (match-end 1)))) + (setq nmlst (cons nam nmlst) + ;; * 1000 to put it into bytes + cntlst (cons (* (string-to-number num) 1000) cntlst))))) + (dolist (file (directory-files d t directory-files-no-dot-files-regexp)) + (let ((fbase (file-name-nondirectory file))) + ;; Typical shells exclude files and subdirectories whose names + ;; begin with a period when it expands *, so we do the same. + (unless (string-match-p "\\`\\." fbase) + (setq nmlst (cons fbase nmlst)) + (if (file-regular-p file) + (setq cntlst (cons (chart--file-size + (nth 7 (file-attributes file))) + cntlst)) + (setq cntlst (cons (chart--directory-size file) cntlst))))))) (if (not nmlst) (error "No files found!")) (chart-bar-quickie 'vertical (format "Largest files in %s" d) commit 04c44405bf604380c575fa2a4d9611af0f3bc0d9 Author: Eli Zaretskii Date: Sat Sep 7 11:27:03 2024 +0300 Fix alignment and documentation of vtable.el * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Ensure proper alignment between the columns in header-line and in the body of the table. (Bug#73032) * doc/misc/vtable.texi (Making A Table): Document the defaults of the various keyword parameters. diff --git a/doc/misc/vtable.texi b/doc/misc/vtable.texi index 2e0adfb235a..795d7fad037 100644 --- a/doc/misc/vtable.texi +++ b/doc/misc/vtable.texi @@ -337,7 +337,9 @@ width (in pixels), and @var{table} is the table. @end defun @item align -Should be either @code{right} or @code{left}. +Should be either @code{right} or @code{left}. If not specified, +numerical values will be flushed to the right, and all other values will +be flushed to the left. @end table @item :getter @@ -426,14 +428,19 @@ current line, they can use the @code{vtable-current-object} function (@pxref{Interface Functions}) to determine what that object is. @item :separator-width -The width of the blank space between columns. +The width of the blank space between columns. If not specified, it +defaults to 1. @item :divider-width @itemx :divider -You can have a divider inserted between the columns. This can either -be specified by using @code{:divider}, which should be a string to be -displayed between the columns, or @code{:divider-width}, which -specifies the width of the space to be used as the divider. +You can have a divider inserted between the columns. This can either be +specified by using @code{:divider}, which should be a string to be +displayed between the columns, or @code{:divider-width}, which specifies +the width of the space to be used as the divider, in units of characters +of the face used to display the table. If not specified, +@code{:divider} defaults to @code{nil}, but specifying +@code{:divider-width} effectively sets the divider to a whitespace +string of that width. @item :sort-by This should be a list of tuples, and specifies how the table is to be diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el index cb7ea397314..d58c6894c16 100644 --- a/lisp/emacs-lisp/vtable.el +++ b/lisp/emacs-lisp/vtable.el @@ -722,15 +722,17 @@ This also updates the displayed table." (vtable--limit-string name (- (elt widths index) indicator-width)) name)) - (let ((fill-width - (+ (- (elt widths index) - (string-pixel-width displayed) - indicator-width - (vtable-separator-width table) - ;; We want the indicator to not be quite flush - ;; right. - (/ (vtable--char-width table) 2.0)) - (if last 0 spacer)))) + (let* ((indicator-lead-width + ;; We want the indicator to not be quite flush right. + (/ (vtable--char-width table) 2.0)) + (indicator-pad-width (- (vtable--char-width table) + indicator-lead-width)) + (fill-width + (+ (- (elt widths index) + (string-pixel-width displayed) + indicator-width + indicator-lead-width) + (if last 0 spacer)))) (if (or (not last) (zerop indicator-width) (< (seq-reduce #'+ widths 0) (window-width nil t))) @@ -739,7 +741,9 @@ This also updates the displayed table." displayed (propertize " " 'display (list 'space :width (list fill-width))) - indicator) + indicator + (propertize " " 'display + (list 'space :width (list indicator-pad-width)))) ;; This is the final column, and we have a sorting ;; indicator, and the table is too wide for the window. (let* ((pre-indicator (string-pixel-width @@ -758,10 +762,6 @@ This also updates the displayed table." (list (- fill-width pre-fill)))))))) (when (and divider (not last)) (insert (propertize divider 'keymap dmap))) - (insert (propertize - " " 'display - (list 'space :width (list - (/ (vtable--char-width table) 2.0))))) (put-text-property start (point) 'vtable-column index))) (vtable-columns table)) (insert "\n") commit 358208dfaa374cc71c4a1c081c2d5bff9127c55a Author: Eli Zaretskii Date: Sat Sep 7 11:15:43 2024 +0300 Remove low-level keyboard hook when attaching GDB to Emacs on Windows This fixes the problem whereby attaching GDB to a running Emacs on MS-Windows would slow down keyboard input, because the low-level keyboard hook installed by Emacs at startup was still installed, but with Emacs stopped, the hook code couldn't run, and therefore the OS would time-out waiting for the hook to return. Now when GDB is attached to Emacs, it will remove the hook right away. * src/.gdbinit: Call 'remove_w32_kbdhook' if the keyboard hook is already installed. * src/alloc.c (defined_WINDOWSNT): New enum. (gdb_make_enums_visible): Add 'defined_WINDOWSNT'. diff --git a/src/.gdbinit b/src/.gdbinit index 0f55cc18699..d13134a4e3f 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1308,6 +1308,11 @@ if defined_HAVE_X_WINDOWS break x_error_quitter end +if defined_WINDOWSNT + while kbdhook.hook_count > 0 + call remove_w32_kbdhook() + end +end # Put the Python code at the end of .gdbinit so that if GDB does not # support Python, GDB will do all the above initializations before diff --git a/src/alloc.c b/src/alloc.c index c22a5a787e4..066ec9fefe5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -8297,6 +8297,9 @@ N should be nonnegative. */); DEFSYM (QCemergency, ":emergency"); } +/* The below is for being able to do platform-specific stuff in .gdbinit + without risking error messages from GDB about missing types and + variables on other platforms. */ #ifdef HAVE_X_WINDOWS enum defined_HAVE_X_WINDOWS { defined_HAVE_X_WINDOWS = true }; #else @@ -8309,6 +8312,12 @@ enum defined_HAVE_PGTK { defined_HAVE_PGTK = true }; enum defined_HAVE_PGTK { defined_HAVE_PGTK = false }; #endif +#ifdef WINDOWSNT +enum defined_WINDOWSNT { defined_WINDOWSNT = true }; +#else +enum defined_WINDOWSNT { defined_WINDOWSNT = false }; +#endif + /* When compiled with GCC, GDB might say "No enum type named pvec_type" if we don't have at least one symbol with that type, and then xbacktrace could fail. Similarly for the other enums and @@ -8329,6 +8338,7 @@ extern union enums_for_gdb enum pvec_type pvec_type; enum defined_HAVE_X_WINDOWS defined_HAVE_X_WINDOWS; enum defined_HAVE_PGTK defined_HAVE_PGTK; + enum defined_WINDOWSNT defined_WINDOWSNT; } const gdb_make_enums_visible; union enums_for_gdb const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0}; #endif /* __GNUC__ */ commit e2154c63761add6063a719ba6253c8e6e8133814 Author: Eli Zaretskii Date: Sat Sep 7 10:42:01 2024 +0300 Fix multisession.el when SQLite becomes unavailable This is for the case when the user customizes multisession to use SQLite, but then built-in SQLite support becomes unavailable for some reason (e.g., upgrade the OS). * lisp/emacs-lisp/multisession.el (multisession-backend-value) (multisession--backend-set-value, multisession--backend-values) (multisession--backend-delete): Call next method if built-in SQLite support is not available. Suggested by Stefan Monnier . (Bug#72788) diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el index b7bc5536f78..c923c29bbf7 100644 --- a/lisp/emacs-lisp/multisession.el +++ b/lisp/emacs-lisp/multisession.el @@ -170,56 +170,60 @@ DOC should be a doc string, and ARGS are keywords as applicable to "create unique index multisession_idx on multisession (package, key)"))))) (cl-defmethod multisession-backend-value ((_type (eql 'sqlite)) object) - (multisession--ensure-db) - (let ((id (list (multisession--package object) - (multisession--key object)))) - (cond - ;; We have no value yet; check the database. - ((eq (multisession--cached-value object) multisession--unbound) - (let ((stored - (car - (sqlite-select - multisession--db - "select value, sequence from multisession where package = ? and key = ?" - id)))) - (if stored - (let ((value (car (read-from-string (car stored))))) - (setf (multisession--cached-value object) value - (multisession--cached-sequence object) (cadr stored)) - value) - ;; Nothing; return the initial value. - (multisession--initial-value object)))) - ;; We have a value, but we want to update in case some other - ;; Emacs instance has updated. - ((multisession--synchronized object) - (let ((stored - (car - (sqlite-select - multisession--db - "select value, sequence from multisession where sequence > ? and package = ? and key = ?" - (cons (multisession--cached-sequence object) id))))) - (if stored - (let ((value (car (read-from-string (car stored))))) - (setf (multisession--cached-value object) value - (multisession--cached-sequence object) (cadr stored)) - value) - ;; Nothing, return the cached value. - (multisession--cached-value object)))) - ;; Just return the cached value. - (t - (multisession--cached-value object))))) + (if (not (sqlite-available-p)) + (cl-call-next-method) + (multisession--ensure-db) + (let ((id (list (multisession--package object) + (multisession--key object)))) + (cond + ;; We have no value yet; check the database. + ((eq (multisession--cached-value object) multisession--unbound) + (let ((stored + (car + (sqlite-select + multisession--db + "select value, sequence from multisession where package = ? and key = ?" + id)))) + (if stored + (let ((value (car (read-from-string (car stored))))) + (setf (multisession--cached-value object) value + (multisession--cached-sequence object) (cadr stored)) + value) + ;; Nothing; return the initial value. + (multisession--initial-value object)))) + ;; We have a value, but we want to update in case some other + ;; Emacs instance has updated. + ((multisession--synchronized object) + (let ((stored + (car + (sqlite-select + multisession--db + "select value, sequence from multisession where sequence > ? and package = ? and key = ?" + (cons (multisession--cached-sequence object) id))))) + (if stored + (let ((value (car (read-from-string (car stored))))) + (setf (multisession--cached-value object) value + (multisession--cached-sequence object) (cadr stored)) + value) + ;; Nothing, return the cached value. + (multisession--cached-value object)))) + ;; Just return the cached value. + (t + (multisession--cached-value object)))))) (cl-defmethod multisession--backend-set-value ((_type (eql 'sqlite)) object value) - (catch 'done - (let ((i 0)) - (while (< i 10) - (condition-case nil - (throw 'done (multisession--set-value-sqlite object value)) - (sqlite-locked-error - (setq i (1+ i)) - (sleep-for (+ 0.1 (/ (float (random 10)) 10)))))) - (signal 'sqlite-locked-error "Database is locked")))) + (if (not (sqlite-available-p)) + (cl-call-next-method) + (catch 'done + (let ((i 0)) + (while (< i 10) + (condition-case nil + (throw 'done (multisession--set-value-sqlite object value)) + (sqlite-locked-error + (setq i (1+ i)) + (sleep-for (+ 0.1 (/ (float (random 10)) 10)))))) + (signal 'sqlite-locked-error "Database is locked"))))) (defun multisession--set-value-sqlite (object value) (multisession--ensure-db) @@ -245,16 +249,20 @@ DOC should be a doc string, and ARGS are keywords as applicable to (setf (multisession--cached-value object) value)))) (cl-defmethod multisession--backend-values ((_type (eql 'sqlite))) - (multisession--ensure-db) - (sqlite-select - multisession--db - "select package, key, value from multisession order by package, key")) + (if (not (sqlite-available-p)) + (cl-call-next-method) + (multisession--ensure-db) + (sqlite-select + multisession--db + "select package, key, value from multisession order by package, key"))) (cl-defmethod multisession--backend-delete ((_type (eql 'sqlite)) object) - (sqlite-execute multisession--db - "delete from multisession where package = ? and key = ?" - (list (multisession--package object) - (multisession--key object)))) + (if (not (sqlite-available-p)) + (cl-call-next-method) + (sqlite-execute multisession--db + "delete from multisession where package = ? and key = ?" + (list (multisession--package object) + (multisession--key object))))) ;; Files Backend commit 4d6fadb8d2146218fd573dc8b6ccfcab59fbfb93 Author: Eli Zaretskii Date: Fri Sep 6 19:02:50 2024 +0300 ; * lisp/which-key.el: Fix ':package-version' (bug#73072). diff --git a/lisp/which-key.el b/lisp/which-key.el index 34de676616f..91eb05c4dc7 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -70,7 +70,7 @@ This makes it possible to shorten the delay for subsequent popups in the same key sequence. The default is for this value to be nil, which disables this behavior." :type '(choice float (const :tag "Disabled" nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key "1.0") :version "30.1") (defcustom which-key-echo-keystrokes (if (and echo-keystrokes (> (+ echo-keystrokes 0.01) @@ -83,7 +83,7 @@ This only applies if `which-key-popup-type' is minibuffer or `which-key-idle-delay' or else the keystroke echo will erase the which-key popup." :type 'float - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-max-description-length 27 "Truncate the description of keys to this length. @@ -96,17 +96,17 @@ before. Truncation is done using `which-key-ellipsis'." (integer :tag "Width in characters") (float :tag "Use fraction of available width") function) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-min-column-description-width 0 "Every column should at least have this width." :type 'natnum - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-add-column-padding 0 "Additional spaces to add to the left of each key column." :type 'integer - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-unicode-correction 3 "Correction for wide unicode characters. @@ -122,7 +122,7 @@ additional ASCII character in the which-key buffer. Increase this number if you are seeing characters get cutoff on the right side of the which-key popup." :type 'integer - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-dont-use-unicode t "If non-nil, don't use any unicode characters in default setup. @@ -136,7 +136,7 @@ For affected settings, see `which-key-replacement-alist', `which-key-ellipsis' (custom-reevaluate-setting sym)))) :initialize #'custom-initialize-changed :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-separator (if which-key-dont-use-unicode " : " " → ") @@ -145,7 +145,7 @@ Default is \" → \", unless `which-key-dont-use-unicode' is non nil, in which case the default is \" : \"." :type 'string :set-after '(which-key-dont-use-unicode) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-ellipsis (if which-key-dont-use-unicode ".." "…") @@ -155,20 +155,20 @@ in which case the default is \"..\". This can also be the empty string to truncate without using any ellipsis." :type 'string :set-after '(which-key-dont-use-unicode) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-prefix-prefix "+" "Prefix string to indicate a key bound to a keymap. Default is \"+\"." :type 'string - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-compute-remaps nil "If non-nil, show remapped commands. This applies to commands that have been remapped given the currently active keymaps." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-replacement-alist `(((nil . "which-key-show-next-page-no-cycle") . (nil . "wk next pg")) @@ -211,7 +211,7 @@ non-nil value." (choice regexp (const nil))) :value-type (cons (choice string (const nil)) (choice string (const nil)))) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-allow-multiple-replacements nil "Allow a key binding to be modified by multiple elements. @@ -220,7 +220,7 @@ patterns in `which-key-replacement-alist'. When nil, only the first match is used to perform replacements from `which-key-replacement-alist'." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-docstrings nil "If non-nil, show each command's docstring in the which-key popup. @@ -233,7 +233,7 @@ you use this feature." (const :tag "Do not show docstrings" nil) (const :tag "Add docstring to command names" t) (const :tag "Replace command name with docstring" docstring-only)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-extra-keymaps '(key-translation-map) "List of extra keymaps to show entries from. @@ -242,7 +242,7 @@ The default is to check `key-translation-map', which contains the :type '(choice (list :tag "Translation map" (const key-translation-map)) (const :tag "None" nil) (repeat :tag "Custom" symbol)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-highlighted-command-list '() "Rules used to highlight certain commands. @@ -252,7 +252,7 @@ matching command names and use the element is a cons cell, it should take the form (regexp . face to apply)." :type '(repeat (choice string (cons regexp face))) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-special-keys '() "These keys will automatically be truncated to one character. @@ -261,12 +261,12 @@ is disabled by default. An example configuration is \(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\)" :type '(repeat string) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-buffer-name " *which-key*" "Name of which-key buffer." :type 'string - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-prefix 'echo "Whether to and where to display the current prefix sequence. @@ -278,7 +278,7 @@ and nil. nil turns the feature off." (const :tag "In the echo area" echo) (const :tag "In the mode-line" mode-line) (const :tag "Hide" nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-popup-type 'side-window "Supported types are minibuffer, side-window, frame, and custom." @@ -286,18 +286,18 @@ and nil. nil turns the feature off." (const :tag "Show in side window" side-window) (const :tag "Show in popup frame" frame) (const :tag "Use your custom display functions" custom)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-min-display-lines 1 "Minimum number of horizontal lines to display in the which-key buffer." :type 'integer - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-max-display-columns nil "Maximum number of columns to display in the which-key buffer. A value of nil means don't impose a maximum." :type '(choice integer (const :tag "Unbounded" nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-side-window-location 'bottom "Location of which-key popup when `which-key-popup-type' is side-window. @@ -311,7 +311,7 @@ location is tried." (const top) (const (right bottom)) (const (bottom right))) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-side-window-slot 0 "The `slot' to use for `display-buffer-in-side-window'. @@ -325,31 +325,31 @@ preceding (that is, above or on the left of) the middle slot. A positive value means use a slot following (that is, below or on the right of) the middle slot. The default is zero." :type 'integer - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-side-window-max-width 0.333 "Maximum width of which-key popup when type is side-window. This variable can also be a number between 0 and 1. In that case, it denotes a percentage out of the frame's width." :type 'float - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-side-window-max-height 0.25 "Maximum height of which-key popup when type is side-window. This variable can also be a number between 0 and 1. In that case, it denotes a percentage out of the frame's height." :type 'float - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-frame-max-width 60 "Maximum width of which-key popup when type is frame." :type 'natnum - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-frame-max-height 20 "Maximum height of which-key popup when type is frame." :type 'natnum - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-allow-imprecise-window-fit (not (display-graphic-p)) "Allow which-key to use a simpler method for resizing the popup. @@ -359,13 +359,13 @@ this on may help. See https://github.com/justbur/emacs-which-key/issues/130 and https://github.com/justbur/emacs-which-key/issues/225." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-remaining-keys nil "Show remaining keys in last slot, when keys are hidden." :type '(radio (const :tag "Yes" t) (const :tag "No" nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-sort-order #'which-key-key-order "Order in which the key bindings are sorted. @@ -385,25 +385,25 @@ information." (function-item which-key-description-order) (function-item which-key-prefix-then-key-order) (function-item which-key-local-then-key-order)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-sort-uppercase-first t "If non-nil, uppercase comes before lowercase in sorting. This applies to the function chosen in `which-key-sort-order'. Otherwise, the order is reversed." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-paging-prefixes '() "Enable paging for these prefixes." :type '(repeat string) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-paging-key "" "Key to use for changing pages. Bound after each of the prefixes in `which-key-paging-prefixes'" :type 'string - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") ;; (defcustom which-key-undo-key nil ;; "Key (string) to use for undoing keypresses. Bound recursively @@ -422,7 +422,7 @@ Normally `help-char' after a prefix calls `describe-prefix-bindings'. This changes that command to a which-key paging command when `which-key-mode' is active." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-early-on-C-h nil "Allow \\`C-h' (`help-char') to trigger which-key popup before timer. @@ -438,7 +438,7 @@ using \\`C-h'. Note that `which-key-idle-delay' should be set before turning on `which-key-mode'." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-preserve-window-configuration nil "Save and restore window configuration around which-key popup display. @@ -448,7 +448,7 @@ prevents which-key from changing window position of visible buffers. Only taken into account when popup type is side-window." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defvar which-key-C-h-map-prompt (concat " \\" @@ -516,7 +516,7 @@ of terminals issue META modifier for the Alt key. See Info node `(emacs)Modifier Keys'." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-delay-functions nil "List of functions that may delay the which-key popup. @@ -532,7 +532,7 @@ this list to return a value is the value that is used. The delay time is effectively added to the normal `which-key-idle-delay'." :type '(repeat function) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-allow-regexps nil "A list of regexp strings to use to filter key sequences. @@ -540,7 +540,7 @@ When non-nil, for a key sequence to trigger the which-key popup it must match one of the regexps in this list. The format of the key sequences is what is produced by `key-description'." :type '(repeat regexp) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-inhibit-regexps nil "A list of regexp strings to use to filter key sequences. @@ -548,7 +548,7 @@ When non-nil, for a key sequence to trigger the which-key popup it cannot match one of the regexps in this list. The format of the key sequences is what is produced by `key-description'." :type '(repeat regexp) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-transient-maps nil "Show keymaps created by `set-transient-map' when applicable. @@ -557,7 +557,7 @@ More specifically, detect when `overriding-terminal-local-map' is set (this is the keymap used by `set-transient-map') and display it." :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (make-obsolete-variable 'which-key-enable-extended-define-key @@ -568,7 +568,7 @@ it." (defcustom which-key-init-buffer-hook '() "Hook run when which-key buffer is initialized." :type 'hook - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") ;;;; Faces @@ -581,31 +581,31 @@ it." '((t . (:inherit font-lock-constant-face))) "Face for which-key keys." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-separator-face '((t . (:inherit font-lock-comment-face))) "Face for the separator (default separator is an arrow)." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-note-face '((t . (:inherit which-key-separator-face))) "Face for notes or hints occasionally provided." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-command-description-face '((t . (:inherit font-lock-function-name-face))) "Face for the key description when it is a command." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-local-map-description-face '((t . (:inherit which-key-command-description-face))) "Face for the key description when it is found in `current-local-map'." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-highlighted-command-face '((t . (:inherit (which-key-command-description-face highlight)))) @@ -613,25 +613,25 @@ it." A command is highlighted, when it matches a string in `which-key-highlighted-command-list'." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-group-description-face '((t . (:inherit font-lock-keyword-face))) "Face for the key description when it is a group or prefix." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-special-key-face '((t . (:inherit which-key-key-face :inverse-video t :weight bold))) "Face for special keys (\\`SPC', \\`TAB', \\`RET')." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defface which-key-docstring-face '((t . (:inherit which-key-note-face))) "Face for docstrings." :group 'which-key-faces - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") ;;;; Custom popup @@ -642,14 +642,14 @@ return the maximum height in lines and width in characters of the which-key popup in the form a cons cell (height . width)." :group 'which-key :type '(choice function (const nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-custom-hide-popup-function nil "Set a custom hide-popup function. It takes no arguments and the return value is ignored." :group 'which-key :type '(choice function (const nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-custom-show-popup-function nil "Set a custom show-popup function. @@ -658,13 +658,13 @@ width) in lines and characters respectively. The return value is ignored." :group 'which-key :type '(choice function (const nil)) - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-lighter " WK" "Minor mode lighter to use in the mode-line." :group 'which-key :type 'string - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defvar which-key-inhibit nil "Prevent which-key from popping up momentarily. @@ -681,7 +681,7 @@ popup. If any function returns a non-nil value, the popup will not display." :group 'which-key :type 'hook - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defvar which-key-keymap-history nil "History of keymap selections. @@ -812,7 +812,7 @@ allow which-key to support packages that insert non-standard `keys' into the key sequence being read by Emacs." :group 'which-key :type 'function - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") ;;;; Evil @@ -826,7 +826,7 @@ setting this to non-nil will override this behavior for evil operators." :group 'which-key :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-show-operator-state-maps nil "Show the keys following an evil command that reads a motion. @@ -836,7 +836,7 @@ might be some valid keys missing and it might be showing some invalid keys." :group 'which-key :type 'boolean - :package-version "1.0" :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defun which-key-evil-this-operator-p () (and which-key-allow-evil-operators @@ -948,6 +948,10 @@ given your settings)." #'which-key--hide-popup-on-frame-size-change) (which-key--stop-timer))) +;; Update `customize-package-emacs-version-alist'. +(add-to-list 'customize-package-emacs-version-alist + '(which-key ("1.0" . "30.1"))) + (defun which-key--init-buffer () "Initialize which-key buffer." (unless (buffer-live-p which-key--buffer) commit 54071b9cef287ac6826d67534d0c5c935bbca78c Author: Eli Zaretskii Date: Thu Sep 5 22:09:40 2024 +0300 ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode' * lisp/tab-line.el (tab-line-mode): * lisp/tab-bar.el (tab-bar-mode): Doc fixes (bug#73049) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 718ddfd2e88..ea36a924c78 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -257,7 +257,15 @@ a list of frames to update." "Tab Bar mode map.") (define-minor-mode tab-bar-mode - "Toggle the tab bar in all graphical frames (Tab Bar mode)." + "Toggle the tab bar in all graphical frames (Tab Bar mode). + +When this mode is enabled, Emacs displays a tab bar on top of each frame. +The tab bar is a row of tabs -- buttons that you can click +to switch the frame between different window configurations. +See `current-window-configuration' for more about window configurations. +To add a button (which can then record one more window configuration), +click on the \"+\" button. Clicking on the \"x\" icon of a button +deletes the button." :global t ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. :variable tab-bar-mode diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 462a0a27692..92b52b6936c 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -1141,7 +1141,15 @@ However, return the correct mouse position list if EVENT is a ;;;###autoload (define-minor-mode tab-line-mode - "Toggle display of tab line in the windows displaying the current buffer." + "Toggle display of tab line in the windows displaying the current buffer. + +When this mode is enabled, each window displays a tab line on its +top screen line. The tab line is a row of tabs -- buttons which +you can click to have the window display the buffer whose name is +shown on the button. Clicking on the \"x\" icon of the button +removes the button (but does not kill the corresponding buffer). +In addition, the tab line shows a \"+\" button which adds a new +button, so you could have one more buffer shown on the tab line." :lighter nil (let ((default-value '(:eval (tab-line-format)))) ;; Preserve the existing tab-line set outside of this mode commit 87a8b12a0c45cd92665978e63cb56354d61cc076 Author: Ulrich Müller Date: Wed Sep 4 13:35:51 2024 +0200 Fix test failure in erc-networks-tests * test/lisp/erc/erc-networks-tests.el (erc-networks--id-sort-buffers): Make sure that buffers have different timestamps. (Bug#73036) diff --git a/test/lisp/erc/erc-networks-tests.el b/test/lisp/erc/erc-networks-tests.el index f0a7c37ddf2..e84cca68cdd 100644 --- a/test/lisp/erc/erc-networks-tests.el +++ b/test/lisp/erc/erc-networks-tests.el @@ -133,10 +133,12 @@ (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'oldest) oldest (current-buffer)) + (sleep-for 0.02) (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'middle) middle (current-buffer)) + (sleep-for 0.02) (with-temp-buffer (setq erc-networks--id (erc-networks--id-fixed-create 'newest) commit dad0935cfcbed67b5f538ba26531eeefce356c12 Author: Eli Zaretskii Date: Thu Sep 5 09:23:23 2024 +0300 ; * doc/emacs/building.texi (Lisp Libraries): Update (bug#72961). diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 1b079c2cef9..bb03d8cf325 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1689,9 +1689,9 @@ command or function is invoked. For example: Note that installing a package using @code{package-install} (@pxref{Package Installation}) takes care of placing the package's -Lisp files in a directory where Emacs will find it, and also writes -the necessary initialization code into your init files, making the -above manual customizations unnecessary. +Lisp files in a directory where Emacs will find it, and also extends +@code{load-path} as needed, making the above manual customizations +unnecessary for such packages. @node Lisp Eval @section Evaluating Emacs Lisp Expressions commit e4dc6711b02bf459c1e64794107c5046f9e3c054 Author: Eli Zaretskii Date: Wed Sep 4 20:43:25 2024 +0300 Fix :hook in 'use-package' * lisp/use-package/use-package-core.el (use-package-handler/:hook): Support mode variables in :hook declarations. (Bug#72993) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 2c5fc560749..6c3d350c610 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1376,13 +1376,16 @@ enable gathering statistics." (when fun (mapcar #'(lambda (sym) - (if (boundp sym) - `(add-hook (quote ,sym) (function ,fun)) - `(add-hook - (quote ,(intern - (concat (symbol-name sym) - use-package-hook-name-suffix))) - (function ,fun)))) + (let ((symname (symbol-name sym))) + (if (and (boundp sym) + ;; Mode variables are usually bound, but + ;; their hooks are named FOO-mode-hook. + (not (string-suffix-p "-mode" symname))) + `(add-hook (quote ,sym) (function ,fun)) + `(add-hook + (quote ,(intern + (concat symname use-package-hook-name-suffix))) + (function ,fun))))) (use-package-hook-handler-normalize-mode-symbols syms))))) (use-package-normalize-commands args)))) commit c1cd036d27a8b078278619a356830521c6ffa6f2 Author: Eli Zaretskii Date: Wed Sep 4 17:14:25 2024 +0300 ; * doc/lispref/modes.texi (Mode Line Data): Fox wording. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index b24a89af9e0..ddb6c4bf2fb 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2227,7 +2227,7 @@ construct.) @item (:eval @var{form}) A list whose first element is the symbol @code{:eval} says to evaluate @var{form}, and use the result as a string to display. Make sure this -evaluation cannot load any files, nor calls functions like +evaluation neither loads any files nor calls functions like @code{posn-at-point} or @code{window-in-direction}, which themselves evaluate the mode line, as doing so could cause infinite recursion. commit ae2463796f236b8ee2cef3b5e38bffa13abd2233 Author: Eli Zaretskii Date: Tue Sep 3 17:33:28 2024 +0300 ; Caveats about using :eval in 'mode-line-format' * doc/lispref/modes.texi (Mode Line Data): Warn against more infinite-recursion cases in ':eval' in mode line. Reported by Nicolas P. Rougier . diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 27b74a9d233..b24a89af9e0 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2227,8 +2227,9 @@ construct.) @item (:eval @var{form}) A list whose first element is the symbol @code{:eval} says to evaluate @var{form}, and use the result as a string to display. Make sure this -evaluation cannot load any files, as doing so could cause infinite -recursion. +evaluation cannot load any files, nor calls functions like +@code{posn-at-point} or @code{window-in-direction}, which themselves +evaluate the mode line, as doing so could cause infinite recursion. @item (:propertize @var{elt} @var{props}@dots{}) A list whose first element is the symbol @code{:propertize} says to commit 4047072c7d847afb5027dab27e97606a49c1d62e Author: Stefan Kangas Date: Mon Sep 2 20:56:59 2024 +0200 Update FSF's address * doc/emacs/emacs.texi (Distrib): * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/elisp.texi: * doc/misc/org.org (Link Abbreviations): * etc/tutorials/TUTORIAL.eo: * lisp/elide-head.el: * lisp/textmodes/page-ext.el: Update the FSF address to 31 Milk Street. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 72e985ec44d..6df853f2a00 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -89,8 +89,8 @@ developing GNU and promoting software freedom.'' @sp 2 Published by the Free Software Foundation @* -51 Franklin Street, Fifth Floor @* -Boston, MA 02110-1301 USA @* +31 Milk Street, # 960789 @* +Boston, MA 02196 @* ISBN 978-0-9831592-8-5 @sp 2 @@ -1432,8 +1432,8 @@ If you need to contact the Free Software Foundation, see @display Free Software Foundation -51 Franklin Street, Fifth Floor -Boston, MA 02110-1301 +31 Milk Street # 960789 +Boston, MA 02196 USA @end display diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index bc4dc31bf4c..49916235fbf 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -125,8 +125,8 @@ Published by the:@* GNU Press, @hfill @uref{https://www.fsf.org/licensing/gnu-press/}@* a division of the @hfill email: @email{sales@@fsf.org}@* Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@* -51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@* -Boston, MA 02110-1301 USA +31 Milk Street, # 960789 @hfill Fax: +1 (617) 542-2652@* +Boston, MA 02196 USA @end iftex @ifnottex @@ -136,8 +136,8 @@ Printed copies available from @uref{https://shop.fsf.org/}. Published by: GNU Press, https://www.fsf.org/licensing/gnu-press/ a division of the email: sales@@fsf.org Free Software Foundation, Inc. Tel: +1 (617) 542-5942 -51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652 -Boston, MA 02110-1301 USA +31 Milk Street, # 960789 Fax: +1 (617) 542-2652 +Boston, MA 02196 USA @end example @end ifnottex diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index f464bcfe94f..1ce89c6431f 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -140,8 +140,8 @@ developing GNU and promoting software freedom.'' @sp 2 Published by the Free Software Foundation @* -51 Franklin St, Fifth Floor @* -Boston, MA 02110-1301 @* +31 Milk Street, # 960789 @* +Boston, MA 02196 @* USA @* ISBN 1-882114-74-4 diff --git a/doc/misc/org.org b/doc/misc/org.org index dcc1ddc7f44..e595d0be195 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -3788,8 +3788,8 @@ argument. With the above setting, you could link to a specific bug with =[[bugzilla:129]]=, search the web for =OrgMode= with =[[duckduckgo:OrgMode]]=, -show the map location of the Free Software Foundation =[[gmap:51 -Franklin Street, Boston]]= or of Carsten office =[[omap:Science Park 904, +show the map location of the Free Software Foundation =[[omap:31 +Milk Street, Boston]]= or of Carsten's office =[[omap:Science Park 904, Amsterdam, The Netherlands]]= and find out what the Org author is doing besides Emacs hacking with =[[ads:Dominik,C]]=. diff --git a/etc/tutorials/TUTORIAL.eo b/etc/tutorials/TUTORIAL.eo index 01423a04f50..633fa224c5d 100644 --- a/etc/tutorials/TUTORIAL.eo +++ b/etc/tutorials/TUTORIAL.eo @@ -1098,8 +1098,8 @@ kondiĉoj estas observataj: Ekzemplero de la GNUa Ĝenerala Publika Permesilo devas esti liverita al vi kun ĉi tiu programo; se vi ĝin ne ricevis, turnu vin - al: Free Software Foundation, Inc., 51 Franklin Street, Fifth - Floor, Boston, MA 02110-1301, USA. + al: Free Software Foundation, Inc., 31 Milk Street, # 960789, + Boston, MA 02196, USA. Bonvole legu la dosieron COPYING kaj sekve donu kopiojn de GNU Emakso al viaj amikoj. Helpu ekstermi programaran obstrukcismon diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 808bf55a05f..800d2c27d35 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -68,7 +68,7 @@ "http" (? "s") "://www.gnu.org/licenses" (? "/") (? ">") (? " ")) (seq "Boston," delim "MA" delim - (or "02111-1307" "02110-1301" "02111-1301") + (or "02111-1307" "02110-1301" "02111-1301" "02196") (? ",") delim "USA") "675 Mass Ave, Cambridge, MA 02139, USA") diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 1681f86b343..7a225ff7338 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -119,8 +119,8 @@ ;; ;; FSF ;; Free Software Foundation -;; 51 Franklin Street, Fifth Floor -;; Boston, MA 02110-1301 USA. +;; 31 Milk Street, # 960789 +;; Boston, MA 02196 USA. ;; (617) 542-5942 ;; gnu@gnu.org ;; commit 24f12bdd77ee3dd1f2254bdc6cb5cbf7be488c36 Author: Dmitry Gutov Date: Mon Sep 2 21:02:21 2024 +0300 Support the new option in ruby-ts-mode too * etc/NEWS: Describe it here. * lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol): Support the option ruby-bracketed-args-indent here too (bug#60321). * test/lisp/progmodes/ruby-ts-mode-tests.el: Include ruby-bracketed-args-indent.rb as test examples. * test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb: Extend examples for better regression testing. diff --git a/etc/NEWS b/etc/NEWS index f2c999a3955..a61bdc4a7f3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1973,6 +1973,10 @@ By default it retains the previous behavior: read the contents of Gemfile and act accordingly. But you can also set it to t or nil to skip the check. +*** New user option 'ruby-bracketed-args-indent'. +When it is set to nil, multiple consecutive open braces/brackets/parens +result in only one additional indentation level. + ** Thingatpt --- diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index 5f4e11e0b4c..adcdf15c7ad 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -842,6 +842,16 @@ a statement container is a node that matches ;; No paren/curly/brace found on the same line. ((< (treesit-node-start found) parent-bol) parent-bol) + ;; Nesting of brackets args. + ((and + (not (eq ruby-bracketed-args-indent t)) + (string-match-p "\\`array\\|hash\\'" (treesit-node-type parent)) + (equal (treesit-node-parent parent) found) + ;; Grandparent is not a parenless call. + (or (not (equal (treesit-node-type found) "argument_list")) + (equal (treesit-node-type (treesit-node-child found 0)) + "("))) + parent-bol) ;; Hash or array opener on the same line. ((string-match-p "\\`array\\|hash\\'" (treesit-node-type found)) (save-excursion diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb b/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb index ac7a73463bf..c1aaff78ac9 100644 --- a/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb +++ b/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb @@ -1,10 +1,11 @@ -update({ - key => value, - other_key: -}, { - key => value, - other_key: -}) +foo + .update({ + key => value, + other_key: + }, { + key => value, + other_key: + }) update([ 1, @@ -27,6 +28,15 @@ 2 ], arg2) +def foo + foo.update( + { + key => value, + other_key: foo + } + ) +end + # Local Variables: # ruby-bracketed-args-indent: nil # End: diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el index 61ef80eb610..05d98974acf 100644 --- a/test/lisp/progmodes/ruby-ts-mode-tests.el +++ b/test/lisp/progmodes/ruby-ts-mode-tests.el @@ -326,6 +326,7 @@ The whitespace before and including \"|\" on each line is removed." (ruby-ts-deftest-indent "ruby-method-call-indent.rb") (ruby-ts-deftest-indent "ruby-method-params-indent.rb") (ruby-ts-deftest-indent "ruby-parenless-call-arguments-indent.rb") +(ruby-ts-deftest-indent "ruby-bracketed-args-indent.rb") (provide 'ruby-ts-mode-tests) commit 6c15b7710d4bfc201afbafd2daec74c2baec9102 Author: Aaron Jensen Date: Sat Aug 31 19:31:20 2024 -0400 Add new option ruby-bracketed-args-indent * lisp/progmodes/ruby-mode.el (ruby-bracketed-args-indent): New option. (ruby-smie-rules): Use it (bug#60321). * test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb: New file. * test/lisp/progmodes/ruby-mode-tests.el: Use it for new case. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 3bcfa9ee7df..d953ec8b25c 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -472,6 +472,26 @@ Only has effect when `ruby-use-smie' is t." :safe 'booleanp :version "29.1") +(defcustom ruby-bracketed-args-indent t + "Non-nil to align the contents of bracketed arguments with the brackets. + +Example: + + qux({ + foo => bar + }) + +Set it to nil to align to the beginning of the statement: + + qux({ + foo => bar + }) + +Only has effect when `ruby-use-smie' is t." + :type 'boolean + :safe 'booleanp + :version "30.1") + (defcustom ruby-deep-arglist t "Deep indent lists in parenthesis when non-nil. Also ignores spaces after parenthesis when `space'. @@ -826,6 +846,9 @@ This only affects the output of the command `ruby-toggle-block'." )) (`(:before . ,(or "(" "[" "{")) (cond + ((and (not (eq ruby-bracketed-args-indent t)) + (smie-rule-prev-p "," "(" "[")) + (cons 'column (current-indentation))) ((and (equal token "{") (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";" "do")) (save-excursion diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb b/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb new file mode 100644 index 00000000000..ac7a73463bf --- /dev/null +++ b/test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb @@ -0,0 +1,32 @@ +update({ + key => value, + other_key: +}, { + key => value, + other_key: +}) + +update([ + 1, + 2 +], [ + 3, + 4 +]) + +update([{ + key: "value" +}, { + key: "value" +}]) + +update(arg1, { + foo: "bar" +}, [ + 1, + 2 +], arg2) + +# Local Variables: +# ruby-bracketed-args-indent: nil +# End: diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 2b8506a7adc..c9cde791baa 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -992,6 +992,7 @@ VALUES-PLIST is a list with alternating index and value elements." (ruby-deftest-indent "ruby-method-call-indent.rb") (ruby-deftest-indent "ruby-method-params-indent.rb") (ruby-deftest-indent "ruby-parenless-call-arguments-indent.rb") +(ruby-deftest-indent "ruby-bracketed-args-indent.rb") (ert-deftest ruby--test-chained-indentation () (with-temp-buffer commit 7799ef43354d756d7144cab3437f38496199522c Author: Eli Zaretskii Date: Mon Sep 2 17:14:29 2024 +0300 Fix Rmail base64 and qp decoding of MIME payloads * lisp/mail/rmailmm.el (rmail-mime-insert-decoded-text) (rmail-mime-insert-html): Remove ^M characters left from DOS EOLs. This is what 'rmail-decode-region' does for non-MIME messages. diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index b4a0e92136e..a5ce5b65cd7 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -579,7 +579,11 @@ HEADER is a header component of a MIME-entity object (see (ignore-errors (base64-decode-region pos (point)))) ((string= transfer-encoding "quoted-printable") (quoted-printable-decode-region pos (point)))))) - (decode-coding-region pos (point) coding-system) + (decode-coding-region + pos (point) + ;; Use -dos decoding, to remove ^M characters left from base64 or + ;; rogue qp-encoded text. + (coding-system-change-eol-conversion coding-system 1)) (if (and (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system)) (not (eq (coding-system-base coding-system) 'us-ascii))) @@ -691,7 +695,11 @@ HEADER is a header component of a MIME-entity object (see (if (and (eq coding-system 'undecided) (not (null coding-system-for-read))) (setq coding-system coding-system-for-read)))) - (decode-coding-region (point-min) (point) coding-system) + (decode-coding-region + (point-min) (point) + ;; Use -dos decoding, to remove ^M characters left from base64 or + ;; rogue qp-encoded text. + (coding-system-change-eol-conversion coding-system 1)) (if (and (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system)) (not (eq (coding-system-base coding-system) 'us-ascii))) commit 0def396fa8f4806226c4d010daa86ce5f8f9eb13 Author: Kyle Meyer Date: Sun Sep 1 17:51:22 2024 -0400 Update to Org 9.7.11 diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 22212fa6d07..eeab970e3e1 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -284,6 +284,26 @@ respected. Images dropped also respect the value of ~org-yank-image-save-method~ when ~org-yank-dnd-method~ is =attach=. +*** Alignment of image previews can be customized + +Previously, all the image previews where always left-aligned. + +Now, you can customize image previews to be left-aligned, centered, or right-aligned. + +The customization can be done globally, via ~org-image-align~, or per +image, using =#+attr_...:=. Example: + +: #+attr_org: :align center +: [[/path/to/image/file/png]] +: +: or +: +: #+attr_org: :center t +: [[/path/to/image/file/png]] + +When =#+attr_org= is not present, ~:align~ and ~:center~ attributes +from other =#+attr_...:= keywords will be used. + *** =id:= links support search options; ~org-id-store-link~ adds search option by default Adding search option by ~org-id-store-link~ can be disabled by setting diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 65e9caa26d2..1a525289987 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.7.10} +\def\orgversionnumber{9.7.11} \def\versionyear{2024} % latest update \input emacsver.tex diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 956763c587e..10192cb9a32 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -45,7 +45,6 @@ (require 'ob) (require 'org-macs) -(require 'ox-ascii) (declare-function org-time-string-to-time "org" (s)) (declare-function orgtbl-to-generic "org-table" (table params)) @@ -295,6 +294,8 @@ then create one. Return the initialized session. The current "Export TABLE to DATA-FILE in a format readable by gnuplot. Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE." (require 'ox-org) + (require 'ox-ascii) + (declare-function org-export-create-backend "ox") (with-temp-file data-file (insert (let ((org-babel-gnuplot-timestamp-fmt (or (plist-get params :timefmt) "%Y-%m-%d-%H:%M:%S")) diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 989fadf69fa..657d657d2ab 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.7.10")) + (let ((org-release "9.7.11")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.7.10")) + (let ((org-git-version "release_9.7.11")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 26812bbfb29..5bee96fb0b5 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "26.1")) -;; Version: 9.7.10 +;; Version: 9.7.11 ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 1024bdc4bae..7cdf622ec44 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -156,8 +156,11 @@ (:cite-export "CITE_EXPORT" nil org-cite-export-processors)) "Alist between export properties and ways to set them. -The key of the alist is the property name, and the value is a list -like (KEYWORD OPTION DEFAULT BEHAVIOR) where: +Each element of the alist is a list like +(ALIST-KEY KEYWORD OPTION DEFAULT BEHAVIOR) + +ALIST-KEY is the key of the alist - a symbol like `:option', and the +value is (KEYWORD OPTION ...). KEYWORD is a string representing a buffer keyword, or nil. Each property defined this way can also be set, during subtree commit 8c044bd97266b42973abb3343eeb4ea48d0949a0 Author: Eli Zaretskii Date: Sun Sep 1 20:57:03 2024 +0300 ; Fix recent changes in documentation * doc/lispref/positions.texi (List Motion): Fix indexing. * doc/emacs/mini.texi (Completion Options): Fix wording. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 862cf9bdd79..a6d2a17ed50 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -699,12 +699,12 @@ completions list buffer, and the second one will switch to it. @vindex completion-auto-wrap When the window showing the completions is selected, either because you customized @code{completion-auto-select} or because you switched to -it by typing @kbd{C-x o}, the @kbd{@key{UP}} (@code{previous-line-completion}) -and @kbd{@key{DOWN}} (@code{next-line-completion}) arrow keys -move by lines between completion candidates; with a prefix numeric -argument, they move that many lines. If @code{completion-auto-wrap} is -non-@code{nil}, these commands will wrap at bottom and top of the -candidate list. +it by typing @kbd{C-x o}, the @kbd{@key{UP}} and @kbd{@key{DOWN}} arrow +keys (@code{previous-line-completion} and @code{next-line-completion}, +respectively) move by lines between completion candidates; with a prefix +numeric argument, they move that many lines. If +@code{completion-auto-wrap} is non-@code{nil}, these commands will wrap +at bottom and top of the candidate list. @vindex completion-cycle-threshold If @code{completion-cycle-threshold} is non-@code{nil}, completion diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 93fba8b8ac0..d813fc6b20e 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -788,6 +788,14 @@ other kinds, such as words and string constants. ---------- Buffer: foo ---------- @end group @end example + +@vindex forward-sexp-function +@code{forward-sexp} calls the function that is the value of the variable +@code{forward-sexp-function}, if that is non-@code{nil}, to do the +actual work, passing it the same arguments as those with which the +command was called. Major modes can define their own functions for +moving over balanced expressions as appropriate for the mode, and set +this variable to that function. @end deffn @deffn Command backward-sexp &optional arg @@ -894,7 +902,6 @@ Sentences,,, emacs, The extensible self-documenting text editor}). @findex treesit-forward-sexp @findex forward-sexp@r{, and tree-sitter} @findex backward-sexp@r{, and tree-sitter} -@vindex forward-sexp-function If Emacs is compiled with tree-sitter, it can use the tree-sitter parser information to move across syntax constructs. Since what exactly is considered a sexp varies between languages, a major mode commit e0d8879bcd58c9eb5001cdc5294c126f742db63c Author: Juri Linkov Date: Sun Sep 1 20:17:03 2024 +0300 * test/lisp/emacs-lisp/tabulated-list-tests.el: Add missing test. (tabulated-list-groups-with-path): Add test for tabulated-list-groups. diff --git a/test/lisp/emacs-lisp/tabulated-list-tests.el b/test/lisp/emacs-lisp/tabulated-list-tests.el index e53268b3f14..7edcaaf9441 100644 --- a/test/lisp/emacs-lisp/tabulated-list-tests.el +++ b/test/lisp/emacs-lisp/tabulated-list-tests.el @@ -171,4 +171,31 @@ 4clojure 4clojure 1507 obsolete Open and evaluate 4clojure.com questions "))))) +(ert-deftest tabulated-list-groups-with-path () + (with-temp-buffer + (tabulated-list-mode) + (setq tabulated-list-groups + (tabulated-list-groups + tabulated-list--test-entries + `( :path-function (lambda (entry) + (list (list (aref (cadr entry) 3)))) + :sort-function (lambda (groups _level) + (sort groups :in-place t :key #'car))))) + (setq tabulated-list-format tabulated-list--test-format) + (setq tabulated-list-padding 7) + (tabulated-list-init-header) + (tabulated-list-print) + ;; Basic printing. + (should (string-equal + (buffer-substring-no-properties (point-min) (point-max)) + "\ +* available + abc-mode abc-mode 944 available Major mode for editing abc music files +* installed + zzzz-game zzzz-game 2113 installed play zzzz in Emacs + mode mode 1128 installed A simple mode for editing Actionscript 3 files +* obsolete + 4clojure 4clojure 1507 obsolete Open and evaluate 4clojure.com questions +")))) + ;;; tabulated-list-tests.el ends here commit 4ff4b78f922353236cb2970270dd175c8011ba8f Author: Juri Linkov Date: Sun Sep 1 19:53:52 2024 +0300 ; Small doc fixes * doc/emacs/dired.texi (Operating on Files): Add indexed function 'dired-do-open' to the text. * doc/emacs/mini.texi (Completion Options): Add indexed functions 'previous-line-completion' and 'next-line-completion' to the text. * doc/lispref/minibuf.texi (Completion Variables): Remove self-reference. * doc/lispref/positions.texi (List Motion): Add indexed function 'treesit-forward-sexp' to the text. Add @vindex for 'forward-sexp-function'. * etc/NEWS: Group tab-bar and tab-line items separately. Move two Buffer-menu items to separate outline. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index cf57350743f..88638190d7f 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -816,9 +816,9 @@ Like the other commands in this section, this command operates on the @findex dired-do-open @kindex E @r{(Dired)} @item E -``Open'' the specified files using an external program. The program is -selected according to the system conventions, as determined by the -variable @code{shell-command-guess-open}. +``Open'' the specified files using an external program (@code{dired-do-open}). +The program is selected according to the system conventions, as +determined by the variable @code{shell-command-guess-open}. @findex dired-do-rename @kindex R @r{(Dired)} diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 79744967455..862cf9bdd79 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -699,8 +699,9 @@ completions list buffer, and the second one will switch to it. @vindex completion-auto-wrap When the window showing the completions is selected, either because you customized @code{completion-auto-select} or because you switched to -it by typing @kbd{C-x o}, the @kbd{@key{UP}} and @kbd{@key{DOWN}} arrow -keys move by lines between completion candidates; with a prefix numeric +it by typing @kbd{C-x o}, the @kbd{@key{UP}} (@code{previous-line-completion}) +and @kbd{@key{DOWN}} (@code{next-line-completion}) arrow keys +move by lines between completion candidates; with a prefix numeric argument, they move that many lines. If @code{completion-auto-wrap} is non-@code{nil}, these commands will wrap at bottom and top of the candidate list. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 3b863eefd72..42b57143bf1 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1430,7 +1430,7 @@ line shows how many manual pages are available. @vindex Man-prefer-synchronous-call By default, @kbd{M-x man} calls the @code{man} program asynchronously. You can force the invocation to be synchronous by -customizing @code{Man-prefer-synchronous-calls} to a non-@code{nil} +customizing @code{Man-prefer-synchronous-call} to a non-@code{nil} value. @vindex Man-support-remote-systems diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 73ff170401e..f0b7fef30c7 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1910,8 +1910,8 @@ pairs. The following properties are supported: @item :category The value should be a symbol describing what kind of text the completion function is trying to complete. If the symbol matches one -of the keys in @code{completion-category-overrides}, the usual -completion behavior is overridden. @xref{Completion Variables}. +of the keys in @code{completion-category-overrides} described above, +the usual completion behavior is overridden. @item :annotation-function The value should be a function to add annotations in the completions diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 37cfe264157..93fba8b8ac0 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -894,11 +894,13 @@ Sentences,,, emacs, The extensible self-documenting text editor}). @findex treesit-forward-sexp @findex forward-sexp@r{, and tree-sitter} @findex backward-sexp@r{, and tree-sitter} +@vindex forward-sexp-function If Emacs is compiled with tree-sitter, it can use the tree-sitter parser information to move across syntax constructs. Since what exactly is considered a sexp varies between languages, a major mode should set @code{treesit-thing-settings} to determine that. Then -the mode can get navigation-by-sexp functionality for free, by using +@code{forward-sexp-function} will be set to @code{treesit-forward-sexp}, +and the mode can get navigation-by-sexp functionality for free, by using @code{forward-sexp} and @code{backward-sexp}(@pxref{Expressions, ,, emacs, The extensible self-documenting text editor}). diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 9b422915d7e..8c3b81a5fe5 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -954,7 +954,7 @@ used. @item New major modes based on the @uref{https://tree-sitter.github.io/tree-sitter/, tree-sitter library} -library for editing Elixir, HTML, Lua, HEEx, and PHP. +library for editing Elixir, HEEx, HTML, Lua, and PHP. @item Support for the EditorConfig standard has been added, an editor-neutral diff --git a/etc/NEWS b/etc/NEWS index 6c9eb0d33c6..f2c999a3955 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -379,11 +379,6 @@ the name of the killed buffer that was displayed in that window. It can be used to add, remove and reorder functions that change the appearance of every tab on the tab bar. ---- -*** New user option 'tab-line-tabs-buffer-group-function'. -It provides two choices to group tab buffers by major mode and by -project name. - --- *** New hook 'tab-bar-tab-post-select-functions'. @@ -401,7 +396,7 @@ you want to use these keys for the commands 'previous-buffer' and 'next-buffer'. --- -*** Default list of tabs is changed to support a fixed order. +*** Default list of tab-line tabs is changed to support a fixed order. This means that 'tab-line-tabs-fixed-window-buffers', the new default tabs function, is like the previous 'tab-line-tabs-window-buffers' where both of them show only buffers that were previously displayed in the @@ -411,7 +406,12 @@ these buffers. You can drag the tabs and release at a new position to manually reorder the buffers on the tab line. --- -*** Buffers on group tabs are now sorted alphabetically. +*** New user option 'tab-line-tabs-buffer-group-function'. +It provides two choices to group tab buffers by major mode and by +project name. + +--- +*** Buffers on tab-line group tabs are now sorted alphabetically. This will keep the fixed order of tabs, even after switching between them. @@ -945,7 +945,7 @@ Customizing it to 'relativize' makes commands like 'project-find-file' and 'project-find-dir' display previous history entries relative to the current project. --- +--- *** New user option 'project-key-prompt-style'. The look of the key prompt in the project switcher has been changed slightly. To get the previous one, set this option to 'brackets'. @@ -1993,12 +1993,7 @@ providers for "things" that are defined by text properties. Now, calling '(thing-at-point 'url)' when point is on a bug reference will return the URL for that bug. -** Miscellaneous - -+++ -*** New user option 'rcirc-log-time-format'. -This allows for rcirc logs to use a custom timestamp format, which the -chat buffers use by default. +** Buffer-menu --- *** New user option 'Buffer-menu-group-by'. @@ -2013,6 +2008,13 @@ that is, buffers not visiting a file and whose names start with a space. Previously, such buffers were never shown. This command is bound to 'I' in Buffer Menu mode. +** Miscellaneous + ++++ +*** New user option 'rcirc-log-time-format'. +This allows for rcirc logs to use a custom timestamp format, which the +chat buffers use by default. + --- *** 'ffap-lax-url' now defaults to nil. Previously, it was set to t, but this broke remote file name detection. @@ -2506,7 +2508,7 @@ sorts by the return value of 'age', then by 'size', then by 'cost'. The old signature, '(sort SEQ PREDICATE)', can still be used and sorts its input in-place as before. -** New API for 'derived-mode-p' and control of the graph of major modes. +** New API for 'derived-mode-p' and control of the graph of major modes +++ *** 'derived-mode-p' now takes the list of modes as a single argument. commit da980ad838e404460da8e284a62a35395833a96c Author: Sean Whitton Date: Sun Sep 1 11:20:25 2024 +0100 ; Reword some "allows Xing" * doc/emacs/anti.texi (Antinews): * etc/NEWS: * etc/NEWS.29: * lisp/tab-bar.el (tab-bar-select-restore-windows): * lisp/vc/vc-git.el (vc-git-print-log-follow): Reword to avoid "allows Xing". This is reported to be better for non-native readers. Based on suggestions of Eli Zaretskii . diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi index 97110dc8cdb..f64dd104f60 100644 --- a/doc/emacs/anti.texi +++ b/doc/emacs/anti.texi @@ -71,7 +71,7 @@ tool bars on the bottom. For the same reasons @code{modifier-bar-mode} is now gone. @item -The command @code{recover-file} no longer allows displaying the diffs +The command @code{recover-file} no longer lets you display the diffs between a file and its auto-save file. You either want to recover a file or you don't; confusing users with a third alternative when they are anxious already by the possibility of losing precious edits is diff --git a/etc/NEWS b/etc/NEWS index 0766900a495..6c9eb0d33c6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1102,7 +1102,7 @@ in size. +++ *** 'dired-listing-switches' handles connection-local values if exist. -This allows customizing different switches for different remote machines. +This allows you to customize different switches for different remote machines. ** Ediff diff --git a/etc/NEWS.29 b/etc/NEWS.29 index bd893c04446..d213c4b8010 100644 --- a/etc/NEWS.29 +++ b/etc/NEWS.29 @@ -2032,7 +2032,7 @@ The intention is that this command can be used to access a wide variety of version control system-specific functionality from VC without complexifying either the VC command set or the backend API. -*** 'C-x v v' in a diffs buffer allows committing only some of the changes. +*** 'C-x v v' in a diffs buffer lets you commit only some of the changes. This command is intended to allow you to commit only some of the changes you have in your working tree. Begin by creating a buffer with the changes against the last commit, e.g. with 'C-x v D' @@ -3529,8 +3529,8 @@ The variables 'connection-local-profile-alist' and make it more convenient to inspect and modify them. *** New function 'connection-local-update-profile-variables'. -This function allows modifying the settings of an existing -connection-local profile. +You can use this 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 @@ -4046,8 +4046,8 @@ measured will be counted for the purpose of calculating the text dimensions. ** 'window-text-pixel-size' understands a new meaning of FROM. -Specifying a cons as the FROM argument allows starting the measurement -of text from a specified amount of pixels above or below a position. +The FROM argument can now be a cons, which means to start measuring text +from a specified number of pixels above or below a position. ** 'window-body-width' and 'window-body-height' can use remapped faces. Specifying 'remap' as the PIXELWISE argument now checks if the default diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 363c98d8337..718ddfd2e88 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1478,8 +1478,8 @@ in the same window to give information about the killed buffer." (defun tab-bar-select-restore-windows (_frame windows _type) "Display a placeholder buffer in the window whose buffer was killed. -A button in the window allows restoring the killed buffer, -if it was visiting a file." +There is a button in the window which you can press to restore the +killed buffer, if that buffer was visiting a file." (dolist (quad windows) (when (window-live-p (nth 0 quad)) (let* ((window (nth 0 quad)) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 4006623799b..00cef214af7 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1452,9 +1452,9 @@ the file renames. The downsides is that the log produced this way may omit certain (merge) commits, and that `log-view-diff' fails on commits that used the previous name, in that log buffer. -When this variable is nil, and the log ends with a rename, we -show a button below that which allows showing the log for the -file name before the rename." +When this variable is nil, and the log ends with a rename, there is a +button which you can press to show the log for the file name before the +rename." :type 'boolean :version "26.1") commit 2ca7d5649c69efbc65a4c7c074c52d8f4f0d4a21 Author: Mattias Engdegård Date: Sat Aug 31 18:39:46 2024 +0200 ; More accurate text about how `equal` compares various objects * doc/lispref/objects.texi (Equality Predicates): Attempt at improving the text further (bug#72888). diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 399a1d169c2..34ea7cf4996 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -2413,10 +2413,12 @@ the converse is not always true. @end group @end example -The @code{equal} function recursively compares the contents of objects -if they are integers, strings, markers, lists, cons cells, vectors, -bool-vectors, byte-code function objects, char-tables, records, or font -objects. +The @code{equal} function compares strings and bool-vectors by value. +Numbers are compared by type and numeric value, using @code{eql}. +Lists, cons cells, vectors, records, markers, char-tables, font objects, +and function objects (closures)@footnote{However, equality of distinct +function objects cannot be guaranteed in general.} are compared +recursively by using @code{equal} on their constituent parts. Comparison of strings is case-sensitive, but does not take account of text properties---it compares only the characters in the strings.