From: Stefan Monnier Date: Mon, 20 Dec 2021 20:28:51 +0000 (-0500) Subject: cl-macs.el (cl--transform-lambda): Fix last change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c9d64b602981ac07be6919d350b4af9a1d43b7b;p=emacs.git cl-macs.el (cl--transform-lambda): Fix last change * lisp/simple.el (interactive-form): Minor simplification. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Fix last change. --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 96559fbfb6e..bc837e5bf38 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -316,7 +316,7 @@ FORM is of the form (ARGS . BODY)." (cl-decf slen)) (setq header (cond - ((eq :documentation (caar header)) + ((eq :documentation (car-safe (car header))) `((:documentation (docstring-add-fundoc-usage ,(cadr (car header)) ,usage-str)) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index efb9296c110..3c539811739 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -812,7 +812,7 @@ but still contains full information about each coding system." (declare-function font-info "font.c" (name &optional frame)) -(defun describe-font-internal (font-info &optional ignored) +(defun describe-font-internal (font-info &optional _ignored) "Print information about a font in FONT-INFO. The IGNORED argument is ignored." (print-list "name (opened by):" (aref font-info 0)) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index d1e8a2f3c69..0c3e17ee861 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -565,7 +565,7 @@ This also saves the value of `send-mail-function' via Customize." (defun sendmail-user-agent-compose (&optional to subject other-headers continue switch-function yank-action send-actions return-action - &rest ignored) + &rest _) (if switch-function (funcall switch-function "*mail*")) (let ((cc (cdr (assoc-string "cc" other-headers t))) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 7cf4ce27305..8732e398fa0 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -960,7 +960,7 @@ With non-nil ARG, uncomments the region." (set-marker save-point nil))) ;; uncomment-region calls this with 3 args. -(defun fortran-uncomment-region (start end &optional ignored) +(defun fortran-uncomment-region (start end &optional _ignored) "Uncomment every line in the region." (fortran-comment-region start end t)) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index c36082bb6d0..b68cb001a4b 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1327,7 +1327,7 @@ With prefix argument ARG, restart the Prolog process if running before." (prolog-mode-variables) )) -(defun prolog-inferior-guess-flavor (&optional ignored) +(defun prolog-inferior-guess-flavor (&optional _ignored) (setq-local prolog-system (when (or (numberp prolog-system) (markerp prolog-system)) (save-excursion diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index b0b055bd361..a8dc31b612b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -840,7 +840,7 @@ The style of the comment is controlled by `ruby-encoding-magic-comment-style'." (back-to-indentation) (current-column))) -(defun ruby-indent-line (&optional ignored) +(defun ruby-indent-line (&optional _ignored) "Correct the indentation of the current Ruby line." (interactive) (ruby-indent-to (ruby-calculate-indent))) @@ -1567,7 +1567,7 @@ With ARG, do it many times. Negative ARG means move forward." ((error))) i)))) -(defun ruby-indent-exp (&optional ignored) +(defun ruby-indent-exp (&optional _ignored) "Indent each line in the balanced expression following the point." (interactive "*P") (let ((here (point-marker)) start top column (nest t)) diff --git a/lisp/simple.el b/lisp/simple.el index cd9e2396fd6..9227ee5caa4 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2362,19 +2362,20 @@ ORIGINAL-NAME is used internally only." ((pred byte-code-function-p) (when (> (length cmd) 5) (let ((form (aref cmd 5))) - (if (vectorp form) - ;; The vector form is the new form, where the first - ;; element is the interactive spec, and the second is the - ;; command modes. - (list 'interactive (aref form 0)) - (list 'interactive form))))) + (list 'interactive + (if (vectorp form) + ;; The vector form is the new form, where the first + ;; element is the interactive spec, and the second + ;; is the "command modes" info. + (aref form 0) + form))))) ((pred autoloadp) (interactive-form (autoload-do-load cmd original-name))) ((or `(lambda ,_args . ,body) `(closure ,_env ,_args . ,body)) (let ((spec (assq 'interactive body))) (if (cddr spec) - ;; Drop the "applicable modes" info. + ;; Drop the "command modes" info. (list 'interactive (cadr spec)) spec))) (_ (internal--interactive-form cmd)))) diff --git a/lisp/url/url.el b/lisp/url/url.el index ccc95a6eec4..bc44d55a470 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -291,7 +291,7 @@ how long to wait for a response before giving up." (declare-function mm-display-part "mm-decode" (handle &optional no-default force)) -(defun url-mm-callback (&rest ignored) +(defun url-mm-callback (&rest _) (let ((handle (mm-dissect-buffer t))) (url-mark-buffer-as-dead (current-buffer)) (with-current-buffer