commit 7791907c3852e6ec197352e1c3d3dd8487cc04f5 (HEAD, refs/remotes/origin/master) Author: Benson Chu Date: Tue May 9 17:05:32 2023 +0200 tramp-ssh-controlmaster-options shouldn't return nil * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Should never return nil, but empty string. Copyright-paperwork-exempt: yes diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index d020615af07..49e6d2d7aa9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4856,26 +4856,30 @@ tramp-ssh-controlmaster-options (stringp tramp-ssh-controlmaster-options)) tramp-ssh-controlmaster-options) + ;; We can't auto-compute the options. + ((ignore-errors + (not (tramp-ssh-option-exists-p vec "ControlMaster=auto"))) + "") + ;; Determine the options. (t (ignore-errors ;; ControlMaster and ControlPath options are introduced in OpenSSH 3.9. - (when (tramp-ssh-option-exists-p vec "ControlMaster=auto") - (concat - "-o ControlMaster=" - (if (eq tramp-use-connection-share 'suppress) - "no" "auto") - - " -o ControlPath=" - (if (eq tramp-use-connection-share 'suppress) - "none" - ;; Hashed tokens are introduced in OpenSSH 6.7. - (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C") - "tramp.%%C" "tramp.%%r@%%h:%%p")) - - ;; ControlPersist option is introduced in OpenSSH 5.6. - (when (and (not (eq tramp-use-connection-share 'suppress)) - (tramp-ssh-option-exists-p vec "ControlPersist=no")) - " -o ControlPersist=no"))))))) + (concat + "-o ControlMaster=" + (if (eq tramp-use-connection-share 'suppress) + "no" "auto") + + " -o ControlPath=" + (if (eq tramp-use-connection-share 'suppress) + "none" + ;; Hashed tokens are introduced in OpenSSH 6.7. + (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C") + "tramp.%%C" "tramp.%%r@%%h:%%p")) + + ;; ControlPersist option is introduced in OpenSSH 5.6. + (when (and (not (eq tramp-use-connection-share 'suppress)) + (tramp-ssh-option-exists-p vec "ControlPersist=no")) + " -o ControlPersist=no")))))) (defun tramp-scp-strict-file-name-checking (vec) "Return the strict file name checking argument of the local scp." commit 953d3772fb68f71e5edc51c8169809af898cc0d3 Author: Mattias Engdegård Date: Tue May 9 13:37:26 2023 +0200 ; * test/src/treesit-tests.el: declare functions to silence warnings diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 5b2955c34e3..4aa81a9ce0b 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -54,6 +54,9 @@ (declare-function treesit-node-descendant-for-range "treesit.c") (declare-function treesit-node-eq "treesit.c") +(declare-function treesit-search-forward "treesit.c") +(declare-function treesit-search-subtree "treesit.c") + ;;; Basic API (ert-deftest treesit-basic-parsing () commit a85609c22d21adee6308ce15c3ed5515baef3ace Author: Mattias Engdegård Date: Tue May 9 13:28:20 2023 +0200 ; * lisp/treesit.el (treesit-node-top-level): cleaner and faster diff --git a/lisp/treesit.el b/lisp/treesit.el index 54f223dc40b..e9ca45c0d6c 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -251,8 +251,7 @@ treesit-node-top-level and more. See `treesit-thing-settings' for details. If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." - (let ((pred (or pred (rx-to-string - `(seq bos ,(treesit-node-type node) eos)))) + (let ((pred (or pred (rx bos (literal (treesit-node-type node)) eos))) (result nil)) (cl-loop for cursor = (if include-node node (treesit-node-parent node)) commit 56468b52b2355a00c1dff2137c54136dbb031922 Author: Mattias Engdegård Date: Mon May 8 18:38:33 2023 +0200 Speed up skip-chars-{forward|reverse} with char classes * src/regex-emacs.h (re_wctype_t): Add RECC_NUM_CLASSES. * src/syntax.c (skip_chars, in_classes): Use an array on the stack instead of a Lisp list for storing character classes. Don't check all classes if there is a match in one. Remove useless handle_iso_classes argument. diff --git a/src/regex-emacs.h b/src/regex-emacs.h index 1bc973363e9..bc357633135 100644 --- a/src/regex-emacs.h +++ b/src/regex-emacs.h @@ -187,7 +187,8 @@ #define EMACS_REGEX_H 1 RECC_DIGIT, RECC_XDIGIT, RECC_BLANK, RECC_SPACE, RECC_MULTIBYTE, RECC_NONASCII, - RECC_ASCII, RECC_UNIBYTE + RECC_ASCII, RECC_UNIBYTE, + RECC_NUM_CLASSES = RECC_UNIBYTE } re_wctype_t; extern bool re_iswctype (int ch, re_wctype_t cc); diff --git a/src/syntax.c b/src/syntax.c index e9e04e2d638..839ab36bb2f 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -178,14 +178,14 @@ SYNTAX_COMEND_FIRST (int c) static modiff_count find_start_modiff; -static Lisp_Object skip_chars (bool, Lisp_Object, Lisp_Object, bool); +static Lisp_Object skip_chars (bool, Lisp_Object, Lisp_Object); static Lisp_Object skip_syntaxes (bool, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, bool); static void scan_sexps_forward (struct lisp_parse_state *, ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT, bool, int); static void internalize_parse_state (Lisp_Object, struct lisp_parse_state *); -static bool in_classes (int, Lisp_Object); +static bool in_classes (int c, int num_classes, const unsigned char *classes); static void parse_sexp_propertize (ptrdiff_t charpos); /* This setter is used only in this file, so it can be private. */ @@ -1607,7 +1607,7 @@ DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, Returns the distance traveled, either zero or positive. */) (Lisp_Object string, Lisp_Object lim) { - return skip_chars (1, string, lim, 1); + return skip_chars (1, string, lim); } DEFUN ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, 0, @@ -1616,7 +1616,7 @@ DEFUN ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, Returns the distance traveled, either zero or negative. */) (Lisp_Object string, Lisp_Object lim) { - return skip_chars (0, string, lim, 1); + return skip_chars (0, string, lim); } DEFUN ("skip-syntax-forward", Fskip_syntax_forward, Sskip_syntax_forward, 1, 2, 0, @@ -1643,8 +1643,7 @@ DEFUN ("skip-syntax-backward", Fskip_syntax_backward, Sskip_syntax_backward, 1, } static Lisp_Object -skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, - bool handle_iso_classes) +skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim) { int c; char fastmap[0400]; @@ -1661,11 +1660,9 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, ptrdiff_t size_byte; const unsigned char *str; int len; - Lisp_Object iso_classes; USE_SAFE_ALLOCA; CHECK_STRING (string); - iso_classes = Qnil; if (NILP (lim)) XSETINT (lim, forwardp ? ZV : BEGV); @@ -1700,6 +1697,8 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, If STRING contains non-ASCII characters, setup char_ranges for them and use fastmap only for their leading codes. */ + int nclasses = 0; + unsigned char classes[RECC_NUM_CLASSES]; if (! string_multibyte) { bool string_has_eight_bit = 0; @@ -1707,18 +1706,16 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, /* At first setup fastmap. */ while (i_byte < size_byte) { - if (handle_iso_classes) + const unsigned char *ch = str + i_byte; + re_wctype_t cc = re_wctype_parse (&ch, size_byte - i_byte); + if (cc == 0) + error ("Invalid ISO C character class"); + if (cc != -1) { - const unsigned char *ch = str + i_byte; - re_wctype_t cc = re_wctype_parse (&ch, size_byte - i_byte); - if (cc == 0) - error ("Invalid ISO C character class"); - if (cc != -1) - { - iso_classes = Fcons (make_fixnum (cc), iso_classes); - i_byte = ch - str; - continue; - } + if (!(nclasses && memchr (classes, cc, nclasses))) + classes[nclasses++] = cc; + i_byte = ch - str; + continue; } c = str[i_byte++]; @@ -1803,18 +1800,16 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, { int leading_code = str[i_byte]; - if (handle_iso_classes) + const unsigned char *ch = str + i_byte; + re_wctype_t cc = re_wctype_parse (&ch, size_byte - i_byte); + if (cc == 0) + error ("Invalid ISO C character class"); + if (cc != -1) { - const unsigned char *ch = str + i_byte; - re_wctype_t cc = re_wctype_parse (&ch, size_byte - i_byte); - if (cc == 0) - error ("Invalid ISO C character class"); - if (cc != -1) - { - iso_classes = Fcons (make_fixnum (cc), iso_classes); - i_byte = ch - str; - continue; - } + if (!(nclasses && memchr (classes, cc, nclasses))) + classes[nclasses++] = cc; + i_byte = ch - str; + continue; } if (leading_code== '\\') @@ -1960,7 +1955,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, stop = endp; } c = string_char_and_length (p, &nbytes); - if (! NILP (iso_classes) && in_classes (c, iso_classes)) + if (nclasses && in_classes (c, nclasses, classes)) { if (negate) break; @@ -2001,7 +1996,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, stop = endp; } - if (!NILP (iso_classes) && in_classes (*p, iso_classes)) + if (nclasses && in_classes (*p, nclasses, classes)) { if (negate) break; @@ -2035,7 +2030,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, c = STRING_CHAR (p); - if (! NILP (iso_classes) && in_classes (c, iso_classes)) + if (nclasses && in_classes (c, nclasses, classes)) { if (negate) break; @@ -2069,7 +2064,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, stop = endp; } - if (! NILP (iso_classes) && in_classes (p[-1], iso_classes)) + if (nclasses && in_classes (p[-1], nclasses, classes)) { if (negate) break; @@ -2253,26 +2248,16 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim) } } -/* Return true if character C belongs to one of the ISO classes - in the list ISO_CLASSES. Each class is represented by an - integer which is its type according to re_wctype. */ +/* Return true if character C belongs to one of the ISO classes in the + array. */ static bool -in_classes (int c, Lisp_Object iso_classes) +in_classes (int c, int nclasses, const unsigned char *classes) { - bool fits_class = 0; - - while (CONSP (iso_classes)) - { - Lisp_Object elt; - elt = XCAR (iso_classes); - iso_classes = XCDR (iso_classes); - - if (re_iswctype (c, XFIXNAT (elt))) - fits_class = 1; - } - - return fits_class; + for (int i = 0; i < nclasses; i++) + if (re_iswctype (c, classes[i])) + return true; + return false; } /* Jump over a comment, assuming we are at the beginning of one. commit e9258a882a9b54f2992ae8ffd73e3da6bb3c4556 Author: João Távora Date: Tue May 9 10:34:52 2023 +0100 Eglot: Replace eglot-execute-command with new eglot-execute Hopefully helps with https://github.com/joaotavora/eglot/discussions/1070 and https://github.com/emacs-sideline/sideline/issues/5 * lisp/progmodes/eglot.el (eglot-execute-command): Obsolete. (eglot-execute): New generic. (eglot--read-execute-code-action): Use eglot-execute. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index dc8d4674425..66d893a14b5 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -724,8 +724,23 @@ eglot-handle-request (cl-defgeneric eglot-handle-notification (server method &rest params) "Handle SERVER's METHOD notification with PARAMS.") -(cl-defgeneric eglot-execute-command (server command arguments) - "Ask SERVER to execute COMMAND with ARGUMENTS.") +(cl-defgeneric eglot-execute-command (_ _ _) + (declare (obsolete eglot-execute "30.1")) + (:method + (server command arguments) + (eglot--request server :workspace/executeCommand + `(:command ,(format "%s" command) :arguments ,arguments)))) + +(cl-defgeneric eglot-execute (server action) + "Ask SERVER to execute ACTION. +ACTION is an LSP object of either `CodeAction' or `Command' type." + (:method + (server action) "Default implementation." + (eglot--dcase action + (((Command)) (eglot--request server :workspace/executeCommand action)) + (((CodeAction) edit command) + (when edit (eglot--apply-workspace-edit edit)) + (when command (eglot--request server :workspace/executeCommand action)))))) (cl-defgeneric eglot-initialization-options (server) "JSON object to send under `initializationOptions'." @@ -2181,13 +2196,6 @@ eglot-handle-request (when (memq 'disallow-unknown-methods eglot-strict-mode) (jsonrpc-error "Unknown request method `%s'" method))) -(cl-defmethod eglot-execute-command - (server command arguments) - "Execute COMMAND on SERVER with `:workspace/executeCommand'. -COMMAND is a symbol naming the command." - (eglot--request server :workspace/executeCommand - `(:command ,(format "%s" command) :arguments ,arguments))) - (cl-defmethod eglot-handle-notification (_server (_method (eql window/showMessage)) &key type message) "Handle notification window/showMessage." @@ -3465,14 +3473,7 @@ eglot--read-execute-code-action default-action) menu-items nil t nil nil default-action) menu-items)))))) - (eglot--dcase chosen - (((Command) command arguments) - (eglot-execute-command server (intern command) arguments)) - (((CodeAction) edit command) - (when edit (eglot--apply-workspace-edit edit)) - (when command - (eglot--dbind ((Command) command arguments) command - (eglot-execute-command server (intern command) arguments))))))) + (eglot-execute server chosen))) (defmacro eglot--code-action (name kind) "Define NAME to execute KIND code action." commit b625ccff870cbae785d21678161c59fe91fda7a8 Author: Yuan Fu Date: Mon May 8 12:58:19 2023 -0700 Fix treesit-node-top-level (bug#63374) * lisp/treesit.el (treesit-node-top-level): Fix the use of rx-to-string. diff --git a/lisp/treesit.el b/lisp/treesit.el index 1b1a7783a32..54f223dc40b 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -252,7 +252,7 @@ treesit-node-top-level If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." (let ((pred (or pred (rx-to-string - `(bos ,(treesit-node-type node) eos)))) + `(seq bos ,(treesit-node-type node) eos)))) (result nil)) (cl-loop for cursor = (if include-node node (treesit-node-parent node)) commit 0e4cc6a8bfb8e1dfcfc13d4bf150fa712664ebbb Author: Philipp Uhl Date: Mon May 8 13:33:42 2023 +0200 Extend secrets.el by lock/unlock item * lisp/net/secrets.el (secrets-lock-item, secrets-unlock-item): New defuns. (secrets-get-secret): Use `secrets-unlock-item'. (Bug#62952) diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index f4e68d7b817..08ab942fddb 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -687,13 +687,38 @@ secrets-item-path item (secrets-get-item-property item-path "Label")) (throw 'item-found item-path))))))) +(defun secrets-lock-item (collection item) + "Lock collection item labeled ITEM in COLLECTION. +If successful, return the object path of the item. Does not lock +the collection." + (let ((item-path (secrets-item-path collection item))) + (unless (secrets-empty-path item-path) + (secrets-prompt + (cadr + (dbus-call-method + :session secrets-service secrets-path secrets-interface-service + "Lock" `(:array :object-path ,item-path))))) + item-path)) + +(defun secrets-unlock-item (collection item) + "Unlock item labeled ITEM from collection labeled COLLECTION. +If successful, return the object path of the item." + (let ((item-path (secrets-item-path collection item))) + (unless (secrets-empty-path item-path) + (secrets-prompt + (cadr + (dbus-call-method + :session secrets-service secrets-path secrets-interface-service + "Unlock" `(:array :object-path ,item-path))))) + item-path)) + (defun secrets-get-secret (collection item) "Return the secret of item labeled ITEM in COLLECTION. If there are several items labeled ITEM, it is undefined which one is returned. If there is no such item, return nil. ITEM can also be an object path, which is used if contained in COLLECTION." - (let ((item-path (secrets-item-path collection item))) + (let ((item-path (secrets-unlock-item collection item))) (unless (secrets-empty-path item-path) (dbus-byte-array-to-string (nth 2 commit 3adc1e7f37901235bda83ea65a90644b7b0a8dbf Author: Alan Third Date: Thu Apr 27 20:08:23 2023 +0100 Fix crash when creating a child frame in NS (bug#63107) * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at creating the toolbar. ([EmacsWindow createToolbar:]): If there is already a toolbar or the EmacsView's layer is not an EmacsLayer, then do nothing. diff --git a/src/nsterm.m b/src/nsterm.m index ecbf80ff72d..b9e3cbf81a1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7930,6 +7930,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f [self setLayerContentsRedrawPolicy: NSViewLayerContentsRedrawOnSetNeedsDisplay]; [self setLayerContentsPlacement:NSViewLayerContentsPlacementTopLeft]; + + /* initWithEmacsFrame can't create the toolbar before the layer is + set, so have another go at creating the toolbar here. */ + [(EmacsWindow*)[self window] createToolbar:f]; #endif if (ns_drag_types) @@ -9174,11 +9178,18 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f - (void)createToolbar: (struct frame *)f { - if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f)) + if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f) || [self toolbar] != nil) return; EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 + /* If the view's layer isn't an EmacsLayer then we can't create the + toolbar yet. */ + if (! [[view layer] isKindOfClass:[EmacsLayer class]]) + return; +#endif + EmacsToolbar *toolbar = [[EmacsToolbar alloc] initForView:view withIdentifier:[NSString stringWithFormat:@"%p", f]]; commit d5ab8b6f2459b0c0111edc1ac7da20e1452c1f33 Author: Andreas Schwab Date: Sat May 6 22:27:55 2023 +0200 ; Fix last change diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index a57fd200599..a36bce2dbfa 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -643,7 +643,7 @@ nntp-with-open-group `nntp-with-open-group', opens a new connection then re-issues the NNTP command whose response triggered the error." (declare (indent 2) (debug (form form [&optional symbolp] def-body))) - (when (consp connectionless)) + (when (consp connectionless) (setq forms (cons connectionless forms) connectionless nil)) `(nntp-with-open-group-function ,group ,server ,connectionless commit ab5258b19255ebff04df01d6f55888f43c42dcb9 Author: Andreas Schwab Date: Sat May 6 22:17:19 2023 +0200 Simplify check for non-empty list * lisp/gnus/nntp.el (nntp-with-open-group): Simplify check for non-empty list. diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 20c176f2269..a57fd200599 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -643,8 +643,7 @@ nntp-with-open-group `nntp-with-open-group', opens a new connection then re-issues the NNTP command whose response triggered the error." (declare (indent 2) (debug (form form [&optional symbolp] def-body))) - (when (and (listp connectionless) - (not (eq connectionless nil))) + (when (consp connectionless)) (setq forms (cons connectionless forms) connectionless nil)) `(nntp-with-open-group-function ,group ,server ,connectionless commit 31a66dc8918e81470dc35be7c489108fbbfbce01 Author: Po Lu Date: Sat May 6 20:43:22 2023 +0800 Fix portability problem in lisp/Makefile.in * lisp/Makefile.in (check-defun-dups): Avoid POSIX command substitutions. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index c90237615c6..fbe502cec6d 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -490,8 +490,8 @@ check-declare: ## This finds a lot of duplicates between foo.el and obsolete/foo.el. check-defun-dups: sed -n -e '/^(defun /s/\(.\)(.*/\1/p' \ - $$(find . -name '*.el' ! -name '.*' -print | \ - grep -Ev '(loaddefs|ldefs-boot)\.el|obsolete') | sort | uniq -d + `find . -name '*.el' ! -name '.*' -print | \ + grep -Ev '(loaddefs|ldefs-boot)\.el|obsolete'` | sort | uniq -d # Dependencies commit a5d142e8301c3dfb193e89eda9caf50ee2a92d28 Author: Po Lu Date: Sat May 6 20:42:22 2023 +0800 Fix portability problem in toplevel Makefile * Makefile.in (sanity-check, preferred-branch-is-current): Avoid POSIX command substitution, to make Makefile work with the SVR4 shell. diff --git a/Makefile.in b/Makefile.in index 0b7c9680fe5..729cd4140e5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,9 +417,9 @@ advice-on-failure: sanity-check: @[ -f .no-advice-on-failure ] && exit 0; true - @v=$$(src/emacs${EXEEXT} --batch --eval \ + @v=`src/emacs${EXEEXT} --batch --eval \ '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ - 2> /dev/null); \ + 2> /dev/null`; \ [ "X$$v" = "X3628800" ] && exit 0; \ echo >&2 '***'; \ echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \ @@ -1287,7 +1287,7 @@ PREFERRED_BRANCH = preferred-branch-is-current: git branch | grep -q '^\* $(PREFERRED_BRANCH)$$' unchanged-history-files: - x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \ + x=`git diff-files --name-only $(CHANGELOG_N) $(emacslog)` && \ test -z "$$x" # Regular expression that matches the newest commit covered by a ChangeLog. commit 9b66a64d9c2c7ae2b155bf209ad735383070822e Author: Eli Zaretskii Date: Sat May 6 11:29:58 2023 +0300 Fix interactive forms in some Lisp packages * lisp/woman.el (woman-reset-emulation): * lisp/treesit.el (treesit--explorer-jump): * lisp/speedbar.el (speedbar-toggle-etags): * lisp/filesets.el (filesets-convert-patterns): * lisp/calculator.el (calculator-saved-move): * lisp/progmodes/gud.el (gud-basic-call): * lisp/progmodes/ebrowse.el (ebrowse-redraw-marks) (ebrowse-view-file-other-frame): * lisp/progmodes/dcl-mode.el (dcl-indent-to): * lisp/net/socks.el (socks-open-connection): * lisp/net/ntlm.el (ntlm-build-auth-request): * lisp/emacs-lisp/backtrace.el (backtrace-expand-ellipsis): * lisp/calc/calc-prog.el (calc-edit-macro-finish-edit): * lisp/calc/calc-misc.el (calc-info-goto-node): * lisp/net/dictionary.el (dictionary-new-search) (dictionary-definition, dictionary-switch-tooltip-mode): Fix interactive functions where the 'interactive' form did not supply the mandatory arguments. (Bug#62864) diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 93de04a586d..4b1aab837af 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -195,7 +195,6 @@ calc-info ;;;###autoload (defun calc-info-goto-node (node) "Go to a node in the Calculator info documentation." - (interactive) (select-window (get-largest-window)) (info (concat "(Calc)" node))) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index d8569d0c5af..8502b5196d2 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -936,7 +936,6 @@ calc-edit-macro-pre-finish-edit (defun calc-edit-macro-finish-edit (cmdname key) "Finish editing a Calc macro. Redefine the corresponding command." - (interactive) (let ((cmd (intern cmdname))) (calc-edit-macro-pre-finish-edit) (let* ((str (buffer-substring calc-edit-top (point-max))) diff --git a/lisp/calculator.el b/lisp/calculator.el index 6a1d960c3e4..bf2ac9b6215 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1349,8 +1349,9 @@ calculator-clear-saved (calculator-update-display t)) (defun calculator-saved-move (n) - "Go N elements up the list of saved values." - (interactive) + "Go N elements up the list of saved values. +Interactively, N is the prefix numeric argument and defaults to 1." + (interactive "p") (when (and calculator-saved-list (or (null calculator-stack) calculator-display-fragile)) (setq calculator-saved-ptr diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index 53e17693933..57912c854b0 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -499,7 +499,6 @@ backtrace--set-feature (defun backtrace-expand-ellipsis (button) "Expand display of the elided form at BUTTON." - (interactive) (goto-char (button-start button)) (unless (get-text-property (point) 'cl-print-ellipsis) (if (and (> (point) (point-min)) diff --git a/lisp/filesets.el b/lisp/filesets.el index 1b7e6ffa81f..81a194a45e6 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -1807,7 +1807,6 @@ filesets-remove-buffer (defun filesets-convert-patterns (name) "Change fileset NAME's mode from :pattern to :files." - (interactive) (let ((entry (assoc name filesets-data))) (if entry (let ((pattern (filesets-entry-get-pattern entry)) diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index d9973b831ba..ba65225692a 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -683,7 +683,6 @@ dictionary-new-search "Save the current state and start a new search based on ARGS. The parameter ARGS is a cons cell where car is the word to search and cdr is the dictionary where to search the word in." - (interactive) (dictionary-store-positions) (let ((word (car args)) (dictionary (cdr args))) @@ -1258,7 +1257,6 @@ dictionary-tooltip-dictionary :version "28.1") (defun dictionary-definition (word &optional dictionary) - (interactive) (unwind-protect (let ((dictionary (or dictionary dictionary-default-dictionary))) (dictionary-do-search word dictionary 'dictionary-read-definition t)) @@ -1315,7 +1313,6 @@ dictionary-switch-tooltip-mode variable `dictionary-tooltip-mode' to decide if some action must be taken. When disabling the tooltip mode the value of this variable will be set to nil." - (interactive) (tooltip-mode on) (if on (add-hook 'tooltip-functions #'dictionary-display-tooltip) diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el index 356bf95669f..c92c90bf694 100644 --- a/lisp/net/ntlm.el +++ b/lisp/net/ntlm.el @@ -98,7 +98,6 @@ ntlm-build-auth-request DOMAIN is a NT domain. USER can include a NT domain part as in user@domain where the string after @ is used as the domain if DOMAIN is not given." - (interactive) (let ((request-ident (concat "NTLMSSP" (make-string 1 0))) (request-msgType (concat (make-string 1 1) (make-string 3 0))) ;0x01 0x00 0x00 0x00 diff --git a/lisp/net/socks.el b/lisp/net/socks.el index adf8b357dc3..968a28d2be8 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -328,7 +328,6 @@ socks-override-functions (advice-add 'open-network-stream :around #'socks--open-network-stream)) (defun socks-open-connection (server-info) - (interactive) (save-excursion (let ((proc (let ((socks-override-functions nil)) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 0bb1a01f902..cf589762e8f 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -1396,7 +1396,7 @@ dcl-electric-character ;;;------------------------------------------------------------------------- (defun dcl-indent-to (col &optional minimum) "Like `indent-to', but only indents if indentation would change." - (interactive) + (interactive "NIndent to column: ") (let (cur-indent collapsed indent) (save-excursion (skip-chars-forward " \t") diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 4563b83389f..5ca2f09b141 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1130,7 +1130,7 @@ ebrowse-mark-all-classes (defun ebrowse-redraw-marks (start end) "Display class marker signs in the tree between START and END." - (interactive) + (interactive "r") (save-excursion (with-silent-modifications (catch 'end @@ -1494,9 +1494,9 @@ ebrowse-view-exit-fn (defun ebrowse-view-file-other-frame (file) - "View a file FILE in another frame. + "View FILE in another frame. The new frame is deleted when you quit viewing the file in that frame." - (interactive) + (interactive "fIn other frame view file: ") (let ((old-frame-configuration (current-frame-configuration)) (had-a-buf (get-file-buffer file)) (buf-to-view (find-file-noselect file))) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d5c8e37a37b..2b178e50684 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3150,7 +3150,7 @@ gud-call (defun gud-basic-call (command) "Invoke the debugger COMMAND displaying source in other window." - (interactive) + (interactive "sInvoke debugger command: ") (gud-set-buffer) (let ((proc (get-buffer-process gud-comint-buffer))) (or proc (error "Current buffer has no process")) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 29f351ca021..0115a6f4ae4 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3550,9 +3550,7 @@ speedbar-toggle-etags "Toggle FLAG in `speedbar-fetch-etags-arguments'. FLAG then becomes a member of etags command line arguments. If flag is \"sort\", then toggle the value of `speedbar-sort-tags'. If its -value is \"show\" then toggle the value of -`speedbar-show-unknown-files'." - (interactive) +value is \"show\" then toggle the value of `speedbar-show-unknown-files'." (cond ((equal flag "sort") (setq speedbar-sort-tags (not speedbar-sort-tags))) diff --git a/lisp/treesit.el b/lisp/treesit.el index 1750929cc85..1b1a7783a32 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2753,7 +2753,6 @@ treesit--explorer-post-command (defun treesit--explorer-jump (button) "Mark the original text corresponding to BUTTON." - (interactive) (when (and (derived-mode-p 'treesit--explorer-tree-mode) (buffer-live-p treesit--explorer-source-buffer)) (with-current-buffer treesit--explorer-source-buffer diff --git a/lisp/woman.el b/lisp/woman.el index 24f23c8e8f0..e4e3d176d08 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1846,7 +1846,6 @@ woman-toggle-use-symbol-font (defun woman-reset-emulation (value) "Reset `woman-emulation' to VALUE and reformat, for menu use." - (interactive) (setq woman-emulation value) (woman-reformat-last-file))