diff options
| author | Po Lu <luangruo@yahoo.com> | 2023-01-17 22:11:31 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2023-01-17 22:11:31 +0800 |
| commit | 6253e7e74249c7cdfa86723f0b91a1d207cb143e (patch) | |
| tree | 797c1f9de31084283df720f1d5e61626733cda33 /lisp | |
| parent | 1b8258a1f2b6a080a4f0e819aa4a86c1ec2da89f (diff) | |
| parent | 96015c9c8cc1720e8ee7cd9cea4de48126dd9122 (diff) | |
| download | emacs-6253e7e74249c7cdfa86723f0b91a1d207cb143e.tar.gz | |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-prompt.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-var.el | 1 | ||||
| -rw-r--r-- | lisp/htmlfontify.el | 14 | ||||
| -rw-r--r-- | lisp/net/tramp-adb.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-archive.el | 7 | ||||
| -rw-r--r-- | lisp/net/tramp-crypt.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-rclone.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-sshfs.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp-sudoedit.el | 1 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 13 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/dockerfile-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/eglot.el | 24 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 15 | ||||
| -rw-r--r-- | lisp/progmodes/json-ts-mode.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-ts-mode.el | 32 | ||||
| -rw-r--r-- | lisp/progmodes/typescript-ts-mode.el | 14 | ||||
| -rw-r--r-- | lisp/simple.el | 12 | ||||
| -rw-r--r-- | lisp/subr.el | 6 | ||||
| -rw-r--r-- | lisp/treesit.el | 1 | ||||
| -rw-r--r-- | lisp/use-package/use-package-core.el | 2 | ||||
| -rw-r--r-- | lisp/use-package/use-package.el | 2 |
27 files changed, 126 insertions, 46 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index d7a0d851e01..039cebedb44 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1380,6 +1380,9 @@ See Info node `(elisp) Integer Basics'." ;; (apply F ... (list X Y ...)) -> (funcall F ... X Y ...) ((eq (car-safe last) 'list) `(funcall ,fn ,@(butlast (cddr form)) ,@(cdr last))) + ;; (apply F ... (cons X Y)) -> (apply F ... X Y) + ((eq (car-safe last) 'cons) + (append (butlast form) (cdr last))) (t form))) form))) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 23d02ba92cf..fb4b73b1c14 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1575,7 +1575,7 @@ extra args." "`%s' called with %d args to fill %d format field(s)" (car form) nargs nfields))))) -(dolist (elt '(format message error)) +(dolist (elt '(format message format-message error)) (put elt 'byte-compile-format-like t)) (defun byte-compile--suspicious-defcustom-choice (type) diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 52d46282c52..b3a0fadf618 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -52,7 +52,7 @@ as is common with most shells." (defcustom eshell-prompt-function (lambda () (concat (abbreviate-file-name (eshell/pwd)) - (if (= (user-uid) 0) " # " " $ "))) + (if (= (file-user-uid) 0) " # " " $ "))) "A function that returns the Eshell prompt string. Make sure to update `eshell-prompt-regexp' so that it will match your prompt." diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 811bb9957cf..fd76a2c6f09 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -162,6 +162,7 @@ if they are quoted with a backslash." ("COLUMNS" ,(lambda () (window-body-width nil 'remap)) t t) ("LINES" ,(lambda () (window-body-height nil 'remap)) t t) ("INSIDE_EMACS" eshell-inside-emacs t) + ("UID" ,(lambda () (file-user-uid)) nil t) ;; for esh-ext.el ("PATH" (,(lambda () (string-join (eshell-get-path t) (path-separator))) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 0959405081f..1ab33cc6411 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -373,13 +373,13 @@ otherwise." :type '(string)) (defcustom hfy-exclude-file-rules - '("\\.flc$" - "/CVS/.*" - ".*~$" - "/\\.git\\(?:/.*\\)?$") - "Define some regular expressions to exclude files" + '("\\.flc\\'" + "/CVS/" + "~\\'" + "/\\.git\\(?:/\\|\\'\\)") + "Regular expressions matching files to exclude." :tag "exclude-rules" - :type '(list string) + :type '(repeat regexp) :version "29.1") (defcustom hfy-display-class nil @@ -1835,7 +1835,7 @@ Strips any leading \"./\" from each filename." (seq-some (lambda (r) (string-match r f)) hfy-exclude-file-rules))) - (directory-files-recursively "." ".*" nil t))) + (directory-files-recursively "." "" nil t))) ;; strip the filename off, return a directory name ;; not a particularly thorough implementation, but it will be diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 29b9f894ec3..10f33e5f929 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -153,6 +153,7 @@ It is used for TCP/IP devices." (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-adb-handle-file-system-info) (file-truename . tramp-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-adb-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 3b1d568c127..b9cf85bd843 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -265,6 +265,7 @@ It must be supported by libarchive(3).") (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-archive-handle-file-system-info) (file-truename . tramp-archive-handle-file-truename) + (file-user-uid . tramp-archive-handle-file-user-uid) (file-writable-p . ignore) (find-backup-file-name . ignore) ;; `get-file-buffer' performed by default handler. @@ -701,6 +702,12 @@ offered." (let ((default-directory (file-name-directory archive))) (temporary-file-directory)))) +(defun tramp-archive-handle-file-user-uid () + "Like `user-uid' for file archives." + (with-parsed-tramp-archive-file-name default-directory nil + (let ((default-directory (file-name-directory archive))) + (file-user-uid)))) + (defun tramp-archive-handle-not-implemented (operation &rest args) "Generic handler for operations not implemented for file archives." (let ((v (ignore-errors diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 507fd432419..b9d0d96eccc 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -204,6 +204,7 @@ If NAME doesn't belong to an encrypted remote directory, return nil." (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-crypt-handle-file-system-info) ;; `file-truename' performed by default handler. + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-crypt-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index ea774d0b9b7..02ceb2979f7 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -798,6 +798,7 @@ It has been changed in GVFS 1.14.") (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-gvfs-handle-file-system-info) (file-truename . tramp-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index b28f9f64952..9eb2a54cdcf 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -118,6 +118,7 @@ (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-rclone-handle-file-system-info) (file-truename . tramp-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index acbb6aea135..46b1f612101 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1086,6 +1086,7 @@ Format specifiers \"%s\" are replaced before the script is used.") (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-sh-handle-file-system-info) (file-truename . tramp-sh-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-sh-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index b3f0344f818..9d03490f1d5 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -269,6 +269,7 @@ See `tramp-actions-before-shell' for more info.") (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-smb-handle-file-system-info) (file-truename . tramp-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-smb-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index 27b2854e451..65c4bf23c38 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -124,6 +124,7 @@ (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-sshfs-handle-file-system-info) (file-truename . tramp-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-sshfs-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el index ce080918e0f..db7ac842871 100644 --- a/lisp/net/tramp-sudoedit.el +++ b/lisp/net/tramp-sudoedit.el @@ -114,6 +114,7 @@ See `tramp-actions-before-shell' for more info.") (file-symlink-p . tramp-handle-file-symlink-p) (file-system-info . tramp-sudoedit-handle-file-system-info) (file-truename . tramp-sudoedit-handle-file-truename) + (file-user-uid . tramp-handle-file-user-uid) (file-writable-p . tramp-sudoedit-handle-file-writable-p) (find-backup-file-name . tramp-handle-find-backup-file-name) ;; `get-file-buffer' performed by default handler. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 169cf1982b4..fab1962d2b7 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2632,7 +2632,9 @@ Must be handled by the callers." '(exec-path make-nearby-temp-file make-process process-file shell-command start-file-process temporary-file-directory ;; Emacs 29+ only. - list-system-processes memory-info process-attributes)) + list-system-processes memory-info process-attributes + ;; Emacs 30+ only. + file-user-uid)) default-directory) ;; PROC. ((member operation '(file-notify-rm-watch file-notify-valid-p)) @@ -3714,6 +3716,15 @@ Let-bind it when necessary.") vec (concat "~" (substring filename (match-beginning 1)))) (tramp-make-tramp-file-name (tramp-dissect-file-name filename))))) +(defun tramp-handle-file-user-uid () + "Like `user-uid' for Tramp files." + (let ((v (tramp-dissect-file-name default-directory))) + (or (tramp-get-remote-uid v 'integer) + ;; Some handlers for `tramp-get-remote-uid' return nil if they + ;; can't get the UID; always return -1 in this case for + ;; consistency. + -1))) + (defun tramp-handle-access-file (filename string) "Like `access-file' for Tramp files." (setq filename (file-truename filename)) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 8ac3ef6808d..45d90ea2431 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10863,7 +10863,13 @@ This function might do hidden buffer changes." ;; types; other identifiers could just as well be ;; constants in C++. (memq at-type '(known found))))) - (throw 'at-decl-or-cast t) + (progn + ;; The user may be part way through typing a statement + ;; beginning with an identifier. This makes a 'maybe + ;; type in the following "declarator"'s arglist suspect. + (when (eq at-type 'maybe) + (setq unsafe-maybe t)) + (throw 'at-decl-or-cast t)) ;; CASE 7 ;; Can't be a valid declaration or cast, but if we've found a ;; specifier it can't be anything else either, so treat it as diff --git a/lisp/progmodes/dockerfile-ts-mode.el b/lisp/progmodes/dockerfile-ts-mode.el index 3f8766e6713..1b91681f085 100644 --- a/lisp/progmodes/dockerfile-ts-mode.el +++ b/lisp/progmodes/dockerfile-ts-mode.el @@ -161,6 +161,10 @@ the subtrees." (setq-local treesit-simple-indent-rules dockerfile-ts-mode--indent-rules) + ;; Navigation + (setq-local treesit-sentence-type-regexp + "instruction") + ;; Font-lock. (setq-local treesit-font-lock-settings dockerfile-ts-mode--font-lock-settings) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index a846baa1b16..8ce1a8b7baf 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1075,7 +1075,7 @@ suitable root directory for a given LSP server's purposes." ;;;###autoload (defun eglot (managed-major-mode project class contact language-id - &optional interactive) + &optional _interactive) "Start LSP server in support of PROJECT's buffers under MANAGED-MAJOR-MODE. This starts a Language Server Protocol (LSP) server suitable for the @@ -1112,17 +1112,17 @@ described in `eglot-server-programs', which see. LANGUAGE-ID is the language ID string to send to the server for MANAGED-MAJOR-MODE, which matters to a minority of servers. -INTERACTIVE is t if called interactively." - (interactive (append (eglot--guess-contact t) '(t))) - (setq managed-major-mode (eglot--ensure-list managed-major-mode)) - (let* ((current-server (eglot-current-server)) - (live-p (and current-server (jsonrpc-running-p current-server)))) - (if (and live-p - interactive - (y-or-n-p "[eglot] Live process found, reconnect instead? ")) - (eglot-reconnect current-server interactive) - (when live-p (ignore-errors (eglot-shutdown current-server))) - (eglot--connect managed-major-mode project class contact language-id)))) +INTERACTIVE is ignored and provided for backward compatibility." + (interactive + (let ((current-server (eglot-current-server))) + (unless (or (null current-server) + (y-or-n-p "\ +[eglot] Shut down current connection before attempting new one?")) + (user-error "[eglot] Connection attempt aborted by user.")) + (prog1 (append (eglot--guess-contact t) '(t)) + (when current-server (ignore-errors (eglot-shutdown current-server)))))) + (eglot--connect (eglot--ensure-list managed-major-mode) + project class contact language-id)) (defun eglot-reconnect (server &optional interactive) "Reconnect to SERVER. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index fa3b4687ef2..28305a0b39b 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3454,13 +3454,16 @@ This function is intended for use in `after-change-functions'." ((parent-is "statement_block") parent-bol js-indent-level) ;; JSX - ((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset) + ((match "<" "jsx_fragment") parent 0) + ((parent-is "jsx_fragment") parent js-indent-level) ((node-is "jsx_closing_element") parent 0) - ((node-is "/") parent 0) - ((node-is ">") parent 0))))) + ((node-is "jsx_element") parent js-indent-level) + ((parent-is "jsx_element") parent js-indent-level) + ((parent-is "jsx_opening_element") parent js-indent-level) + ((parent-is "jsx_expression") parent-bol js-indent-level) + ((match "/" "jsx_self_closing_element") parent 0) + ((parent-is "jsx_self_closing_element") parent js-indent-level) + (no-node parent-bol 0))))) (defvar js--treesit-keywords '("as" "async" "await" "break" "case" "catch" "class" "const" "continue" diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el index fbcda22acca..f6a303290a8 100644 --- a/lisp/progmodes/json-ts-mode.el +++ b/lisp/progmodes/json-ts-mode.el @@ -147,6 +147,8 @@ Return nil if there is no name or if NODE is not a defun node." (rx (or "pair" "object"))) (setq-local treesit-defun-name-function #'json-ts-mode--defun-name) + (setq-local treesit-sentence-type-regexp "pair") + ;; Font-lock. (setq-local treesit-font-lock-settings json-ts-mode--font-lock-settings) (setq-local treesit-font-lock-feature-list diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index d68b57966ba..939c054b041 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -780,12 +780,20 @@ i.e. expr of def foo(args) = expr is returned." ;; but with node set to the statement and parent set to ;; body_statement for all others. ... Fine. Be that way. ;; Ditto for "block" and "block_body" - ((node-is "body_statement") parent-bol ruby-indent-level) - ((parent-is "body_statement") (ruby-ts--bol ruby-ts--grand-parent-node) ruby-indent-level) - ((match "end" "do_block") parent-bol 0) - ((n-p-gp "block_body" "block" nil) parent-bol ruby-indent-level) - ((n-p-gp nil "block_body" "block") (ruby-ts--bol ruby-ts--grand-parent-node) ruby-indent-level) - ((match "}" "block") parent-bol 0) + ((node-is "body_statement") + (ruby-ts--block-indent-anchor ruby-ts--parent-node) + ruby-indent-level) + ((parent-is "body_statement") + (ruby-ts--block-indent-anchor ruby-ts--grand-parent-node) + ruby-indent-level) + ((match "end" "do_block") (ruby-ts--block-indent-anchor ruby-ts--parent-node) 0) + ((n-p-gp "block_body" "block" nil) + (ruby-ts--block-indent-anchor ruby-ts--parent-node) + ruby-indent-level) + ((n-p-gp nil "block_body" "block") + (ruby-ts--block-indent-anchor ruby-ts--grand-parent-node) + ruby-indent-level) + ((match "}" "block") (ruby-ts--block-indent-anchor ruby-ts--parent-node) 0) ;; Chained strings ((match "string" "chained_string") first-sibling 0) @@ -794,6 +802,18 @@ i.e. expr of def foo(args) = expr is returned." (catch-all parent-bol ruby-indent-level)))) `((ruby . ,common)))) +(defun ruby-ts--block-indent-anchor (block-node-getter) + (lambda (node parent _bol &rest _rest) + (let ((block-node (funcall block-node-getter node parent))) + (save-excursion + (goto-char + (treesit-node-start + (if ruby-block-indent + (ruby-ts--statement-ancestor block-node) + block-node))) + (back-to-indentation) + (point))))) + (defun ruby-ts--class-or-module-p (node) "Predicate if NODE is a class or module." (string-match-p ruby-ts--class-or-module-regex (treesit-node-type node))) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index cd631d048ea..f7bf7ed7e42 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -97,13 +97,15 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "binary_expression") parent-bol typescript-ts-mode-indent-offset) ,@(when (eq language 'tsx) - `(((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset) + `(((match "<" "jsx_fragment") parent 0) + ((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset) ((node-is "jsx_closing_element") parent 0) - ((node-is "/") parent 0) - ((node-is ">") parent 0))) + ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_opening_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_expression") parent-bol typescript-ts-mode-indent-offset) + ((match "/" "jsx_self_closing_element") parent 0) + ((parent-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset))) (no-node parent-bol 0)))) (defvar typescript-ts-mode--keywords diff --git a/lisp/simple.el b/lisp/simple.el index 4b09f41de55..844cfa68b08 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4730,6 +4730,18 @@ Also see the `async-shell-command-buffer' variable." action)) (user-error "Shell command in progress")))) +(defun file-user-uid () + "Return the connection-local effective uid. +This is similar to `user-uid', but may invoke a file name handler +based on `default-directory'. See Info node `(elisp)Magic File +Names'. + +If a file name handler is unable to retrieve the effective uid, +this function will instead return -1." + (if-let ((handler (find-file-name-handler default-directory 'file-user-uid))) + (funcall handler 'file-user-uid) + (user-uid))) + (defun max-mini-window-lines (&optional frame) "Compute maximum number of lines for echo area in FRAME. As defined by `max-mini-window-height'. FRAME defaults to the diff --git a/lisp/subr.el b/lisp/subr.el index 1762c94a43e..f909b63aabe 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2562,12 +2562,14 @@ The variable list SPEC is the same as in `if-let'." Evaluate each binding in turn, stopping if a binding value is nil. If all bindings are non-nil, eval BODY and repeat. -The variable list SPEC is the same as in `if-let'." +The variable list SPEC is the same as in `if-let*'." (declare (indent 1) (debug if-let)) (let ((done (gensym "done"))) `(catch ',done (while t - (if-let ,spec + ;; This is `if-let*', not `if-let', deliberately, despite the + ;; name of this macro. See bug#60758. + (if-let* ,spec (progn ,@body) (throw ',done nil)))))) diff --git a/lisp/treesit.el b/lisp/treesit.el index e9f5a8b37b1..69bfff21df3 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1152,7 +1152,6 @@ See `treesit-simple-indent-presets'.") (and (>= (point) comment-start-bol) adaptive-fill-regexp (looking-at adaptive-fill-regexp) - (> (match-end 0) (match-beginning 0)) (match-end 0)))))) ;; TODO: Document. (cons 'grand-parent diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 379e119b60f..7ab5bdc276f 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -65,7 +65,7 @@ :link '(custom-manual "(use-package) Top") :version "29.1") -(defconst use-package-version "2.4.4" +(defconst use-package-version "2.4.5" "This version of `use-package'.") (defcustom use-package-keywords diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 7682468522d..1b63a6d651a 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -5,7 +5,7 @@ ;; Author: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Created: 17 Jun 2012 -;; Version: 2.4.4 +;; Version: 2.4.5 ;; Package-Requires: ((emacs "24.3") (bind-key "2.4")) ;; Keywords: dotemacs startup speed config package extensions ;; URL: https://github.com/jwiegley/use-package |
