summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-04-19 15:44:55 +0200
committerJuanma Barranquero <lekktu@gmail.com>2011-04-19 15:44:55 +0200
commit06b605171f1c9d8b42bd3326a243b8b03d2e4e58 (patch)
treee96c135042999136bf0e75d113aae306e51983e3 /lisp
parent04c569546ad52f6270d8fc6d4aa0750950a0ac05 (diff)
downloademacs-06b605171f1c9d8b42bd3326a243b8b03d2e4e58.tar.gz
lisp/*.el: Lexical-binding cleanup.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog409
-rw-r--r--lisp/align.el7
-rw-r--r--lisp/apropos.el4
-rw-r--r--lisp/arc-mode.el2
-rw-r--r--lisp/bindings.el28
-rw-r--r--lisp/buff-menu.el4
-rw-r--r--lisp/cmuscheme.el2
-rw-r--r--lisp/comint.el12
-rw-r--r--lisp/completion.el12
-rw-r--r--lisp/composite.el37
-rw-r--r--lisp/cus-edit.el76
-rw-r--r--lisp/cus-theme.el24
-rw-r--r--lisp/custom.el2
-rw-r--r--lisp/dabbrev.el3
-rw-r--r--lisp/delim-col.el14
-rw-r--r--lisp/descr-text.el32
-rw-r--r--lisp/desktop.el215
-rw-r--r--lisp/dframe.el18
-rw-r--r--lisp/dired-aux.el26
-rw-r--r--lisp/dired-x.el39
-rw-r--r--lisp/dirtrack.el4
-rw-r--r--lisp/dnd.el4
-rw-r--r--lisp/dos-fns.el2
-rw-r--r--lisp/dos-w32.el10
-rw-r--r--lisp/echistory.el5
-rw-r--r--lisp/edmacro.el4
-rw-r--r--lisp/electric.el3
-rw-r--r--lisp/emacs-lock.el2
-rw-r--r--lisp/expand.el1
-rw-r--r--lisp/ezimage.el2
-rw-r--r--lisp/facemenu.el12
-rw-r--r--lisp/faces.el22
-rw-r--r--lisp/files-x.el12
-rw-r--r--lisp/files.el42
-rw-r--r--lisp/find-lisp.el15
-rw-r--r--lisp/follow.el2
-rw-r--r--lisp/format.el45
-rw-r--r--lisp/forms.el6
-rw-r--r--lisp/frame.el4
-rw-r--r--lisp/fringe.el2
-rw-r--r--lisp/generic-x.el2
-rw-r--r--lisp/help-mode.el6
-rw-r--r--lisp/help.el2
-rw-r--r--lisp/hilit-chg.el13
-rw-r--r--lisp/htmlfontify.el18
-rw-r--r--lisp/ibuf-ext.el21
-rw-r--r--lisp/ibuffer.el160
-rw-r--r--lisp/ido.el18
-rw-r--r--lisp/ielm.el20
-rw-r--r--lisp/image-dired.el36
-rw-r--r--lisp/indent.el4
-rw-r--r--lisp/info-xref.el4
-rw-r--r--lisp/informat.el4
-rw-r--r--lisp/isearch.el9
-rw-r--r--lisp/iswitchb.el4
-rw-r--r--lisp/jka-compr.el4
-rw-r--r--lisp/kmacro.el10
-rw-r--r--lisp/locate.el2
-rw-r--r--lisp/longlines.el4
-rw-r--r--lisp/ls-lisp.el2
-rw-r--r--lisp/macros.el2
-rw-r--r--lisp/makesum.el3
-rw-r--r--lisp/misearch.el4
-rw-r--r--lisp/mouse-drag.el11
-rw-r--r--lisp/mouse-sel.el1
-rw-r--r--lisp/outline.el2
-rw-r--r--lisp/pcomplete.el30
-rw-r--r--lisp/proced.el4
-rw-r--r--lisp/ps-def.el8
-rw-r--r--lisp/ps-mule.el2
-rw-r--r--lisp/ps-print.el18
-rw-r--r--lisp/recentf.el10
-rw-r--r--lisp/rect.el4
-rw-r--r--lisp/register.el4
-rw-r--r--lisp/replace.el32
-rw-r--r--lisp/savehist.el6
-rw-r--r--lisp/scroll-bar.el6
-rw-r--r--lisp/select.el32
-rw-r--r--lisp/shadowfile.el31
-rw-r--r--lisp/shell.el6
-rw-r--r--lisp/simple.el39
-rw-r--r--lisp/speedbar.el30
-rw-r--r--lisp/strokes.el2
-rw-r--r--lisp/subr.el8
-rw-r--r--lisp/talk.el5
-rw-r--r--lisp/tar-mode.el5
-rw-r--r--lisp/terminal.el4
-rw-r--r--lisp/time-stamp.el4
-rw-r--r--lisp/time.el19
-rw-r--r--lisp/tool-bar.el2
-rw-r--r--lisp/tooltip.el6
-rw-r--r--lisp/tree-widget.el4
-rw-r--r--lisp/type-break.el4
-rw-r--r--lisp/view.el2
-rw-r--r--lisp/w32-fns.el9
-rw-r--r--lisp/wdired.el4
-rw-r--r--lisp/whitespace.el4
-rw-r--r--lisp/wid-browse.el10
-rw-r--r--lisp/wid-edit.el141
-rw-r--r--lisp/widget.el2
-rw-r--r--lisp/windmove.el9
-rw-r--r--lisp/window.el4
-rw-r--r--lisp/woman.el36
-rw-r--r--lisp/x-dnd.el23
-rw-r--r--lisp/xml.el17
-rw-r--r--lisp/xt-mouse.el4
106 files changed, 1290 insertions, 831 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 693fae97ee5..22c9813b5ce 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,412 @@
+2011-04-19 Juanma Barranquero <lekktu@gmail.com>
+
+ Lexical-binding cleanup.
+
+ * arc-mode.el (archive-mode-revert):
+ * cmuscheme.el (scheme-interactively-start-process):
+ * custom.el (custom-initialize-delay):
+ * dnd.el (dnd-open-local-file, dnd-open-remote-url):
+ * dos-w32.el (direct-print-region-helper, direct-print-region-function):
+ * emacs-lock.el (emacs-lock-clear-sentinel):
+ * ezimage.el (defezimage):
+ * follow.el (follow-avoid-tail-recenter):
+ * fringe.el (set-fringe-mode-1):
+ * generic-x.el (bat-generic-mode-compile):
+ * help-mode.el (help-info-variable, help-do-xref)
+ (help-mode-revert-buffer):
+ * help.el (view-emacs-todo):
+ * iswitchb.el (iswitchb-completion-help):
+ * jka-compr.el (jka-compr-make-temp-name, jka-compr-load):
+ * kmacro.el (kmacro-cycle-ring-next, kmacro-cycle-ring-previous)
+ (kmacro-delete-ring-head, kmacro-bind-to-key, kmacro-view-macro):
+ * locate.el (locate-update):
+ * longlines.el (longlines-encode-region)
+ (longlines-after-change-function):
+ * outline.el (outline-isearch-open-invisible):
+ * ps-def.el (declare-function, charset-dimension, char-width)
+ (encode-char):
+ * ps-mule.el (ps-mule-plot-string):
+ * recentf.el (recentf-make-menu-items, recentf-cancel-dialog)
+ (recentf-edit-list-select, recentf-edit-list-validate)
+ (recentf-open-files-action):
+ * rect.el (delete-whitespace-rectangle-line)
+ (rectangle-number-line-callback):
+ * register.el (window-configuration-to-register)
+ (frame-configuration-to-register):
+ * scroll-bar.el (scroll-bar-mode, toggle-horizontal-scroll-bar):
+ * select.el (xselect-convert-to-string, xselect-convert-to-length)
+ (xselect-convert-to-targets, xselect-convert-to-delete)
+ (xselect-convert-to-filename, xselect-convert-to-charpos)
+ (xselect-convert-to-lineno, xselect-convert-to-colno)
+ (xselect-convert-to-os, xselect-convert-to-host)
+ (xselect-convert-to-user, xselect-convert-to-class)
+ (xselect-convert-to-name, xselect-convert-to-integer)
+ (xselect-convert-to-atom, xselect-convert-to-identity):
+ * subr.el (declare, ignore, process-kill-without-query)
+ (text-clone-maintain):
+ * terminal.el (te-get-char, te-tic-sentinel):
+ * tool-bar.el (tool-bar-make-keymap):
+ * tooltip.el (tooltip-timeout, tooltip-hide, tooltip-help-tips):
+ * type-break.el (type-break-mode, type-break-noninteractive-query):
+ * view.el (View-back-to-mark):
+ * wid-browse.el (widget-browse-action, widget-browse-widget)
+ (widget-browse-widgets, widget-browse-sexp):
+ * widget.el (define-widget-keywords):
+ * xt-mouse.el (xterm-mouse-translate, turn-off-xterm-mouse-tracking):
+ Mark unused parameters.
+
+ * align.el (align-adjust-col-for-rule): Mark unused parameter.
+ (align-areas): Remove unused variable `look'.
+ (align-region): Remove unused variables `real-end' and `pos-list'.
+
+ * apropos.el (apropos-score-doc): Remove unused variable `i'.
+
+ * bindings.el (mode-line-modified, mode-line-remote):
+ Mark unused parameters.
+ (mode-line-mule-info): Mark unused parameter; don't quote `lambda'.
+
+ * buff-menu.el (Buffer-menu-revert-function): Mark unused parameters.
+ (Buffer-menu-mode): Mark unused parameter; don't quote `lambda'.
+
+ * comint.el (comint-history-isearch-pop-state)
+ (comint-postoutput-scroll-to-bottom, comint-truncate-buffer)
+ (comint-strip-ctrl-m, comint-read-noecho): Mark unused parameters.
+ (comint-substitute-in-file-name): Doc fix.
+
+ * completion.el (cmpl-statistics-block): Mark unused parameter.
+ (add-completions-from-tags-table, add-completions-from-lisp-buffer)
+ (save-completions-to-file, load-completions-from-file):
+ Remove unused local variable `e'.
+
+ * composite.el (compose-chars): Remove unused variable `len'.
+ (lgstring-insert-glyph): Remove unused variable `g'.
+ (compose-glyph-string): Remove unused variables `ascent',
+ `descent', `lbearing' and `rbearing'.
+ (compose-glyph-string-relative): Remove unused variables
+ `lbearing', `rbearing' and `wadjust'.
+ (compose-gstring-for-graphic): Remove unused variables `header',
+ `wadjust', `xoff' and `yoff'. Use `let', not `let*'.
+ (compose-gstring-for-terminal): Remove unused variables `header'
+ and `nchars'. Use `let', not `let*'.
+
+ * cus-edit.el (Custom-set, Custom-save, custom-reset)
+ (Custom-reset-current, Custom-reset-saved, Custom-reset-standard)
+ (Custom-buffer-done, custom-buffer-create-internal)
+ (custom-browse-visibility-action, custom-browse-group-tag-action)
+ (custom-browse-variable-tag-action, custom-browse-face-tag-action)
+ (widget-magic-mouse-down-action, custom-toggle-parent)
+ (custom-add-parent-links, custom-toggle-hide-variable)
+ (custom-face-edit-value-visibility-action, custom-face-edit-fix-value)
+ (custom-toggle-hide-face, face, hook, custom-group-link-action)
+ (custom-face-menu-create, custom-variable-menu-create, get)
+ (custom-group-menu-create, Custom-no-edit): Mark unused parameters.
+ (custom-reset-standard-save-and-update): Remove unused variable `value'.
+ (customize-apropos): Remove unused variable `tests'.
+ (custom-group-value-create): Remove unused variable `hidden-p'.
+ (sort-fold-case): Declare.
+
+ * cus-theme.el (custom-reset-standard-faces-list)
+ (custom-reset-standard-variables-list): Declare.
+ (customize-create-theme, custom-theme-revert, custom-theme-write)
+ (custom-theme-choose-mode, customize-themes, custom-theme-save):
+ Mark unused parameters.
+
+ * dabbrev.el (dabbrev-completion): Remove unused variable `init'.
+
+ * delim-col.el (delimit-columns-max): Move defvar before first use.
+
+ * descr-text.el (describe-char-categories): Don't quote `lambda'.
+ (describe-char): Don't quote `lambda'. Mark unused parameter.
+
+ * desktop.el (desktop-save-buffer-p): Mark unused parameter.
+ (auto-insert): Declare.
+ (desktop-restore-file-buffer): Rename desktop-* parameters;
+ mark unused ones.
+ (desktop-create-buffer): Rename desktop-* parameters and bind them.
+ (desktop-buffer): Rename desktop-* parameters.
+
+ * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare.
+ (dframe-reposition-frame-xemacs, dframe-help-echo)
+ (dframe-hack-buffer-menu, dframe-set-timer, dframe-set-timer-internal):
+ Mark unused parameters.
+
+ * dired-aux.el (backup-extract-version-start, overwrite-query)
+ (overwrite-backup-query, rename-regexp-query)
+ (rename-non-directory-query): Declare.
+ (dired-shell-stuff-it, dired-do-create-files): Mark unused parameters.
+ (dired-add-entry): Remove unused variable `orig-file-name'.
+ (dired-copy-file-recursive): Remove unused variable `dirfailed'.
+ Use parameter PRESERVE-TIME instead of accessing dynamic variable
+ `dired-copy-preserve-time' directly.
+ (dired-do-create-files-regexp): Remove unused variable `fn-count'.
+ (dired-insert-subdir-newpos): Rename unused variable `pos'.
+
+ * dired-x.el (dired-omit-size-limit): Move defcustom before first use.
+ (dired-virtual-revert, dired-make-relative-symlink):
+ Mark unused parameters.
+ (manual-program): Declare.
+ (dired-x-hands-off-my-keys): Rename parameters of lambda expression.
+ (inode, s, mode, nlink, uid, gid, size, time, name, sym): Declare them,
+ wrapped in `with-no-warnings' to avoid replacing one warning by another.
+
+ * dirtrack.el (dirtrack): Remove unused variable `multi-line'.
+
+ * dos-fns.el (dos-8+3-filename): Remove unused variable `i'.
+
+ * echistory.el (electric-history-in-progress, Helper-return-blurb):
+ Declare.
+
+ * edmacro.el (edmacro-finish-edit): Remove unused variable `kmacro'.
+
+ * electric.el (Electric-command-loop): Rename parameter
+ INHIBIT-QUIT to INHIBIT-QUITTING and bind `inhibit-quit'.
+
+ * expand.el (expand-in-literal): Remove unused variable `here'.
+
+ * facemenu.el (facemenu-add-new-color):
+ Remove unused variable `docstring'.
+
+ * faces.el (face-id, make-face-bold, make-face-unbold, make-face-italic)
+ (make-face-unitalic, make-face-bold-italic): Mark unused parameters.
+ (face-attr-construct): Mark unused parameter. Doc fix.
+ (read-color): Remove unused variable `hex-string'.
+
+ * files.el (parse-colon-path): Rename argument CD-PATH to SEARCH-PATH.
+ (locate-dominating-file): Remove unused vars `prev-file' and `user'.
+ (remote-file-name-inhibit-cache, revert-buffer): Clean up docstrings.
+ (display-buffer-other-frame): Remove unused variable `old-window'.
+ (kill-buffer-hook): Declare.
+ (insert-file-contents-literally, set-auto-mode, risky-local-variable-p):
+ Mark unused parameters.
+ (after-find-file): Pass 1 to `auto-save-mode', not t.
+
+ * files-x.el (auto-insert): Declare.
+ (modify-file-local-variable-prop-line): Remove unused variable `val'.
+
+ * find-lisp.el (find-lisp-find-dired-internal): Remove unused
+ variable `buf'. Mark unused parameter.
+ (find-lisp-insert-directory): Mark unused parameter.
+
+ * format.el (format-decode-run-method): Mark unused parameter; doc fix.
+ (format-encode-region): Remove unused variables `cur-buf' and `result'.
+ (format-common-tail): Remove, unused.
+ (format-deannotate-region): Remove unused variable `loc'.
+ (format-annotate-region): Remove unused variable `p'.
+ (format-annotate-single-property-change): Remove unused variables
+ `default' and `tail'.
+
+ * forms.el (read-file-filter): Declare.
+ (forms--iif-hook, forms--revert-buffer): Mark unused parameters.
+
+ * frame.el (frame-creation-function-alist): Mark unused parameter.
+ (frame-geom-spec-cons): Pass FRAME to `frame-geom-value-cons'.
+
+ * hilit-chg.el (hilit-chg-cust-fix-changes-face-list, hilit-chg-clear):
+ Remove unused parameters.
+ (hilit-chg-set-face-on-change): Remove unused variable `beg-decr'.
+ (highlight-compare-with-file): Remove unused variable `buf-b-read-only'.
+
+ * htmlfontify.el (hfy-default-footer, hfy-decor, hfy-invisible)
+ (hfy-parse-tags-buffer, hfy-prepare-index-i, hfy-prepare-index)
+ (hfy-prepare-tag-map): Mark unused parameters.
+ (htmlfontify-buffer): Use `called-interactively-p'.
+
+ * ibuf-ext.el (ibuffer-do-kill-lines, ibuffer-jump-to-buffer)
+ (ibuffer-copy-filename-as-kill, ibuffer-mark-on-buffer)
+ (ibuffer-do-occur): Mark unused parameters.
+ (ibuffer-forward-next-marked): Remove unused variable `curmark'.
+ (ibuffer-diff-buffer-with-file-1): Remove unused variable `proc'.
+
+ * ibuffer.el: Don't quote `lambda'.
+ (ibuffer-count-marked-lines, ibuffer-count-deletion-lines)
+ (ibuffer-unmark-all, ibuffer-toggle-marks, ibuffer-redisplay-engine):
+ Mark unused parameters.
+
+ * ido.el (ido-mode, ido-wide-find-dir-or-delete-dir)
+ (ido-completing-read): Mark unused parameters.
+ (ido-copy-current-word): Mark unused parameters;
+ remove unused variable `name'.
+ (ido-sort-merged-list): Remove unused parameter `dirs'.
+
+ * ielm.el (ielm-input-sender): Mark unused parameter.
+ (ielm-string, ielm-form, ielm-pos, ielm-result, ielm-error-type)
+ (ielm-output, ielm-wbuf, ielm-pmark): Declare.
+ (ielm-eval-input): Rename argument IELM-STRING to INPUT-STRING to keep
+ `ielm-string' as a dynamic variable accessible from the IELM prompt.
+ Bind `ielm-string' to INPUT-STRING. Remove unused variable `err'.
+
+ * image-dired.el (image-dired-display-thumbs): Remove unused
+ variables `curr-file' and `count'.
+ (image-dired-remove-tag): Remove unused variable `start'.
+ (image-dired-tag-files, image-dired-create-thumbs): Remove unused
+ variable `curr-file'
+ (image-dired-rotate-original): Remove unused variable `temp-file'.
+ (image-dired-mouse-select-thumbnail, image-dired-mouse-toggle-mark):
+ Remove unused variable `file'.
+ (image-dired-gallery-generate): Remove unused variable `curr'.
+ (image-dired-dired-edit-comment-and-tags): Mark unused parameters.
+
+ * indent.el (tab-to-tab-stop): Remove unused variable `opoint'.
+
+ * info-xref.el (info-xref-goto-node-p): Remove unused variable `err'.
+
+ * informat.el (texinfo-command-start, texinfo-command-end): Declare.
+
+ * isearch.el (minibuffer-history-symbol): Declare.
+ (isearch-edit-string): Remove unused variable `err'.
+ (isearch-message-prefix, isearch-message-suffix):
+ Mark unused parameters.
+
+ * ls-lisp.el (ls-lisp-insert-directory): Remove unused variable `fil'.
+
+ * macros.el (insert-kbd-macro): Remove unused variable `mods'.
+
+ * makesum.el (double-column): Remove unused variable `cnt'.
+
+ * misearch.el (multi-isearch-pop-state): Mark unused parameter.
+ (ido-ignore-item-temp-list): Declare.
+
+ * mouse-drag.el (mouse-drag-throw): Remove unused variables
+ `mouse-delta', `window-last-row', `mouse-col-delta', `window-last-col',
+ `adjusted-mouse-col-delta' and `adjusted-mouse-delta'.
+ (mouse-drag-drag): Remove unused variables `mouse-delta' and
+ `mouse-col-delta'.
+
+ * mouse-sel.el (mouse-extend-internal):
+ Remove unused variable `orig-window-frame'.
+
+ * pcomplete.el (pcomplete-args, pcomplete-begins, pcomplete-last)
+ (pcomplete-index, pcomplete-stub, pcomplete-seen, pcomplete-norm-func):
+ Move declarations before first use.
+ (pcomplete-opt): Mark unused parameters; doc fix.
+
+ * proced.el (proced-revert): Mark unused parameter.
+ (proced-send-signal): Remove unused variable `err'.
+
+ * ps-print.el (ps-print-preprint-region, ps-print-preprint):
+ Rename parameter PREFIX-ARG to ARG.
+ (ps-basic-plot-string, ps-basic-plot-whitespace):
+ Mark unused parameters.
+
+ * replace.el (replace-count): Define.
+ (occur-revert-function): Mark unused parameters.
+ (ido-ignore-item-temp-list, isearch-error, isearch-forward)
+ (isearch-case-fold-search, isearch-string): Declare.
+ (occur-engine): Rename parameter CASE-FOLD-SEARCH to CASE-FOLD and
+ bind `case-fold-search'. Remove unused variables `beg' and `end',
+ and simplify.
+ (replace-eval-replacement): Rename parameter REPLACE-COUNT to
+ COUNT and bind `replace-count'.
+ (replace-loop-through-replacements): Rename parameter REPLACE-COUNT
+ to COUNT.
+
+ * savehist.el (print-readably, print-string-length): Declare.
+
+ * shadowfile.el (shadow-expand-cluster-in-file-name):
+ Remove unused variable `cluster'.
+ (shadow-copy-file): Remove unused variable `i'.
+ (shadow-noquery, shadow-clusters, shadow-site-cluster)
+ (shadow-parse-fullname, shadow-parse-name, shadow-define-cluster)
+ (shadow-define-literal-group, shadow-define-regexp-group)
+ (shadow-make-group, shadow-shadows-of): Clean up docstrings.
+
+ * shell.el (shell-filter-ctrl-a-ctrl-b): Mark unused parameter.
+ (shell): Use `called-interactively-p'.
+ (shell-directory-tracker): Remove unused variable `chdir-failure'.
+
+ * simple.el (compilation-context-lines, comint-file-name-quote-list)
+ (comint-file-name-chars, comint-delimiter-argument-list): Declare.
+ (delete-backward-char): Remove unused variable `ocol'.
+ (minibuffer-avoid-prompt, minibuffer-history-isearch-pop-state)
+ (line-move-1, event-apply-alt-modifier, event-apply-super-modifier)
+ (event-apply-hyper-modifier, event-apply-shift-modifier)
+ (event-apply-control-modifier, event-apply-meta-modifier):
+ Mark unused parameters.
+ (undo-make-selective-list): Remove duplicate variable `undo-elt'.
+ (normal-erase-is-backspace-mode): Remove unused variable `old-state'.
+
+ * speedbar.el (speedbar-ignored-directory-expressions)
+ (speedbar-supported-extension-expressions, speedbar-directory-buttons)
+ (speedbar-find-file, speedbar-dir-follow)
+ (speedbar-directory-buttons-follow, speedbar-tag-find)
+ (speedbar-buffer-buttons, speedbar-buffer-buttons-temp)
+ (speedbar-buffers-line-directory, speedbar-buffer-click):
+ Mark unused parameters.
+ (speedbar-tag-file): Remove unused variable `mode'.
+ (speedbar-buffers-tail-notes): Remove unused variable `mod'; simplify.
+
+ * strokes.el (strokes-decode-buffer): Remove unused variable `ext'.
+
+ * talk.el (talk): Remove unused variable `display'.
+
+ * tar-mode.el (tar-subfile-save-buffer): Remove unused variable `name'.
+ (tar-write-region-annotate): Mark unused parameter.
+
+ * time.el (now, time, load, mail, 24-hours, hour, 12-hours, am-pm)
+ (minutes, seconds, time-zone, day, year, monthname, month, dayname):
+ Declare them, wrapped in `with-no-warnings' to avoid replacing one
+ warning by another.
+
+ * time-stamp.el (time-stamp-string-preprocess):
+ Remove unused variable `require-padding'.
+
+ * tree-widget.el (widget-glyph-enable): Declare.
+ (tree-widget-action): Mark unused parameter.
+
+ * w32-fns.el (x-get-selection): Mark unused parameter.
+ (autoload-make-program, generated-autoload-file): Declare.
+
+ * wdired.el (wdired-revert): Mark unused parameters.
+ (wdired-xcase-word): Remove unused variable `err'.
+
+ * whitespace.el (whitespace-buffer-changed): Mark unused parameters.
+ (whitespace-help-scroll): Remove unused variable `data-help'.
+
+ * wid-edit.el (widget-mouse-help, widget-overlay-inactive)
+ (widget-image-insert, widget-after-change, default)
+ (widget-default-format-handler, widget-default-notify)
+ (widget-default-prompt-value, widget-info-link-action)
+ (widget-url-link-action, widget-function-link-action)
+ (widget-variable-link-action, widget-file-link-action)
+ (widget-emacs-library-link-action, widget-emacs-commentary-link-action)
+ (widget-field-prompt-internal, widget-field-action, widget-field-match)
+ (widget-choice-mouse-down-action, toggle, widget-radio-button-notify)
+ (widget-insert-button-action, widget-delete-button-action, visibility)
+ (widget-documentation-link-action, widget-documentation-string-action)
+ (widget-const-prompt-value, widget-regexp-match, symbol)
+ (widget-coding-system-prompt-value)
+ (widget-key-sequence-value-to-external, sexp)
+ (widget-sexp-value-to-internal, character, vector, cons)
+ (widget-choice-prompt-value, widget-boolean-prompt-value)
+ (widget-color--choose-action): Mark unused parameters.
+ (widget-item-match-inline, widget-choice-match-inline)
+ (widget-checklist-match, widget-checklist-match-inline)
+ (widget-group-match): Rename parameter VALUES to VALS.
+ (widget-field-value-set): Remove unused variable `size'.
+ (widget-color-action): Remove unused variables `value' and `start'.
+
+ * windmove.el (windmove-wrap-loc-for-movement): Remove unused
+ variable `dir'. Doc fix.
+ (windmove-find-other-window): Don't pass it.
+
+ * window.el (count-windows): Mark unused parameter.
+ (bw-adjust-window): Remove unused variable `err'.
+
+ * woman.el (woman-file-name): Remove unused variable `default'.
+ (woman-expand-directory-path): Rename parameters WOMAN-MANPATH and
+ WOMAN-PATH to PATH-DIRS and PATH-REGEXPS, respectively.
+ (global-font-lock-mode): Declare.
+ (woman-decode-region): Mark unused parameter.
+ (woman-get-tab-stop): Rename parameter TAB-STOP-LIST to TAB-STOPS.
+
+ * x-dnd.el (x-dnd-default-test-function, x-dnd-handle-old-kde)
+ (x-dnd-handle-xdnd, x-dnd-handle-motif): Mark unused parameters.
+ (x-dnd-handle-moz-url): Remove unused variable `title'.
+ (x-dnd-handle-xdnd): Remove unused variables `x', `y' and `ret-action'.
+
+ * xml.el (xml-parse-tag, xml-parse-attlist):
+ Remove unused variable `pos'.
+
2011-04-19 Glenn Morris <rgm@gnu.org>
* calendar/cal-tex.el (cal-tex-list-holidays, cal-tex-cursor-month)
diff --git a/lisp/align.el b/lisp/align.el
index 83e27daeced..8767b6ff306 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1106,7 +1106,7 @@ documentation for `align-region-separate' for more details."
(setq seps (cdr seps))))
yes))))
-(defun align-adjust-col-for-rule (column rule spacing tab-stop)
+(defun align-adjust-col-for-rule (column _rule spacing tab-stop)
"Adjust COLUMN according to the given RULE.
SPACING specifies how much spacing to use.
TAB-STOP specifies whether SPACING refers to tab-stop boundaries."
@@ -1161,7 +1161,7 @@ have been aligned. No changes will be made to the buffer."
(justify (cdr (assq 'justify rule)))
(col (or fixed 0))
(width 0)
- ecol change look)
+ ecol change)
;; Determine the alignment column.
(let ((a areas))
@@ -1285,7 +1285,6 @@ purpose where you might want to know where the regions that the
aligner would have dealt with are."
(let ((end-mark (and end (copy-marker end t)))
(real-beg beg)
- (real-end end)
(report (and (not func) align-large-region beg end
(>= (- end beg) align-large-region)))
(rule-index 1)
@@ -1314,7 +1313,7 @@ aligner would have dealt with are."
tab-stop tab-stop-c
repeat repeat-c
valid valid-c
- pos-list first
+ first
regions index
last-point b e
save-match-data
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 734b2fb2f6b..35a3ac3c09a 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -371,8 +371,8 @@ Value is a list of offsets of the words into the string."
"Return apropos score for documentation string DOC."
(let ((l (length doc)))
(if (> l 0)
- (let ((score 0) i)
- (when (setq i (string-match apropos-pattern-quoted doc))
+ (let ((score 0))
+ (when (string-match apropos-pattern-quoted doc)
(setq score 10000))
(dolist (s (apropos-calc-scores doc apropos-all-words) score)
(setq score (+ score 50 (/ (* (- l s) 50) l)))))
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 412fed102b7..0d129856f1d 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1386,7 +1386,7 @@ as a relative change like \"g+rw\" as for chmod(2)."
(error "Renaming is not supported for this archive type"))))
;; Revert the buffer and recompute the dired-like listing.
-(defun archive-mode-revert (&optional no-auto-save no-confirm)
+(defun archive-mode-revert (&optional _no-auto-save _no-confirm)
(let ((no (archive-get-lineno)))
(setq archive-files nil)
(let ((revert-buffer-function nil)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 4d9f4f09e58..8c48bdc5d59 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -153,17 +153,17 @@ mouse-3: Describe current input method"))
,(propertize
"%z"
'help-echo
- #'(lambda (window object point)
- (with-current-buffer (window-buffer window)
- ;; Don't show this tip if the coding system is nil,
- ;; it reads like a bug, and is not useful anyway.
- (when buffer-file-coding-system
- (format "Buffer coding system %s\nmouse-1: describe coding system"
- (if enable-multibyte-characters
- (concat "(multi-byte): "
- (symbol-name buffer-file-coding-system))
- (concat "(unibyte): "
- (symbol-name buffer-file-coding-system)))))))
+ (lambda (window _object _point)
+ (with-current-buffer (window-buffer window)
+ ;; Don't show this tip if the coding system is nil,
+ ;; it reads like a bug, and is not useful anyway.
+ (when buffer-file-coding-system
+ (format "Buffer coding system %s\nmouse-1: describe coding system"
+ (if enable-multibyte-characters
+ (concat "(multi-byte): "
+ (symbol-name buffer-file-coding-system))
+ (concat "(unibyte): "
+ (symbol-name buffer-file-coding-system)))))))
'mouse-face 'mode-line-highlight
'local-map mode-line-coding-system-map)
(:eval (mode-line-eol-desc)))
@@ -209,7 +209,7 @@ Normally nil in most modes, since there is no process to display.")
(defvar mode-line-modified
(list (propertize
"%1*"
- 'help-echo (purecopy (lambda (window object point)
+ 'help-echo (purecopy (lambda (window _object _point)
(format "Buffer is %s\nmouse-1 toggles"
(save-selected-window
(select-window window)
@@ -222,7 +222,7 @@ Normally nil in most modes, since there is no process to display.")
'mouse-face 'mode-line-highlight)
(propertize
"%1+"
- 'help-echo (purecopy (lambda (window object point)
+ 'help-echo (purecopy (lambda (window _object _point)
(format "Buffer is %sodified\nmouse-1 toggles modified state"
(save-selected-window
(select-window window)
@@ -242,7 +242,7 @@ Normally nil in most modes, since there is no process to display.")
(list (propertize
"%1@"
'mouse-face 'mode-line-highlight
- 'help-echo (purecopy (lambda (window object point)
+ 'help-echo (purecopy (lambda (window _object _point)
(format "%s"
(save-selected-window
(select-window window)
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 1e92c08475a..70befa11d8b 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -264,14 +264,14 @@ Letters do not insert themselves; instead, they are commands.
(set (make-local-variable 'revert-buffer-function)
'Buffer-menu-revert-function)
(set (make-local-variable 'buffer-stale-function)
- #'(lambda (&optional noconfirm) 'fast))
+ (lambda (&optional _noconfirm) 'fast))
(setq truncate-lines t)
(setq buffer-read-only t))
(define-obsolete-variable-alias 'buffer-menu-mode-hook
'Buffer-menu-mode-hook "23.1")
-(defun Buffer-menu-revert-function (ignore1 ignore2)
+(defun Buffer-menu-revert-function (_ignore1 _ignore2)
(or (eq buffer-undo-list t)
(setq buffer-undo-list nil))
;; We can not use save-excursion here. The buffer gets erased.
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index fc1134f03db..f4d15689885 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -503,7 +503,7 @@ See variable `scheme-buffer'."
(current-buffer)
scheme-buffer)))
-(defun scheme-interactively-start-process (&optional cmd)
+(defun scheme-interactively-start-process (&optional _cmd)
"Start an inferior Scheme process. Return the process started.
Since this command is run implicitly, always ask the user for the
command to run."
diff --git a/lisp/comint.el b/lisp/comint.el
index c9d2108f132..64ed32dd2b3 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1529,7 +1529,7 @@ in the search status stack."
`(lambda (cmd)
(comint-history-isearch-pop-state cmd ,comint-input-ring-index)))
-(defun comint-history-isearch-pop-state (cmd hist-pos)
+(defun comint-history-isearch-pop-state (_cmd hist-pos)
"Restore the input history search state.
Go to the history element by the absolute history position HIST-POS."
(comint-goto-input hist-pos))
@@ -2053,7 +2053,7 @@ This function should be a pre-command hook."
(select-window selected))))
nil t))))))
-(defun comint-postoutput-scroll-to-bottom (string)
+(defun comint-postoutput-scroll-to-bottom (_string)
"Go to the end of buffer in some or all windows showing it.
Does not scroll if the current line is the last line in the buffer.
Depends on the value of `comint-move-point-for-output' and
@@ -2090,7 +2090,7 @@ This function should be in the list `comint-output-filter-functions'."
nil t))
(set-buffer current))))
-(defun comint-truncate-buffer (&optional string)
+(defun comint-truncate-buffer (&optional _string)
"Truncate the buffer to `comint-buffer-maximum-size'.
This function could be on `comint-output-filter-functions' or bound to a key."
(interactive)
@@ -2101,7 +2101,7 @@ This function could be on `comint-output-filter-functions' or bound to a key."
(let ((inhibit-read-only t))
(delete-region (point-min) (point)))))
-(defun comint-strip-ctrl-m (&optional string)
+(defun comint-strip-ctrl-m (&optional _string)
"Strip trailing `^M' characters from the current output group.
This function could be on `comint-output-filter-functions' or bound to a key."
(interactive)
@@ -2207,7 +2207,7 @@ a buffer local variable."
(goto-char (comint-line-beginning-position))))
;; For compatibility.
-(defun comint-read-noecho (prompt &optional ignore)
+(defun comint-read-noecho (prompt &optional _ignore)
(read-passwd prompt))
;; These three functions are for entering text you don't want echoed or
@@ -2933,7 +2933,7 @@ inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters.
(defun comint-substitute-in-file-name (filename)
"Return FILENAME with environment variables substituted.
Supports additional environment variable syntax of the command
-interpreter (e.g., the percent notation of cmd.exe on NT)."
+interpreter (e.g., the percent notation of cmd.exe on Windows)."
(let ((name (substitute-in-file-name filename)))
(if (memq system-type '(ms-dos windows-nt))
(let (env-var-name
diff --git a/lisp/completion.el b/lisp/completion.el
index 128e3a2a489..ad7e781bb7a 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -695,7 +695,7 @@ Returns nil if there isn't one longer than `completion-min-length'."
;; Conditionalizing code on *record-cmpl-statistics-p*
;;-----------------------------------------------
;; All statistics code outside this block should use this
-(defmacro cmpl-statistics-block (&rest body))
+(defmacro cmpl-statistics-block (&rest _body))
;; "Only executes body if we are recording statistics."
;; (list 'cond
;; (list* '*record-cmpl-statistics-p* body)
@@ -1751,7 +1751,7 @@ Prefix args ::
(save-excursion
(goto-char (point-min))
(let (string)
- (condition-case e
+ (condition-case nil
(while t
(search-forward "\177")
(backward-char 3)
@@ -1788,7 +1788,7 @@ Prefix args ::
(let (string)
(save-excursion
(goto-char (point-min))
- (condition-case e
+ (condition-case nil
(while t
(re-search-forward *lisp-def-regexp*)
(and (setq string (symbol-under-point))
@@ -2042,7 +2042,7 @@ If file name is not specified, use `save-completions-file-name'."
last-use-time)) "\n"))))
;; write the buffer
- (condition-case e
+ (condition-case nil
(let ((file-exists-p (file-exists-p filename)))
(if file-exists-p
(progn
@@ -2108,7 +2108,7 @@ If file is not specified, then use `save-completions-file-name'."
(aref completion-add-count-vector cmpl-source-file-parsing)))
(total-in-file 0) (total-perm 0))
;; insert the file into a buffer
- (condition-case e
+ (condition-case nil
(progn (insert-file-contents filename t)
(setq insert-okay-p t))
@@ -2120,7 +2120,7 @@ If file is not specified, then use `save-completions-file-name'."
(progn
(goto-char (point-min))
- (condition-case e
+ (condition-case nil
(while t
(setq entry (read buffer))
(setq total-in-file (1+ total-in-file))
diff --git a/lisp/composite.el b/lisp/composite.el
index 878302469ec..11a3d5ba388 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -289,9 +289,7 @@ A composition rule is a cons of glyph reference points of the form
(let (str components)
(if (consp (car (cdr args)))
;; Rule-base composition.
- (let ((len (length args))
- (tail (encode-composition-components args 'nocopy)))
-
+ (let ((tail (encode-composition-components args 'nocopy)))
(while tail
(setq str (cons (car tail) str))
(setq tail (nthcdr 2 tail)))
@@ -448,8 +446,8 @@ after a sequence of character events."
(defun lgstring-insert-glyph (gstring idx glyph)
(let ((nglyphs (lgstring-glyph-len gstring))
- (i idx) g)
- (while (and (< i nglyphs) (setq g (lgstring-glyph gstring i)))
+ (i idx))
+ (while (and (< i nglyphs) (lgstring-glyph gstring i))
(setq i (1+ i)))
(if (= i nglyphs)
(setq gstring (vconcat gstring (vector glyph)))
@@ -463,8 +461,7 @@ after a sequence of character events."
(defun compose-glyph-string (gstring from to)
(let ((glyph (lgstring-glyph gstring from))
- from-pos to-pos
- ascent descent lbearing rbearing)
+ from-pos to-pos)
(setq from-pos (lglyph-from glyph)
to-pos (lglyph-to (lgstring-glyph gstring (1- to))))
(lglyph-set-from-to glyph from-pos to-pos)
@@ -482,7 +479,7 @@ after a sequence of character events."
(let ((font-object (lgstring-font gstring))
(glyph (lgstring-glyph gstring from))
from-pos to-pos
- ascent descent lbearing rbearing)
+ ascent descent)
(if gap
(setq gap (floor (* (font-get font-object :size) gap)))
(setq gap 0))
@@ -497,7 +494,7 @@ after a sequence of character events."
(lglyph-set-from-to glyph from-pos to-pos)
(let ((this-ascent (lglyph-ascent glyph))
(this-descent (lglyph-descent glyph))
- xoff yoff wadjust)
+ xoff yoff)
(setq xoff (if (<= (lglyph-rbearing glyph) 0) 0
(- (lglyph-width glyph))))
(if (> this-ascent 0)
@@ -521,17 +518,16 @@ a padding space before and/or after the character.
All non-spacing characters have this function in
`composition-function-table' unless overwritten."
- (let* ((header (lgstring-header gstring))
- (nchars (lgstring-char-len gstring))
- (nglyphs (lgstring-glyph-len gstring))
- (glyph (lgstring-glyph gstring 0)))
+ (let ((nchars (lgstring-char-len gstring))
+ (nglyphs (lgstring-glyph-len gstring))
+ (glyph (lgstring-glyph gstring 0)))
(cond
;; A non-spacing character not following a proper base character.
((= nchars 1)
(let ((lbearing (lglyph-lbearing glyph))
(rbearing (lglyph-rbearing glyph))
(width (lglyph-width glyph))
- xoff wadjust)
+ xoff)
(if (< lbearing 0)
(setq xoff (- lbearing))
(setq xoff 0 lbearing 0))
@@ -561,8 +557,7 @@ All non-spacing characters have this function in
(rbearing (lglyph-rbearing glyph))
(lbearing (lglyph-lbearing glyph))
(center (/ (+ lbearing rbearing) 2))
- (gap (round (* (font-get (lgstring-font gstring) :size) 0.1)))
- xoff yoff)
+ (gap (round (* (font-get (lgstring-font gstring) :size) 0.1))))
(dotimes (i nchars)
(setq glyph (lgstring-glyph gstring i))
(when (> i 0)
@@ -652,12 +647,10 @@ Non-spacing characters are composed with the preceding base
character. If the preceding character is not a base character,
each non-spacing character is composed as a spacing character by
prepending a space before it."
- (let* ((header (lgstring-header gstring))
- (nchars (lgstring-char-len gstring))
- (nglyphs (lgstring-glyph-len gstring))
- (i 0)
- (coding (lgstring-font gstring))
- glyph)
+ (let ((nglyphs (lgstring-glyph-len gstring))
+ (i 0)
+ (coding (lgstring-font gstring))
+ glyph)
(while (and (< i nglyphs)
(setq glyph (lgstring-glyph gstring i)))
(if (not (char-charset (lglyph-char glyph) coding))
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 203043ebd97..f14c055d7a8 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -792,7 +792,7 @@ and `yes-or-no-p' otherwise."
(message "Aborted")
nil))
-(defun Custom-set (&rest ignore)
+(defun Custom-set (&rest _ignore)
"Set the current value of all edited settings in the buffer."
(interactive)
(custom-command-apply
@@ -801,7 +801,7 @@ and `yes-or-no-p' otherwise."
(widget-apply child :custom-set)))
"Set all values according to this buffer? "))
-(defun Custom-save (&rest ignore)
+(defun Custom-save (&rest _ignore)
"Set all edited settings, then save all settings that have been set.
If a setting was edited and set before, this saves it. If a
setting was merely edited before, this sets it then saves it."
@@ -817,7 +817,7 @@ setting was merely edited before, this sets it then saves it."
(dolist (child custom-options)
(widget-apply child :custom-state-set-and-redraw))))
-(defun custom-reset (widget &optional event)
+(defun custom-reset (_widget &optional event)
"Select item from reset menu."
(let* ((completion-ignore-case t)
(answer (widget-choose "Reset settings"
@@ -826,7 +826,7 @@ setting was merely edited before, this sets it then saves it."
(if answer
(funcall answer))))
-(defun Custom-reset-current (&rest ignore)
+(defun Custom-reset-current (&rest _ignore)
"Reset all edited settings in the buffer to show their current values."
(interactive)
(custom-command-apply
@@ -835,7 +835,7 @@ setting was merely edited before, this sets it then saves it."
(widget-apply widget :custom-reset-current)))
"Reset all settings' buffer text to show current values? "))
-(defun Custom-reset-saved (&rest ignore)
+(defun Custom-reset-saved (&rest _ignore)
"Reset all edited or set settings in the buffer to their saved value.
This also shows the saved values in the buffer."
(interactive)
@@ -876,7 +876,6 @@ This also shows the saved values in the buffer."
(unless (eq widget t)
(let* ((symbol (widget-value widget))
(child (car (widget-get widget :children)))
- (value (get symbol 'face-defface-spec))
(comment-widget (widget-get widget :comment-widget)))
(put symbol 'face-comment nil)
(widget-value-set child
@@ -888,7 +887,7 @@ This also shows the saved values in the buffer."
(custom-face-state-set widget)
(custom-redraw-magic widget))))))
-(defun Custom-reset-standard (&rest ignore)
+(defun Custom-reset-standard (&rest _ignore)
"Erase all customizations (either current or saved) in current buffer.
The immediate result is to restore them to their standard values.
This operation eliminates any saved values for the group members,
@@ -920,7 +919,7 @@ it were the arg to `interactive' (which see) to interactively read the value.
If the variable has a `custom-type' property, it must be a widget and the
`:prompt-value' property of that widget will be used for reading the value.
-If the variable also has a `custom-get' property, that is used for finding
+If the variable also has a `custom-get' property, that is used for finding
the current value of the variable, otherwise `symbol-value' is used.
If optional COMMENT argument is non-nil, also prompt for a comment and return
@@ -943,8 +942,8 @@ it as the third element in the list."
(widget-prompt-value type
prompt
(if (boundp var)
- (funcall
- (or (get var 'custom-get) 'symbol-value)
+ (funcall
+ (or (get var 'custom-get) 'symbol-value)
var))
(not (boundp var))))
(t
@@ -1401,7 +1400,7 @@ that are not customizable options, as well as faces and groups
(interactive (list (apropos-read-pattern "symbol") current-prefix-arg))
(require 'apropos)
(apropos-parse-pattern pattern)
- (let (found tests)
+ (let (found)
(mapatoms
`(lambda (symbol)
(when (string-match apropos-regexp (symbol-name symbol))
@@ -1536,7 +1535,7 @@ This button will have a menu with all three reset operations."
:type 'boolean
:group 'custom-buffer)
-(defun Custom-buffer-done (&rest ignore)
+(defun Custom-buffer-done (&rest _ignore)
"Exit current Custom buffer according to `custom-buffer-done-kill'."
(interactive)
(quit-window custom-buffer-done-kill))
@@ -1574,7 +1573,7 @@ Otherwise use brackets."
'custom-button-pressed
'custom-button-pressed-unraised))))
-(defun custom-buffer-create-internal (options &optional description)
+(defun custom-buffer-create-internal (options &optional _description)
(Custom-mode)
(let ((init-file (or custom-file user-init-file)))
;; Insert verbose help at the top of the custom buffer.
@@ -1609,7 +1608,7 @@ Otherwise use brackets."
search-widget 'push-button
:tag " Search "
:help-echo echo :action
- (lambda (widget &optional event)
+ (lambda (widget &optional _event)
(customize-apropos (widget-value (widget-get widget :parent)))))
(widget-insert "\n")))
@@ -1623,7 +1622,7 @@ Otherwise use brackets."
(if custom-buffer-verbose-help
(widget-insert "
Operate on all settings in this buffer:\n"))
- (let ((button (lambda (tag action active help icon label)
+ (let ((button (lambda (tag action active help _icon _label)
(widget-insert " ")
(if (eval active)
(widget-create 'push-button :tag tag
@@ -1743,7 +1742,7 @@ item in another window.\n\n"))
:format "%[[%t]%]"
:action 'custom-browse-visibility-action)
-(defun custom-browse-visibility-action (widget &rest ignore)
+(defun custom-browse-visibility-action (widget &rest _ignore)
(let ((custom-buffer-style 'tree))
(custom-toggle-parent widget)))
@@ -1753,7 +1752,7 @@ item in another window.\n\n"))
:tag-glyph "folder"
:action 'custom-browse-group-tag-action)
-(defun custom-browse-group-tag-action (widget &rest ignore)
+(defun custom-browse-group-tag-action (widget &rest _ignore)
(let ((parent (widget-get widget :parent)))
(customize-group-other-window (widget-value parent))))
@@ -1763,7 +1762,7 @@ item in another window.\n\n"))
:tag-glyph "option"
:action 'custom-browse-variable-tag-action)
-(defun custom-browse-variable-tag-action (widget &rest ignore)
+(defun custom-browse-variable-tag-action (widget &rest _ignore)
(let ((parent (widget-get widget :parent)))
(customize-variable-other-window (widget-value parent))))
@@ -1773,7 +1772,7 @@ item in another window.\n\n"))
:tag-glyph "face"
:action 'custom-browse-face-tag-action)
-(defun custom-browse-face-tag-action (widget &rest ignore)
+(defun custom-browse-face-tag-action (widget &rest _ignore)
(let ((parent (widget-get widget :parent)))
(customize-face-other-window (widget-value parent))))
@@ -1809,7 +1808,7 @@ item in another window.\n\n"))
(widget-put (get 'item 'widget-type) :custom-show t)
(widget-put (get 'editable-field 'widget-type)
- :custom-show (lambda (widget value)
+ :custom-show (lambda (_widget value)
(let ((pp (pp-to-string value)))
(cond ((string-match "\n" pp)
nil)
@@ -1998,7 +1997,7 @@ and `face'."
:value-create 'custom-magic-value-create
:value-delete 'widget-children-value-delete)
-(defun widget-magic-mouse-down-action (widget &optional event)
+(defun widget-magic-mouse-down-action (widget &optional _event)
;; Non-nil unless hidden.
(not (eq (widget-get (widget-get (widget-get widget :parent) :parent)
:custom-state)
@@ -2182,7 +2181,7 @@ and `face'."
:value-delete 'widget-children-value-delete
:value-get 'widget-value-value-get
:validate 'widget-children-validate
- :match (lambda (widget value) (symbolp value)))
+ :match (lambda (_widget value) (symbolp value)))
(defun custom-convert-widget (widget)
"Initialize :value and :tag from :args in WIDGET."
@@ -2282,7 +2281,7 @@ and `face'."
(custom-redraw widget)
(widget-setup)))
-(defun custom-toggle-parent (widget &rest ignore)
+(defun custom-toggle-parent (widget &rest _ignore)
"Toggle visibility of parent of WIDGET."
(custom-toggle-hide (widget-get widget :parent)))
@@ -2318,7 +2317,7 @@ Insert PREFIX first if non-nil."
(insert ", "))))
(widget-put widget :buttons buttons))))
-(defun custom-add-parent-links (widget &optional initial-string doc-initial-string)
+(defun custom-add-parent-links (widget &optional initial-string _doc-initial-string)
"Add \"Parent groups: ...\" to WIDGET if the group has parents.
The value is non-nil if any parents were found.
If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
@@ -2675,7 +2674,7 @@ try matching its doc string against `custom-guess-doc-alist'."
(custom-add-parent-links widget))
(custom-add-see-also widget)))))
-(defun custom-toggle-hide-variable (visibility-widget &rest ignore)
+(defun custom-toggle-hide-variable (visibility-widget &rest _ignore)
"Toggle the visibility of a `custom-variable' parent widget.
By default, this signals an error if the parent has unsaved
changes. If the parent has a `simple' :custom-style property,
@@ -3132,14 +3131,14 @@ face attributes (as specified by a `default' defface entry)."
(widget-put widget :buttons buttons)
(widget-put widget :children (nreverse (widget-get widget :children)))))
-(defun custom-face-edit-value-visibility-action (widget &rest ignore)
+(defun custom-face-edit-value-visibility-action (widget &rest _ignore)
;; Toggle hiding of face attributes.
(let ((parent (widget-get widget :parent)))
(widget-put parent :show-all-attributes
(not (widget-get parent :show-all-attributes)))
(custom-redraw parent)))
-(defun custom-face-edit-fix-value (widget value)
+(defun custom-face-edit-fix-value (_widget value)
"Ignoring WIDGET, convert :bold and :italic in VALUE to new form.
Also change :reverse-video to :inverse-video."
(custom-fix-face-spec value))
@@ -3426,7 +3425,7 @@ WIDGET should be a `custom-face' widget."
(setq spec `((t ,(face-attr-construct face (selected-frame))))))
(custom-pre-filter-face-spec spec)))
-(defun custom-toggle-hide-face (visibility-widget &rest ignore)
+(defun custom-toggle-hide-face (visibility-widget &rest _ignore)
"Toggle the visibility of a `custom-face' parent widget.
By default, this signals an error if the parent has unsaved
changes. If the parent has a `simple' :custom-style property,
@@ -3830,7 +3829,7 @@ restoring it to the state of a face that has never been customized."
:value 'default
:sample-face-get 'widget-face-sample-face-get
:notify 'widget-face-notify
- :match (lambda (widget value) (facep value))
+ :match (lambda (_widget value) (facep value))
:complete-function (lambda ()
(interactive)
(lisp-complete-symbol 'facep))
@@ -3860,7 +3859,7 @@ restoring it to the state of a face that has never been customized."
(define-widget 'hook 'list
"An Emacs Lisp hook."
- :value-to-internal (lambda (widget value)
+ :value-to-internal (lambda (_widget value)
(if (and value (symbolp value))
(list value)
value))
@@ -3905,7 +3904,7 @@ restoring it to the state of a face that has never been customized."
:follow-link 'mouse-face
:action 'custom-group-link-action)
-(defun custom-group-link-action (widget &rest ignore)
+(defun custom-group-link-action (widget &rest _ignore)
(customize-group (widget-value widget)))
;;; The `custom-group' Widget.
@@ -4202,8 +4201,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(widget-insert "\n")
(progress-reporter-update reporter (setq count (1+ count)))
(let ((sym (nth 0 entry))
- (type (nth 1 entry))
- hidden-p)
+ (type (nth 1 entry)))
(prog1
(widget-create-child-and-convert
widget type
@@ -4510,6 +4508,8 @@ This function does not save the buffer."
(setq pos (line-beginning-position))))
(goto-char pos)))))
+(defvar sort-fold-case) ; defined in sort.el
+
(defun custom-save-variables ()
"Save all customized variables in `custom-file'."
(save-excursion
@@ -4648,13 +4648,13 @@ This function does not save the buffer."
:type 'integer
:group 'custom-menu)
-(defun custom-face-menu-create (widget symbol)
+(defun custom-face-menu-create (_widget symbol)
"Ignoring WIDGET, create a menu entry for customization face SYMBOL."
(vector (custom-unlispify-menu-entry symbol)
`(customize-face ',symbol)
t))
-(defun custom-variable-menu-create (widget symbol)
+(defun custom-variable-menu-create (_widget symbol)
"Ignoring WIDGET, create a menu entry for customization variable SYMBOL."
(let ((type (get symbol 'custom-type)))
(unless (listp type)
@@ -4667,13 +4667,13 @@ This function does not save the buffer."
;; Add checkboxes to boolean variable entries.
(widget-put (get 'boolean 'widget-type)
- :custom-menu (lambda (widget symbol)
+ :custom-menu (lambda (_widget symbol)
(vector (custom-unlispify-menu-entry symbol)
`(customize-variable ',symbol)
':style 'toggle
':selected symbol)))
-(defun custom-group-menu-create (widget symbol)
+(defun custom-group-menu-create (_widget symbol)
"Ignoring WIDGET, create a menu entry for customization group SYMBOL."
`( ,(custom-unlispify-menu-entry symbol t)
:filter (lambda (&rest junk)
@@ -4747,7 +4747,7 @@ The format is suitable for use with `easy-menu-define'."
;;; The Custom Mode.
-(defun Custom-no-edit (pos &optional event)
+(defun Custom-no-edit (_pos &optional _event)
"Invoke button at POS, or refuse to allow editing of Custom buffer."
(interactive "@d")
(error "You can't edit this part of the Custom buffer"))
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 4f9428d497b..86fb43be72a 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -112,13 +112,13 @@ remove them from your saved Custom file.\n\n"))
(widget-create 'push-button
:tag " Visit Theme "
:help-echo "Insert the settings of a pre-defined theme."
- :action (lambda (widget &optional event)
+ :action (lambda (_widget &optional _event)
(call-interactively 'custom-theme-visit-theme)))
(widget-insert " ")
(widget-create 'push-button
:tag " Merge Theme "
:help-echo "Merge in the settings of a pre-defined theme."
- :action (lambda (widget &optional event)
+ :action (lambda (_widget &optional _event)
(call-interactively 'custom-theme-merge-theme)))
(widget-insert " ")
(widget-create 'push-button
@@ -182,7 +182,7 @@ remove them from your saved Custom file.\n\n"))
:button-face 'custom-link
:mouse-face 'highlight
:pressed-face 'highlight
- :action (lambda (widget &optional event)
+ :action (lambda (_widget &optional _event)
(call-interactively 'custom-theme-add-face)))
;; If THEME is non-nil, insert all of that theme's variables.
@@ -201,14 +201,14 @@ remove them from your saved Custom file.\n\n"))
:button-face 'custom-link
:mouse-face 'highlight
:pressed-face 'highlight
- :action (lambda (widget &optional event)
+ :action (lambda (_widget &optional _event)
(call-interactively 'custom-theme-add-variable)))
(widget-insert ?\n)
(widget-setup)
(goto-char (point-min))
(message "")))
-(defun custom-theme-revert (ignore-auto noconfirm)
+(defun custom-theme-revert (_ignore-auto noconfirm)
(when (or noconfirm (y-or-n-p "Discard current changes? "))
(customize-create-theme custom-theme--save-name (current-buffer))))
@@ -336,7 +336,11 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
(nth 3 setting))))
theme)
-(defun custom-theme-write (&rest ignore)
+;; From cus-edit.el
+(defvar custom-reset-standard-faces-list)
+(defvar custom-reset-standard-variables-list)
+
+(defun custom-theme-write (&rest _ignore)
"Write the current custom theme to its theme file."
(interactive)
(let* ((name (widget-value custom-theme-name))
@@ -533,7 +537,7 @@ Do not call this mode function yourself. It is meant for internal use."
(use-local-map custom-theme-choose-mode-map)
(custom--initialize-widget-variables)
(set (make-local-variable 'revert-buffer-function)
- (lambda (ignore-auto noconfirm)
+ (lambda (_ignore-auto noconfirm)
(when (or noconfirm (y-or-n-p "Discard current choices? "))
(customize-themes (current-buffer))))))
(put 'custom-theme-choose-mode 'mode-class 'special)
@@ -566,7 +570,7 @@ Theme files are named *-theme.el in `"))
:help-echo "Describe `custom-theme-load-path'."
:keymap custom-mode-link-map
:follow-link 'mouse-face
- :action (lambda (widget &rest ignore)
+ :action (lambda (_widget &rest _ignore)
(describe-variable 'custom-theme-load-path)))
(widget-insert "'.\n\n")
@@ -589,7 +593,7 @@ Theme files are named *-theme.el in `"))
:help-echo "Migrate."
:keymap custom-mode-link-map
:follow-link 'mouse-face
- :action (lambda (widget &rest ignore)
+ :action (lambda (_widget &rest _ignore)
(customize-create-theme 'user)))
(widget-insert ".\n\n")))
@@ -653,7 +657,7 @@ Theme files are named *-theme.el in `"))
(and widget
(describe-theme (widget-get widget :theme-name)))))
-(defun custom-theme-save (&rest ignore)
+(defun custom-theme-save (&rest _ignore)
(interactive)
(customize-save-variable 'custom-enabled-themes custom-enabled-themes)
(message "Custom themes saved for future sessions."))
diff --git a/lisp/custom.el b/lisp/custom.el
index 964d8d9ea4a..9673db47ea8 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -109,7 +109,7 @@ For the standard setting, use `set-default'."
(defvar custom-delayed-init-variables nil
"List of variables whose initialization is pending.")
-(defun custom-initialize-delay (symbol value)
+(defun custom-initialize-delay (symbol _value)
"Delay initialization of SYMBOL to the next Emacs start.
This is used in files that are preloaded (or for autoloaded
variables), so that the initialization is done in the run-time
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 00e9cd60cfe..00e2ec802e2 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -391,8 +391,7 @@ then it searches *all* buffers."
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev)))))
- (my-obarray dabbrev--last-obarray)
- init)
+ (my-obarray dabbrev--last-obarray))
(save-excursion
;;--------------------------------
;; New abbreviation to expand.
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index 009b179fa49..d9f8634fb54 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -240,6 +240,11 @@ column (column 0) is located at left corner."
;; User Commands:
+;; to avoid compilation gripes
+(defvar delimit-columns-max nil)
+(defvar delimit-columns-limit nil)
+
+
;;;###autoload
(defun delimit-columns-customize ()
"Customization of `columns' group."
@@ -354,12 +359,7 @@ START and END delimits the corners of text rectangle."
;; Internal Variables and Functions:
-;; to avoid compilation gripes
-(defvar delimit-columns-max nil)
-(defvar delimit-columns-limit nil)
-
-
-(defun delimit-columns-rectangle-max (startpos &optional ignore1 ignore2)
+(defun delimit-columns-rectangle-max (startpos &optional _ignore1 _ignore2)
(set-marker delimit-columns-limit (point))
(goto-char startpos)
(let ((ncol 1)
@@ -392,7 +392,7 @@ START and END delimits the corners of text rectangle."
(setq values (cdr values)))))
-(defun delimit-columns-rectangle-line (startpos &optional ignore1 ignore2)
+(defun delimit-columns-rectangle-line (startpos &optional _ignore1 _ignore2)
(let ((len (length delimit-columns-max))
(ncol 0)
origin)
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 411fef51bd9..fca06adb2a9 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -364,13 +364,13 @@ This function is semi-obsolete. Use `get-char-code-property'."
(let ((mnemonics (category-set-mnemonics category-set)))
(unless (eq mnemonics "")
(list (mapconcat
- #'(lambda (x)
- (let* ((c (category-docstring x))
- (doc (if (string-match "\\`\\(.*?\\)\n\\(.*\\)\\'" c)
- (propertize (match-string 1 c)
- 'help-echo (match-string 2 c))
- c)))
- (format "%c:%s" x doc)))
+ (lambda (x)
+ (let* ((c (category-docstring x))
+ (doc (if (string-match "\\`\\(.*?\\)\n\\(.*\\)\\'" c)
+ (propertize (match-string 1 c)
+ 'help-echo (match-string 2 c))
+ c)))
+ (format "%c:%s" x doc)))
mnemonics ", ")))))
;;;###autoload
@@ -399,7 +399,7 @@ as well as widgets, buttons, overlays, and text properties."
standard-display-table))
(disp-vector (and display-table (aref display-table char)))
(multibyte-p enable-multibyte-characters)
- (overlays (mapcar #'(lambda (o) (overlay-properties o))
+ (overlays (mapcar (lambda (o) (overlay-properties o))
(overlays-at pos)))
(char-description (if (not multibyte-p)
(single-key-description char)
@@ -582,8 +582,8 @@ as well as widgets, buttons, overlays, and text properties."
pos (glyph-char (aref disp-vector i))))))
(format "by display table entry [%s] (see below)"
(mapconcat
- #'(lambda (x)
- (format "?%c" (glyph-char (car x))))
+ (lambda (x)
+ (format "?%c" (glyph-char (car x))))
disp-vector " ")))
(composition
(cadr composition))
@@ -650,11 +650,11 @@ as well as widgets, buttons, overlays, and text properties."
(goto-char (point-min))
(re-search-forward "character:[ \t\n]+")
(let ((end (+ (point) (length char-description))))
- (mapc #'(lambda (props)
- (let ((o (make-overlay (point) end)))
- (while props
- (overlay-put o (car props) (nth 1 props))
- (setq props (cddr props)))))
+ (mapc (lambda (props)
+ (let ((o (make-overlay (point) end)))
+ (while props
+ (overlay-put o (car props) (nth 1 props))
+ (setq props (cddr props)))))
overlays))))
(when disp-vector
@@ -745,7 +745,7 @@ as well as widgets, buttons, overlays, and text properties."
"\nCharacter code properties: "))
(insert-text-button
"customize what to show"
- 'action (lambda (&rest ignore)
+ 'action (lambda (&rest _ignore)
(customize-variable
'describe-char-unidata-list))
'follow-link t)
diff --git a/lisp/desktop.el b/lisp/desktop.el
index fd5baaf020f..c60745a6b16 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -811,7 +811,7 @@ which means to truncate VAR's value to at most MAX-SIZE elements
")\n"))))
;; ----------------------------------------------------------------------------
-(defun desktop-save-buffer-p (filename bufname mode &rest dummy)
+(defun desktop-save-buffer-p (filename bufname mode &rest _dummy)
"Return t if buffer should have its state saved in the desktop file.
FILENAME is the visited file name, BUFNAME is the buffer name, and
MODE is the major mode.
@@ -1076,15 +1076,16 @@ directory DIRNAME."
(defvar desktop-buffer-major-mode)
(defvar desktop-buffer-locals)
+(defvar auto-insert) ; from autoinsert.el
;; ----------------------------------------------------------------------------
-(defun desktop-restore-file-buffer (desktop-buffer-file-name
- desktop-buffer-name
- desktop-buffer-misc)
+(defun desktop-restore-file-buffer (buffer-filename
+ _buffer-name
+ _buffer-misc)
"Restore a file buffer."
- (when desktop-buffer-file-name
- (if (or (file-exists-p desktop-buffer-file-name)
+ (when buffer-filename
+ (if (or (file-exists-p buffer-filename)
(let ((msg (format "Desktop: File \"%s\" no longer exists."
- desktop-buffer-file-name)))
+ buffer-filename)))
(if desktop-missing-file-warning
(y-or-n-p (concat msg " Re-create buffer? "))
(message "%s" msg)
@@ -1094,7 +1095,7 @@ directory DIRNAME."
(or coding-system-for-read
(cdr (assq 'buffer-file-coding-system
desktop-buffer-locals))))
- (buf (find-file-noselect desktop-buffer-file-name)))
+ (buf (find-file-noselect buffer-filename)))
(condition-case nil
(switch-to-buffer buf)
(error (pop-to-buffer buf)))
@@ -1125,104 +1126,114 @@ directory DIRNAME."
(defvar desktop-buffer-fail-count)
(defun desktop-create-buffer
- (desktop-file-version
- desktop-buffer-file-name
- desktop-buffer-name
- desktop-buffer-major-mode
- desktop-buffer-minor-modes
- desktop-buffer-point
- desktop-buffer-mark
- desktop-buffer-read-only
- desktop-buffer-misc
- &optional
- desktop-buffer-locals)
- ;; To make desktop files with relative file names possible, we cannot
- ;; allow `default-directory' to change. Therefore we save current buffer.
- (save-current-buffer
- ;; Give major mode module a chance to add a handler.
- (desktop-load-file desktop-buffer-major-mode)
- (let ((buffer-list (buffer-list))
- (result
- (condition-case-no-debug err
- (funcall (or (cdr (assq desktop-buffer-major-mode
- desktop-buffer-mode-handlers))
- 'desktop-restore-file-buffer)
- desktop-buffer-file-name
- desktop-buffer-name
- desktop-buffer-misc)
- (error
- (message "Desktop: Can't load buffer %s: %s"
- desktop-buffer-name
- (error-message-string err))
- (when desktop-missing-file-warning (sit-for 1))
- nil))))
- (if (bufferp result)
- (setq desktop-buffer-ok-count (1+ desktop-buffer-ok-count))
- (setq desktop-buffer-fail-count (1+ desktop-buffer-fail-count))
- (setq result nil))
- ;; Restore buffer list order with new buffer at end. Don't change
- ;; the order for old desktop files (old desktop module behaviour).
- (unless (< desktop-file-version 206)
- (mapc 'bury-buffer buffer-list)
- (when result (bury-buffer result)))
- (when result
- (unless (or desktop-first-buffer (< desktop-file-version 206))
- (setq desktop-first-buffer result))
- (set-buffer result)
- (unless (equal (buffer-name) desktop-buffer-name)
- (rename-buffer desktop-buffer-name t))
- ;; minor modes
- (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible
- (auto-fill-mode 1))
- ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible
- (auto-fill-mode 0))
- (t
- (dolist (minor-mode desktop-buffer-minor-modes)
- ;; Give minor mode module a chance to add a handler.
- (desktop-load-file minor-mode)
- (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers))))
- (if handler
- (funcall handler desktop-buffer-locals)
- (when (functionp minor-mode)
- (funcall minor-mode 1)))))))
- ;; Even though point and mark are non-nil when written by
- ;; `desktop-save', they may be modified by handlers wanting to set
- ;; point or mark themselves.
- (when desktop-buffer-point
- (goto-char
- (condition-case err
- ;; Evaluate point. Thus point can be something like
- ;; '(search-forward ...
- (eval desktop-buffer-point)
- (error (message "%s" (error-message-string err)) 1))))
- (when desktop-buffer-mark
- (if (consp desktop-buffer-mark)
- (progn
- (set-mark (car desktop-buffer-mark))
- (setq mark-active (car (cdr desktop-buffer-mark))))
- (set-mark desktop-buffer-mark)))
- ;; Never override file system if the file really is read-only marked.
- (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only))
- (while desktop-buffer-locals
- (let ((this (car desktop-buffer-locals)))
- (if (consp this)
- ;; an entry of this form `(symbol . value)'
+ (file-version
+ buffer-filename
+ buffer-name
+ buffer-majormode
+ buffer-minormodes
+ buffer-point
+ buffer-mark
+ buffer-readonly
+ buffer-misc
+ &optional
+ buffer-locals)
+
+ (let ((desktop-file-version file-version)
+ (desktop-buffer-file-name buffer-filename)
+ (desktop-buffer-name buffer-name)
+ (desktop-buffer-major-mode buffer-majormode)
+ (desktop-buffer-minor-modes buffer-minormodes)
+ (desktop-buffer-point buffer-point)
+ (desktop-buffer-mark buffer-mark)
+ (desktop-buffer-read-only buffer-readonly)
+ (desktop-buffer-misc buffer-misc)
+ (desktop-buffer-locals buffer-locals))
+ ;; To make desktop files with relative file names possible, we cannot
+ ;; allow `default-directory' to change. Therefore we save current buffer.
+ (save-current-buffer
+ ;; Give major mode module a chance to add a handler.
+ (desktop-load-file desktop-buffer-major-mode)
+ (let ((buffer-list (buffer-list))
+ (result
+ (condition-case-no-debug err
+ (funcall (or (cdr (assq desktop-buffer-major-mode
+ desktop-buffer-mode-handlers))
+ 'desktop-restore-file-buffer)
+ desktop-buffer-file-name
+ desktop-buffer-name
+ desktop-buffer-misc)
+ (error
+ (message "Desktop: Can't load buffer %s: %s"
+ desktop-buffer-name
+ (error-message-string err))
+ (when desktop-missing-file-warning (sit-for 1))
+ nil))))
+ (if (bufferp result)
+ (setq desktop-buffer-ok-count (1+ desktop-buffer-ok-count))
+ (setq desktop-buffer-fail-count (1+ desktop-buffer-fail-count))
+ (setq result nil))
+ ;; Restore buffer list order with new buffer at end. Don't change
+ ;; the order for old desktop files (old desktop module behaviour).
+ (unless (< desktop-file-version 206)
+ (mapc 'bury-buffer buffer-list)
+ (when result (bury-buffer result)))
+ (when result
+ (unless (or desktop-first-buffer (< desktop-file-version 206))
+ (setq desktop-first-buffer result))
+ (set-buffer result)
+ (unless (equal (buffer-name) desktop-buffer-name)
+ (rename-buffer desktop-buffer-name t))
+ ;; minor modes
+ (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible
+ (auto-fill-mode 1))
+ ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible
+ (auto-fill-mode 0))
+ (t
+ (dolist (minor-mode desktop-buffer-minor-modes)
+ ;; Give minor mode module a chance to add a handler.
+ (desktop-load-file minor-mode)
+ (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers))))
+ (if handler
+ (funcall handler desktop-buffer-locals)
+ (when (functionp minor-mode)
+ (funcall minor-mode 1)))))))
+ ;; Even though point and mark are non-nil when written by
+ ;; `desktop-save', they may be modified by handlers wanting to set
+ ;; point or mark themselves.
+ (when desktop-buffer-point
+ (goto-char
+ (condition-case err
+ ;; Evaluate point. Thus point can be something like
+ ;; '(search-forward ...
+ (eval desktop-buffer-point)
+ (error (message "%s" (error-message-string err)) 1))))
+ (when desktop-buffer-mark
+ (if (consp desktop-buffer-mark)
(progn
- (make-local-variable (car this))
- (set (car this) (cdr this)))
- ;; an entry of the form `symbol'
- (make-local-variable this)
- (makunbound this)))
- (setq desktop-buffer-locals (cdr desktop-buffer-locals)))))))
+ (set-mark (car desktop-buffer-mark))
+ (setq mark-active (car (cdr desktop-buffer-mark))))
+ (set-mark desktop-buffer-mark)))
+ ;; Never override file system if the file really is read-only marked.
+ (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only))
+ (while desktop-buffer-locals
+ (let ((this (car desktop-buffer-locals)))
+ (if (consp this)
+ ;; an entry of this form `(symbol . value)'
+ (progn
+ (make-local-variable (car this))
+ (set (car this) (cdr this)))
+ ;; an entry of the form `symbol'
+ (make-local-variable this)
+ (makunbound this)))
+ (setq desktop-buffer-locals (cdr desktop-buffer-locals))))))))
;; ----------------------------------------------------------------------------
;; Backward compatibility -- update parameters to 205 standards.
-(defun desktop-buffer (desktop-buffer-file-name desktop-buffer-name
- desktop-buffer-major-mode
- mim pt mk ro tl fc cfs cr desktop-buffer-misc)
- (desktop-create-buffer 205 desktop-buffer-file-name desktop-buffer-name
- desktop-buffer-major-mode (cdr mim) pt mk ro
- desktop-buffer-misc
+(defun desktop-buffer (buffer-filename buffer-name buffer-majormode
+ mim pt mk ro tl fc cfs cr buffer-misc)
+ (desktop-create-buffer 205 buffer-filename buffer-name
+ buffer-majormode (cdr mim) pt mk ro
+ buffer-misc
(list (cons 'truncate-lines tl)
(cons 'fill-column fc)
(cons 'case-fold-search cfs)
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 71773b1abf8..02eeef064fe 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -243,6 +243,9 @@ Local to those buffers, as a function called that created it.")
"Return non-nil if FRAME is currently available."
(and frame (frame-live-p frame) (frame-visible-p frame)))
+(defvar x-sensitive-text-pointer-shape)
+(defvar x-pointer-shape)
+
(defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name
local-mode-fn
&optional
@@ -503,7 +506,7 @@ a cons cell indicating a position of the form (LEFT . TOP)."
(list (cons 'left newleft)
(cons 'top newtop))))))
-(defun dframe-reposition-frame-xemacs (new-frame parent-frame location)
+(defun dframe-reposition-frame-xemacs (_new-frame _parent-frame _location)
"Move NEW-FRAME to be relative to PARENT-FRAME.
LOCATION can be one of 'random, 'left-right, or 'top-bottom."
;; Not yet implemented
@@ -713,13 +716,12 @@ Argument PROMPT is the prompt to use."
(defvar dframe-client-functions nil
"List of client functions using the dframe timer.")
-(defun dframe-set-timer (timeout fn &optional null-on-error)
+(defun dframe-set-timer (timeout fn &optional _null-on-error)
"Apply a timer with TIMEOUT, to call FN, or remove a timer if TIMEOUT is nil.
TIMEOUT is the number of seconds until the dframe controled program
timer is called again. When TIMEOUT is nil, turn off all timeouts.
This function must be called from the buffer belonging to the program
-who requested the timer.
-If NULL-ON-ERROR is a symbol, set it to nil if we cannot create a timer."
+who requested the timer. NULL-ON-ERROR is ignored."
;; First, fix up our list of client functions
(if timeout
(add-to-list 'dframe-client-functions fn)
@@ -732,9 +734,9 @@ If NULL-ON-ERROR is a symbol, set it to nil if we cannot create a timer."
;; functions are left, shut er down.
(and dframe-timer (not timeout) dframe-client-functions))
;; Only call the low level function if we are changing the state.
- (dframe-set-timer-internal timeout null-on-error)))
+ (dframe-set-timer-internal timeout)))
-(defun dframe-set-timer-internal (timeout &optional null-on-error)
+(defun dframe-set-timer-internal (timeout &optional _null-on-error)
"Apply a timer with TIMEOUT to call the dframe timer manager."
(when dframe-timer
(if (featurep 'xemacs)
@@ -838,7 +840,7 @@ Must be bound to event E."
(if dframe-track-mouse-function
(funcall dframe-track-mouse-function event)))
-(defun dframe-help-echo (window &optional buffer position)
+(defun dframe-help-echo (_window &optional buffer position)
"Display help based context.
The context is in WINDOW, viewing BUFFER, at POSITION.
BUFFER and POSITION are optional because XEmacs doesn't use them."
@@ -933,7 +935,7 @@ redirected into a window on the attached frame."
(mapcar (function (lambda (hook) (funcall hook buffer)))
temp-buffer-show-hook))))
-(defun dframe-hack-buffer-menu (e)
+(defun dframe-hack-buffer-menu (_e)
"Control mouse 1 is buffer menu.
This hack overrides it so that the right thing happens in the main
Emacs frame, not in the dedicated frame.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 6ff7ff7d77d..059a635cded 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -459,6 +459,8 @@ with a prefix argument."
(funcall fun file))))
(forward-line 1)))))
+(defvar backup-extract-version-start) ; used in backup-extract-version
+
(defun dired-collect-file-versions (fn)
(let ((fn (file-name-sans-versions fn)))
;; Only do work if this file is not already in the alist.
@@ -628,7 +630,7 @@ can be produced by `dired-get-marked-files', for example."
(defvar dired-mark-separator " "
"Separates marked files in dired shell commands.")
-(defun dired-shell-stuff-it (command file-list on-each &optional raw-arg)
+(defun dired-shell-stuff-it (command file-list on-each &optional _raw-arg)
;; "Make up a shell command line from COMMAND and FILE-LIST.
;; If ON-EACH is t, COMMAND should be applied to each file, else
;; simply concat all files and apply COMMAND to this.
@@ -1078,7 +1080,6 @@ files matching `dired-omit-regexp'."
;; Entry is always for files, even if they happen to also be directories
(let* ((opoint (point))
(cur-dir (dired-current-directory))
- (orig-file-name filename)
(directory (if relative cur-dir (file-name-directory filename)))
reason)
(setq filename
@@ -1251,21 +1252,20 @@ Special value `always' suppresses confirmation."
(defun dired-copy-file-recursive (from to ok-flag &optional
preserve-time top recursive)
- (let ((attrs (file-attributes from))
- dirfailed)
+ (let ((attrs (file-attributes from)))
(if (and recursive
(eq t (car attrs))
(or (eq recursive 'always)
(yes-or-no-p (format "Recursive copies of %s? " from))))
;; This is a directory.
- (copy-directory from to dired-copy-preserve-time)
+ (copy-directory from to preserve-time)
;; Not a directory.
(or top (dired-handle-overwrite to))
(condition-case err
(if (stringp (car attrs))
;; It is a symlink
(make-symbolic-link (car attrs) to ok-flag)
- (copy-file from to ok-flag dired-copy-preserve-time))
+ (copy-file from to ok-flag preserve-time))
(file-date-error
(push (dired-make-relative from)
dired-create-files-failures)
@@ -1360,6 +1360,10 @@ Special value `always' suppresses confirmation."
(setcar elt cur-dir)
(when cons (setcar cons cur-dir))))))
+;; Bound in dired-create-files
+(defvar overwrite-query)
+(defvar overwrite-backup-query)
+
;; The basic function for half a dozen variations on cp/mv/ln/ln -s.
(defun dired-create-files (file-creator operation fn-list name-constructor
&optional marker-char)
@@ -1546,7 +1550,7 @@ Optional arg HOW-TO determiness how to treat the target.
(function
(lambda (from)
(expand-file-name (file-name-nondirectory from) target)))
- (function (lambda (from) target)))
+ (function (lambda (_from) target)))
marker-char))))
;; Read arguments for a marked-files command that wants a file name,
@@ -1740,6 +1744,8 @@ of `dired-dwim-target', which see."
;;; 5K
;;;###begin dired-re.el
+(defvar rename-regexp-query)
+
(defun dired-do-create-files-regexp
(file-creator operation arg regexp newname &optional whole-name marker-char)
;; Create a new file for each marked file using regexps.
@@ -1751,7 +1757,6 @@ of `dired-dwim-target', which see."
;; instead of only the non-directory part of the file.
;; Optional arg MARKER-CHAR as in dired-create-files.
(let* ((fn-list (dired-get-marked-files nil arg))
- (fn-count (length fn-list))
(operation-prompt (concat operation " `%s' to `%s'?"))
(rename-regexp-help-form (format "\
Type SPC or `y' to %s one match, DEL or `n' to skip to next,
@@ -1860,6 +1865,8 @@ See function `dired-do-rename-regexp' for more info."
(function make-symbolic-link)
"SymLink" arg regexp newname whole-name dired-keep-marker-symlink))
+(defvar rename-non-directory-query)
+
(defun dired-create-files-non-directory
(file-creator basename-constructor operation arg)
;; Perform FILE-CREATOR on the non-directory part of marked files
@@ -2056,8 +2063,7 @@ of marked files. If KILL-ROOT is non-nil, kill DIRNAME as well."
(while alist
(setq elt (car alist)
alist (cdr alist)
- dir (car elt)
- pos (dired-get-subdir-min elt))
+ dir (car elt))
(if (dired-tree-lessp dir new-dir)
;; Insert NEW-DIR after DIR
(setq new-pos (dired-get-subdir-max elt)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index a5063bb77dd..548728cf28d 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -126,6 +126,12 @@ files not writable by you are visited read-only."
(other :tag "non-writable only" if-file-read-only))
:group 'dired-x)
+(defcustom dired-omit-size-limit 30000
+ "Maximum size for the \"omitting\" feature.
+If nil, there is no maximum size."
+ :type '(choice (const :tag "no maximum" nil) integer)
+ :group 'dired-x)
+
(define-minor-mode dired-omit-mode
"Toggle Dired-Omit mode.
With numeric ARG, enable Dired-Omit mode if ARG is positive, disable
@@ -179,12 +185,6 @@ toggle between those two."
:type 'boolean
:group 'dired-x)
-(defcustom dired-omit-size-limit 30000
- "Maximum size for the \"omitting\" feature.
-If nil, there is no maximum size."
- :type '(choice (const :tag "no maximum" nil) integer)
- :group 'dired-x)
-
(defcustom dired-enable-local-variables t
"Control use of local-variables lists in Dired.
This temporarily overrides the value of `enable-local-variables' when
@@ -659,7 +659,7 @@ nil."
nil))))
-(defun dired-virtual-revert (&optional arg noconfirm)
+(defun dired-virtual-revert (&optional _arg _noconfirm)
(if (not
(y-or-n-p "Cannot revert a Virtual Dired buffer - switch to Real Dired mode? "))
(error "Cannot revert a Virtual Dired buffer")
@@ -1180,7 +1180,7 @@ results in
(setq count (1+ count)
start (1+ start)))
;; ... and prepend a "../" for each slash found:
- (dotimes (n count)
+ (dotimes (_n count)
(setq name1 (concat "../" name1)))))
(make-symbolic-link
(directory-file-name name1) ; must not link to foo/
@@ -1293,6 +1293,8 @@ NOSELECT the files are merely found but not selected."
(declare-function Man-getpage-in-background "man" (topic))
+(defvar manual-program) ; from man.el
+
(defun dired-man ()
"Run `man' on this file."
;; Used also to say: "Display old buffer if buffer name matches filename."
@@ -1382,6 +1384,23 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
;; Does anyone use this? - lrd 6/29/93.
;; Apparently people do use it. - lrd 12/22/97.
+
+(with-no-warnings
+ ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix".
+ ;; This is unbearably ugly, but not more than having global variables
+ ;; named size, time, name or s, however practical it can be while writing
+ ;; `dired-mark-sexp' predicates.
+ (defvar inode)
+ (defvar s)
+ (defvar mode)
+ (defvar nlink)
+ (defvar uid)
+ (defvar gid)
+ (defvar size)
+ (defvar time)
+ (defvar name)
+ (defvar sym))
+
(defun dired-mark-sexp (predicate &optional unflag-p)
"Mark files for which PREDICATE returns non-nil.
With a prefix arg, unflag those files instead.
@@ -1487,8 +1506,8 @@ If you change this variable without using \\[customize] after `dired-x.el'
is loaded then call \\[dired-x-bind-find-file]."
:type 'boolean
:initialize 'custom-initialize-default
- :set (lambda (sym val)
- (set sym val)
+ :set (lambda (symbol value)
+ (set symbol value)
(dired-x-bind-find-file))
:group 'dired-x)
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index b30b7ac146f..c3dfc747772 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -230,9 +230,9 @@ function `dirtrack-debug-mode' to turn on debugging output."
(let (prompt-path
(current-dir default-directory)
(dirtrack-regexp (nth 0 dirtrack-list))
- (match-num (nth 1 dirtrack-list))
+ (match-num (nth 1 dirtrack-list)))
;; Currently unimplemented, it seems. --Stef
- (multi-line (nth 2 dirtrack-list)))
+ ;; (multi-line (nth 2 dirtrack-list)))
(save-excursion
;; No match
(if (not (string-match dirtrack-regexp input))
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 19b95016174..2d0c6fc31cd 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -160,7 +160,7 @@ Return nil if URI is not a local file."
(setq f nil))
f))
-(defun dnd-open-local-file (uri action)
+(defun dnd-open-local-file (uri _action)
"Open a local file.
The file is opened in the current window, or a new window if
`dnd-open-file-other-window' is set. URI is the url for the file,
@@ -180,7 +180,7 @@ An alternative for systems that do not support unc file names is
'private)
(error "Can not read %s" uri))))
-(defun dnd-open-remote-url (uri action)
+(defun dnd-open-remote-url (uri _action)
"Open a remote file with `find-file' and `url-handler-mode'.
Turns `url-handler-mode' on if not on before. The file is opened in the
current window, or a new window if `dnd-open-file-other-window' is set.
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 5f13555e472..629360b1c18 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -159,7 +159,7 @@ sure to obey the 8.3 limitations."
(string (copy-sequence (file-name-nondirectory filename)))
(strlen (length string))
(lastchar (aref string (1- strlen)))
- i firstdot)
+ firstdot)
(setq firstdot (string-match "\\." string))
(cond
(firstdot
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 20b04e0db34..36832df3c67 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -290,7 +290,7 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
(defun direct-print-region-helper (printer
start end
lpr-prog
- delete-text buf display
+ _delete-text _buf _display
rest)
(let* (;; Ignore case when matching known external program names.
(case-fold-search t)
@@ -381,9 +381,9 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
(declare-function default-printer-name "w32fns.c")
(defun direct-print-region-function (start end
- &optional lpr-prog
- delete-text buf display
- &rest rest)
+ &optional lpr-prog
+ delete-text buf display
+ &rest rest)
"DOS/Windows-specific function to print the region on a printer.
Writes the region to the device or file which is a value of
`printer-name' \(which see\), unless the value of `lpr-command'
@@ -399,7 +399,7 @@ indicates a specific program should be invoked."
;; paper if the file ends with a form-feed already.
(write-region-annotate-functions
(cons
- (lambda (start end)
+ (lambda (_start end)
(if (not (char-equal (char-before end) ?\C-l))
`((,end . "\f"))))
write-region-annotate-functions))
diff --git a/lisp/echistory.el b/lisp/echistory.el
index 1d2c5d8a388..d5ee3003d68 100644
--- a/lisp/echistory.el
+++ b/lisp/echistory.el
@@ -27,6 +27,9 @@
(require 'electric) ; command loop
(require 'chistory) ; history lister
+;; Dynamically bound in electric-command-history
+(defvar electric-history-in-progress)
+
;;;###autoload
(defun Electric-command-history-redo-expression (&optional noconfirm)
"Edit current history line in minibuffer and execute result.
@@ -85,6 +88,8 @@ With prefix arg NOCONFIRM, execute current line as-is without editing."
(defvar electric-command-history-hook nil
"If non-nil, its value is called by `electric-command-history'.")
+(defvar Helper-return-blurb) ; from helper.el
+
(defun electric-command-history ()
"\\<electric-history-map>Major mode for examining and redoing commands from `command-history'.
This pops up a window with the Command History listing.
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index ac0a7f47e55..f6c39062d1c 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -225,7 +225,7 @@ or nil, use a compact 80-column format."
"This command is valid only in buffers created by `edit-kbd-macro'"))
(run-hooks 'edmacro-finish-hook)
(let ((cmd nil) (keys nil) (no-keys nil)
- (mac-counter nil) (mac-format nil) (kmacro nil)
+ (mac-counter nil) (mac-format nil)
(top (point-min)))
(goto-char top)
(let ((case-fold-search nil))
@@ -240,7 +240,7 @@ or nil, use a compact 80-column format."
(setq cmd (and (not (equal str "none"))
(intern str)))
(and (fboundp cmd) (not (arrayp (symbol-function cmd)))
- (not (setq kmacro (get cmd 'kmacro)))
+ (not (get cmd 'kmacro))
(not (y-or-n-p
(format "Command %s is already defined; %s"
cmd "proceed? ")))
diff --git a/lisp/electric.el b/lisp/electric.el
index 7682c566332..17c33c7d5cd 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -63,11 +63,12 @@
;; conditions for any error that occurred or nil if none.
(defun Electric-command-loop (return-tag
- &optional prompt inhibit-quit
+ &optional prompt inhibit-quitting
loop-function loop-state)
(let (cmd
(err nil)
+ (inhibit-quit inhibit-quitting)
(prompt-string prompt))
(while t
(if (functionp prompt)
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 6033648298d..1553aeae0d5 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -76,7 +76,7 @@ If the buffer is locked, signal error and display its name."
(set-process-sentinel
(get-buffer-process (buffer-name)) (function emacs-lock-clear-sentinel)))
-(defun emacs-lock-clear-sentinel (proc str)
+(defun emacs-lock-clear-sentinel (_proc _str)
(if emacs-lock-from-exiting
(progn
(setq emacs-lock-from-exiting nil)
diff --git a/lisp/expand.el b/lisp/expand.el
index ae68c00c894..544d0b1cb17 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -469,7 +469,6 @@ This is used only in conjunction with `expand-add-abbrevs'."
(beginning-of-defun)
(point))
(point-min)))
- (here (point))
(state (parse-partial-sexp lim (point))))
(cond
((nth 3 state) 'string)
diff --git a/lisp/ezimage.el b/lisp/ezimage.el
index c0ba2474940..b828f79f8fa 100644
--- a/lisp/ezimage.el
+++ b/lisp/ezimage.el
@@ -71,7 +71,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
;; XEmacs.
(if (not (fboundp 'make-glyph))
- (defmacro defezimage (variable imagespec docstring)
+ (defmacro defezimage (variable _imagespec docstring)
"Don't bother loading up an image...
Argument VARIABLE is the variable to define.
Argument IMAGESPEC is the list defining the image to create.
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index fffe09a84a5..1b42aa9ea73 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -825,19 +825,13 @@ MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'.
Return the event type (a symbol) of the added menu entry.
This is called whenever you use a new color."
- (let (symbol docstring)
+ (let (symbol)
(unless (color-defined-p color)
(error "Color `%s' undefined" color))
(cond ((eq menu 'facemenu-foreground-menu)
- (setq docstring
- (format "Select foreground color %s for subsequent insertion."
- color)
- symbol (intern (concat "fg:" color))))
+ (setq symbol (intern (concat "fg:" color))))
((eq menu 'facemenu-background-menu)
- (setq docstring
- (format "Select background color %s for subsequent insertion."
- color)
- symbol (intern (concat "bg:" color))))
+ (setq symbol (intern (concat "bg:" color))))
(t (error "MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'")))
(unless (facemenu-iterate ; Check if color is already in the menu.
(lambda (m) (and (listp m)
diff --git a/lisp/faces.el b/lisp/faces.el
index b49cdc777be..e7cfa200602 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -207,7 +207,7 @@ Value is FACE."
;; of realized faces. The ID assigned to Lisp faces is used to
;; support faces in display table entries.
-(defun face-id (face &optional frame)
+(defun face-id (face &optional _frame)
"Return the internal ID of face with name FACE.
If FACE is a face-alias, return the ID of the target face.
The optional argument FRAME is ignored, since the internal face ID
@@ -724,7 +724,7 @@ like an underlying face would be, with higher priority than underlying faces."
where))
(setq args (cddr args)))))
-(defun make-face-bold (face &optional frame noerror)
+(defun make-face-bold (face &optional frame _noerror)
"Make the font of FACE be bold, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
@@ -733,7 +733,7 @@ Use `set-face-attribute' for finer control of the font weight."
(set-face-attribute face frame :weight 'bold))
-(defun make-face-unbold (face &optional frame noerror)
+(defun make-face-unbold (face &optional frame _noerror)
"Make the font of FACE be non-bold, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility."
@@ -741,7 +741,7 @@ Argument NOERROR is ignored and retained for compatibility."
(set-face-attribute face frame :weight 'normal))
-(defun make-face-italic (face &optional frame noerror)
+(defun make-face-italic (face &optional frame _noerror)
"Make the font of FACE be italic, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
@@ -750,7 +750,7 @@ Use `set-face-attribute' for finer control of the font slant."
(set-face-attribute face frame :slant 'italic))
-(defun make-face-unitalic (face &optional frame noerror)
+(defun make-face-unitalic (face &optional frame _noerror)
"Make the font of FACE be non-italic, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility."
@@ -758,7 +758,7 @@ Argument NOERROR is ignored and retained for compatibility."
(set-face-attribute face frame :slant 'normal))
-(defun make-face-bold-italic (face &optional frame noerror)
+(defun make-face-bold-italic (face &optional frame _noerror)
"Make the font of FACE be bold and italic, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
@@ -1413,11 +1413,12 @@ If FRAME is omitted or nil, use the selected frame."
;; Parameter FRAME Is kept for call compatibility to with previous
;; face implementation.
-(defun face-attr-construct (face &optional frame)
- "Return a `defface'-style attribute list for FACE on FRAME.
+(defun face-attr-construct (face &optional _frame)
+ "Return a `defface'-style attribute list for FACE.
Value is a property list of pairs ATTRIBUTE VALUE for all specified
face attributes of FACE where ATTRIBUTE is the attribute name and
-VALUE is the specified value of that attribute."
+VALUE is the specified value of that attribute.
+Argument FRAME is ignored and retained for compatibility."
(let (result)
(dolist (entry face-attribute-name-alist result)
(let* ((attribute (car entry))
@@ -1750,8 +1751,7 @@ resulting color name in the echo area."
((eq flag 'lambda) ; Test completion.
(or (memq string colors)
(color-defined-p string)))))
- nil t))
- hex-string)
+ nil t)))
;; Process named colors.
(when (member color colors)
diff --git a/lisp/files-x.el b/lisp/files-x.el
index a9c32477155..a6320b32e50 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -299,11 +299,11 @@ from the -*- line ignoring the input argument VALUE."
(or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
(throw 'exit (message "Malformed -*- line")))
(goto-char (match-end 0))
- (let ((key (intern (match-string 1)))
- (val (save-restriction
- (narrow-to-region (point) end)
- (let ((read-circle nil))
- (read (current-buffer))))))
+ (let ((key (intern (match-string 1))))
+ (save-restriction
+ (narrow-to-region (point) end)
+ (let ((read-circle nil))
+ (read (current-buffer))))
(skip-chars-forward " \t;")
(when (eq key variable)
(delete-region (match-beginning 0) (point))
@@ -344,6 +344,8 @@ then this function adds it."
(list (read-file-local-variable "Delete -*- file-local variable")))
(modify-file-local-variable-prop-line variable nil 'delete))
+(defvar auto-insert) ; from autoinsert.el
+
(defun modify-dir-local-variable (mode variable value op)
"Modify directory-local VARIABLE in .dir-locals.el depending on operation OP.
diff --git a/lisp/files.el b/lisp/files.el
index 5b29f3790e8..8cd5699eb9a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -635,22 +635,22 @@ the value of `default-directory'."
"Value of the CDPATH environment variable, as a list.
Not actually set up until the first time you use it.")
-(defun parse-colon-path (cd-path)
+(defun parse-colon-path (search-path)
"Explode a search path into a list of directory names.
Directories are separated by occurrences of `path-separator'
\(which is colon in GNU and GNU-like systems)."
;; We could use split-string here.
- (and cd-path
+ (and search-path
(let (cd-list (cd-start 0) cd-colon)
- (setq cd-path (concat cd-path path-separator))
- (while (setq cd-colon (string-match path-separator cd-path cd-start))
+ (setq search-path (concat search-path path-separator))
+ (while (setq cd-colon (string-match path-separator search-path cd-start))
(setq cd-list
(nconc cd-list
(list (if (= cd-start cd-colon)
nil
(substitute-in-file-name
(file-name-as-directory
- (substring cd-path cd-start cd-colon)))))))
+ (substring search-path cd-start cd-colon)))))))
(setq cd-start (+ cd-colon 1)))
cd-list)))
@@ -866,11 +866,10 @@ and return the directory. Return nil if not found."
;; `name' in /home or in /.
(setq file (abbreviate-file-name file))
(let ((root nil)
- (prev-file file)
;; `user' is not initialized outside the loop because
;; `file' may not exist, so we may have to walk up part of the
- ;; hierarchy before we find the "initial UID".
- (user nil)
+ ;; hierarchy before we find the "initial UID". Note: currently unused
+ ;; (user nil)
try)
(while (not (or root
(null file)
@@ -887,8 +886,7 @@ and return the directory. Return nil if not found."
(string-match locate-dominating-stop-dir-regexp file)))
(setq try (file-exists-p (expand-file-name name file)))
(cond (try (setq root file))
- ((equal file (setq prev-file file
- file (file-name-directory
+ ((equal file (setq file (file-name-directory
(directory-file-name file))))
(setq file nil))))
root))
@@ -958,10 +956,10 @@ reasonable to let-bind this variable to a value less then the
time period between two checks.
Example:
- \(defun display-time-file-nonempty-p \(file)
- \(let \(\(remote-file-name-inhibit-cache \(- display-time-interval 5)))
- \(and \(file-exists-p file)
- \(< 0 \(nth 7 \(file-attributes \(file-chase-links file)))))))"
+ (defun display-time-file-nonempty-p (file)
+ (let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
+ (and (file-exists-p file)
+ (< 0 (nth 7 (file-attributes (file-chase-links file)))))))"
:group 'files
:version "24.1"
:type `(choice
@@ -1368,7 +1366,7 @@ its documentation for additional customization information."
(interactive "BDisplay buffer in other frame: ")
(let ((pop-up-frames t)
same-window-buffer-names same-window-regexps
- (old-window (selected-window))
+ ;;(old-window (selected-window))
new-window)
(setq new-window (display-buffer buffer t))
;; This may have been here in order to prevent the new frame from hiding
@@ -1575,6 +1573,8 @@ expand wildcards (if any) and replace the file with multiple files."
(other-window 1)
(find-alternate-file filename wildcards))))
+(defvar kill-buffer-hook) ; from buffer.c
+
(defun find-alternate-file (filename &optional wildcards)
"Find file FILENAME, select its buffer, kill previous buffer.
If the current buffer now contains an empty file that you just visited
@@ -2073,7 +2073,7 @@ This function ensures that none of these modifications will take place."
(inhibit-file-name-operation 'insert-file-contents))
(unwind-protect
(progn
- (fset 'find-buffer-file-type (lambda (filename) t))
+ (fset 'find-buffer-file-type (lambda (_filename) t))
(insert-file-contents filename visit beg end replace))
(if find-buffer-file-type-function
(fset 'find-buffer-file-type find-buffer-file-type-function)
@@ -2182,7 +2182,7 @@ unless NOMODES is non-nil."
(message "%s" msg)
(or not-serious (sit-for 1 t))))
(when (and auto-save-default (not noauto))
- (auto-save-mode t)))
+ (auto-save-mode 1)))
;; Make people do a little extra work (C-x C-q)
;; before altering a backup file.
(when (backup-file-name-p buffer-file-name)
@@ -2691,7 +2691,7 @@ we don't actually set it to the same mode the buffer already has."
(min (point-max)
(+ (point-min) magic-mode-regexp-match-limit)))
(assoc-default nil magic-mode-alist
- (lambda (re dummy)
+ (lambda (re _dummy)
(if (functionp re)
(funcall re)
(looking-at re)))))))
@@ -2744,7 +2744,7 @@ we don't actually set it to the same mode the buffer already has."
(min (point-max)
(+ (point-min) magic-mode-regexp-match-limit)))
(assoc-default nil magic-fallback-mode-alist
- (lambda (re dummy)
+ (lambda (re _dummy)
(if (functionp re)
(funcall re)
(looking-at re)))))))
@@ -3269,7 +3269,7 @@ It is safe if any of these conditions are met:
;; can't assure us that the value is safe.
(with-demoted-errors (funcall safep val))))))
-(defun risky-local-variable-p (sym &optional ignored)
+(defun risky-local-variable-p (sym &optional _ignored)
"Non-nil if SYM could be dangerous as a file-local variable.
It is dangerous if either of these conditions are met:
@@ -5059,7 +5059,7 @@ sake of backward compatibility. IGNORE-AUTO is optional, defaulting
to nil.
Optional second argument NOCONFIRM means don't ask for confirmation
-at all. \(The variable `revert-without-query' offers another way to
+at all. (The variable `revert-without-query' offers another way to
revert buffers without querying for confirmation.)
Optional third argument PRESERVE-MODES non-nil means don't alter
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el
index cacfd57e9fb..b89762dc1a8 100644
--- a/lisp/find-lisp.el
+++ b/lisp/find-lisp.el
@@ -192,7 +192,6 @@ It is a function which takes two arguments, the directory and its parent."
directory-predicate buffer-name)
"Run find (Lisp version) and go into Dired mode on a buffer of the output."
(let ((dired-buffers dired-buffers)
- buf
(regexp find-lisp-regexp))
;; Expand DIR ("" means default-directory), and make sure it has a
;; trailing slash.
@@ -203,7 +202,7 @@ It is a function which takes two arguments, the directory and its parent."
(or
(and (buffer-name)
(string= buffer-name (buffer-name)))
- (switch-to-buffer (setq buf (get-buffer-create buffer-name))))
+ (switch-to-buffer (get-buffer-create buffer-name)))
(widen)
(kill-all-local-variables)
(setq buffer-read-only nil)
@@ -223,7 +222,7 @@ It is a function which takes two arguments, the directory and its parent."
(make-local-variable 'revert-buffer-function)
(setq revert-buffer-function
(function
- (lambda(ignore1 ignore2)
+ (lambda (_ignore1 _ignore2)
(find-lisp-insert-directory
default-directory
find-lisp-file-predicate
@@ -246,10 +245,10 @@ It is a function which takes two arguments, the directory and its parent."
(goto-char (point-min))
(dired-goto-next-file)))
-(defun find-lisp-insert-directory (dir
- file-predicate
- directory-predicate
- sort-function)
+(defun find-lisp-insert-directory (dir
+ file-predicate
+ directory-predicate
+ _sort-function)
"Insert the results of `find-lisp-find-files' in the current buffer."
(let ((buffer-read-only nil)
(files (find-lisp-find-files-internal
@@ -269,7 +268,7 @@ It is a function which takes two arguments, the directory and its parent."
;; Run the find function
(mapc
(function
- (lambda(file)
+ (lambda (file)
(find-lisp-find-dired-insert-file
(substring file len)
(current-buffer))))
diff --git a/lisp/follow.el b/lisp/follow.el
index c76085f6dcb..9bf472e547c 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1260,7 +1260,7 @@ should be a member of WINDOWS, starts at position START."
;; especially if it is placed in the debug filter section. I must
;; investigate this further...
-(defun follow-avoid-tail-recenter (&rest rest)
+(defun follow-avoid-tail-recenter (&rest _rest)
"Make sure windows displaying the end of a buffer aren't recentered.
This is done by reading and rewriting the start position of
diff --git a/lisp/format.el b/lisp/format.el
index c5b48173e35..61c68870e08 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -90,7 +90,7 @@
,(purecopy "diac") iso-iso2duden t nil)
(de646 ,(purecopy "German ASCII (ISO 646)")
nil
- ,(purecopy "recode -f iso646-ge:latin1")
+ ,(purecopy "recode -f iso646-ge:latin1")
,(purecopy "recode -f latin1:iso646-ge") t nil)
(denet ,(purecopy "net German")
nil
@@ -167,10 +167,10 @@ BUFFER should be the buffer that the output originally came from."
(error "Format encoding failed")))
(funcall method from to buffer)))
-(defun format-decode-run-method (method from to &optional buffer)
+(defun format-decode-run-method (method from to &optional _buffer)
"Decode using METHOD the text from FROM to TO.
If METHOD is a string, it is a shell command (including options); otherwise,
-it should be a Lisp function. Decoding is done for the given BUFFER."
+it should be a Lisp function. BUFFER is currently ignored."
(if (stringp method)
(let ((error-buff (get-buffer-create "*Format Errors*"))
(coding-system-for-write 'no-conversion)
@@ -356,13 +356,11 @@ one of the formats defined in `format-alist', or a list of such symbols."
(if (symbolp format) (setq format (list format)))
(save-excursion
(goto-char end)
- (let ((cur-buf (current-buffer))
- (end (point-marker)))
+ (let ((end (point-marker)))
(while format
(let* ((info (assq (car format) format-alist))
(to-fn (nth 4 info))
- (modify (nth 5 info))
- result)
+ (modify (nth 5 info)))
(if to-fn
(if modify
(setq end (format-encode-run-method to-fn beg end
@@ -539,22 +537,6 @@ Compare using `equal'."
(setq tail next)))
(cons acopy bcopy)))
-(defun format-common-tail (a b)
- "Given two lists that have a common tail, return it.
-Compare with `equal', and return the part of A that is equal to the
-equivalent part of B. If even the last items of the two are not equal,
-return nil."
- (let ((la (length a))
- (lb (length b)))
- ;; Make sure they are the same length
- (if (> la lb)
- (setq a (nthcdr (- la lb) a))
- (setq b (nthcdr (- lb la) b))))
- (while (not (equal a b))
- (setq a (cdr a)
- b (cdr b)))
- a)
-
(defun format-proper-list-p (list)
"Return t if LIST is a proper list.
A proper list is a list ending with a nil cdr, not with an atom "
@@ -641,7 +623,7 @@ to write these unknown annotations back into the file."
(save-restriction
(narrow-to-region (point-min) to)
(goto-char from)
- (let (next open-ans todo loc unknown-ans)
+ (let (next open-ans todo unknown-ans)
(while (setq next (funcall next-fn))
(let* ((loc (nth 0 next))
(end (nth 1 next))
@@ -932,12 +914,11 @@ The same TRANSLATIONS structure can be used in reverse for reading files."
all-ans))
(setq neg-ans (cdr neg-ans)))
;; Now deal with positive (opening) annotations
- (let ((p pos-ans))
- (while pos-ans
- (push (car pos-ans) open-ans)
- (push (cons loc (funcall format-fn (car pos-ans) t))
- all-ans)
- (setq pos-ans (cdr pos-ans))))))
+ (while pos-ans
+ (push (car pos-ans) open-ans)
+ (push (cons loc (funcall format-fn (car pos-ans) t))
+ all-ans)
+ (setq pos-ans (cdr pos-ans)))))
;; Close any annotations still open
(while open-ans
@@ -1016,8 +997,7 @@ They can be whatever the FORMAT-FN in `format-annotate-region'
can handle. If that is `enriched-make-annotation', they can be
either strings, or lists of the form (PARAMETER VALUE)."
- (let ((prop-alist (cdr (assoc prop translations)))
- default)
+ (let ((prop-alist (cdr (assoc prop translations))))
(if (not prop-alist)
nil
;; If either old or new is a list, have to treat both that way.
@@ -1028,7 +1008,6 @@ either strings, or lists of the form (PARAMETER VALUE)."
(format-annotate-atomic-property-change prop-alist old new)
(let* ((old (if (listp old) old (list old)))
(new (if (listp new) new (list new)))
- (tail (format-common-tail old new))
close open)
(while old
(setq close
diff --git a/lisp/forms.el b/lisp/forms.el
index 9ae824131ec..ef6d9b023b4 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -845,7 +845,7 @@ Commands: Equivalent keys in read-only mode:
(defvar forms--iif-properties nil
"Original properties of the character being overridden.")
-(defun forms--iif-hook (begin end)
+(defun forms--iif-hook (_begin _end)
"`insert-in-front-hooks' function for read-only segments."
;; Note start location. By making it a marker that points one
@@ -1197,6 +1197,8 @@ Commands: Equivalent keys in read-only mode:
(setq forms--field nil)))
))
+(defvar read-file-filter) ; bound in forms--intuit-from-file
+
(defun forms--intuit-from-file ()
"Get number of fields and a default form using the data file."
@@ -1919,7 +1921,7 @@ after writing out the data."
(forms-jump-record cur))
t)
-(defun forms--revert-buffer (&optional arg noconfirm)
+(defun forms--revert-buffer (&optional _arg noconfirm)
"Reverts current form to un-modified."
(interactive "P")
(if (or noconfirm
diff --git a/lisp/frame.el b/lisp/frame.el
index 050bd49f458..a95e91c8eeb 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -31,7 +31,7 @@
(list (cons nil
(if (fboundp 'tty-create-frame-with-faces)
'tty-create-frame-with-faces
- (lambda (parameters)
+ (lambda (_parameters)
(error "Can't create multiple frames without a window system")))))
"Alist of window-system dependent functions to call to create a new frame.
The window system startup file should add its frame creation
@@ -1430,7 +1430,7 @@ Examples (measures in pixels) -
In the 3rd, 4th, and 6th examples, the returned value is relative to
the opposite frame edge from the edge indicated in the input spec."
- (cons (car spec) (frame-geom-value-cons (car spec) (cdr spec))))
+ (cons (car spec) (frame-geom-value-cons (car spec) (cdr spec) frame)))
(defun delete-other-frames (&optional frame)
diff --git a/lisp/fringe.el b/lisp/fringe.el
index 7d009b03e76..ce24bb60100 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -96,7 +96,7 @@
"Non-nil means `set-fringe-mode' should really do something.
This is nil while loading `fringe.el', and t afterward.")
-(defun set-fringe-mode-1 (ignore value)
+(defun set-fringe-mode-1 (_ignore value)
"Call `set-fringe-mode' with VALUE.
See `fringe-mode' for valid values and their effect.
This is usually invoked when setting `fringe-mode' via customize."
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index 37819599f62..5205a6811f6 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -543,7 +543,7 @@ like an INI file. You can add this hook to `find-file-hook'."
(interactive)
(let ((compilation-buffer-name-function
(function
- (lambda(ign)
+ (lambda (_ign)
(concat "*" (buffer-file-name) "*")))))
(compile
(concat (w32-shell-name) " -c " (buffer-file-name)))))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 005358e3c7d..642dac71ba6 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -162,7 +162,7 @@ The format is (FUNCTION ARGS...).")
(define-button-type 'help-info-variable
:supertype 'help-xref
;; the name of the variable is put before the argument to Info
- 'help-function (lambda (a v) (info v))
+ 'help-function (lambda (_a v) (info v))
'help-echo (purecopy "mouse-2, RET: read this Info node"))
(define-button-type 'help-info
@@ -778,7 +778,7 @@ help buffer."
(help-xref-go-forward (current-buffer))
(error "No next help buffer")))
-(defun help-do-xref (pos function args)
+(defun help-do-xref (_pos function args)
"Call the help cross-reference function FUNCTION with args ARGS.
Things are set up properly so that the resulting help-buffer has
a proper [back] button."
@@ -819,7 +819,7 @@ Show all docs for that symbol as either a variable, function or face."
(fboundp sym) (facep sym))
(help-do-xref pos #'help-xref-interned (list sym)))))
-(defun help-mode-revert-buffer (ignore-auto noconfirm)
+(defun help-mode-revert-buffer (_ignore-auto noconfirm)
(when (or noconfirm (yes-or-no-p "Revert help buffer? "))
(let ((pos (point))
(item help-xref-stack-item)
diff --git a/lisp/help.el b/lisp/help.el
index b7f46a02155..3a943274a14 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -415,7 +415,7 @@ With argument, display info only for the selected version."
(beginning-of-line)
(point)))))))
-(defun view-emacs-todo (&optional arg)
+(defun view-emacs-todo (&optional _arg)
"Display the Emacs TODO list."
(interactive "P")
(view-help-file "TODO"))
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 859f1288c81..6591ef44ff0 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -385,7 +385,7 @@ This command does not itself set highlight-changes mode."
)
-(defun hilit-chg-cust-fix-changes-face-list (w wc &optional event)
+(defun hilit-chg-cust-fix-changes-face-list (w _wc &optional event)
;; When customization function `highlight-changes-face-list' inserts a new
;; face it uses the default face. We don't want the user to modify this
;; face, so we rename the faces in the list on an insert. The rename is
@@ -557,9 +557,9 @@ This allows you to manually remove highlighting from uninteresting changes."
;; otherwise an undone change shows up as changed. While the properties
;; are automatically restored by undo, we must fix up the overlay.
(save-match-data
- (let ((beg-decr 1) (end-incr 1)
- (type 'hilit-chg)
- old)
+ (let (;;(beg-decr 1)
+ (end-incr 1)
+ (type 'hilit-chg))
(if undo-in-progress
(if (and highlight-changes-mode
highlight-changes-visible-mode)
@@ -632,7 +632,7 @@ This removes all saved change information."
(highlight-save-buffer-state
(hilit-chg-hide-changes)
(hilit-chg-map-changes
- (lambda (prop start stop)
+ (lambda (_prop start stop)
(remove-text-properties start stop '(hilit-chg nil)))))
(setq highlight-changes-mode nil)
(force-mode-line-update)))
@@ -911,8 +911,7 @@ changes are made, so \\[highlight-changes-next-change] and
(file-a (buffer-file-name))
(existing-buf (get-file-buffer file-b))
(buf-b (or existing-buf
- (find-file-noselect file-b)))
- (buf-b-read-only (with-current-buffer buf-b buffer-read-only)))
+ (find-file-noselect file-b))))
(highlight-markup-buffers buf-a file-a buf-b file-b (not existing-buf))
(unless existing-buf
(kill-buffer buf-b))
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 1e2fd126cf0..c8e95581510 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -710,7 +710,7 @@ STYLE is the inline CSS stylesheet (or tag referring to an external sheet)."
<body onload=\"stripe('index'); return true;\">\n"
file style))
-(defun hfy-default-footer (file)
+(defun hfy-default-footer (_file)
"Default value for `hfy-page-footer'.
FILE is the name of the file being rendered, in case it is needed."
"\n </body>\n</html>\n")
@@ -825,7 +825,7 @@ regular specifiers."
((stringp box) (list (cons "border" (format "solid %s 1px" box))))
((listp box) (hfy-box-to-style box) ))) )
-(defun hfy-decor (tag val)
+(defun hfy-decor (tag _val)
"Derive CSS text-decoration specifiers from various Emacs font attributes.
TAG is an Emacs font attribute key (eg :underline).
VAL is ignored."
@@ -836,7 +836,7 @@ VAL is ignored."
(:overline (cons "text-decoration" "overline" ))
(:strike-through (cons "text-decoration" "line-through")))))
-(defun hfy-invisible (&optional val)
+(defun hfy-invisible (&optional _val)
"This text should be invisible.
Do something in CSS to make that happen.
VAL is ignored here."
@@ -1149,7 +1149,7 @@ See also `hfy-face-to-style'."
(setq p (next-char-property-change p)))
;; still invisible at buffer end?
(when i
- (setq invisible (cons (cons s (point-max)) invisible)))
+ (setq invisible (cons (cons s (point-max)) invisible)))
invisible)))
(defun hfy-invisible-name (point map)
@@ -1759,7 +1759,7 @@ hyperlinks as appropriate."
(if (not (hfy-opt 'skip-refontification))
(save-excursion ;; Keep region
(hfy-force-fontification)))
- (if (interactive-p) ;; display the buffer in interactive mode:
+ (if (called-interactively-p 'any) ;; display the buffer in interactive mode:
(switch-to-buffer (hfy-fontify-buffer srcdir file))
(hfy-fontify-buffer srcdir file)))
@@ -2061,7 +2061,7 @@ FILE is the specific file we are rendering."
(puthash tag-string hash-entry cache-hash)))) )))
;; cache a list of tags in descending length order:
- (maphash (lambda (K V) (push K tags-list)) cache-hash)
+ (maphash (lambda (K _V) (push K tags-list)) cache-hash)
(setq tags-list (sort tags-list (lambda (A B) (< (length B) (length A)))))
;; put the tag list into the cache:
@@ -2092,7 +2092,7 @@ DSTDIR is the output directory, where files will be written."
(setq cache-hash (cadr cache-entry))
(setq index-buf (get-buffer-create index-file))))
nil ;; noop
- (maphash (lambda (K V) (push K tag-list)) cache-hash)
+ (maphash (lambda (K _V) (push K tag-list)) cache-hash)
(setq tag-list (sort tag-list 'string<))
(set-buffer index-buf)
(erase-buffer)
@@ -2136,7 +2136,7 @@ SRCDIR and DSTDIR are the source and output directories respectively."
(cache-entry (assoc srcdir hfy-tags-cache)))
(if (and cache-entry (setq cache-hash (cadr cache-entry)))
(maphash
- (lambda (K V)
+ (lambda (K _V)
(let ((stub (upcase (substring K 0 1))))
(if (member stub stub-list)
nil ;; seen this already: NOOP
@@ -2169,7 +2169,7 @@ See also `hfy-prepare-index', `hfy-split-index'."
(if (and cache-entry (setq cache-hash (cadr cache-entry)))
(maphash
- (lambda (K V)
+ (lambda (K _V)
(let ((stub (upcase (substring K 0 1))))
(if (member stub stub-list)
nil ;; seen this already: NOOP
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index c77a479c0b1..f4b729458e6 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1219,12 +1219,10 @@ mean move backwards, non-negative integers mean move forwards."
(setq direction 1))
;; Skip the title
(ibuffer-forward-line 0)
- (let ((opos (point))
- curmark)
+ (let ((opos (point)))
(ibuffer-forward-line direction)
(while (not (or (= (point) opos)
- (eq (setq curmark (ibuffer-current-mark))
- mark)))
+ (eq (ibuffer-current-mark) mark)))
(ibuffer-forward-line direction))
(when (and (= (point) opos)
(not (eq (ibuffer-current-mark) mark)))
@@ -1247,7 +1245,7 @@ to move by. The default is `ibuffer-marked-char'."
(message "No buffers marked; use 'm' to mark a buffer")
(let ((count
(ibuffer-map-marked-lines
- #'(lambda (buf mark)
+ #'(lambda (_buf _mark)
'kill))))
(message "Killed %s lines" count))))
@@ -1279,7 +1277,7 @@ a prefix argument reverses the meaning of that variable."
(let (buf-point)
;; Blindly search for our buffer: it is very likely that it is
;; not in a hidden filter group.
- (ibuffer-map-lines #'(lambda (buf marks)
+ (ibuffer-map-lines #'(lambda (buf _marks)
(when (string= (buffer-name buf) name)
(setq buf-point (point))
nil))
@@ -1293,7 +1291,7 @@ a prefix argument reverses the meaning of that variable."
(dolist (group ibuffer-hidden-filter-groups)
(ibuffer-jump-to-filter-group group)
(ibuffer-toggle-filter-group)
- (ibuffer-map-lines #'(lambda (buf marks)
+ (ibuffer-map-lines #'(lambda (buf _marks)
(when (string= (buffer-name buf) name)
(setq buf-point (point))
nil))
@@ -1336,8 +1334,7 @@ a prefix argument reverses the meaning of that variable."
(format "Buffer %s" (buffer-name buffer)))))
,(shell-quote-argument (or oldtmp old))
,(shell-quote-argument (or newtmp new)))
- " "))
- proc)
+ " ")))
(let ((inhibit-read-only t))
(insert command "\n")
(diff-sentinel
@@ -1396,7 +1393,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
(t
'name))))
(ibuffer-map-marked-lines
- #'(lambda (buf mark)
+ #'(lambda (buf _mark)
(setq ibuffer-copy-filename-as-kill-result
(concat ibuffer-copy-filename-as-kill-result
(let ((name (buffer-file-name buf)))
@@ -1417,7 +1414,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
(defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group)
(let ((count
(ibuffer-map-lines
- #'(lambda (buf mark)
+ #'(lambda (buf _mark)
(when (funcall func buf)
(ibuffer-set-mark-1 (or ibuffer-mark-on-buffer-mark
ibuffer-marked-char))
@@ -1585,7 +1582,7 @@ defaults to one."
(let ((ibuffer-do-occur-bufs nil))
;; Accumulate a list of marked buffers
(ibuffer-map-marked-lines
- #'(lambda (buf mark)
+ #'(lambda (buf _mark)
(push buf ibuffer-do-occur-bufs)))
(occur-1 regexp nlines ibuffer-do-occur-bufs)))
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index f7ac24fa2e3..5fda52f3d12 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1137,15 +1137,15 @@ a new window in the current frame, splitting vertically."
(frame-height)))
(1+ (length marked-bufs)))))
(mapcar (if (eq type 'other-frame)
- #'(lambda (buf)
- (let ((curframe (selected-frame)))
- (select-frame (make-frame))
- (switch-to-buffer buf)
- (select-frame curframe)))
- #'(lambda (buf)
- (split-window nil height (eq type 'horizontally))
- (other-window 1)
- (switch-to-buffer buf)))
+ (lambda (buf)
+ (let ((curframe (selected-frame)))
+ (select-frame (make-frame))
+ (switch-to-buffer buf)
+ (select-frame curframe)))
+ (lambda (buf)
+ (split-window nil height (eq type 'horizontally))
+ (other-window 1)
+ (switch-to-buffer buf)))
marked-bufs)))))
(defun ibuffer-do-view-other-frame ()
@@ -1214,10 +1214,10 @@ a new window in the current frame, splitting vertically."
(defun ibuffer-buffer-names-with-mark (mark)
(let ((ibuffer-buffer-names-with-mark-result nil))
(ibuffer-map-lines-nomodify
- #'(lambda (buf mk)
- (when (char-equal mark mk)
- (push (buffer-name buf)
- ibuffer-buffer-names-with-mark-result))))
+ (lambda (buf mk)
+ (when (char-equal mark mk)
+ (push (buffer-name buf)
+ ibuffer-buffer-names-with-mark-result))))
ibuffer-buffer-names-with-mark-result))
(defsubst ibuffer-marked-buffer-names ()
@@ -1229,16 +1229,16 @@ a new window in the current frame, splitting vertically."
(defun ibuffer-count-marked-lines (&optional all)
(if all
(ibuffer-map-lines-nomodify
- #'(lambda (buf mark)
- (not (char-equal mark ?\s))))
+ (lambda (_buf mark)
+ (not (char-equal mark ?\s))))
(ibuffer-map-lines-nomodify
- #'(lambda (buf mark)
- (char-equal mark ibuffer-marked-char)))))
+ (lambda (_buf mark)
+ (char-equal mark ibuffer-marked-char)))))
(defsubst ibuffer-count-deletion-lines ()
(ibuffer-map-lines-nomodify
- #'(lambda (buf mark)
- (char-equal mark ibuffer-deletion-char))))
+ (lambda (_buf mark)
+ (char-equal mark ibuffer-deletion-char))))
(defsubst ibuffer-map-deletion-lines (func)
(ibuffer-map-on-mark ibuffer-deletion-char func))
@@ -1317,20 +1317,20 @@ With optional ARG, make read-only only if ARG is positive."
(cond
((char-equal mark ibuffer-marked-char)
(ibuffer-map-marked-lines
- #'(lambda (buf mark)
- (ibuffer-set-mark-1 ?\s)
- t)))
+ (lambda (_buf _mark)
+ (ibuffer-set-mark-1 ?\s)
+ t)))
((char-equal mark ibuffer-deletion-char)
(ibuffer-map-deletion-lines
- #'(lambda (buf mark)
- (ibuffer-set-mark-1 ?\s)
- t)))
+ (lambda (_buf _mark)
+ (ibuffer-set-mark-1 ?\s)
+ t)))
(t
(ibuffer-map-lines
- #'(lambda (buf mark)
- (when (not (char-equal mark ?\s))
- (ibuffer-set-mark-1 ?\s))
- t)))))
+ (lambda (_buf mark)
+ (when (not (char-equal mark ?\s))
+ (ibuffer-set-mark-1 ?\s))
+ t)))))
(ibuffer-redisplay t))
(defun ibuffer-toggle-marks (&optional group)
@@ -1344,15 +1344,15 @@ group."
(setq group it))
(let ((count
(ibuffer-map-lines
- #'(lambda (buf mark)
- (cond ((eq mark ibuffer-marked-char)
- (ibuffer-set-mark-1 ?\s)
- nil)
- ((eq mark ?\s)
- (ibuffer-set-mark-1 ibuffer-marked-char)
- t)
- (t
- nil)))
+ (lambda (_buf mark)
+ (cond ((eq mark ibuffer-marked-char)
+ (ibuffer-set-mark-1 ?\s)
+ nil)
+ ((eq mark ?\s)
+ (ibuffer-set-mark-1 ibuffer-marked-char)
+ t)
+ (t
+ nil)))
nil group)))
(message "%s buffers marked" count))
(ibuffer-redisplay t))
@@ -1663,11 +1663,11 @@ If point is on a group name, this function operates on that group."
(mapcar #'ibuffer-compile-format ibuffer-formats))
(when (boundp 'ibuffer-filter-format-alist)
(setq ibuffer-compiled-filter-formats
- (mapcar #'(lambda (entry)
- (cons (car entry)
- (mapcar #'(lambda (formats)
- (mapcar #'ibuffer-compile-format formats))
- (cdr entry))))
+ (mapcar (lambda (entry)
+ (cons (car entry)
+ (mapcar (lambda (formats)
+ (mapcar #'ibuffer-compile-format formats))
+ (cdr entry))))
ibuffer-filter-format-alist))))
(defun ibuffer-clear-summary-columns (format)
@@ -1864,10 +1864,10 @@ If point is on a group name, this function operates on that group."
(defun ibuffer-map-on-mark (mark func)
(ibuffer-map-lines
- #'(lambda (buf mk)
- (if (char-equal mark mk)
- (funcall func buf mark)
- nil))))
+ (lambda (buf mk)
+ (if (char-equal mark mk)
+ (funcall func buf mark)
+ nil))))
(defun ibuffer-map-lines (function &optional nomodify group)
"Call FUNCTION for each buffer.
@@ -1939,9 +1939,9 @@ the buffer object itself and the current mark symbol."
(defun ibuffer-get-marked-buffers ()
"Return a list of buffer objects currently marked."
(delq nil
- (mapcar #'(lambda (e)
- (when (eq (cdr e) ibuffer-marked-char)
- (car e)))
+ (mapcar (lambda (e)
+ (when (eq (cdr e) ibuffer-marked-char)
+ (car e)))
(ibuffer-current-state-list))))
(defun ibuffer-current-state-list (&optional pos)
@@ -1953,22 +1953,22 @@ the value of point at the beginning of the line for that buffer."
;; break later. Don't blame me.
(if pos
(ibuffer-map-lines-nomodify
- #'(lambda (buf mark)
- (when (buffer-live-p buf)
- (push (list buf mark (point)) ibuffer-current-state-list-tmp))))
- (ibuffer-map-lines-nomodify
- #'(lambda (buf mark)
+ (lambda (buf mark)
(when (buffer-live-p buf)
- (push (cons buf mark) ibuffer-current-state-list-tmp)))))
+ (push (list buf mark (point)) ibuffer-current-state-list-tmp))))
+ (ibuffer-map-lines-nomodify
+ (lambda (buf mark)
+ (when (buffer-live-p buf)
+ (push (cons buf mark) ibuffer-current-state-list-tmp)))))
(nreverse ibuffer-current-state-list-tmp)))
(defun ibuffer-current-buffers-with-marks (curbufs)
"Return a list like (BUF . MARK) of all open buffers."
(let ((bufs (ibuffer-current-state-list)))
- (mapcar #'(lambda (buf) (let ((e (assq buf bufs)))
- (if e
- e
- (cons buf ?\s))))
+ (mapcar (lambda (buf) (let ((e (assq buf bufs)))
+ (if e
+ e
+ (cons buf ?\s))))
curbufs)))
(defun ibuffer-buf-matches-predicates (buf predicates)
@@ -1986,17 +1986,17 @@ the value of point at the beginning of the line for that buffer."
(delq nil
(mapcar
;; element should be like (BUFFER . MARK)
- #'(lambda (e)
- (let* ((buf (car e)))
- (when
- ;; This takes precedence over anything else
- (or (and ibuffer-always-show-last-buffer
- (eq last buf))
- (funcall (if ext-loaded
- #'ibuffer-ext-visible-p
- #'ibuffer-visible-p)
- buf all ibuffer-buf))
- e)))
+ (lambda (e)
+ (let* ((buf (car e)))
+ (when
+ ;; This takes precedence over anything else
+ (or (and ibuffer-always-show-last-buffer
+ (eq last buf))
+ (funcall (if ext-loaded
+ #'ibuffer-ext-visible-p
+ #'ibuffer-visible-p)
+ buf all ibuffer-buf))
+ e)))
bmarklist))))
(defun ibuffer-visible-p (buf all &optional ibuffer-buf)
@@ -2084,11 +2084,11 @@ the value of point at the beginning of the line for that buffer."
(beginning-of-line)
(buffer-substring (point) (line-end-position)))))
(apply #'insert (mapcar
- #'(lambda (c)
- (if (not (or (char-equal c ?\s)
- (char-equal c ?\n)))
- ?-
- ?\s))
+ (lambda (c)
+ (if (not (or (char-equal c ?\s)
+ (char-equal c ?\n)))
+ ?-
+ ?\s))
str)))
(insert "\n"))
(point))
@@ -2244,7 +2244,7 @@ If optional arg SILENT is non-nil, do not display progress messages."
'ibuffer-filter-group
name)))
-(defun ibuffer-redisplay-engine (bmarklist &optional ignore)
+(defun ibuffer-redisplay-engine (bmarklist &optional _ignore)
(ibuffer-assert-ibuffer-mode)
(let* ((--ibuffer-insert-buffers-and-marks-format
(ibuffer-current-format))
@@ -2345,7 +2345,7 @@ FORMATS is the value to use for `ibuffer-formats'.
(setq ibuffer-prev-window-config (current-window-configuration))
(let ((buf (get-buffer-create (or name "*Ibuffer*"))))
(if other-window-p
- (funcall (if noselect #'(lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf)
+ (funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf)
(funcall (if noselect #'display-buffer #'switch-to-buffer) buf))
(with-current-buffer buf
(save-selected-window
@@ -2648,7 +2648,7 @@ will be inserted before the group at point."
;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
-;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "eb3de21aef70e4ca75f611f1c3c56aa1")
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "001cd83e8e1ff27c9a61097c840a984d")
;;; Generated autoloads from ibuf-ext.el
(autoload 'ibuffer-auto-mode "ibuf-ext" "\
@@ -2701,7 +2701,7 @@ Move point backwards by COUNT filtering groups.
(autoload 'ibuffer-do-print "ibuf-ext")
(autoload 'ibuffer-included-in-filters-p "ibuf-ext" "\
-Not documented
+
\(fn BUF FILTERS)" nil nil)
diff --git a/lisp/ido.el b/lisp/ido.el
index 9606879ce70..d1b5fd07938 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1,4 +1,4 @@
-;;; ido.el --- interactively do things with buffers and files.
+;;; ido.el --- interactively do things with buffers and files
;; Copyright (C) 1996-2011 Free Software Foundation, Inc.
@@ -350,7 +350,7 @@ should be enabled. The following values are possible:
Setting this variable directly does not take effect;
use either \\[customize] or the function `ido-mode'."
- :set #'(lambda (symbol value)
+ :set #'(lambda (_symbol value)
(ido-mode value))
:initialize 'custom-initialize-default
:require 'ido
@@ -1134,6 +1134,9 @@ Only used if `ido-use-virtual-buffers' is non-nil.")
;; Set to 'ignore to inhibit switching between find-file/switch-buffer.
(defvar ido-context-switch-command)
+;; Dynamically bound in ido-read-internal.
+(defvar ido-completing-read)
+
;;; FUNCTIONS
(defun ido-active (&optional merge)
@@ -2912,7 +2915,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
(setq ido-rotate-temp t)
(exit-minibuffer)))
-(defun ido-wide-find-dir-or-delete-dir (&optional dir)
+(defun ido-wide-find-dir-or-delete-dir (&optional _dir)
"Prompt for DIR to search for using find, starting from current directory.
If input stack is non-empty, delete current directory component."
(interactive)
@@ -3021,11 +3024,11 @@ If repeated, insert text from buffer instead."
ido-try-merged-list nil)
(exit-minibuffer))))
-(defun ido-copy-current-word (all)
+(defun ido-copy-current-word (_all)
"Insert current word (file or directory name) from current buffer."
(interactive "P")
(let ((word (with-current-buffer ido-entry-buffer
- (let ((p (point)) start-line end-line start-name name)
+ (let ((p (point)) start-line end-line start-name)
(if (and mark-active (/= p (mark)))
(setq start-name (mark))
(beginning-of-line)
@@ -3232,7 +3235,7 @@ for first matching file."
;; Input is list of ("file" . "dir") cons cells.
;; Output is sorted list of ("file "dir" ...) lists
(let ((l (sort items (lambda (a b) (string-lessp (car b) (car a)))))
- res a cur dirs)
+ res a cur)
(while l
(setq a (car l)
l (cdr l))
@@ -4734,7 +4737,8 @@ See `read-directory-name' for additional parameters."
(concat ido-current-directory filename)))))
;;;###autoload
-(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def inherit-input-method)
+(defun ido-completing-read (prompt choices &optional _predicate require-match
+ initial-input hist def _inherit-input-method)
"Ido replacement for the built-in `completing-read'.
Read a string in the minibuffer with ido-style completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
diff --git a/lisp/ielm.el b/lisp/ielm.el
index a1057303743..c445e647878 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -282,7 +282,7 @@ simply inserts a newline."
(defvar ielm-input)
-(defun ielm-input-sender (proc input)
+(defun ielm-input-sender (_proc input)
;; Just sets the variable ielm-input, which is in the scope of
;; `ielm-send-input's call.
(setq ielm-input input))
@@ -303,8 +303,17 @@ simply inserts a newline."
;;; Evaluation
-(defun ielm-eval-input (ielm-string)
- "Evaluate the Lisp expression IELM-STRING, and pretty-print the result."
+(defvar ielm-string)
+(defvar ielm-form)
+(defvar ielm-pos)
+(defvar ielm-result)
+(defvar ielm-error-type)
+(defvar ielm-output)
+(defvar ielm-wbuf)
+(defvar ielm-pmark)
+
+(defun ielm-eval-input (input-string)
+ "Evaluate the Lisp expression INPUT-STRING, and pretty-print the result."
;; This is the function that actually `sends' the input to the
;; `inferior Lisp process'. All comint-send-input does is works out
;; what that input is. What this function does is evaluates that
@@ -317,7 +326,8 @@ simply inserts a newline."
;;
;; NOTE: all temporary variables in this function will be in scope
;; during the eval, and so need to have non-clashing names.
- (let (ielm-form ; form to evaluate
+ (let ((ielm-string input-string) ; input expression, as a string
+ ielm-form ; form to evaluate
ielm-pos ; End posn of parse in string
ielm-result ; Result, or error message
ielm-error-type ; string, nil if no error
@@ -395,7 +405,7 @@ simply inserts a newline."
(goto-char ielm-pmark)
(unless ielm-error-type
- (condition-case err
+ (condition-case nil
;; Self-referential objects cause loops in the printer, so
;; trap quits here. May as well do errors, too
(setq ielm-output (concat ielm-output (pp-to-string ielm-result)))
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index efe8262645d..31a6aed7206 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -551,7 +551,7 @@ Create the thumbnails directory if it does not exist."
))
(defun image-dired-insert-thumbnail (file original-file-name
- associated-dired-buffer)
+ associated-dired-buffer)
"Insert thumbnail image FILE.
Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER."
(let (beg end)
@@ -816,7 +816,7 @@ used or not. If non-nil, use `display-buffer' instead of
thumbnail buffer to be selected."
(interactive "P")
(let ((buf (image-dired-create-thumbnail-buffer))
- curr-file thumb-name files count dired-buf beg)
+ thumb-name files dired-buf)
(if arg
(setq files (list (dired-get-filename)))
(setq files (dired-get-marked-files)))
@@ -918,7 +918,7 @@ FILE-TAGS is an alist in the following form:
"For all FILES, remove TAG from the image database."
(image-dired-sane-db-file)
(save-excursion
- (let (end buf start)
+ (let (end buf)
(setq buf (find-file image-dired-db-file))
(if (not (listp files))
(if (stringp files)
@@ -974,7 +974,7 @@ FILE-TAGS is an alist in the following form:
"Tag marked file(s) in dired. With prefix ARG, tag file at point."
(interactive "P")
(let ((tag (read-string "Tags to add (separate tags with a semicolon): "))
- curr-file files)
+ files)
(if arg
(setq files (list (dired-get-filename)))
(setq files (dired-get-marked-files)))
@@ -1598,7 +1598,7 @@ Note that n, p and <down> and <up> will be hijacked and bound to
With prefix argument ARG, create thumbnails even if they already exist
\(i.e. use this to refresh your thumbnails)."
(interactive "P")
- (let (curr-file thumb-name files count)
+ (let (thumb-name files)
(setq files (dired-get-marked-files))
(mapcar
(lambda (curr-file)
@@ -1906,7 +1906,7 @@ overwritten. This confirmation can be turned off using
(if (not (image-dired-image-at-point-p))
(message "No image at point")
(let ((file (image-dired-original-file-name))
- command temp-file)
+ command)
(if (not (string-match "\.[jJ][pP[eE]?[gG]$" file))
(error "Only JPEG images can be rotated!"))
(setq command (format-spec
@@ -2209,11 +2209,10 @@ non-nil."
Track this in associated dired buffer if `image-dired-track-movement' is
non-nil."
(interactive "e")
- (let (file)
- (mouse-set-point event)
- (goto-char (posn-point (event-end event)))
- (if image-dired-track-movement
- (image-dired-track-original-file)))
+ (mouse-set-point event)
+ (goto-char (posn-point (event-end event)))
+ (if image-dired-track-movement
+ (image-dired-track-original-file))
(image-dired-display-thumb-properties))
(defun image-dired-mouse-toggle-mark (event)
@@ -2221,11 +2220,10 @@ non-nil."
Track this in associated dired buffer if `image-dired-track-movement' is
non-nil."
(interactive "e")
- (let (file)
- (mouse-set-point event)
- (goto-char (posn-point (event-end event)))
- (if image-dired-track-movement
- (image-dired-track-original-file)))
+ (mouse-set-point event)
+ (goto-char (posn-point (event-end event)))
+ (if image-dired-track-movement
+ (image-dired-track-original-file))
(image-dired-toggle-mark-thumb-original-file))
(defun image-dired-dired-display-properties ()
@@ -2374,7 +2372,7 @@ it easier to generate, then HTML-files are created in
when using per-directory thumbnail file storage"))
(image-dired-create-gallery-lists)
(let ((tags image-dired-tag-file-list)
- count curr tag index-buf tag-buf
+ count tag index-buf tag-buf
comment file-tags tag-link tag-link-list)
;; Make sure gallery root exist
(if (file-exists-p image-dired-gallery-dir)
@@ -2533,7 +2531,7 @@ the operation by activating the Cancel button.\n\n")
(widget-insert "\n")
(widget-create 'push-button
:notify
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(image-dired-save-information-from-widgets)
(bury-buffer)
(message "Done."))
@@ -2541,7 +2539,7 @@ the operation by activating the Cancel button.\n\n")
(widget-insert " ")
(widget-create 'push-button
:notify
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(bury-buffer)
(message "Operation canceled."))
"Cancel")
diff --git a/lisp/indent.el b/lisp/indent.el
index b9f008d46aa..93218032700 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -561,8 +561,8 @@ Use \\[edit-tab-stops] to edit them interactively."
(while (and tabs (>= (current-column) (car tabs)))
(setq tabs (cdr tabs)))
(if tabs
- (let ((opoint (point)))
- (delete-horizontal-space t)
+ (progn
+ (delete-horizontal-space t)
(indent-to (car tabs)))
(insert ?\s))))
diff --git a/lisp/info-xref.el b/lisp/info-xref.el
index c56db2c94bb..41da9d12c99 100644
--- a/lisp/info-xref.el
+++ b/lisp/info-xref.el
@@ -151,7 +151,7 @@ overall good/bad count summary inserted at the very end."
(unless info-xref-in-progress
(info-xref-output "done, %d good, %d bad, %d unavailable"
info-xref-good info-xref-bad info-xref-unavail))))
-
+
(defun info-xref-output (fmt &rest args)
"Emit a `format'-ed message FMT+ARGS to the `info-xref-output-buffer'."
(with-current-buffer info-xref-output-buffer
@@ -200,7 +200,7 @@ buffer's line and column of point."
(save-excursion
(save-window-excursion
(prog1
- (condition-case err
+ (condition-case nil
(progn
(Info-goto-node node
(when (get-buffer "*info*")
diff --git a/lisp/informat.el b/lisp/informat.el
index 77ead94123a..be60b12bbac 100644
--- a/lisp/informat.el
+++ b/lisp/informat.el
@@ -31,6 +31,10 @@
(declare-function texinfo-format-refill "texinfmt" ())
+;; From texinfmt.el
+(defvar texinfo-command-start)
+(defvar texinfo-command-end)
+
;;;###autoload
(defun Info-tagify (&optional input-buffer-name)
"Create or update Info file tag table in current buffer or in a region."
diff --git a/lisp/isearch.el b/lisp/isearch.el
index e13d9673514..1e6ac9c024e 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1058,6 +1058,7 @@ nonincremental search instead via `isearch-edit-string'."
(isearch-done)
(isearch-clean-overlays))
+(defvar minibuffer-history-symbol) ;; from external package gmhist.el
(defun isearch-edit-string ()
"Edit the search string in the minibuffer.
@@ -1077,7 +1078,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
;; this could be simplified greatly.
;; Editing doesn't back up the search point. Should it?
(interactive)
- (condition-case err
+ (condition-case nil
(progn
(let ((isearch-nonincremental isearch-nonincremental)
@@ -1122,7 +1123,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
;; Actually terminate isearching until editing is done.
;; This is so that the user can do anything without failure,
;; like switch buffers and start another isearch, and return.
- (condition-case err
+ (condition-case nil
(isearch-done t t)
(exit nil)) ; was recursive editing
@@ -2151,7 +2152,7 @@ If there is no completion possible, say so and continue searching."
(isearch-message-suffix c-q-hack ellipsis)))
(if c-q-hack m (let ((message-log-max nil)) (message "%s" m)))))
-(defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental)
+(defun isearch-message-prefix (&optional _c-q-hack ellipsis nonincremental)
;; If about to search, and previous search regexp was invalid,
;; check that it still is. If it is valid now,
;; let the message we display while searching say that it is valid.
@@ -2184,7 +2185,7 @@ If there is no completion possible, say so and continue searching."
(propertize (concat (upcase (substring m 0 1)) (substring m 1))
'face 'minibuffer-prompt)))
-(defun isearch-message-suffix (&optional c-q-hack ellipsis)
+(defun isearch-message-suffix (&optional c-q-hack _ellipsis)
(concat (if c-q-hack "^Q" "")
(if isearch-error
(concat " [" isearch-error "]")
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index fd6cff0faa0..171048e22dc 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -658,7 +658,7 @@ the selection process begins. Used by isearchb.el."
(not (iswitchb-existing-buffer-p)))
(let ((virt (car iswitchb-virtual-buffers))
(new-buf))
- ;; Keep the name of the buffer returned by find-file-noselect, as
+ ;; Keep the name of the buffer returned by find-file-noselect, as
;; the buffer 'virt' could be a symlink to a file of a different name.
(setq new-buf (buffer-name (find-file-noselect (cdr virt))))
(setq iswitchb-matches (list new-buf)
@@ -1015,7 +1015,7 @@ Return the modified list with the last element prepended to it."
(display-completion-list (or iswitchb-matches iswitchb-buflist)
:help-string "iswitchb "
:activate-callback
- (lambda (x y z)
+ (lambda (_x _y _z)
(message "doesn't work yet, sorry!")))
;; else running Emacs
(display-completion-list (or iswitchb-matches iswitchb-buflist))))
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 6fb3ffdd719..37c9d40ec65 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -247,7 +247,7 @@ There should be no more than seven characters after the final `/'."
:type 'string
:group 'jka-compr)
-(defun jka-compr-make-temp-name (&optional local-copy)
+(defun jka-compr-make-temp-name (&optional _local-copy)
"This routine will return the name of a new file."
(make-temp-file jka-compr-temp-name-template))
@@ -572,7 +572,7 @@ There should be no more than seven characters after the final `/'."
;; Support for loading compressed files.
-(defun jka-compr-load (file &optional noerror nomessage nosuffix)
+(defun jka-compr-load (file &optional noerror nomessage _nosuffix)
"Documented as original."
(let* ((local-copy (jka-compr-file-local-copy file))
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 6f4bed3ec5b..e47f571db71 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -479,7 +479,7 @@ without repeating the prefix."
(kmacro-display (car (car kmacro-ring)) "2nd macro")))
-(defun kmacro-cycle-ring-next (&optional arg)
+(defun kmacro-cycle-ring-next (&optional _arg)
"Move to next keyboard macro in keyboard macro ring.
Displays the selected macro in the echo area."
(interactive)
@@ -498,7 +498,7 @@ Displays the selected macro in the echo area."
(put 'kmacro-cycle-ring-next 'kmacro-repeat 'ring)
-(defun kmacro-cycle-ring-previous (&optional arg)
+(defun kmacro-cycle-ring-previous (&optional _arg)
"Move to previous keyboard macro in keyboard macro ring.
Displays the selected macro in the echo area."
(interactive)
@@ -526,7 +526,7 @@ Displays the selected macro in the echo area."
(kmacro-display last-kbd-macro t)))
-(defun kmacro-delete-ring-head (&optional arg)
+(defun kmacro-delete-ring-head (&optional _arg)
"Delete current macro from keyboard macro ring."
(interactive)
(unless (kmacro-ring-empty-p t)
@@ -777,7 +777,7 @@ If kbd macro currently being defined end it before activating it."
mac))
-(defun kmacro-bind-to-key (arg)
+(defun kmacro-bind-to-key (_arg)
"When not defining or executing a macro, offer to bind last macro to a key.
The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
through [C-x C-k Z] are reserved for user bindings, and to bind to
@@ -837,7 +837,7 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
(put symbol 'kmacro t))
-(defun kmacro-view-macro (&optional arg)
+(defun kmacro-view-macro (&optional _arg)
"Display the last keyboard macro.
If repeated, it shows previous elements in the macro ring."
(interactive)
diff --git a/lisp/locate.el b/lisp/locate.el
index c78dd5aa34f..2ac2d30f41d 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -588,7 +588,7 @@ do not work in subdirectories.
(message "This command only works inside main listing.")))
;; From Stephen Eglen <stephen@cns.ed.ac.uk>
-(defun locate-update (ignore1 ignore2)
+(defun locate-update (_ignore1 _ignore2)
"Revert the *Locate* buffer.
If `locate-update-when-revert' is non-nil, offer to update the
locate database using the shell command in `locate-update-command'."
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 8843b1663ff..387ce394f50 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -370,7 +370,7 @@ If BEG and END are nil, the point and mark are used."
"Turn all newlines in the buffer into hard newlines."
(longlines-decode-region (point-min) (point-max)))
-(defun longlines-encode-region (beg end &optional buffer)
+(defun longlines-encode-region (beg end &optional _buffer)
"Replace each soft newline between BEG and END with exactly one space.
Hard newlines are left intact. The optional argument BUFFER exists for
compatibility with `format-alist', and is ignored."
@@ -413,7 +413,7 @@ If automatic line wrapping is turned on, wrap the entire buffer."
(setq longlines-auto-wrap nil)
(message "Auto wrap disabled.")))
-(defun longlines-after-change-function (beg end len)
+(defun longlines-after-change-function (beg end _len)
"Update `longlines-wrap-beg' and `longlines-wrap-end'.
This is called by `after-change-functions' to keep track of the region
that has changed."
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 9314f934dc1..14a8cabf1a7 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -329,7 +329,7 @@ not contain `d', so that a full listing is expected."
(max-gid-len 0)
(max-file-size 0)
;; do all bindings here for speed
- total-line files elt short file-size fil attr
+ total-line files elt short file-size attr
fuid fgid uid-len gid-len)
(cond ((memq ?A switches)
(setq file-alist
diff --git a/lisp/macros.el b/lisp/macros.el
index b4f38b7db84..554f89a8a60 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -127,7 +127,7 @@ use this command, and then save the file."
(delete-region (point) (1+ (point)))
(insert "\\M-\\C-?"))))))
(if (vectorp definition)
- (let ((len (length definition)) (i 0) char mods)
+ (let ((len (length definition)) (i 0) char)
(while (< i len)
(insert (if (zerop i) ?\[ ?\s))
(setq char (aref definition i)
diff --git a/lisp/makesum.el b/lisp/makesum.el
index c392f190166..21fc693cfd6 100644
--- a/lisp/makesum.el
+++ b/lisp/makesum.el
@@ -85,8 +85,7 @@ Previous contents of that buffer are killed first."
(defun double-column (start end)
(interactive "r")
- (let (half cnt
- line lines nlines
+ (let (half line lines nlines
(from-end (- (point-max) end)))
(setq nlines (count-lines start end))
(if (<= nlines 1)
diff --git a/lisp/misearch.el b/lisp/misearch.el
index a0351f3820f..c533562f073 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -201,7 +201,7 @@ search status stack."
`(lambda (cmd)
(multi-isearch-pop-state cmd ,(current-buffer))))
-(defun multi-isearch-pop-state (cmd buffer)
+(defun multi-isearch-pop-state (_cmd buffer)
"Restore the multiple buffers search state.
Switch to the buffer restored from the search status stack."
(unless (equal buffer (current-buffer))
@@ -224,6 +224,8 @@ set in `multi-isearch-buffers' or `multi-isearch-buffers-regexp'."
(car buffers)
(cadr (member buffer buffers)))))
+(defvar ido-ignore-item-temp-list) ; from ido.el
+
(defun multi-isearch-read-buffers ()
"Return a list of buffers specified interactively, one by one."
;; Most code from `multi-occur'.
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index ac99a34e64c..1f16b9935c8 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -214,13 +214,10 @@ To test this function, evaluate:
(start-row (cdr (posn-col-row start-posn)))
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
- event end row mouse-delta scroll-delta
+ event end row scroll-delta
have-scrolled
- window-last-row
- col mouse-col-delta window-last-col
+ col
(scroll-col-delta 0)
- adjusted-mouse-col-delta
- adjusted-mouse-delta
;; be conservative about allowing horizontal scrolling
(col-scrolling-p (mouse-drag-should-do-col-scrolling)))
(select-window start-window)
@@ -275,10 +272,10 @@ To test this function, evaluate:
(start-row (cdr (posn-col-row start-posn)))
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
- event end row mouse-delta scroll-delta
+ event end row scroll-delta
have-scrolled
window-last-row
- col mouse-col-delta window-last-col
+ col window-last-col
(scroll-col-delta 0)
;; be conservative about allowing horizontal scrolling
(col-scrolling-p (mouse-drag-should-do-col-scrolling)))
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index d80f8db3b7f..1f601377ad4 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -548,7 +548,6 @@ See documentation for mouse-select-internal for more details."
(let* ((thing-symbol (mouse-sel-selection-thing selection))
(overlay (mouse-sel-selection-overlay selection))
(orig-window (selected-window))
- (orig-window-frame (window-frame orig-window))
(top (nth 1 (window-edges orig-window)))
(bottom (nth 3 (window-edges orig-window)))
(mark-active nil) ; inhibit normal region highlight
diff --git a/lisp/outline.el b/lisp/outline.el
index cedc55b3336..2f84e7d93ea 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -800,7 +800,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
;; Function to be set as an outline-isearch-open-invisible' property
;; to the overlay that makes the outline invisible (see
;; `outline-flag-region').
-(defun outline-isearch-open-invisible (overlay)
+(defun outline-isearch-open-invisible (_overlay)
;; We rely on the fact that isearch places point on the matched text.
(show-entry))
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 0f4d5e42d78..a1cb7b237e9 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -348,6 +348,16 @@ modified to be an empty string, or the desired separation string."
(defvar pcomplete-show-list nil)
(defvar pcomplete-expand-only-p nil)
+;; for the sake of the bye-compiler, when compiling other files that
+;; contain completion functions
+(defvar pcomplete-args nil)
+(defvar pcomplete-begins nil)
+(defvar pcomplete-last nil)
+(defvar pcomplete-index nil)
+(defvar pcomplete-stub nil)
+(defvar pcomplete-seen nil)
+(defvar pcomplete-norm-func nil)
+
;;; User Functions:
;;; Alternative front-end using the standard completion facilities.
@@ -439,7 +449,7 @@ in the same way as TABLE completes strings of the form (concat S2 S)."
(if (string-match re c)
(substring c (match-end 0))))
res))))))))))
-
+
;; I don't think such commands are usable before first setting up buffer-local
;; variables to parse args, so there's no point autoloading it.
;; ;;;###autoload
@@ -468,7 +478,7 @@ Same as `pcomplete' but using the standard completion UI."
;; pcomplete-parse-arguments-function does, that connection
;; might not be that close. E.g. in eshell,
;; pcomplete-parse-arguments-function expands envvars.
- ;;
+ ;;
;; Since we use minibuffer-complete, which doesn't know
;; pcomplete-stub and works from the buffer's text instead,
;; we need to trick minibuffer-complete, into using
@@ -647,17 +657,6 @@ This will modify the current buffer."
;;; Internal Functions:
;; argument handling
-
-;; for the sake of the bye-compiler, when compiling other files that
-;; contain completion functions
-(defvar pcomplete-args nil)
-(defvar pcomplete-begins nil)
-(defvar pcomplete-last nil)
-(defvar pcomplete-index nil)
-(defvar pcomplete-stub nil)
-(defvar pcomplete-seen nil)
-(defvar pcomplete-norm-func nil)
-
(defun pcomplete-arg (&optional index offset)
"Return the textual content of the INDEXth argument.
INDEX is based from the current processing position. If INDEX is
@@ -995,13 +994,14 @@ component, `default-directory' is used as the basis for completion."
(pcomplete-next-arg)
(funcall sym)))))))
-(defun pcomplete-opt (options &optional prefix no-ganging args-follow)
+(defun pcomplete-opt (options &optional prefix _no-ganging _args-follow)
"Complete a set of OPTIONS, each beginning with PREFIX (?- by default).
PREFIX may be t, in which case no PREFIX character is necessary.
If NO-GANGING is non-nil, each option is separate (-xy is not allowed).
If ARGS-FOLLOW is non-nil, then options which take arguments may have
the argument appear after a ganged set of options. This is how tar
-behaves, for example."
+behaves, for example.
+Arguments NO-GANGING and ARGS-FOLLOW are currently ignored."
(if (and (= pcomplete-index pcomplete-last)
(string= (pcomplete-arg) "-"))
(let ((len (length options))
diff --git a/lisp/proced.el b/lisp/proced.el
index ce3ad08598c..ddc4ed1db14 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1676,7 +1676,7 @@ After updating a displayed Proced buffer run the normal hook
(message (if revert "Updating process information...done."
"Updating process display...done.")))))
-(defun proced-revert (&rest args)
+(defun proced-revert (&rest _args)
"Reevaluate the process listing based on the currently running processes.
Preserves point and marks."
(proced-update t))
@@ -1770,7 +1770,7 @@ After sending the signal, this command runs the normal hook
(number-to-string signal) signal))))
(dolist (process process-alist)
(with-temp-buffer
- (condition-case err
+ (condition-case nil
(if (zerop (call-process
proced-signal-function nil t nil
signal (number-to-string (car process))))
diff --git a/lisp/ps-def.el b/lisp/ps-def.el
index fd499c964da..639183e5ab3 100644
--- a/lisp/ps-def.el
+++ b/lisp/ps-def.el
@@ -32,7 +32,7 @@
;;; Code:
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
(declare-function ps-plot-with-face "ps-print" (from to face))
(declare-function ps-plot-string "ps-print" (string))
@@ -60,13 +60,13 @@
;; ps-mule
(or (fboundp 'charset-dimension)
- (defun charset-dimension (charset) 1)) ; ascii
+ (defun charset-dimension (_charset) 1)) ; ascii
(or (fboundp 'char-width)
- (defun char-width (char) 1)) ; ascii
+ (defun char-width (_char) 1)) ; ascii
(or (fboundp 'encode-char)
- (defun encode-char (ch ccs)
+ (defun encode-char (ch _ccs)
ch))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index 7c974d3d3c4..d95719ba552 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -632,7 +632,7 @@ f2, f3, h0, h1, and H0 respectively."
(ps-output "]"))))))
(ps-output " ] " (if (nth 3 composition) "RLC" "RBC") "\n"))
-(defun ps-mule-plot-string (from to &optional bg-color)
+(defun ps-mule-plot-string (from to &optional _bg-color)
"Generate PostScript code for plotting characters in the region FROM and TO.
Optional argument BG-COLOR is ignored.
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index b51eb944696..3d1dbfb406a 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -4592,16 +4592,16 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
ps-print-height))))))
-(defun ps-print-preprint-region (prefix-arg)
+(defun ps-print-preprint-region (prefix)
(or (ps-mark-active-p)
(error "The mark is not set now"))
- (list (point) (mark) (ps-print-preprint prefix-arg)))
+ (list (point) (mark) (ps-print-preprint prefix)))
-(defun ps-print-preprint (prefix-arg)
- (and prefix-arg
- (or (numberp prefix-arg)
- (listp prefix-arg))
+(defun ps-print-preprint (prefix)
+ (and prefix
+ (or (numberp prefix)
+ (listp prefix))
(let* ((name (concat (file-name-nondirectory (or (buffer-file-name)
(buffer-name)))
".ps"))
@@ -6020,7 +6020,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
(ps-output " S\n")
wrappoint))
-(defun ps-basic-plot-string (from to &optional bg-color)
+(defun ps-basic-plot-string (from to &optional _bg-color)
(let* ((wrappoint (ps-find-wrappoint from to
(ps-avg-char-width 'ps-font-for-text)))
(to (car wrappoint))
@@ -6029,7 +6029,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
(ps-output " S\n")
wrappoint))
-(defun ps-basic-plot-whitespace (from to &optional bg-color)
+(defun ps-basic-plot-whitespace (from to &optional _bg-color)
(let* ((wrappoint (ps-find-wrappoint from to
(ps-space-width 'ps-font-for-text)))
(to (car wrappoint)))
@@ -6658,7 +6658,7 @@ If FACE is not a valid face name, use default face."
;; But autoload them here to make the separation invisible.
;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize
-;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "14536f28e0dcaa956901bb59ad86a875")
+;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "179b43ee432338186dde9e8c4fe761af")
;;; Generated autoloads from ps-mule.el
(defvar ps-multibyte-buffer nil "\
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 9f9baad8dbd..fc9b7881733 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -590,7 +590,7 @@ menu-elements (no sub-menu)."
;; Count the number of assigned menu shortcuts.
(defvar recentf-menu-shortcuts)
-(defun recentf-make-menu-items (&optional menu)
+(defun recentf-make-menu-items (&optional _menu)
"Make menu items from the recent list.
This is a menu filter function which ignores the MENU argument."
(setq recentf-menu-filter-commands nil)
@@ -1036,7 +1036,7 @@ That is, remove a non kept file from the recent list."
;;; Common dialog stuff
;;
-(defun recentf-cancel-dialog (&rest ignore)
+(defun recentf-cancel-dialog (&rest _ignore)
"Cancel the current dialog.
IGNORE arguments."
(interactive)
@@ -1092,7 +1092,7 @@ Go to the beginning of buffer if not found."
;;
(defvar recentf-edit-list nil)
-(defun recentf-edit-list-select (widget &rest ignore)
+(defun recentf-edit-list-select (widget &rest _ignore)
"Toggle a file selection based on the checkbox WIDGET state.
IGNORE other arguments."
(let ((value (widget-get widget :tag))
@@ -1102,7 +1102,7 @@ IGNORE other arguments."
(setq recentf-edit-list (delq value recentf-edit-list)))
(message "%s %sselected" value (if check "" "un"))))
-(defun recentf-edit-list-validate (&rest ignore)
+(defun recentf-edit-list-validate (&rest _ignore)
"Process the recent list when the edit list dialog is committed.
IGNORE arguments."
(if recentf-edit-list
@@ -1146,7 +1146,7 @@ Click on Cancel or type `q' to cancel.\n")
;;; Open file dialog
;;
-(defun recentf-open-files-action (widget &rest ignore)
+(defun recentf-open-files-action (widget &rest _ignore)
"Open the file stored in WIDGET's value when notified.
IGNORE other arguments."
(kill-buffer (current-buffer))
diff --git a/lisp/rect.el b/lisp/rect.el
index 174e31f87d0..ad914cab7d2 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -281,7 +281,7 @@ no text on the right side of the rectangle."
(= (point) (point-at-eol)))
(indent-to endcol))))
-(defun delete-whitespace-rectangle-line (startcol endcol fill)
+(defun delete-whitespace-rectangle-line (startcol _endcol fill)
(when (= (move-to-column startcol (if fill t 'coerce)) startcol)
(unless (= (point) (point-at-eol))
(delete-region (point) (progn (skip-syntax-forward " ") (point))))))
@@ -373,7 +373,7 @@ rectangle which were empty."
;; Line numbers for `rectangle-number-line-callback'.
(defvar rectangle-number-line-counter)
-(defun rectangle-number-line-callback (start end format-string)
+(defun rectangle-number-line-callback (start _end format-string)
(move-to-column start t)
(insert (format format-string rectangle-number-line-counter))
(setq rectangle-number-line-counter
diff --git a/lisp/register.el b/lisp/register.el
index 517c50ee1e2..af1a421a0a2 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -88,7 +88,7 @@ Argument is a character, naming the register."
(if arg (list (current-frame-configuration) (point-marker))
(point-marker))))
-(defun window-configuration-to-register (register &optional arg)
+(defun window-configuration-to-register (register &optional _arg)
"Store the window configuration of the selected frame in register REGISTER.
Use \\[jump-to-register] to restore the configuration.
Argument is a character, naming the register."
@@ -97,7 +97,7 @@ Argument is a character, naming the register."
;; of point in the current buffer, so record that separately.
(set-register register (list (current-window-configuration) (point-marker))))
-(defun frame-configuration-to-register (register &optional arg)
+(defun frame-configuration-to-register (register &optional _arg)
"Store the window configuration of all frames in register REGISTER.
Use \\[jump-to-register] to restore the configuration.
Argument is a character, naming the register."
diff --git a/lisp/replace.el b/lisp/replace.el
index 0ed716966ed..31a48d48960 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -98,6 +98,10 @@ is highlighted lazily using isearch lazy highlighting (see
:group 'matching
:version "22.1")
+(defvar replace-count 0
+ "Number of replacements done so far.
+See `replace-regexp' and `query-replace-regexp-eval'.")
+
(defun query-replace-descr (string)
(mapconcat 'isearch-text-char-description string ""))
@@ -849,7 +853,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
(setq next-error-function 'occur-next-error))
-(defun occur-revert-function (ignore1 ignore2)
+(defun occur-revert-function (_ignore1 _ignore2)
"Handle `revert-buffer' for Occur mode buffers."
(apply 'occur-1 (append occur-revert-arguments (list (buffer-name)))))
@@ -1069,6 +1073,8 @@ are not modified."
(interactive (occur-read-primary-args))
(occur-1 regexp nlines (list (current-buffer))))
+(defvar ido-ignore-item-temp-list)
+
(defun multi-occur (bufs regexp &optional nlines)
"Show all lines in buffers BUFS containing a match for REGEXP.
This function acts on multiple buffers; otherwise, it is exactly like
@@ -1204,11 +1210,12 @@ See also `multi-occur'."
(set-buffer-modified-p nil)
(run-hooks 'occur-hook)))))))
-(defun occur-engine (regexp buffers out-buf nlines case-fold-search
+(defun occur-engine (regexp buffers out-buf nlines case-fold
title-face prefix-face match-face keep-props)
(with-current-buffer out-buf
(let ((globalcount 0)
- (coding nil))
+ (coding nil)
+ (case-fold-search case-fold))
;; Map over all the buffers
(dolist (buf buffers)
(when (buffer-live-p buf)
@@ -1308,8 +1315,7 @@ See also `multi-occur'."
(nth 0 ret))))
;; Actually insert the match display data
(with-current-buffer out-buf
- (let ((beg (point))
- (end (progn (insert data) (point)))))))
+ (insert data)))
(goto-char endpt))
(if endpt
(progn
@@ -1557,8 +1563,9 @@ type them using Lisp syntax."
(setcar n 'replace-count))))))
(setq n (cdr n))))
-(defun replace-eval-replacement (expression replace-count)
- (let ((replacement (eval expression)))
+(defun replace-eval-replacement (expression count)
+ (let* ((replace-count count)
+ (replacement (eval expression)))
(if (stringp replacement)
replacement
(prin1-to-string replacement t))))
@@ -1578,15 +1585,15 @@ with the `noescape' argument set.
(prin1-to-string replacement t))
t t)))
-(defun replace-loop-through-replacements (data replace-count)
+(defun replace-loop-through-replacements (data count)
;; DATA is a vector contaning the following values:
;; 0 next-rotate-count
;; 1 repeat-count
;; 2 next-replacement
;; 3 replacements
- (if (= (aref data 0) replace-count)
+ (if (= (aref data 0) count)
(progn
- (aset data 0 (+ replace-count (aref data 1)))
+ (aset data 0 (+ count (aref data 1)))
(let ((next (cdr (aref data 2))))
(aset data 2 (if (consp next) next (aref data 3))))))
(car (aref data 2)))
@@ -2011,6 +2018,11 @@ make, or the user didn't cancel the call."
(if (= replace-count 1) "" "s")))
(or (and keep-going stack) multi-buffer)))
+(defvar isearch-error)
+(defvar isearch-forward)
+(defvar isearch-case-fold-search)
+(defvar isearch-string)
+
(defvar replace-overlay nil)
(defun replace-highlight (match-beg match-end range-beg range-end
diff --git a/lisp/savehist.el b/lisp/savehist.el
index f1060fb5150..653d0312a19 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -1,4 +1,4 @@
-;;; savehist.el --- Save minibuffer history.
+;;; savehist.el --- Save minibuffer history
;; Copyright (C) 1997, 2005-2011 Free Software Foundation, Inc.
@@ -254,6 +254,10 @@ Normally invoked by calling `savehist-mode' to unset the minor mode."
(cancel-timer savehist-timer))
(setq savehist-timer nil)))
+;; From XEmacs?
+(defvar print-readably)
+(defvar print-string-length)
+
(defun savehist-save (&optional auto-save)
"Save the values of minibuffer history variables.
Unbound symbols referenced in `savehist-additional-variables' are ignored.
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 87c24018c07..54f2ba765b5 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -105,7 +105,7 @@ Setting the variable with a customization buffer also takes effect."
;; The default value for :initialize would try to use :set
;; when processing the file in cus-dep.el.
:initialize 'custom-initialize-default
- :set (lambda (sym val) (set-scroll-bar-mode val)))
+ :set (lambda (_sym val) (set-scroll-bar-mode val)))
;; We just set scroll-bar-mode, but that was the default.
;; If it is set again, that is for real.
@@ -141,7 +141,7 @@ when they are turned on; if it is nil, they go on the left."
(if (> arg 0)
(or scroll-bar-mode default-frame-scroll-bars))))))
-(defun toggle-horizontal-scroll-bar (arg)
+(defun toggle-horizontal-scroll-bar (_arg)
"Toggle whether or not the selected frame has horizontal scroll bars.
With arg, turn horizontal scroll bars on if and only if arg is positive.
Horizontal scroll bars aren't implemented yet."
@@ -204,7 +204,7 @@ EVENT should be a scroll bar click or drag event."
(let* ((start-position (event-start event))
(window (nth 0 start-position))
(portion-whole (nth 2 start-position)))
- (save-excursion
+ (save-excursion
(with-current-buffer (window-buffer window)
;; Calculate position relative to the accessible part of the buffer.
(goto-char (+ (point-min)
diff --git a/lisp/select.el b/lisp/select.el
index 7ca5c3a432d..1f5191e86c1 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -213,7 +213,7 @@ two markers or an overlay. Otherwise, it is nil."
(defun xselect--int-to-cons (n)
(cons (ash n -16) (logand n 65535)))
-(defun xselect-convert-to-string (selection type value)
+(defun xselect-convert-to-string (_selection type value)
(let (str coding)
;; Get the actual string from VALUE.
(cond ((stringp value)
@@ -279,7 +279,7 @@ two markers or an overlay. Otherwise, it is nil."
(setq next-selection-coding-system nil)
(cons type str))))
-(defun xselect-convert-to-length (selection type value)
+(defun xselect-convert-to-length (_selection _type value)
(let ((len (cond ((stringp value)
(length value))
((setq value (xselect--selection-bounds value))
@@ -287,7 +287,7 @@ two markers or an overlay. Otherwise, it is nil."
(if len
(xselect--int-to-cons len))))
-(defun xselect-convert-to-targets (selection type value)
+(defun xselect-convert-to-targets (_selection _type _value)
;; return a vector of atoms, but remove duplicates first.
(let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist)))
(rest all))
@@ -300,25 +300,25 @@ two markers or an overlay. Otherwise, it is nil."
(setq rest (cdr rest)))))
(apply 'vector all)))
-(defun xselect-convert-to-delete (selection type value)
+(defun xselect-convert-to-delete (selection _type _value)
(x-disown-selection-internal selection)
;; A return value of nil means that we do not know how to do this conversion,
;; and replies with an "error". A return value of NULL means that we have
;; done the conversion (and any side-effects) but have no value to return.
'NULL)
-(defun xselect-convert-to-filename (selection type value)
+(defun xselect-convert-to-filename (_selection _type value)
(when (setq value (xselect--selection-bounds value))
(buffer-file-name (nth 2 value))))
-(defun xselect-convert-to-charpos (selection type value)
+(defun xselect-convert-to-charpos (_selection _type value)
(when (setq value (xselect--selection-bounds value))
(let ((beg (1- (nth 0 value))) ; zero-based
(end (1- (nth 1 value))))
(cons 'SPAN (vector (xselect--int-to-cons (min beg end))
(xselect--int-to-cons (max beg end)))))))
-(defun xselect-convert-to-lineno (selection type value)
+(defun xselect-convert-to-lineno (_selection _type value)
(when (setq value (xselect--selection-bounds value))
(with-current-buffer (nth 2 value)
(let ((beg (line-number-at-pos (nth 0 value)))
@@ -326,7 +326,7 @@ two markers or an overlay. Otherwise, it is nil."
(cons 'SPAN (vector (xselect--int-to-cons (min beg end))
(xselect--int-to-cons (max beg end))))))))
-(defun xselect-convert-to-colno (selection type value)
+(defun xselect-convert-to-colno (_selection _type value)
(when (setq value (xselect--selection-bounds value))
(with-current-buffer (nth 2 value)
(let ((beg (progn (goto-char (nth 0 value)) (current-column)))
@@ -334,35 +334,35 @@ two markers or an overlay. Otherwise, it is nil."
(cons 'SPAN (vector (xselect--int-to-cons (min beg end))
(xselect--int-to-cons (max beg end))))))))
-(defun xselect-convert-to-os (selection type size)
+(defun xselect-convert-to-os (_selection _type _size)
(symbol-name system-type))
-(defun xselect-convert-to-host (selection type size)
+(defun xselect-convert-to-host (_selection _type _size)
(system-name))
-(defun xselect-convert-to-user (selection type size)
+(defun xselect-convert-to-user (_selection _type _size)
(user-full-name))
-(defun xselect-convert-to-class (selection type size)
+(defun xselect-convert-to-class (_selection _type _size)
"Convert selection to class.
This function returns the string \"Emacs\"."
"Emacs")
;; We do not try to determine the name Emacs was invoked with,
;; because it is not clean for a program's behavior to depend on that.
-(defun xselect-convert-to-name (selection type size)
+(defun xselect-convert-to-name (_selection _type _size)
"Convert selection to name.
This function returns the string \"emacs\"."
"emacs")
-(defun xselect-convert-to-integer (selection type value)
+(defun xselect-convert-to-integer (_selection _type value)
(and (integerp value)
(xselect--int-to-cons value)))
-(defun xselect-convert-to-atom (selection type value)
+(defun xselect-convert-to-atom (_selection _type value)
(and (symbolp value) value))
-(defun xselect-convert-to-identity (selection type value) ; used internally
+(defun xselect-convert-to-identity (_selection _type value) ; used internally
(vector value))
(setq selection-converter-alist
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index c88b55e964b..1a929ebb58a 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -88,7 +88,7 @@
(defcustom shadow-noquery nil
"If t, always copy shadow files without asking.
-If nil \(the default), always ask. If not nil and not t, ask only if there
+If nil (the default), always ask. If not nil and not t, ask only if there
is no buffer currently visiting the file."
:type '(choice (const t) (const nil) (other :tag "Ask if no buffer" maybe))
:group 'shadow)
@@ -125,7 +125,7 @@ Default: ~/.shadow_todo"
;;; The following two variables should in most cases initialize themselves
;;; correctly. They are provided as variables in case the defaults are wrong
-;;; on your machine \(and for efficiency).
+;;; on your machine (and for efficiency).
(defvar shadow-system-name (system-name)
"The complete hostname of this machine.")
@@ -138,7 +138,7 @@ Default: ~/.shadow_todo"
;;;
(defvar shadow-clusters nil
- "List of host clusters \(see `shadow-define-cluster').")
+ "List of host clusters (see `shadow-define-cluster').")
(defvar shadow-literal-groups nil
"List of files that are shared between hosts.
@@ -259,7 +259,7 @@ information defining the cluster. For interactive use, call
;;; SITES
(defun shadow-site-cluster (site)
- "Given a SITE \(hostname or cluster name), return cluster it is in, or nil."
+ "Given a SITE (hostname or cluster name), return cluster it is in, or nil."
(or (assoc site shadow-clusters)
(shadow-find
(function (lambda (x)
@@ -295,7 +295,7 @@ be matched against the primary of SITE2."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun shadow-parse-fullname (fullname)
- "Parse FULLNAME into \(site user path) list.
+ "Parse FULLNAME into (site user path) list.
Leave it alone if it already is one. Return nil if the argument is
not a full ange-ftp pathname."
(if (listp fullname)
@@ -303,7 +303,7 @@ not a full ange-ftp pathname."
(ange-ftp-ftp-name fullname)))
(defun shadow-parse-name (name)
- "Parse any NAME into \(site user name) list.
+ "Parse any NAME into (site user name) list.
Argument can be a simple name, full ange-ftp name, or already a hup list."
(or (shadow-parse-fullname name)
(list shadow-system-name
@@ -337,8 +337,7 @@ return nil."
(defun shadow-expand-cluster-in-file-name (file)
"If hostname part of FILE is a cluster, expand it to cluster's primary hostname.
Will return the name bare if it is a local file."
- (let ((hup (shadow-parse-name file))
- cluster)
+ (let ((hup (shadow-parse-name file)))
(cond ((null hup) file)
((shadow-local-file hup))
((shadow-make-fullname (shadow-site-primary (nth 0 hup))
@@ -405,10 +404,10 @@ filename expansion or contraction, you must do that yourself first."
;;;###autoload
(defun shadow-define-cluster (name)
- "Edit \(or create) the definition of a cluster NAME.
+ "Edit (or create) the definition of a cluster NAME.
This is a group of hosts that share directories, so that copying to or from
one of them is sufficient to update the file on all of them. Clusters are
-defined by a name, the network address of a primary host \(the one we copy
+defined by a name, the network address of a primary host (the one we copy
files to), and a regular expression that matches the hostnames of all the
sites in the cluster."
(interactive (list (completing-read "Cluster name: " shadow-clusters () ())))
@@ -442,7 +441,7 @@ sites in the cluster."
"Declare a single file to be shared between sites.
It may have different filenames on each site. When this file is edited, the
new version will be copied to each of the other locations. Sites can be
-specific hostnames, or names of clusters \(see `shadow-define-cluster')."
+specific hostnames, or names of clusters (see `shadow-define-cluster')."
(interactive)
(let* ((hup (shadow-parse-fullname
(shadow-contract-file-name (buffer-file-name))))
@@ -466,8 +465,8 @@ specific hostnames, or names of clusters \(see `shadow-define-cluster')."
"Make each of a group of files be shared between hosts.
Prompts for regular expression; files matching this are shared between a list
of sites, which are also prompted for. The filenames must be identical on all
-hosts \(if they aren't, use `shadow-define-literal-group' instead of this
-function). Each site can be either a hostname or the name of a cluster \(see
+hosts (if they aren't, use `shadow-define-literal-group' instead of this
+function). Each site can be either a hostname or the name of a cluster (see
`shadow-define-cluster')."
(interactive)
(let ((regexp (read-string
@@ -545,7 +544,7 @@ permanently, remove the group from `shadow-literal-groups' or
(defun shadow-make-group (regexp sites usernames)
"Make a description of a file group---
-actually a list of regexp ange-ftp file names---from REGEXP \(name of file to
+actually a list of regexp ange-ftp file names---from REGEXP (name of file to
be shadowed), list of SITES, and corresponding list of USERNAMES for each
site."
(if sites
@@ -572,7 +571,7 @@ site."
(to (shadow-expand-cluster-in-file-name (cdr s))))
(when buffer
(set-buffer buffer)
- (condition-case i
+ (condition-case nil
(progn
(write-region nil nil to)
(shadow-remove-from-todo s))
@@ -581,7 +580,7 @@ site."
(defun shadow-shadows-of (file)
"Return copy operations needed to update FILE.
Filename should have clusters expanded, but otherwise can have any format.
-Return value is a list of dotted pairs like \(from . to), where from
+Return value is a list of dotted pairs like (from . to), where from
and to are absolute file names."
(or (symbol-value (intern-soft file shadow-hashtable))
(let* ((absolute-file (shadow-expand-file-name
diff --git a/lisp/shell.el b/lisp/shell.el
index dde81c6cb95..57187b6d7f9 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -494,7 +494,7 @@ buffer."
'shell-dir-cookie-watcher nil t))
(comint-read-input-ring t)))
-(defun shell-filter-ctrl-a-ctrl-b (string)
+(defun shell-filter-ctrl-a-ctrl-b (_string)
"Remove `^A' and `^B' characters from comint output.
Bash uses these characters as internal quoting characters in its
@@ -585,7 +585,7 @@ Otherwise, one argument `-i' is passed to the shell.
(current-buffer)))
;; On remote hosts, the local `shell-file-name' might be useless.
- (if (and (interactive-p)
+ (if (and (called-interactively-p 'any)
(file-remote-p default-directory)
(null explicit-shell-file-name)
(null (getenv "ESHELL")))
@@ -692,7 +692,7 @@ and `shell-pushd-dunique' control the behavior of the relevant command.
Environment variables are expanded, see function `substitute-in-file-name'."
(if shell-dirtrackp
;; We fail gracefully if we think the command will fail in the shell.
- (condition-case chdir-failure
+ (condition-case nil
(let ((start (progn (string-match
(concat "^" shell-command-separator-regexp)
str) ; skip whitespace
diff --git a/lisp/simple.el b/lisp/simple.el
index f0560c48a3b..3cfc579aad0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -33,7 +33,13 @@
(declare-function widget-convert "wid-edit" (type &rest args))
(declare-function shell-mode "shell" ())
+;;; From compile.el
(defvar compilation-current-error)
+(defvar compilation-context-lines)
+;;; From comint.el
+(defvar comint-file-name-quote-list)
+(defvar comint-file-name-chars)
+(defvar comint-delimiter-argument-list)
(defcustom idle-update-delay 0.5
"Idle time delay before updating various things on the screen.
@@ -889,8 +895,8 @@ the end of the line."
(memq (char-before) '(?\t ?\n))
(eobp)
(eq (char-after) ?\n)))
- (let* ((ocol (current-column))
- (val (delete-char (- n) killflag)))
+ (let ((ocol (current-column)))
+ (delete-char (- n) killflag)
(save-excursion
(insert-char ?\s (- ocol (current-column)) nil))))
;; Otherwise, do simple deletion.
@@ -1365,7 +1371,7 @@ in this use of the minibuffer.")
(defun minibuffer-history-initialize ()
(setq minibuffer-text-before-history nil))
-(defun minibuffer-avoid-prompt (new old)
+(defun minibuffer-avoid-prompt (_new _old)
"A point-motion hook for the minibuffer, that moves point out of the prompt."
(constrain-to-field nil (point-max)))
@@ -1731,7 +1737,7 @@ in the search status stack."
`(lambda (cmd)
(minibuffer-history-isearch-pop-state cmd ,minibuffer-history-position)))
-(defun minibuffer-history-isearch-pop-state (cmd hist-pos)
+(defun minibuffer-history-isearch-pop-state (_cmd hist-pos)
"Restore the minibuffer history search state.
Go to the history element by the absolute history position HIST-POS."
(goto-history-element hist-pos))
@@ -1923,7 +1929,7 @@ we stop and ignore all further elements."
(undo-list (list nil))
undo-adjusted-markers
some-rejected
- undo-elt undo-elt temp-undo-list delta)
+ undo-elt temp-undo-list delta)
(while undo-list-copy
(setq undo-elt (car undo-list-copy))
(let ((keep-this
@@ -4404,7 +4410,7 @@ If nil, `line-move' moves point by logical lines."
;; This is the guts of next-line and previous-line.
;; Arg says how many lines to move.
;; The value is t if we can move the specified number of lines.
-(defun line-move-1 (arg &optional noerror to-end)
+(defun line-move-1 (arg &optional noerror _to-end)
;; Don't run any point-motion hooks, and disregard intangibility,
;; for intermediate positions.
(let ((inhibit-point-motion-hooks t)
@@ -6265,27 +6271,27 @@ select the completion near point.\n\n"))))))
;; These functions -- which are not commands -- each add one modifier
;; to the following event.
-(defun event-apply-alt-modifier (ignore-prompt)
+(defun event-apply-alt-modifier (_ignore-prompt)
"\\<function-key-map>Add the Alt modifier to the following event.
For example, type \\[event-apply-alt-modifier] & to enter Alt-&."
(vector (event-apply-modifier (read-event) 'alt 22 "A-")))
-(defun event-apply-super-modifier (ignore-prompt)
+(defun event-apply-super-modifier (_ignore-prompt)
"\\<function-key-map>Add the Super modifier to the following event.
For example, type \\[event-apply-super-modifier] & to enter Super-&."
(vector (event-apply-modifier (read-event) 'super 23 "s-")))
-(defun event-apply-hyper-modifier (ignore-prompt)
+(defun event-apply-hyper-modifier (_ignore-prompt)
"\\<function-key-map>Add the Hyper modifier to the following event.
For example, type \\[event-apply-hyper-modifier] & to enter Hyper-&."
(vector (event-apply-modifier (read-event) 'hyper 24 "H-")))
-(defun event-apply-shift-modifier (ignore-prompt)
+(defun event-apply-shift-modifier (_ignore-prompt)
"\\<function-key-map>Add the Shift modifier to the following event.
For example, type \\[event-apply-shift-modifier] & to enter Shift-&."
(vector (event-apply-modifier (read-event) 'shift 25 "S-")))
-(defun event-apply-control-modifier (ignore-prompt)
+(defun event-apply-control-modifier (_ignore-prompt)
"\\<function-key-map>Add the Ctrl modifier to the following event.
For example, type \\[event-apply-control-modifier] & to enter Ctrl-&."
(vector (event-apply-modifier (read-event) 'control 26 "C-")))
-(defun event-apply-meta-modifier (ignore-prompt)
+(defun event-apply-meta-modifier (_ignore-prompt)
"\\<function-key-map>Add the Meta modifier to the following event.
For example, type \\[event-apply-meta-modifier] & to enter Meta-&."
(vector (event-apply-modifier (read-event) 'meta 27 "M-")))
@@ -6636,11 +6642,10 @@ See also `normal-erase-is-backspace'."
(cond ((or (memq window-system '(x w32 ns pc))
(memq system-type '(ms-dos windows-nt)))
- (let* ((bindings
- `(([M-delete] [M-backspace])
- ([C-M-delete] [C-M-backspace])
- ([?\e C-delete] [?\e C-backspace])))
- (old-state (lookup-key local-function-key-map [delete])))
+ (let ((bindings
+ `(([M-delete] [M-backspace])
+ ([C-M-delete] [C-M-backspace])
+ ([?\e C-delete] [?\e C-backspace]))))
(if enabled
(progn
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index d160a836359..3e707ff3832 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -659,7 +659,7 @@ speedbar is loaded. You may place anything you like in this list
before speedbar has been loaded."
:group 'speedbar
:type '(repeat (regexp :tag "Directory Regexp"))
- :set (lambda (sym val)
+ :set (lambda (_sym val)
(setq speedbar-ignored-directory-expressions val
speedbar-ignored-directory-regexp
(speedbar-extension-list-to-regex val))))
@@ -713,7 +713,7 @@ need to also modify `completion-ignored-extension' which will also help
file completion."
:group 'speedbar
:type '(repeat (regexp :tag "Extension Regexp"))
- :set (lambda (sym val)
+ :set (lambda (_sym val)
(set 'speedbar-supported-extension-expressions val)
(set 'speedbar-file-regexp (speedbar-extension-list-to-regex val))))
@@ -1922,7 +1922,7 @@ the file-system."
nl))
))
-(defun speedbar-directory-buttons (directory index)
+(defun speedbar-directory-buttons (directory _index)
"Insert a single button group at point for DIRECTORY.
Each directory part is a different button. If part of the directory
matches the user directory ~, then it is replaced with a ~.
@@ -3313,7 +3313,7 @@ Optional argument ARG indicates that any cache should be flushed."
;; hidden by default anyway. Yay! It's easy.
)
-(defun speedbar-find-file (text token indent)
+(defun speedbar-find-file (text _token indent)
"Speedbar click handler for filenames.
TEXT, the file will be displayed in the attached frame.
TOKEN is unused, but required by the click handler. INDENT is the
@@ -3333,7 +3333,7 @@ current indentation level."
(speedbar-set-timer dframe-update-speed))
(dframe-maybee-jump-to-attached-frame))
-(defun speedbar-dir-follow (text token indent)
+(defun speedbar-dir-follow (text _token indent)
"Speedbar click handler for directory names.
Clicking a directory will cause the speedbar to list files in
the subdirectory TEXT. TOKEN is an unused requirement. The
@@ -3401,7 +3401,7 @@ expanded. INDENT is the current indentation level."
(speedbar-center-buffer-smartly)
(save-excursion (speedbar-stealthy-updates)))
-(defun speedbar-directory-buttons-follow (text token indent)
+(defun speedbar-directory-buttons-follow (_text token _indent)
"Speedbar click handler for default directory buttons.
TEXT is the button clicked on. TOKEN is the directory to follow.
INDENT is the current indentation level and is unused."
@@ -3422,7 +3422,6 @@ indentation level."
(cond ((string-match "+" text) ;we have to expand this file
(let* ((fn (expand-file-name (concat (speedbar-line-directory indent)
token)))
- (mode nil)
(lst (speedbar-fetch-dynamic-tags fn)))
;; if no list, then remove expando button
(if (not lst)
@@ -3438,7 +3437,7 @@ indentation level."
(t (error "Ooops... not sure what to do")))
(speedbar-center-buffer-smartly))
-(defun speedbar-tag-find (text token indent)
+(defun speedbar-tag-find (_text token indent)
"For the tag TEXT in a file TOKEN, go to that position.
INDENT is the current indentation level."
(let ((file (speedbar-line-directory indent)))
@@ -3838,12 +3837,12 @@ regular expression EXPR."
)
"Menu item elements shown when displaying a buffer list.")
-(defun speedbar-buffer-buttons (directory zero)
+(defun speedbar-buffer-buttons (_directory _zero)
"Create speedbar buttons based on the buffers currently loaded.
DIRECTORY is the directory of the currently active buffer, and ZERO is 0."
(speedbar-buffer-buttons-engine nil))
-(defun speedbar-buffer-buttons-temp (directory zero)
+(defun speedbar-buffer-buttons-temp (_directory _zero)
"Create speedbar buttons based on the buffers currently loaded.
DIRECTORY is the directory of the currently active buffer, and ZERO is 0."
(speedbar-buffer-buttons-engine t))
@@ -3901,11 +3900,8 @@ If TEMP is non-nil, then clicking on a buffer restores the previous display."
(defun speedbar-buffers-tail-notes (buffer)
"Add a note to the end of the last tag line.
Argument BUFFER is the buffer being tested."
- (let (mod ro)
- (with-current-buffer buffer
- (setq mod (buffer-modified-p)
- ro buffer-read-only))
- (if ro (speedbar-insert-button "%" nil nil nil nil t))))
+ (when (with-current-buffer buffer buffer-read-only)
+ (speedbar-insert-button "%" nil nil nil nil t)))
(defun speedbar-buffers-item-info ()
"Display information about the current buffer on the current line."
@@ -3920,7 +3916,7 @@ Argument BUFFER is the buffer being tested."
(with-current-buffer buffer (buffer-size))
(or (buffer-file-name buffer) "<No file>"))))))
-(defun speedbar-buffers-line-directory (&optional depth)
+(defun speedbar-buffers-line-directory (&optional _depth)
"Fetch the directory of the file (buffer) specified on the current line.
Optional argument DEPTH specifies the current depth of the back search."
(save-excursion
@@ -3937,7 +3933,7 @@ Optional argument DEPTH specifies the current depth of the back search."
"")
(buffer-file-name buffer))))))))
-(defun speedbar-buffer-click (text token indent)
+(defun speedbar-buffer-click (text token _indent)
"When the users clicks on a buffer-button in speedbar.
TEXT is the buffer's name, TOKEN and INDENT are unused."
(if dframe-power-click
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 51e75c4387c..ca0086b3b97 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1631,7 +1631,7 @@ Optional FORCE non-nil will ignore the buffer's read-only status."
(let ((inhibit-read-only t))
(message "Strokifying %s..." buffer)
(goto-char (point-min))
- (let (ext string image)
+ (let (string image)
;; The comment below is what I'd have to do if I wanted to
;; deal with random newlines in the midst of the compressed
;; strings. If I do this, I'll also have to change
diff --git a/lisp/subr.el b/lisp/subr.el
index 387d538b69d..cb1fdb7f608 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -245,7 +245,7 @@ the return value (nil if RESULT is omitted).
(setq ,(car spec) (1+ ,(car spec))))
,@(cdr (cdr spec))))))
-(defmacro declare (&rest specs)
+(defmacro declare (&rest _specs)
"Do not evaluate any arguments and return nil.
Treated as a declaration when used at the right place in a
`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)"
@@ -260,7 +260,7 @@ Otherwise, return result of last form in BODY."
;;;; Basic Lisp functions.
-(defun ignore (&rest ignore)
+(defun ignore (&rest _ignore)
"Do nothing and return nil.
This function accepts any number of arguments, but ignores them."
(interactive)
@@ -1798,7 +1798,7 @@ Signal an error if the program returns with a non-zero exit status."
'process-kill-without-query
"use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
"22.1")
-(defun process-kill-without-query (process &optional flag)
+(defun process-kill-without-query (process &optional _flag)
"Say no query needed if PROCESS is running when Emacs is exited.
Optional second argument if non-nil says to require a query.
Value is t if a query was formerly required."
@@ -3445,7 +3445,7 @@ If SYNTAX is nil, return nil."
;;;; Text clones
-(defun text-clone-maintain (ol1 after beg end &optional len)
+(defun text-clone-maintain (ol1 after beg end &optional _len)
"Propagate the changes made under the overlay OL1 to the other clones.
This is used on the `modification-hooks' property of text clones."
(when (and after (not undo-in-progress) (overlay-start ol1))
diff --git a/lisp/talk.el b/lisp/talk.el
index fd845a7eee0..c16255f7742 100644
--- a/lisp/talk.el
+++ b/lisp/talk.el
@@ -47,10 +47,9 @@ Each element has the form (DISPLAY FRAME BUFFER).")
(defun talk ()
"Connect to the Emacs talk group from the current X display or tty frame."
(interactive)
- (let ((type (frame-live-p (selected-frame)))
- (display (frame-terminal (selected-frame))))
+ (let ((type (frame-live-p (selected-frame))))
(if (or (eq type t) (eq type 'x))
- (talk-add-display
+ (talk-add-display
(terminal-name (frame-terminal (selected-frame))))
(error "Unknown frame type")))
(talk-update-buffers))
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 44908a87b8c..39855a1c8cc 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -1,4 +1,4 @@
-;;; tar-mode.el --- simple editing of tar files from GNU emacs
+;;; tar-mode.el --- simple editing of tar files from GNU Emacs
;; Copyright (C) 1990-1991, 1993-2011 Free Software Foundation, Inc.
@@ -1152,7 +1152,6 @@ to make your changes permanent."
subfile-size)
(with-current-buffer tar-superior-buffer
(let* ((start (tar-header-data-start descriptor))
- (name (tar-header-name descriptor))
(size (tar-header-size descriptor))
(head (memq descriptor tar-parse-info)))
(if (not head)
@@ -1232,7 +1231,7 @@ Leaves the region wide."
;; Used in write-region-annotate-functions to write tar-files out correctly.
-(defun tar-write-region-annotate (start end)
+(defun tar-write-region-annotate (start _end)
;; When called from write-file (and auto-save), `start' is nil.
;; When called from M-x write-region, we assume the user wants to save
;; (part of) the summary, not the tar data.
diff --git a/lisp/terminal.el b/lisp/terminal.el
index d888a653c93..0bde04eb2ec 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -1005,7 +1005,7 @@ move to start of new line, clear to end of line."
(unwind-protect
(progn
(set-process-filter te-process
- (function (lambda (p s)
+ (function (lambda (_p s)
(or (eq (length s) 1)
(setq te-pending-output (list 1 s)))
(throw 'char (aref s 0)))))
@@ -1327,7 +1327,7 @@ in the directory specified by `te-terminfo-directory'."
"im=:ei=:dm=:ed=:mi:do=^p^j:nl=^p^j:bs:")
)
-(defun te-tic-sentinel (proc state-change)
+(defun te-tic-sentinel (_proc state-change)
"If tic has finished, delete the .tif file"
(if (equal state-change "finished
")
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 9a9fc8b4a83..59340583997 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -470,7 +470,7 @@ and all `time-stamp-format' compatibility."
(result "")
field-width
field-result
- alt-form change-case require-padding
+ alt-form change-case
(paren-level 0))
(while (< ind fmt-len)
(setq cur-char (aref format ind))
@@ -480,7 +480,7 @@ and all `time-stamp-format' compatibility."
(cond
((eq cur-char ?%)
;; eat any additional args to allow for future expansion
- (setq alt-form nil change-case nil require-padding nil field-width "")
+ (setq alt-form nil change-case nil field-width "")
(while (progn
(setq ind (1+ ind))
(setq cur-char (if (< ind fmt-len)
diff --git a/lisp/time.el b/lisp/time.el
index 2e9dd252bd6..7d752c85d4d 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -365,6 +365,25 @@ would give mode line times like `94/12/30 21:07:48 (UTC)'."
size
nil)))
+(with-no-warnings
+ ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix".
+ (defvar now)
+ (defvar time)
+ (defvar load)
+ (defvar mail)
+ (defvar 24-hours)
+ (defvar hour)
+ (defvar 12-hours)
+ (defvar am-pm)
+ (defvar minutes)
+ (defvar seconds)
+ (defvar time-zone)
+ (defvar day)
+ (defvar year)
+ (defvar monthname)
+ (defvar month)
+ (defvar dayname))
+
(defun display-time-update ()
"Update the display-time info for the mode line.
However, don't redisplay right now.
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 578de1def97..8fdce17df86 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -88,7 +88,7 @@ Define this locally to override the global tool bar.")
(defconst tool-bar-keymap-cache (make-hash-table :weakness t :test 'equal))
-(defun tool-bar-make-keymap (&optional ignore)
+(defun tool-bar-make-keymap (&optional _ignore)
"Generate an actual keymap from `tool-bar-map'.
Its main job is to figure out which images to use based on the display's
color capability and based on the available image libraries."
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index f135d98d716..bfe53dc71b7 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -198,7 +198,7 @@ This might return nil if the event did not occur over a buffer."
(setq tooltip-timeout-id
(add-timeout (tooltip-delay) 'tooltip-timeout nil)))
-(defun tooltip-timeout (object)
+(defun tooltip-timeout (_object)
"Function called when timer with id `tooltip-timeout-id' fires."
(run-hook-with-args-until-success 'tooltip-functions
tooltip-last-mouse-motion-event))
@@ -256,7 +256,7 @@ in echo area."
(declare-function x-hide-tip "xfns.c" ())
-(defun tooltip-hide (&optional ignored-arg)
+(defun tooltip-hide (&optional _ignored-arg)
"Hide a tooltip, if one is displayed.
Value is non-nil if tooltip was open."
(tooltip-cancel-delayed-tip)
@@ -373,7 +373,7 @@ MSG is either a help string to display, or nil to cancel the display."
;; On text-only displays, try `tooltip-show-help-non-mode'.
(tooltip-show-help-non-mode msg)))
-(defun tooltip-help-tips (event)
+(defun tooltip-help-tips (_event)
"Hook function to display a help tooltip.
This is installed on the hook `tooltip-functions', which
is run when the timer with id `tooltip-timeout-id' fires.
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index 77159573c9d..c5aa1f330af 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -657,6 +657,8 @@ This hook should be local in the buffer setup to display widgets.")
(widget-get tree :dynargs)))
tree))
+(defvar widget-glyph-enable) ; XEmacs
+
(defun tree-widget-value-create (tree)
"Create the TREE tree-widget."
(let* ((node (tree-widget-node tree))
@@ -792,7 +794,7 @@ Each function is passed a tree-widget. If the value of the :open
property is non-nil the tree has been expanded, else collapsed.
This hook should be local in the buffer setup to display widgets.")
-(defun tree-widget-action (tree &optional event)
+(defun tree-widget-action (tree &optional _event)
"Handle the :action of the TREE tree-widget.
That is, toggle expansion of the TREE tree-widget.
Ignore the EVENT argument."
diff --git a/lisp/type-break.el b/lisp/type-break.el
index e6782fa23f8..62a44724d40 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -76,7 +76,7 @@
See the docstring for the `type-break-mode' command for more information.
Setting this variable directly does not take effect;
use either \\[customize] or the function `type-break-mode'."
- :set (lambda (symbol value)
+ :set (lambda (_symbol value)
(type-break-mode (if value 1 -1)))
:initialize 'custom-initialize-default
:type 'boolean
@@ -831,7 +831,7 @@ keystroke threshold has been exceeded."
(quit
(type-break-schedule type-break-query-interval))))))
-(defun type-break-noninteractive-query (&optional ignored-args)
+(defun type-break-noninteractive-query (&optional _ignored-args)
"Null query function which doesn't interrupt user and assumes `no'.
It prints a reminder in the echo area to take a break, but doesn't enforce
this or ask the user to start one right now."
diff --git a/lisp/view.el b/lisp/view.el
index b7b43e35997..e91c4dd175c 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -807,7 +807,7 @@ Also set the mark at the position where point was."
(forward-line (1- line))
(view-recenter))
-(defun View-back-to-mark (&optional ignore)
+(defun View-back-to-mark (&optional _ignore)
"Return to last mark set in View mode, else beginning of file.
Display that line at the center of the window.
This command pops the mark ring, so that successive
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 20f1a1b560e..a002a63e3f8 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -1,4 +1,4 @@
-;;; w32-fns.el --- Lisp routines for Windows NT
+;;; w32-fns.el --- Lisp routines for 32-bit Windows
;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
@@ -285,7 +285,7 @@ Note that on MS-Windows, primary and secondary selections set by Emacs
are not available to other programs."
(put 'x-selections (or type 'PRIMARY) data))
-(defun x-get-selection (&optional type data-type)
+(defun x-get-selection (&optional type _data-type)
"Return the value of an X Windows selection.
The argument TYPE (default `PRIMARY') says which selection,
and the argument DATA-TYPE (default `STRING') says
@@ -431,6 +431,11 @@ Consult the selection. Treat empty strings as if they were unset."
;;;; Support for build process
+
+;; From autoload.el
+(defvar autoload-make-program)
+(defvar generated-autoload-file)
+
(defun w32-batch-update-autoloads ()
"Like `batch-update-autoloads', but takes the name of the autoloads file
from the command line.
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 11ef25d4eac..7ac7f535910 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -540,7 +540,7 @@ and proceed depending on the answer."
(interactive)
(customize-apropos "wdired" 'groups))
-(defun wdired-revert (&optional arg noconfirm)
+(defun wdired-revert (&optional _arg _noconfirm)
"Discard changes in the buffer and update it based on changes on disk.
Optional arguments are ignored."
(wdired-change-to-dired-mode)
@@ -648,7 +648,7 @@ If OLD, return the old target. If MOVE, move point before it."
(if (< arg 0)
(funcall command arg)
(while (> arg 0)
- (condition-case err
+ (condition-case nil
(progn
(funcall command 1)
(setq arg (1- arg)))
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 8d25a161b47..955c417ee54 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2046,7 +2046,7 @@ can't split window to display whitespace toggle options"))
"Scroll help window, if it exists.
If UP is non-nil, scroll up; otherwise, scroll down."
- (condition-case data-help
+ (condition-case nil
(let ((buffer (get-buffer whitespace-help-buffer-name)))
(if buffer
(with-selected-window (get-buffer-window buffer)
@@ -2494,7 +2494,7 @@ buffer."
r))
-(defun whitespace-buffer-changed (beg end)
+(defun whitespace-buffer-changed (_beg _end)
"Set `whitespace-buffer-changed' variable to t."
(setq whitespace-buffer-changed t))
diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el
index 23396a900c0..b765e46b9c6 100644
--- a/lisp/wid-browse.el
+++ b/lisp/wid-browse.el
@@ -189,7 +189,7 @@ The :value of the widget shuld be the widget to be browsed."
:value-create 'widget-browse-value-create
:action 'widget-browse-action)
-(defun widget-browse-action (widget &optional event)
+(defun widget-browse-action (widget &optional _event)
;; Create widget browser for WIDGET's :value.
(widget-browse (widget-get widget :value)))
@@ -205,12 +205,12 @@ The :value of the widget shuld be the widget to be browsed."
;;; Keyword Printer Functions.
-(defun widget-browse-widget (widget key value)
+(defun widget-browse-widget (_widget _key value)
"Insert description of WIDGET's KEY VALUE.
VALUE is assumed to be a widget."
(widget-create 'widget-browse value))
-(defun widget-browse-widgets (widget key value)
+(defun widget-browse-widgets (_widget _key value)
"Insert description of WIDGET's KEY VALUE.
VALUE is assumed to be a list of widgets."
(while value
@@ -220,7 +220,7 @@ VALUE is assumed to be a list of widgets."
(when value
(widget-insert " "))))
-(defun widget-browse-sexp (widget key value)
+(defun widget-browse-sexp (_widget _key value)
"Insert description of WIDGET's KEY VALUE.
Nothing is assumed about value."
(let ((pp (condition-case signal
@@ -236,7 +236,7 @@ Nothing is assumed about value."
(widget-insert pp)
(widget-create 'push-button
:tag "show"
- :action (lambda (widget &optional event)
+ :action (lambda (widget &optional _event)
(with-output-to-temp-buffer
"*Pp Eval Output*"
(princ (widget-get widget :value))))
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index c9008d092d4..31cc8ad9ca9 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -414,7 +414,7 @@ the :notify function can't know the new value.")
(overlay-put overlay 'follow-link follow-link)
(overlay-put overlay 'help-echo help-echo)))
-(defun widget-mouse-help (window overlay point)
+(defun widget-mouse-help (_window overlay _point)
"Help-echo callback for widgets whose :help-echo is a function."
(with-current-buffer (overlay-buffer overlay)
(let* ((widget (widget-at (overlay-start overlay)))
@@ -466,7 +466,7 @@ the :notify function can't know the new value.")
(overlay-put overlay 'modification-hooks '(widget-overlay-inactive))
(widget-put widget :inactive overlay))))
-(defun widget-overlay-inactive (&rest junk)
+(defun widget-overlay-inactive (&rest _junk)
"Ignoring the arguments, signal an error."
(unless inhibit-read-only
(error "The widget here is not active")))
@@ -648,7 +648,7 @@ extension (xpm, xbm, gif, jpg, or png) located in
This exists as a variable so it can be set locally in certain
buffers.")
-(defun widget-image-insert (widget tag image &optional down inactive)
+(defun widget-image-insert (widget tag image &optional _down _inactive)
"In WIDGET, insert the text TAG or, if supported, IMAGE.
IMAGE should either be an image or an image file name sans extension
\(xpm, xbm, gif, jpg, or png) located in `widget-image-directory'.
@@ -1307,7 +1307,7 @@ Unlike (get-char-property POS 'field), this works with empty fields too."
(add-hook 'before-change-functions 'widget-before-change nil t)
(add-hook 'after-change-functions 'widget-after-change nil t))
-(defun widget-after-change (from to old)
+(defun widget-after-change (from to _old)
"Adjust field size and text properties."
(let ((field (widget-field-find from))
(other (widget-field-find to)))
@@ -1431,8 +1431,8 @@ The value of the :type attribute should be an unconverted widget type."
(define-widget 'default nil
"Basic widget other widgets are derived from."
- :value-to-internal (lambda (widget value) value)
- :value-to-external (lambda (widget value) value)
+ :value-to-internal (lambda (_widget value) value)
+ :value-to-external (lambda (_widget value) value)
:button-prefix 'widget-button-prefix
:button-suffix 'widget-button-suffix
:complete 'widget-default-complete
@@ -1544,7 +1544,7 @@ During this call, `widget--completing-widget' is bound to WIDGET."
(widget-put widget :to to)))
(widget-clear-undo))
-(defun widget-default-format-handler (widget escape)
+(defun widget-default-format-handler (_widget escape)
(error "Unknown escape `%c'" escape))
(defun widget-default-button-face-get (widget)
@@ -1652,11 +1652,11 @@ During this call, `widget--completing-widget' is bound to WIDGET."
(when parent
(widget-apply parent :notify widget event))))
-(defun widget-default-notify (widget child &optional event)
+(defun widget-default-notify (widget _child &optional event)
"Pass notification to parent."
(widget-default-action widget event))
-(defun widget-default-prompt-value (widget prompt value unbound)
+(defun widget-default-prompt-value (_widget prompt _value _unbound)
"Read an arbitrary value."
(eval-minibuffer prompt))
@@ -1704,14 +1704,14 @@ as the argument to `documentation-property'."
;; Match if the value is the same.
(equal (widget-get widget :value) value))
-(defun widget-item-match-inline (widget values)
+(defun widget-item-match-inline (widget vals)
;; Match if the value is the same.
(let ((value (widget-get widget :value)))
(and (listp value)
- (<= (length value) (length values))
- (let ((head (widget-sublist values 0 (length value))))
+ (<= (length value) (length vals))
+ (let ((head (widget-sublist vals 0 (length value))))
(and (equal head value)
- (cons head (widget-sublist values (length value))))))))
+ (cons head (widget-sublist vals (length value))))))))
(defun widget-sublist (list start &optional end)
"Return the sublist of LIST from START to END.
@@ -1796,7 +1796,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to an info file."
:action 'widget-info-link-action)
-(defun widget-info-link-action (widget &optional event)
+(defun widget-info-link-action (widget &optional _event)
"Open the info node specified by WIDGET."
(info (widget-value widget)))
@@ -1806,7 +1806,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to an www page."
:action 'widget-url-link-action)
-(defun widget-url-link-action (widget &optional event)
+(defun widget-url-link-action (widget &optional _event)
"Open the URL specified by WIDGET."
(browse-url (widget-value widget)))
@@ -1816,7 +1816,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to an Emacs function."
:action 'widget-function-link-action)
-(defun widget-function-link-action (widget &optional event)
+(defun widget-function-link-action (widget &optional _event)
"Show the function specified by WIDGET."
(describe-function (widget-value widget)))
@@ -1826,7 +1826,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to an Emacs variable."
:action 'widget-variable-link-action)
-(defun widget-variable-link-action (widget &optional event)
+(defun widget-variable-link-action (widget &optional _event)
"Show the variable specified by WIDGET."
(describe-variable (widget-value widget)))
@@ -1836,7 +1836,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to a file."
:action 'widget-file-link-action)
-(defun widget-file-link-action (widget &optional event)
+(defun widget-file-link-action (widget &optional _event)
"Find the file specified by WIDGET."
(find-file (widget-value widget)))
@@ -1846,7 +1846,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to an Emacs Lisp library file."
:action 'widget-emacs-library-link-action)
-(defun widget-emacs-library-link-action (widget &optional event)
+(defun widget-emacs-library-link-action (widget &optional _event)
"Find the Emacs library file specified by WIDGET."
(find-file (locate-library (widget-value widget))))
@@ -1856,7 +1856,7 @@ If END is omitted, it defaults to the length of LIST."
"A link to Commentary in an Emacs Lisp library file."
:action 'widget-emacs-commentary-link-action)
-(defun widget-emacs-commentary-link-action (widget &optional event)
+(defun widget-emacs-commentary-link-action (widget &optional _event)
"Find the Commentary section of the Emacs file specified by WIDGET."
(finder-commentary (widget-value widget)))
@@ -1887,7 +1887,7 @@ by some other text in the `:format' string (if specified)."
(defvar widget-field-history nil
"History of field minibuffer edits.")
-(defun widget-field-prompt-internal (widget prompt initial history)
+(defun widget-field-prompt-internal (_widget prompt initial history)
"Read string for WIDGET prompting with PROMPT.
INITIAL is the initial input and HISTORY is a symbol containing
the earlier input."
@@ -1907,7 +1907,7 @@ the earlier input."
(defvar widget-edit-functions nil)
-(defun widget-field-action (widget &optional event)
+(defun widget-field-action (widget &optional _event)
"Move to next field."
(widget-forward 1)
(run-hook-with-args 'widget-edit-functions widget))
@@ -1922,8 +1922,7 @@ the earlier input."
"Set an editable text field WIDGET to VALUE"
(let ((from (widget-field-start widget))
(to (widget-field-text-end widget))
- (buffer (widget-field-buffer widget))
- (size (widget-get widget :size)))
+ (buffer (widget-field-buffer widget)))
(when (and from to (buffer-live-p buffer))
(with-current-buffer buffer
(goto-char from)
@@ -1983,7 +1982,7 @@ the earlier input."
result))
(widget-get widget :value))))
-(defun widget-field-match (widget value)
+(defun widget-field-match (_widget value)
;; Match any string.
(stringp value))
@@ -2054,7 +2053,7 @@ when he invoked the menu."
:type 'boolean
:group 'widgets)
-(defun widget-choice-mouse-down-action (widget &optional event)
+(defun widget-choice-mouse-down-action (widget &optional _event)
;; Return non-nil if we need a menu.
(let ((args (widget-get widget :args))
(old (widget-get widget :choice)))
@@ -2138,14 +2137,14 @@ when he invoked the menu."
found (widget-apply current :match value)))
found))
-(defun widget-choice-match-inline (widget values)
+(defun widget-choice-match-inline (widget vals)
;; Matches if one of the choices matches.
(let ((args (widget-get widget :args))
current found)
(while (and args (null found))
(setq current (car args)
args (cdr args)
- found (widget-match-inline current values)))
+ found (widget-match-inline current vals)))
found))
;;; The `toggle' Widget.
@@ -2155,7 +2154,7 @@ when he invoked the menu."
:format "%[%v%]\n"
:value-create 'widget-toggle-value-create
:action 'widget-toggle-action
- :match (lambda (widget value) t)
+ :match (lambda (_widget _value) t)
:on "on"
:off "off")
@@ -2271,29 +2270,29 @@ If the item is checked, CHOSEN is a cons whose cdr is the value."
(and button (widget-put widget :buttons (cons button buttons)))
(and child (widget-put widget :children (cons child children))))))
-(defun widget-checklist-match (widget values)
+(defun widget-checklist-match (widget vals)
;; All values must match a type in the checklist.
- (and (listp values)
- (null (cdr (widget-checklist-match-inline widget values)))))
+ (and (listp vals)
+ (null (cdr (widget-checklist-match-inline widget vals)))))
-(defun widget-checklist-match-inline (widget values)
+(defun widget-checklist-match-inline (widget vals)
;; Find the values which match a type in the checklist.
(let ((greedy (widget-get widget :greedy))
(args (copy-sequence (widget-get widget :args)))
found rest)
- (while values
- (let ((answer (widget-checklist-match-up args values)))
+ (while vals
+ (let ((answer (widget-checklist-match-up args vals)))
(cond (answer
- (let ((vals (widget-match-inline answer values)))
+ (let ((vals (widget-match-inline answer vals)))
(setq found (append found (car vals))
- values (cdr vals)
+ vals (cdr vals)
args (delq answer args))))
(greedy
- (setq rest (append rest (list (car values)))
- values (cdr values)))
+ (setq rest (append rest (list (car vals)))
+ vals (cdr vals)))
(t
- (setq rest (append rest values)
- values nil)))))
+ (setq rest (append rest vals)
+ vals nil)))))
(cons found rest)))
(defun widget-checklist-match-find (widget &optional vals)
@@ -2375,7 +2374,7 @@ Return an alist of (TYPE MATCH)."
:off "( )"
:off-glyph "radio0")
-(defun widget-radio-button-notify (widget child &optional event)
+(defun widget-radio-button-notify (widget _child &optional event)
;; Tell daddy.
(widget-apply (widget-get widget :parent) :action widget event))
@@ -2544,7 +2543,7 @@ Return an alist of (TYPE MATCH)."
:help-echo "Insert a new item into the list at this position."
:action 'widget-insert-button-action)
-(defun widget-insert-button-action (widget &optional event)
+(defun widget-insert-button-action (widget &optional _event)
;; Ask the parent to insert a new item.
(widget-apply (widget-get widget :parent)
:insert-before (widget-get widget :widget)))
@@ -2557,7 +2556,7 @@ Return an alist of (TYPE MATCH)."
:help-echo "Delete this item from the list."
:action 'widget-delete-button-action)
-(defun widget-delete-button-action (widget &optional event)
+(defun widget-delete-button-action (widget &optional _event)
;; Ask the parent to insert a new item.
(widget-apply (widget-get widget :parent)
:delete-at (widget-get widget :widget)))
@@ -2780,10 +2779,10 @@ Return an alist of (TYPE MATCH)."
;; Get the default of the components.
(mapcar 'widget-default-get (widget-get widget :args)))
-(defun widget-group-match (widget values)
+(defun widget-group-match (widget vals)
;; Match if the components match.
- (and (listp values)
- (let ((match (widget-group-match-inline widget values)))
+ (and (listp vals)
+ (let ((match (widget-group-match-inline widget vals)))
(and match (null (cdr match))))))
(defun widget-group-match-inline (widget vals)
@@ -2820,7 +2819,7 @@ The following properties have special meanings for this widget:
:off "Show"
:value-create 'widget-visibility-value-create
:action 'widget-toggle-action
- :match (lambda (widget value) t))
+ :match (lambda (_widget _value) t))
(defalias 'widget-visibility-value-create 'widget-toggle-value-create)
@@ -2834,7 +2833,7 @@ The following properties have special meanings for this widget:
:help-echo "Describe this symbol"
:action 'widget-documentation-link-action)
-(defun widget-documentation-link-action (widget &optional event)
+(defun widget-documentation-link-action (widget &optional _event)
"Display documentation for WIDGET's value. Ignore optional argument EVENT."
(let* ((string (widget-get widget :value))
(symbol (intern string)))
@@ -2943,7 +2942,7 @@ link for that string."
(widget-documentation-link-add widget start (point))))
(insert ?\n))
-(defun widget-documentation-string-action (widget &rest ignore)
+(defun widget-documentation-string-action (widget &rest _ignore)
;; Toggle documentation.
(let ((parent (widget-get widget :parent)))
(widget-put parent :documentation-shown
@@ -2981,7 +2980,7 @@ Optional ARGS specifies additional keyword arguments for the
:prompt-value 'widget-const-prompt-value
:format "%t\n%d")
-(defun widget-const-prompt-value (widget prompt value unbound)
+(defun widget-const-prompt-value (widget _prompt _value _unbound)
;; Return the value of the const.
(widget-value widget))
@@ -3041,7 +3040,7 @@ widget. If that isn't a list, it's evalled and expected to yield a list."
;; :value-face 'widget-single-line-field
:tag "Regexp")
-(defun widget-regexp-match (widget value)
+(defun widget-regexp-match (_widget value)
;; Match valid regexps.
(and (stringp value)
(condition-case nil
@@ -3113,16 +3112,16 @@ It reads a directory name from an editable text field."
:value nil
:tag "Symbol"
:format "%{%t%}: %v"
- :match (lambda (widget value) (symbolp value))
+ :match (lambda (_widget value) (symbolp value))
:complete-function 'lisp-complete-symbol
:prompt-internal 'widget-symbol-prompt-internal
:prompt-match 'symbolp
:prompt-history 'widget-symbol-prompt-value-history
- :value-to-internal (lambda (widget value)
+ :value-to-internal (lambda (_widget value)
(if (symbolp value)
(symbol-name value)
value))
- :value-to-external (lambda (widget value)
+ :value-to-external (lambda (_widget value)
(if (stringp value)
(intern value)
value)))
@@ -3190,7 +3189,7 @@ It reads a directory name from an editable text field."
:value 'undecided
:prompt-match 'coding-system-p)
-(defun widget-coding-system-prompt-value (widget prompt value unbound)
+(defun widget-coding-system-prompt-value (widget prompt value _unbound)
"Read coding-system from minibuffer."
(if (widget-get widget :base-only)
(intern
@@ -3280,7 +3279,7 @@ It reads a directory name from an editable text field."
(key-description value))
value))
-(defun widget-key-sequence-value-to-external (widget value)
+(defun widget-key-sequence-value-to-external (_widget value)
(if (stringp value)
(if (string-match "\\`[[:space:]]*\\'" value)
widget-key-sequence-default-value
@@ -3294,13 +3293,13 @@ It reads a directory name from an editable text field."
:format "%{%t%}: %v"
:value nil
:validate 'widget-sexp-validate
- :match (lambda (widget value) t)
+ :match (lambda (_widget _value) t)
:value-to-internal 'widget-sexp-value-to-internal
- :value-to-external (lambda (widget value) (read value))
+ :value-to-external (lambda (_widget value) (read value))
:prompt-history 'widget-sexp-prompt-value-history
:prompt-value 'widget-sexp-prompt-value)
-(defun widget-sexp-value-to-internal (widget value)
+(defun widget-sexp-value-to-internal (_widget value)
;; Use pp for printer representation.
(let ((pp (if (symbolp value)
(prin1-to-string value)
@@ -3407,15 +3406,15 @@ To use this type, you must define :match or :match-alternatives."
:format "%{%t%}: %v\n"
:valid-regexp "\\`.\\'"
:error "This field should contain a single character"
- :value-to-internal (lambda (widget value)
+ :value-to-internal (lambda (_widget value)
(if (stringp value)
value
(char-to-string value)))
- :value-to-external (lambda (widget value)
+ :value-to-external (lambda (_widget value)
(if (stringp value)
(aref value 0)
value))
- :match (lambda (widget value)
+ :match (lambda (_widget value)
(characterp value)))
(define-widget 'list 'group
@@ -3428,8 +3427,8 @@ To use this type, you must define :match or :match-alternatives."
:tag "Vector"
:format "%{%t%}:\n%v"
:match 'widget-vector-match
- :value-to-internal (lambda (widget value) (append value nil))
- :value-to-external (lambda (widget value) (apply 'vector value)))
+ :value-to-internal (lambda (_widget value) (append value nil))
+ :value-to-external (lambda (_widget value) (apply 'vector value)))
(defun widget-vector-match (widget value)
(and (vectorp value)
@@ -3441,9 +3440,9 @@ To use this type, you must define :match or :match-alternatives."
:tag "Cons-cell"
:format "%{%t%}:\n%v"
:match 'widget-cons-match
- :value-to-internal (lambda (widget value)
+ :value-to-internal (lambda (_widget value)
(list (car value) (cdr value)))
- :value-to-external (lambda (widget value)
+ :value-to-external (lambda (_widget value)
(apply 'cons value)))
(defun widget-cons-match (widget value)
@@ -3604,7 +3603,7 @@ example:
:button-suffix 'widget-push-button-suffix
:prompt-value 'widget-choice-prompt-value)
-(defun widget-choice-prompt-value (widget prompt value unbound)
+(defun widget-choice-prompt-value (widget prompt value _unbound)
"Make a choice."
(let ((args (widget-get widget :args))
(completion-ignore-case (widget-get widget :case-fold))
@@ -3672,7 +3671,7 @@ example:
:on "on (non-nil)"
:off "off (nil)")
-(defun widget-boolean-prompt-value (widget prompt value unbound)
+(defun widget-boolean-prompt-value (_widget prompt _value _unbound)
;; Toggle a boolean.
(y-or-n-p prompt))
@@ -3699,7 +3698,7 @@ example:
:tag " Choose " :action 'widget-color--choose-action)
(widget-insert " "))
-(defun widget-color--choose-action (widget &optional event)
+(defun widget-color--choose-action (widget &optional _event)
(list-colors-display
nil nil
`(lambda (color)
@@ -3732,8 +3731,6 @@ example:
"Prompt for a color."
(let* ((tag (widget-apply widget :menu-tag-get))
(prompt (concat tag ": "))
- (value (widget-value widget))
- (start (widget-field-start widget))
(answer (facemenu-read-color prompt)))
(unless (zerop (length answer))
(widget-value-set widget answer)
diff --git a/lisp/widget.el b/lisp/widget.el
index 3e6f3132e99..1bac2e44b3f 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -36,7 +36,7 @@
;; Doing this is unnecessary in Emacs 20. Kept as dummy in case
;; external libraries call it. We save a kb or two of purespace by
;; dummying-out such definitions generally.
-(defmacro define-widget-keywords (&rest keys)
+(defmacro define-widget-keywords (&rest _keys)
;; ;; Don't use backquote, since that makes trouble trying to
;; ;; re-bootstrap from just the .el files.
;; (list 'eval-and-compile
diff --git a/lisp/windmove.el b/lisp/windmove.el
index 5e8d019a971..2aef37dd4c8 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -373,14 +373,12 @@ Returns the constrained coordinate."
;; otherwise would be. the only complication is that we need to check
;; if the minibuffer is active, and, if not, pretend that it's not
;; even part of the frame.
-(defun windmove-wrap-loc-for-movement (coord window dir)
+(defun windmove-wrap-loc-for-movement (coord window)
"Takes the constrained COORD and wraps it around for the movement.
This makes an out-of-range x or y coordinate and wraps it around the
frame, giving a coordinate (hopefully) in the window on the other edge
of the frame. WINDOW is the window that movement is relative to (nil
-means the currently selected window); DIR is the direction of the
-movement, one of `left', `up', `right',or `down'.
-Returns the wrapped coordinate."
+means the currently selected window). Returns the wrapped coordinate."
(let* ((frame-edges (windmove-frame-edges window))
(frame-minibuffer (minibuffer-window (if window
(window-frame window)
@@ -474,8 +472,7 @@ DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'."
(other-window-loc
(if windmove-wrap-around
(windmove-wrap-loc-for-movement constrained-other-window-loc
- actual-current-window
- dir)
+ actual-current-window)
constrained-other-window-loc)))
(window-at (car other-window-loc)
(cdr other-window-loc))))
diff --git a/lisp/window.el b/lisp/window.el
index c3f8de6f9dd..9ea00442628 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -251,7 +251,7 @@ The optional argument MINIBUF specifies whether the minibuffer
window shall be counted. See `walk-windows' for the precise
meaning of this argument."
(let ((count 0))
- (walk-windows (lambda (w) (setq count (+ count 1)))
+ (walk-windows (lambda (_w) (setq count (+ count 1)))
minibuf)
count))
@@ -423,7 +423,7 @@ subtree is balanced."
Arguments WINDOW, DELTA and HORIZONTAL are passed on to that function."
;; `adjust-window-trailing-edge' may fail if delta is too large.
(while (>= (abs delta) 1)
- (condition-case err
+ (condition-case nil
(progn
(adjust-window-trailing-edge window delta horizontal)
(setq delta 0))
diff --git a/lisp/woman.el b/lisp/woman.el
index ac4ace62bf1..eb801b55d4d 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1086,6 +1086,9 @@ Set by .PD; used by .SH, .SS, .TP, .LP, .PP, .P, .IP, .HP.")
(defvar woman-nospace nil
"Current no-space mode: nil for normal spacing.
Set by `.ns' request; reset by any output or `.rs' request")
+;; Used for message logging
+(defvar WoMan-current-file nil) ; bound in woman-really-find-file
+(defvar WoMan-Log-header-point-max nil)
(defsubst woman-reset-nospace ()
"Set `woman-nospace' to nil."
@@ -1281,8 +1284,7 @@ cache to be re-read."
;; completions, but to return only a case-sensitive match. This
;; does not seem to work properly by default, so I re-do the
;; completion if necessary.
- (let (files
- (default (current-word)))
+ (let (files)
(or (stringp topic)
(and (if (boundp 'woman-use-topic-at-point)
woman-use-topic-at-point
@@ -1367,16 +1369,17 @@ regexp that is the final component of DIR. Log a warning if list is empty."
(or (file-accessible-directory-p dir)
(WoMan-warn "Ignoring inaccessible `man-page' directory `%s'!" dir)))
-(defun woman-expand-directory-path (woman-manpath woman-path)
- "Expand the manual directories in WOMAN-MANPATH and WOMAN-PATH.
-WOMAN-MANPATH should be a list of general manual directories, while
-WOMAN-PATH should be a list of specific manual directory regexps.
+(defun woman-expand-directory-path (path-dirs path-regexps)
+ "Expand the manual directories in PATH-DIRS and PATH-REGEXPS.
+PATH-DIRS should be a list of general manual directories (like
+`woman-manpath'), while PATH-REGEXPS should be a list of specific
+manual directory regexps (like `woman-path').
Ignore any paths that are unreadable or not directories."
;; Allow each path to be a single string or a list of strings:
- (if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath)))
- (if (not (listp woman-path)) (setq woman-path (list woman-path)))
+ (if (not (listp path-dirs)) (setq path-dirs (list path-dirs)))
+ (if (not (listp path-regexps)) (setq path-regexps (list path-regexps)))
(let (head dirs path)
- (dolist (dir woman-manpath)
+ (dolist (dir path-dirs)
(when (consp dir)
(unless path
(setq path (split-string (getenv "PATH") path-separator t)))
@@ -1390,7 +1393,7 @@ Ignore any paths that are unreadable or not directories."
(setq dir (woman-canonicalize-dir dir)
dirs (nconc dirs (directory-files
dir t woman-manpath-man-regexp)))))
- (dolist (dir woman-path)
+ (dolist (dir path-regexps)
(if (or (null dir)
(null (setq dir (woman-canonicalize-dir dir)
head (file-name-directory dir)))
@@ -1576,6 +1579,8 @@ Also make each path-info component into a list.
;;; tar-mode support
+(defvar global-font-lock-mode) ; defined in font-core.el
+
(defun woman-tar-extract-file ()
"In tar mode, run the WoMan man-page browser on this file."
(interactive)
@@ -2243,7 +2248,7 @@ To be called on original buffer and any .so insertions."
This applies to text between .TE and .TS directives.
Currently set only from '\" t in the first line of the source file.")
-(defun woman-decode-region (from to)
+(defun woman-decode-region (from _to)
"Decode the region between FROM and TO in UN*X man-page source format."
;; Suitable for use in format-alist.
;; But this requires care to control major mode implied font locking.
@@ -4364,9 +4369,9 @@ Format paragraphs upto TO."
(setq tab-stop-list (reverse tab-stop-list))
(woman2-format-paragraphs to))
-(defsubst woman-get-tab-stop (tab-stop-list)
- "If TAB-STOP-LIST is a cons, return its car, else return TAB-STOP-LIST."
- (if (consp tab-stop-list) (car tab-stop-list) tab-stop-list))
+(defsubst woman-get-tab-stop (tab-stops)
+ "If TAB-STOPS is a cons, return its car, else return TAB-STOPS."
+ (if (consp tab-stops) (car tab-stops) tab-stops))
(defun woman-tab-to-tab-stop ()
"Insert spaces to next defined tab-stop column.
@@ -4484,9 +4489,6 @@ Format paragraphs upto TO."
;; The basis for this logging code was shamelessly pirated from bytecomp.el
;; by Jamie Zawinski <jwz@lucid.com> & Hallvard Furuseth <hbf@ulrik.uio.no>
-(defvar WoMan-current-file nil) ; bound in woman-really-find-file
-(defvar WoMan-Log-header-point-max nil)
-
(defun WoMan-log-begin ()
"Log the beginning of formatting in *WoMan-Log*."
(let ((WoMan-current-buffer (buffer-name)))
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index b12cb6c3ab7..1c6af1f45f2 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -145,7 +145,7 @@ any protocol specific data.")
"Return the state in `x-dnd-current-state' for a frame or window."
(cdr (x-dnd-get-state-cons-for-frame frame-or-window)))
-(defun x-dnd-default-test-function (window action types)
+(defun x-dnd-default-test-function (_window _action types)
"The default test function for drag and drop.
WINDOW is where the mouse is when this function is called. It may be
a frame if the mouse is over the menu bar, scroll bar or tool bar.
@@ -225,8 +225,7 @@ DATA is encoded in utf-16. Decode the URL and call `x-dnd-handle-uri-list'."
(string (decode-coding-string data coding))
(strings (split-string string "[\r\n]" t))
;; Can one drop more than one moz-url ?? Assume not.
- (url (car strings))
- (title (car (cdr strings))))
+ (url (car strings)))
(x-dnd-handle-uri-list window action url)))
(defun x-dnd-insert-utf8-text (window action text)
@@ -361,7 +360,7 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized."
(declare-function x-window-property "xfns.c"
(prop &optional frame type source delete-p vector-ret-p))
-(defun x-dnd-handle-old-kde (event frame window message format data)
+(defun x-dnd-handle-old-kde (_event frame window _message _format _data)
"Open the files in a KDE 1.x drop."
(let ((values (x-window-property "DndSelection" frame nil 0 t)))
(x-dnd-handle-uri-list window 'private
@@ -434,7 +433,7 @@ otherwise return the frame coordinates."
(declare-function x-get-selection-internal "xselect.c"
(selection-symbol target-type &optional time-stamp))
-(defun x-dnd-handle-xdnd (event frame window message format data)
+(defun x-dnd-handle-xdnd (event frame window message _format data)
"Receive one XDND event (client message) and send the appropriate reply.
EVENT is the client message. FRAME is where the mouse is now.
WINDOW is the window within FRAME where the mouse is now.
@@ -456,11 +455,8 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent."
(x-get-atom-name (aref data 4))))))))
((equal "XdndPosition" message)
- (let* ((x (car (aref data 2)))
- (y (cdr (aref data 2)))
- (action (x-get-atom-name (aref data 4)))
+ (let* ((action (x-get-atom-name (aref data 4)))
(dnd-source (aref data 0))
- (dnd-time (aref data 3))
(action-type (x-dnd-maybe-call-test-function
window
(cdr (assoc action x-dnd-xdnd-to-action))))
@@ -491,7 +487,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent."
(x-get-selection-internal
'XdndSelection
(intern (x-dnd-current-type window)))))
- success action ret-action)
+ success action)
(setq action (if value
(condition-case info
@@ -502,11 +498,6 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent."
nil))))
(setq success (if action 1 0))
- (setq ret-action
- (if (eq success 1)
- (or (car (rassoc action x-dnd-xdnd-to-action))
- "XdndActionPrivate")
- 0))
(x-send-client-message
frame dnd-source frame "XdndFinished" 32
@@ -591,7 +582,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent."
(2 . private)) ; Motif does not have private, so use copy for private.
"Mapping from number to operation for Motif DND.")
-(defun x-dnd-handle-motif (event frame window message-atom format data)
+(defun x-dnd-handle-motif (event frame window message-atom _format data)
(let* ((message-type (cdr (assoc (aref data 0) x-dnd-motif-message-types)))
(source-byteorder (aref data 1))
(my-byteorder (byteorder))
diff --git a/lisp/xml.el b/lisp/xml.el
index 3c5e316d0f8..52bb0de7ea0 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -188,7 +188,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
(name-chars (concat "-[:digit:]." start-chars))
;;[3] S ::= (#x20 | #x9 | #xD | #xA)+
(whitespace "[ \t\n\r]"))
- ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6]
+ ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6]
;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF]
;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF]
;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
@@ -226,7 +226,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
(defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re
"\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)"))
;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens]
- (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re
+ (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re
"\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*"
whitespace ")\\)"))
;;[57] EnumeratedType ::= NotationType | Enumeration
@@ -247,7 +247,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)")))
;;[75] ExternalID ::= 'SYSTEM' S SystemLiteral
;; | 'PUBLIC' S PubidLiteral S SystemLiteral
-;;[76] NDataDecl ::= S 'NDATA' S
+;;[76] NDataDecl ::= S 'NDATA' S
;;[73] EntityDef ::= EntityValue| (ExternalID NDataDecl?)
;;[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
;;[74] PEDef ::= EntityValue | ExternalID
@@ -433,7 +433,7 @@ Returns one of:
(let* ((node-name (match-string-no-properties 1))
;; Parse the attribute list.
(attrs (xml-parse-attlist xml-ns))
- children pos)
+ children)
;; add the xmlns:* attrs to our cache
(when (consp xml-ns)
@@ -536,8 +536,7 @@ Leave point at the first non-blank character after the tag."
;; Multiple whitespace characters should be replaced with a single one
;; in the attributes
- (let ((string (match-string-no-properties 1))
- (pos 0))
+ (let ((string (match-string-no-properties 1)))
(replace-regexp-in-string "\\s-\\{2,\\}" " " string)
(let ((expansion (xml-substitute-special string)))
(unless (stringp expansion)
@@ -634,7 +633,7 @@ This follows the rule [28] in the XML specifications."
((string-match "^%[^;]+;[ \t\n\r]*$" type) ;; substitution
nil)
(t
- (if xml-validating-parser
+ (if xml-validating-parser
(error "XML: (Validity) Invalid element type in the DTD"))))
;; rule [45]: the element declaration must be unique
@@ -666,7 +665,7 @@ This follows the rule [28] in the XML specifications."
(goto-char (match-end 0))
(setq xml-entity-alist
(append xml-entity-alist
- (list (cons name
+ (list (cons name
(with-temp-buffer
(insert value)
(goto-char (point-min))
@@ -769,7 +768,7 @@ This follows the rule [28] in the XML specifications."
(let* ((this-part (match-string-no-properties 1 string))
(prev-part (substring string point (match-beginning 0)))
(entity (assoc this-part xml-entity-alist))
- (expansion
+ (expansion
(cond ((string-match "#\\([0-9]+\\)" this-part)
(let ((c (decode-char
'ucs
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 66542578d76..403aa5d158b 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -50,7 +50,7 @@
M-down-mouse-1 M-down-mouse-2 M-down-mouse-3))
(put event-type 'event-kind 'mouse-click))
-(defun xterm-mouse-translate (event)
+(defun xterm-mouse-translate (_event)
"Read a click and release event from XTerm."
(save-excursion
(save-window-excursion
@@ -228,7 +228,7 @@ down the SHIFT key while pressing the mouse button."
(dolist (terminal (terminal-list))
(turn-on-xterm-mouse-tracking-on-terminal terminal)))
-(defun turn-off-xterm-mouse-tracking (&optional force)
+(defun turn-off-xterm-mouse-tracking (&optional _force)
"Disable Emacs mouse tracking in xterm."
(dolist (terminal (terminal-list))
(turn-off-xterm-mouse-tracking-on-terminal terminal)))