From: Basil L. Contovounesios Date: Wed, 26 Oct 2022 13:35:59 +0000 (+0300) Subject: Pacify recent unused/ignored lexvar warnings X-Git-Tag: emacs-29.0.90~1616^2~456 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38bcad545125a2cda218835b0210f24ab8db1e9e;p=emacs.git Pacify recent unused/ignored lexvar warnings Lexvars with special names like 'ignored' or 'unused' are no longer treated specially. * lisp/ansi-color.el (ansi-color-process-output): * lisp/cus-edit.el (customize-apropos-options): * lisp/cus-theme.el (customize-create-theme): * lisp/dired-aux.el (dired-hide-all): * lisp/emacs-lisp/crm.el (crm--choose-completion-string): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert): * lisp/ido.el (ido-choose-completion-string): * lisp/international/mule-diag.el (describe-font-internal): * lisp/mail/sendmail.el (sendmail-user-agent-compose): * lisp/progmodes/fortran.el (fortran-uncomment-region): * lisp/progmodes/prolog.el (prolog-inferior-guess-flavor): * lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp): * lisp/url/url.el (url-mm-callback): * lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an underscore to unused function parameter names. * lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused constant. * lisp/files.el (hack-local-variables-filter): Remove unused lexvar. --- diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 6f1c270c239..5e7015db549 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -418,7 +418,7 @@ and it should apply face FACE to the text between BEG and END.") (setq ansi-color-for-comint-mode 'filter)) ;;;###autoload -(defun ansi-color-process-output (ignored) +(defun ansi-color-process-output (_ignored) "Maybe translate SGR control sequences of comint output into text properties. Depending on variable `ansi-color-for-comint-mode' the comint output is diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index ee32c9c945e..e043d9bc17e 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1546,7 +1546,7 @@ If TYPE is `groups', include only groups." "*Customize Apropos*"))) ;;;###autoload -(defun customize-apropos-options (regexp &optional ignored) +(defun customize-apropos-options (regexp &optional _ignored) "Customize all loaded customizable options matching REGEXP." (interactive (list (apropos-read-pattern "options"))) (customize-apropos regexp 'options)) diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 90680ff68f8..b891f241549 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -142,7 +142,7 @@ remove them from your saved Custom file.\n\n") (widget-create 'push-button :tag " Revert " :help-echo "Revert this buffer to its original state." - :action (lambda (&rest ignored) (revert-buffer))) + :action (lambda (&rest _ignored) (revert-buffer))) (widget-insert "\n\nTheme name : ") (setq custom-theme-name diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 9add96c2608..327a4f038b2 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3478,7 +3478,7 @@ Use \\[dired-hide-all] to (un)hide all directories." (dired-next-subdir 1 t)))) ;;;###autoload -(defun dired-hide-all (&optional ignored) +(defun dired-hide-all (&optional _ignored) "Hide all subdirectories, leaving only their header lines. If there is already something hidden, make everything visible again. Use \\[dired-hide-subdir] to (un)hide a particular subdirectory." diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 3f27faab115..289e2b0eee4 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -130,8 +130,6 @@ Returns a form where all lambdas don't have any free variables." (prog1 (cconv-convert form nil nil) ; Env initially empty. (cl-assert (null cconv-freevars-alist))))) -(defconst cconv--dummy-var (make-symbol "ignored")) - (defun cconv--set-diff (s1 s2) "Return elements of set S1 that are not in set S2." (let ((res '())) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 6d4b29b552c..8e61797315f 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -201,7 +201,7 @@ This function is modeled after `minibuffer-complete-and-exit'." (if doexit (exit-minibuffer)))) (defun crm--choose-completion-string (choice buffer base-position - &rest ignored) + &rest _ignored) "Completion string chooser for `completing-read-multiple'. This is called from `choose-completion-string-functions'. It replaces the string that is currently being completed, without diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index c01f3fd4fec..206c10a7734 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -374,7 +374,7 @@ Optional arg POS is a buffer position where to look for a fake header; defaults to `point-min'." (overlays-at (or pos (point-min)))) -(defun tabulated-list-revert (&rest ignored) +(defun tabulated-list-revert (&rest _ignored) "The `revert-buffer-function' for `tabulated-list-mode'. It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." (interactive) diff --git a/lisp/files.el b/lisp/files.el index 3fa0f2f3b81..a2825322580 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3863,7 +3863,7 @@ If these settings come from directory-local variables, then DIR-NAME is the name of the associated directory. Otherwise it is nil." ;; Find those variables that we may want to save to ;; `safe-local-variable-values'. - (let (all-vars risky-vars unsafe-vars ignored) + (let (all-vars risky-vars unsafe-vars) (dolist (elt variables) (let ((var (car elt)) (val (cdr elt))) diff --git a/lisp/ido.el b/lisp/ido.el index 1d0082da97c..77e4dd447d8 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3915,7 +3915,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil." "Return dotted pair (RES . 1)." (cons res 1)) -(defun ido-choose-completion-string (choice &rest ignored) +(defun ido-choose-completion-string (choice &rest _ignored) (when (ido-active) ;; Insert the completion into the buffer where completion was requested. (and ido-completion-buffer diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index cdf2e527e25..6e49c9cb21a 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 387792eb310..3f75faa077d 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -550,10 +550,10 @@ This also saves the value of `send-mail-function' via Customize." #'mail-send-and-exit) ;;;###autoload -(defun sendmail-user-agent-compose (&optional to subject other-headers - continue switch-function yank-action - send-actions return-action - &rest ignored) +(defun sendmail-user-agent-compose ( &optional to subject other-headers + continue switch-function yank-action + send-actions return-action + &rest _ignored ) (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 6791e2fc9f8..9a68c0e6fd7 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -957,7 +957,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 f8edc2b1f7b..6e2c2513b01 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1311,7 +1311,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 955daa393ce..17467b55549 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -849,7 +849,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))) @@ -1576,7 +1576,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/url/url.el b/lisp/url/url.el index b4ece5faeb2..92057742ca7 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -293,7 +293,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 _ignored) (let ((handle (mm-dissect-buffer t))) (url-mark-buffer-as-dead (current-buffer)) (with-current-buffer diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 41a1190c646..109748baec6 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -1198,7 +1198,7 @@ Press \\\\[xwidget-webkit-isearch-exit] to exit (xwidget-webkit-goto-history xwidget-webkit-history--session id)) (xwidget-webkit-history-reload)) -(defun xwidget-webkit-history-reload (&rest ignored) +(defun xwidget-webkit-history-reload (&rest _ignored) "Reload the current history buffer." (interactive) (setq tabulated-list-entries nil)