diff options
| author | Paul Eggert | 2011-04-19 07:46:13 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-19 07:46:13 -0700 |
| commit | 0a20c80c9cee34a71b975bb37ac811bd339eaf9f (patch) | |
| tree | 5dc019993c292129df8916c61ed608f0094b7b37 | |
| parent | ec8df74431a76616a83806e1c1f4a094731a3f77 (diff) | |
| parent | 06b605171f1c9d8b42bd3326a243b8b03d2e4e58 (diff) | |
| download | emacs-0a20c80c9cee34a71b975bb37ac811bd339eaf9f.tar.gz emacs-0a20c80c9cee34a71b975bb37ac811bd339eaf9f.zip | |
Merge from mainline.
109 files changed, 1303 insertions, 839 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 693fae97ee5..22c9813b5ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,412 @@ | |||
| 1 | 2011-04-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | Lexical-binding cleanup. | ||
| 4 | |||
| 5 | * arc-mode.el (archive-mode-revert): | ||
| 6 | * cmuscheme.el (scheme-interactively-start-process): | ||
| 7 | * custom.el (custom-initialize-delay): | ||
| 8 | * dnd.el (dnd-open-local-file, dnd-open-remote-url): | ||
| 9 | * dos-w32.el (direct-print-region-helper, direct-print-region-function): | ||
| 10 | * emacs-lock.el (emacs-lock-clear-sentinel): | ||
| 11 | * ezimage.el (defezimage): | ||
| 12 | * follow.el (follow-avoid-tail-recenter): | ||
| 13 | * fringe.el (set-fringe-mode-1): | ||
| 14 | * generic-x.el (bat-generic-mode-compile): | ||
| 15 | * help-mode.el (help-info-variable, help-do-xref) | ||
| 16 | (help-mode-revert-buffer): | ||
| 17 | * help.el (view-emacs-todo): | ||
| 18 | * iswitchb.el (iswitchb-completion-help): | ||
| 19 | * jka-compr.el (jka-compr-make-temp-name, jka-compr-load): | ||
| 20 | * kmacro.el (kmacro-cycle-ring-next, kmacro-cycle-ring-previous) | ||
| 21 | (kmacro-delete-ring-head, kmacro-bind-to-key, kmacro-view-macro): | ||
| 22 | * locate.el (locate-update): | ||
| 23 | * longlines.el (longlines-encode-region) | ||
| 24 | (longlines-after-change-function): | ||
| 25 | * outline.el (outline-isearch-open-invisible): | ||
| 26 | * ps-def.el (declare-function, charset-dimension, char-width) | ||
| 27 | (encode-char): | ||
| 28 | * ps-mule.el (ps-mule-plot-string): | ||
| 29 | * recentf.el (recentf-make-menu-items, recentf-cancel-dialog) | ||
| 30 | (recentf-edit-list-select, recentf-edit-list-validate) | ||
| 31 | (recentf-open-files-action): | ||
| 32 | * rect.el (delete-whitespace-rectangle-line) | ||
| 33 | (rectangle-number-line-callback): | ||
| 34 | * register.el (window-configuration-to-register) | ||
| 35 | (frame-configuration-to-register): | ||
| 36 | * scroll-bar.el (scroll-bar-mode, toggle-horizontal-scroll-bar): | ||
| 37 | * select.el (xselect-convert-to-string, xselect-convert-to-length) | ||
| 38 | (xselect-convert-to-targets, xselect-convert-to-delete) | ||
| 39 | (xselect-convert-to-filename, xselect-convert-to-charpos) | ||
| 40 | (xselect-convert-to-lineno, xselect-convert-to-colno) | ||
| 41 | (xselect-convert-to-os, xselect-convert-to-host) | ||
| 42 | (xselect-convert-to-user, xselect-convert-to-class) | ||
| 43 | (xselect-convert-to-name, xselect-convert-to-integer) | ||
| 44 | (xselect-convert-to-atom, xselect-convert-to-identity): | ||
| 45 | * subr.el (declare, ignore, process-kill-without-query) | ||
| 46 | (text-clone-maintain): | ||
| 47 | * terminal.el (te-get-char, te-tic-sentinel): | ||
| 48 | * tool-bar.el (tool-bar-make-keymap): | ||
| 49 | * tooltip.el (tooltip-timeout, tooltip-hide, tooltip-help-tips): | ||
| 50 | * type-break.el (type-break-mode, type-break-noninteractive-query): | ||
| 51 | * view.el (View-back-to-mark): | ||
| 52 | * wid-browse.el (widget-browse-action, widget-browse-widget) | ||
| 53 | (widget-browse-widgets, widget-browse-sexp): | ||
| 54 | * widget.el (define-widget-keywords): | ||
| 55 | * xt-mouse.el (xterm-mouse-translate, turn-off-xterm-mouse-tracking): | ||
| 56 | Mark unused parameters. | ||
| 57 | |||
| 58 | * align.el (align-adjust-col-for-rule): Mark unused parameter. | ||
| 59 | (align-areas): Remove unused variable `look'. | ||
| 60 | (align-region): Remove unused variables `real-end' and `pos-list'. | ||
| 61 | |||
| 62 | * apropos.el (apropos-score-doc): Remove unused variable `i'. | ||
| 63 | |||
| 64 | * bindings.el (mode-line-modified, mode-line-remote): | ||
| 65 | Mark unused parameters. | ||
| 66 | (mode-line-mule-info): Mark unused parameter; don't quote `lambda'. | ||
| 67 | |||
| 68 | * buff-menu.el (Buffer-menu-revert-function): Mark unused parameters. | ||
| 69 | (Buffer-menu-mode): Mark unused parameter; don't quote `lambda'. | ||
| 70 | |||
| 71 | * comint.el (comint-history-isearch-pop-state) | ||
| 72 | (comint-postoutput-scroll-to-bottom, comint-truncate-buffer) | ||
| 73 | (comint-strip-ctrl-m, comint-read-noecho): Mark unused parameters. | ||
| 74 | (comint-substitute-in-file-name): Doc fix. | ||
| 75 | |||
| 76 | * completion.el (cmpl-statistics-block): Mark unused parameter. | ||
| 77 | (add-completions-from-tags-table, add-completions-from-lisp-buffer) | ||
| 78 | (save-completions-to-file, load-completions-from-file): | ||
| 79 | Remove unused local variable `e'. | ||
| 80 | |||
| 81 | * composite.el (compose-chars): Remove unused variable `len'. | ||
| 82 | (lgstring-insert-glyph): Remove unused variable `g'. | ||
| 83 | (compose-glyph-string): Remove unused variables `ascent', | ||
| 84 | `descent', `lbearing' and `rbearing'. | ||
| 85 | (compose-glyph-string-relative): Remove unused variables | ||
| 86 | `lbearing', `rbearing' and `wadjust'. | ||
| 87 | (compose-gstring-for-graphic): Remove unused variables `header', | ||
| 88 | `wadjust', `xoff' and `yoff'. Use `let', not `let*'. | ||
| 89 | (compose-gstring-for-terminal): Remove unused variables `header' | ||
| 90 | and `nchars'. Use `let', not `let*'. | ||
| 91 | |||
| 92 | * cus-edit.el (Custom-set, Custom-save, custom-reset) | ||
| 93 | (Custom-reset-current, Custom-reset-saved, Custom-reset-standard) | ||
| 94 | (Custom-buffer-done, custom-buffer-create-internal) | ||
| 95 | (custom-browse-visibility-action, custom-browse-group-tag-action) | ||
| 96 | (custom-browse-variable-tag-action, custom-browse-face-tag-action) | ||
| 97 | (widget-magic-mouse-down-action, custom-toggle-parent) | ||
| 98 | (custom-add-parent-links, custom-toggle-hide-variable) | ||
| 99 | (custom-face-edit-value-visibility-action, custom-face-edit-fix-value) | ||
| 100 | (custom-toggle-hide-face, face, hook, custom-group-link-action) | ||
| 101 | (custom-face-menu-create, custom-variable-menu-create, get) | ||
| 102 | (custom-group-menu-create, Custom-no-edit): Mark unused parameters. | ||
| 103 | (custom-reset-standard-save-and-update): Remove unused variable `value'. | ||
| 104 | (customize-apropos): Remove unused variable `tests'. | ||
| 105 | (custom-group-value-create): Remove unused variable `hidden-p'. | ||
| 106 | (sort-fold-case): Declare. | ||
| 107 | |||
| 108 | * cus-theme.el (custom-reset-standard-faces-list) | ||
| 109 | (custom-reset-standard-variables-list): Declare. | ||
| 110 | (customize-create-theme, custom-theme-revert, custom-theme-write) | ||
| 111 | (custom-theme-choose-mode, customize-themes, custom-theme-save): | ||
| 112 | Mark unused parameters. | ||
| 113 | |||
| 114 | * dabbrev.el (dabbrev-completion): Remove unused variable `init'. | ||
| 115 | |||
| 116 | * delim-col.el (delimit-columns-max): Move defvar before first use. | ||
| 117 | |||
| 118 | * descr-text.el (describe-char-categories): Don't quote `lambda'. | ||
| 119 | (describe-char): Don't quote `lambda'. Mark unused parameter. | ||
| 120 | |||
| 121 | * desktop.el (desktop-save-buffer-p): Mark unused parameter. | ||
| 122 | (auto-insert): Declare. | ||
| 123 | (desktop-restore-file-buffer): Rename desktop-* parameters; | ||
| 124 | mark unused ones. | ||
| 125 | (desktop-create-buffer): Rename desktop-* parameters and bind them. | ||
| 126 | (desktop-buffer): Rename desktop-* parameters. | ||
| 127 | |||
| 128 | * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. | ||
| 129 | (dframe-reposition-frame-xemacs, dframe-help-echo) | ||
| 130 | (dframe-hack-buffer-menu, dframe-set-timer, dframe-set-timer-internal): | ||
| 131 | Mark unused parameters. | ||
| 132 | |||
| 133 | * dired-aux.el (backup-extract-version-start, overwrite-query) | ||
| 134 | (overwrite-backup-query, rename-regexp-query) | ||
| 135 | (rename-non-directory-query): Declare. | ||
| 136 | (dired-shell-stuff-it, dired-do-create-files): Mark unused parameters. | ||
| 137 | (dired-add-entry): Remove unused variable `orig-file-name'. | ||
| 138 | (dired-copy-file-recursive): Remove unused variable `dirfailed'. | ||
| 139 | Use parameter PRESERVE-TIME instead of accessing dynamic variable | ||
| 140 | `dired-copy-preserve-time' directly. | ||
| 141 | (dired-do-create-files-regexp): Remove unused variable `fn-count'. | ||
| 142 | (dired-insert-subdir-newpos): Rename unused variable `pos'. | ||
| 143 | |||
| 144 | * dired-x.el (dired-omit-size-limit): Move defcustom before first use. | ||
| 145 | (dired-virtual-revert, dired-make-relative-symlink): | ||
| 146 | Mark unused parameters. | ||
| 147 | (manual-program): Declare. | ||
| 148 | (dired-x-hands-off-my-keys): Rename parameters of lambda expression. | ||
| 149 | (inode, s, mode, nlink, uid, gid, size, time, name, sym): Declare them, | ||
| 150 | wrapped in `with-no-warnings' to avoid replacing one warning by another. | ||
| 151 | |||
| 152 | * dirtrack.el (dirtrack): Remove unused variable `multi-line'. | ||
| 153 | |||
| 154 | * dos-fns.el (dos-8+3-filename): Remove unused variable `i'. | ||
| 155 | |||
| 156 | * echistory.el (electric-history-in-progress, Helper-return-blurb): | ||
| 157 | Declare. | ||
| 158 | |||
| 159 | * edmacro.el (edmacro-finish-edit): Remove unused variable `kmacro'. | ||
| 160 | |||
| 161 | * electric.el (Electric-command-loop): Rename parameter | ||
| 162 | INHIBIT-QUIT to INHIBIT-QUITTING and bind `inhibit-quit'. | ||
| 163 | |||
| 164 | * expand.el (expand-in-literal): Remove unused variable `here'. | ||
| 165 | |||
| 166 | * facemenu.el (facemenu-add-new-color): | ||
| 167 | Remove unused variable `docstring'. | ||
| 168 | |||
| 169 | * faces.el (face-id, make-face-bold, make-face-unbold, make-face-italic) | ||
| 170 | (make-face-unitalic, make-face-bold-italic): Mark unused parameters. | ||
| 171 | (face-attr-construct): Mark unused parameter. Doc fix. | ||
| 172 | (read-color): Remove unused variable `hex-string'. | ||
| 173 | |||
| 174 | * files.el (parse-colon-path): Rename argument CD-PATH to SEARCH-PATH. | ||
| 175 | (locate-dominating-file): Remove unused vars `prev-file' and `user'. | ||
| 176 | (remote-file-name-inhibit-cache, revert-buffer): Clean up docstrings. | ||
| 177 | (display-buffer-other-frame): Remove unused variable `old-window'. | ||
| 178 | (kill-buffer-hook): Declare. | ||
| 179 | (insert-file-contents-literally, set-auto-mode, risky-local-variable-p): | ||
| 180 | Mark unused parameters. | ||
| 181 | (after-find-file): Pass 1 to `auto-save-mode', not t. | ||
| 182 | |||
| 183 | * files-x.el (auto-insert): Declare. | ||
| 184 | (modify-file-local-variable-prop-line): Remove unused variable `val'. | ||
| 185 | |||
| 186 | * find-lisp.el (find-lisp-find-dired-internal): Remove unused | ||
| 187 | variable `buf'. Mark unused parameter. | ||
| 188 | (find-lisp-insert-directory): Mark unused parameter. | ||
| 189 | |||
| 190 | * format.el (format-decode-run-method): Mark unused parameter; doc fix. | ||
| 191 | (format-encode-region): Remove unused variables `cur-buf' and `result'. | ||
| 192 | (format-common-tail): Remove, unused. | ||
| 193 | (format-deannotate-region): Remove unused variable `loc'. | ||
| 194 | (format-annotate-region): Remove unused variable `p'. | ||
| 195 | (format-annotate-single-property-change): Remove unused variables | ||
| 196 | `default' and `tail'. | ||
| 197 | |||
| 198 | * forms.el (read-file-filter): Declare. | ||
| 199 | (forms--iif-hook, forms--revert-buffer): Mark unused parameters. | ||
| 200 | |||
| 201 | * frame.el (frame-creation-function-alist): Mark unused parameter. | ||
| 202 | (frame-geom-spec-cons): Pass FRAME to `frame-geom-value-cons'. | ||
| 203 | |||
| 204 | * hilit-chg.el (hilit-chg-cust-fix-changes-face-list, hilit-chg-clear): | ||
| 205 | Remove unused parameters. | ||
| 206 | (hilit-chg-set-face-on-change): Remove unused variable `beg-decr'. | ||
| 207 | (highlight-compare-with-file): Remove unused variable `buf-b-read-only'. | ||
| 208 | |||
| 209 | * htmlfontify.el (hfy-default-footer, hfy-decor, hfy-invisible) | ||
| 210 | (hfy-parse-tags-buffer, hfy-prepare-index-i, hfy-prepare-index) | ||
| 211 | (hfy-prepare-tag-map): Mark unused parameters. | ||
| 212 | (htmlfontify-buffer): Use `called-interactively-p'. | ||
| 213 | |||
| 214 | * ibuf-ext.el (ibuffer-do-kill-lines, ibuffer-jump-to-buffer) | ||
| 215 | (ibuffer-copy-filename-as-kill, ibuffer-mark-on-buffer) | ||
| 216 | (ibuffer-do-occur): Mark unused parameters. | ||
| 217 | (ibuffer-forward-next-marked): Remove unused variable `curmark'. | ||
| 218 | (ibuffer-diff-buffer-with-file-1): Remove unused variable `proc'. | ||
| 219 | |||
| 220 | * ibuffer.el: Don't quote `lambda'. | ||
| 221 | (ibuffer-count-marked-lines, ibuffer-count-deletion-lines) | ||
| 222 | (ibuffer-unmark-all, ibuffer-toggle-marks, ibuffer-redisplay-engine): | ||
| 223 | Mark unused parameters. | ||
| 224 | |||
| 225 | * ido.el (ido-mode, ido-wide-find-dir-or-delete-dir) | ||
| 226 | (ido-completing-read): Mark unused parameters. | ||
| 227 | (ido-copy-current-word): Mark unused parameters; | ||
| 228 | remove unused variable `name'. | ||
| 229 | (ido-sort-merged-list): Remove unused parameter `dirs'. | ||
| 230 | |||
| 231 | * ielm.el (ielm-input-sender): Mark unused parameter. | ||
| 232 | (ielm-string, ielm-form, ielm-pos, ielm-result, ielm-error-type) | ||
| 233 | (ielm-output, ielm-wbuf, ielm-pmark): Declare. | ||
| 234 | (ielm-eval-input): Rename argument IELM-STRING to INPUT-STRING to keep | ||
| 235 | `ielm-string' as a dynamic variable accessible from the IELM prompt. | ||
| 236 | Bind `ielm-string' to INPUT-STRING. Remove unused variable `err'. | ||
| 237 | |||
| 238 | * image-dired.el (image-dired-display-thumbs): Remove unused | ||
| 239 | variables `curr-file' and `count'. | ||
| 240 | (image-dired-remove-tag): Remove unused variable `start'. | ||
| 241 | (image-dired-tag-files, image-dired-create-thumbs): Remove unused | ||
| 242 | variable `curr-file' | ||
| 243 | (image-dired-rotate-original): Remove unused variable `temp-file'. | ||
| 244 | (image-dired-mouse-select-thumbnail, image-dired-mouse-toggle-mark): | ||
| 245 | Remove unused variable `file'. | ||
| 246 | (image-dired-gallery-generate): Remove unused variable `curr'. | ||
| 247 | (image-dired-dired-edit-comment-and-tags): Mark unused parameters. | ||
| 248 | |||
| 249 | * indent.el (tab-to-tab-stop): Remove unused variable `opoint'. | ||
| 250 | |||
| 251 | * info-xref.el (info-xref-goto-node-p): Remove unused variable `err'. | ||
| 252 | |||
| 253 | * informat.el (texinfo-command-start, texinfo-command-end): Declare. | ||
| 254 | |||
| 255 | * isearch.el (minibuffer-history-symbol): Declare. | ||
| 256 | (isearch-edit-string): Remove unused variable `err'. | ||
| 257 | (isearch-message-prefix, isearch-message-suffix): | ||
| 258 | Mark unused parameters. | ||
| 259 | |||
| 260 | * ls-lisp.el (ls-lisp-insert-directory): Remove unused variable `fil'. | ||
| 261 | |||
| 262 | * macros.el (insert-kbd-macro): Remove unused variable `mods'. | ||
| 263 | |||
| 264 | * makesum.el (double-column): Remove unused variable `cnt'. | ||
| 265 | |||
| 266 | * misearch.el (multi-isearch-pop-state): Mark unused parameter. | ||
| 267 | (ido-ignore-item-temp-list): Declare. | ||
| 268 | |||
| 269 | * mouse-drag.el (mouse-drag-throw): Remove unused variables | ||
| 270 | `mouse-delta', `window-last-row', `mouse-col-delta', `window-last-col', | ||
| 271 | `adjusted-mouse-col-delta' and `adjusted-mouse-delta'. | ||
| 272 | (mouse-drag-drag): Remove unused variables `mouse-delta' and | ||
| 273 | `mouse-col-delta'. | ||
| 274 | |||
| 275 | * mouse-sel.el (mouse-extend-internal): | ||
| 276 | Remove unused variable `orig-window-frame'. | ||
| 277 | |||
| 278 | * pcomplete.el (pcomplete-args, pcomplete-begins, pcomplete-last) | ||
| 279 | (pcomplete-index, pcomplete-stub, pcomplete-seen, pcomplete-norm-func): | ||
| 280 | Move declarations before first use. | ||
| 281 | (pcomplete-opt): Mark unused parameters; doc fix. | ||
| 282 | |||
| 283 | * proced.el (proced-revert): Mark unused parameter. | ||
| 284 | (proced-send-signal): Remove unused variable `err'. | ||
| 285 | |||
| 286 | * ps-print.el (ps-print-preprint-region, ps-print-preprint): | ||
| 287 | Rename parameter PREFIX-ARG to ARG. | ||
| 288 | (ps-basic-plot-string, ps-basic-plot-whitespace): | ||
| 289 | Mark unused parameters. | ||
| 290 | |||
| 291 | * replace.el (replace-count): Define. | ||
| 292 | (occur-revert-function): Mark unused parameters. | ||
| 293 | (ido-ignore-item-temp-list, isearch-error, isearch-forward) | ||
| 294 | (isearch-case-fold-search, isearch-string): Declare. | ||
| 295 | (occur-engine): Rename parameter CASE-FOLD-SEARCH to CASE-FOLD and | ||
| 296 | bind `case-fold-search'. Remove unused variables `beg' and `end', | ||
| 297 | and simplify. | ||
| 298 | (replace-eval-replacement): Rename parameter REPLACE-COUNT to | ||
| 299 | COUNT and bind `replace-count'. | ||
| 300 | (replace-loop-through-replacements): Rename parameter REPLACE-COUNT | ||
| 301 | to COUNT. | ||
| 302 | |||
| 303 | * savehist.el (print-readably, print-string-length): Declare. | ||
| 304 | |||
| 305 | * shadowfile.el (shadow-expand-cluster-in-file-name): | ||
| 306 | Remove unused variable `cluster'. | ||
| 307 | (shadow-copy-file): Remove unused variable `i'. | ||
| 308 | (shadow-noquery, shadow-clusters, shadow-site-cluster) | ||
| 309 | (shadow-parse-fullname, shadow-parse-name, shadow-define-cluster) | ||
| 310 | (shadow-define-literal-group, shadow-define-regexp-group) | ||
| 311 | (shadow-make-group, shadow-shadows-of): Clean up docstrings. | ||
| 312 | |||
| 313 | * shell.el (shell-filter-ctrl-a-ctrl-b): Mark unused parameter. | ||
| 314 | (shell): Use `called-interactively-p'. | ||
| 315 | (shell-directory-tracker): Remove unused variable `chdir-failure'. | ||
| 316 | |||
| 317 | * simple.el (compilation-context-lines, comint-file-name-quote-list) | ||
| 318 | (comint-file-name-chars, comint-delimiter-argument-list): Declare. | ||
| 319 | (delete-backward-char): Remove unused variable `ocol'. | ||
| 320 | (minibuffer-avoid-prompt, minibuffer-history-isearch-pop-state) | ||
| 321 | (line-move-1, event-apply-alt-modifier, event-apply-super-modifier) | ||
| 322 | (event-apply-hyper-modifier, event-apply-shift-modifier) | ||
| 323 | (event-apply-control-modifier, event-apply-meta-modifier): | ||
| 324 | Mark unused parameters. | ||
| 325 | (undo-make-selective-list): Remove duplicate variable `undo-elt'. | ||
| 326 | (normal-erase-is-backspace-mode): Remove unused variable `old-state'. | ||
| 327 | |||
| 328 | * speedbar.el (speedbar-ignored-directory-expressions) | ||
| 329 | (speedbar-supported-extension-expressions, speedbar-directory-buttons) | ||
| 330 | (speedbar-find-file, speedbar-dir-follow) | ||
| 331 | (speedbar-directory-buttons-follow, speedbar-tag-find) | ||
| 332 | (speedbar-buffer-buttons, speedbar-buffer-buttons-temp) | ||
| 333 | (speedbar-buffers-line-directory, speedbar-buffer-click): | ||
| 334 | Mark unused parameters. | ||
| 335 | (speedbar-tag-file): Remove unused variable `mode'. | ||
| 336 | (speedbar-buffers-tail-notes): Remove unused variable `mod'; simplify. | ||
| 337 | |||
| 338 | * strokes.el (strokes-decode-buffer): Remove unused variable `ext'. | ||
| 339 | |||
| 340 | * talk.el (talk): Remove unused variable `display'. | ||
| 341 | |||
| 342 | * tar-mode.el (tar-subfile-save-buffer): Remove unused variable `name'. | ||
| 343 | (tar-write-region-annotate): Mark unused parameter. | ||
| 344 | |||
| 345 | * time.el (now, time, load, mail, 24-hours, hour, 12-hours, am-pm) | ||
| 346 | (minutes, seconds, time-zone, day, year, monthname, month, dayname): | ||
| 347 | Declare them, wrapped in `with-no-warnings' to avoid replacing one | ||
| 348 | warning by another. | ||
| 349 | |||
| 350 | * time-stamp.el (time-stamp-string-preprocess): | ||
| 351 | Remove unused variable `require-padding'. | ||
| 352 | |||
| 353 | * tree-widget.el (widget-glyph-enable): Declare. | ||
| 354 | (tree-widget-action): Mark unused parameter. | ||
| 355 | |||
| 356 | * w32-fns.el (x-get-selection): Mark unused parameter. | ||
| 357 | (autoload-make-program, generated-autoload-file): Declare. | ||
| 358 | |||
| 359 | * wdired.el (wdired-revert): Mark unused parameters. | ||
| 360 | (wdired-xcase-word): Remove unused variable `err'. | ||
| 361 | |||
| 362 | * whitespace.el (whitespace-buffer-changed): Mark unused parameters. | ||
| 363 | (whitespace-help-scroll): Remove unused variable `data-help'. | ||
| 364 | |||
| 365 | * wid-edit.el (widget-mouse-help, widget-overlay-inactive) | ||
| 366 | (widget-image-insert, widget-after-change, default) | ||
| 367 | (widget-default-format-handler, widget-default-notify) | ||
| 368 | (widget-default-prompt-value, widget-info-link-action) | ||
| 369 | (widget-url-link-action, widget-function-link-action) | ||
| 370 | (widget-variable-link-action, widget-file-link-action) | ||
| 371 | (widget-emacs-library-link-action, widget-emacs-commentary-link-action) | ||
| 372 | (widget-field-prompt-internal, widget-field-action, widget-field-match) | ||
| 373 | (widget-choice-mouse-down-action, toggle, widget-radio-button-notify) | ||
| 374 | (widget-insert-button-action, widget-delete-button-action, visibility) | ||
| 375 | (widget-documentation-link-action, widget-documentation-string-action) | ||
| 376 | (widget-const-prompt-value, widget-regexp-match, symbol) | ||
| 377 | (widget-coding-system-prompt-value) | ||
| 378 | (widget-key-sequence-value-to-external, sexp) | ||
| 379 | (widget-sexp-value-to-internal, character, vector, cons) | ||
| 380 | (widget-choice-prompt-value, widget-boolean-prompt-value) | ||
| 381 | (widget-color--choose-action): Mark unused parameters. | ||
| 382 | (widget-item-match-inline, widget-choice-match-inline) | ||
| 383 | (widget-checklist-match, widget-checklist-match-inline) | ||
| 384 | (widget-group-match): Rename parameter VALUES to VALS. | ||
| 385 | (widget-field-value-set): Remove unused variable `size'. | ||
| 386 | (widget-color-action): Remove unused variables `value' and `start'. | ||
| 387 | |||
| 388 | * windmove.el (windmove-wrap-loc-for-movement): Remove unused | ||
| 389 | variable `dir'. Doc fix. | ||
| 390 | (windmove-find-other-window): Don't pass it. | ||
| 391 | |||
| 392 | * window.el (count-windows): Mark unused parameter. | ||
| 393 | (bw-adjust-window): Remove unused variable `err'. | ||
| 394 | |||
| 395 | * woman.el (woman-file-name): Remove unused variable `default'. | ||
| 396 | (woman-expand-directory-path): Rename parameters WOMAN-MANPATH and | ||
| 397 | WOMAN-PATH to PATH-DIRS and PATH-REGEXPS, respectively. | ||
| 398 | (global-font-lock-mode): Declare. | ||
| 399 | (woman-decode-region): Mark unused parameter. | ||
| 400 | (woman-get-tab-stop): Rename parameter TAB-STOP-LIST to TAB-STOPS. | ||
| 401 | |||
| 402 | * x-dnd.el (x-dnd-default-test-function, x-dnd-handle-old-kde) | ||
| 403 | (x-dnd-handle-xdnd, x-dnd-handle-motif): Mark unused parameters. | ||
| 404 | (x-dnd-handle-moz-url): Remove unused variable `title'. | ||
| 405 | (x-dnd-handle-xdnd): Remove unused variables `x', `y' and `ret-action'. | ||
| 406 | |||
| 407 | * xml.el (xml-parse-tag, xml-parse-attlist): | ||
| 408 | Remove unused variable `pos'. | ||
| 409 | |||
| 1 | 2011-04-19 Glenn Morris <rgm@gnu.org> | 410 | 2011-04-19 Glenn Morris <rgm@gnu.org> |
| 2 | 411 | ||
| 3 | * calendar/cal-tex.el (cal-tex-list-holidays, cal-tex-cursor-month) | 412 | * 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." | |||
| 1106 | (setq seps (cdr seps)))) | 1106 | (setq seps (cdr seps)))) |
| 1107 | yes)))) | 1107 | yes)))) |
| 1108 | 1108 | ||
| 1109 | (defun align-adjust-col-for-rule (column rule spacing tab-stop) | 1109 | (defun align-adjust-col-for-rule (column _rule spacing tab-stop) |
| 1110 | "Adjust COLUMN according to the given RULE. | 1110 | "Adjust COLUMN according to the given RULE. |
| 1111 | SPACING specifies how much spacing to use. | 1111 | SPACING specifies how much spacing to use. |
| 1112 | TAB-STOP specifies whether SPACING refers to tab-stop boundaries." | 1112 | 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." | |||
| 1161 | (justify (cdr (assq 'justify rule))) | 1161 | (justify (cdr (assq 'justify rule))) |
| 1162 | (col (or fixed 0)) | 1162 | (col (or fixed 0)) |
| 1163 | (width 0) | 1163 | (width 0) |
| 1164 | ecol change look) | 1164 | ecol change) |
| 1165 | 1165 | ||
| 1166 | ;; Determine the alignment column. | 1166 | ;; Determine the alignment column. |
| 1167 | (let ((a areas)) | 1167 | (let ((a areas)) |
| @@ -1285,7 +1285,6 @@ purpose where you might want to know where the regions that the | |||
| 1285 | aligner would have dealt with are." | 1285 | aligner would have dealt with are." |
| 1286 | (let ((end-mark (and end (copy-marker end t))) | 1286 | (let ((end-mark (and end (copy-marker end t))) |
| 1287 | (real-beg beg) | 1287 | (real-beg beg) |
| 1288 | (real-end end) | ||
| 1289 | (report (and (not func) align-large-region beg end | 1288 | (report (and (not func) align-large-region beg end |
| 1290 | (>= (- end beg) align-large-region))) | 1289 | (>= (- end beg) align-large-region))) |
| 1291 | (rule-index 1) | 1290 | (rule-index 1) |
| @@ -1314,7 +1313,7 @@ aligner would have dealt with are." | |||
| 1314 | tab-stop tab-stop-c | 1313 | tab-stop tab-stop-c |
| 1315 | repeat repeat-c | 1314 | repeat repeat-c |
| 1316 | valid valid-c | 1315 | valid valid-c |
| 1317 | pos-list first | 1316 | first |
| 1318 | regions index | 1317 | regions index |
| 1319 | last-point b e | 1318 | last-point b e |
| 1320 | save-match-data | 1319 | 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." | |||
| 371 | "Return apropos score for documentation string DOC." | 371 | "Return apropos score for documentation string DOC." |
| 372 | (let ((l (length doc))) | 372 | (let ((l (length doc))) |
| 373 | (if (> l 0) | 373 | (if (> l 0) |
| 374 | (let ((score 0) i) | 374 | (let ((score 0)) |
| 375 | (when (setq i (string-match apropos-pattern-quoted doc)) | 375 | (when (string-match apropos-pattern-quoted doc) |
| 376 | (setq score 10000)) | 376 | (setq score 10000)) |
| 377 | (dolist (s (apropos-calc-scores doc apropos-all-words) score) | 377 | (dolist (s (apropos-calc-scores doc apropos-all-words) score) |
| 378 | (setq score (+ score 50 (/ (* (- l s) 50) l))))) | 378 | (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)." | |||
| 1386 | (error "Renaming is not supported for this archive type")))) | 1386 | (error "Renaming is not supported for this archive type")))) |
| 1387 | 1387 | ||
| 1388 | ;; Revert the buffer and recompute the dired-like listing. | 1388 | ;; Revert the buffer and recompute the dired-like listing. |
| 1389 | (defun archive-mode-revert (&optional no-auto-save no-confirm) | 1389 | (defun archive-mode-revert (&optional _no-auto-save _no-confirm) |
| 1390 | (let ((no (archive-get-lineno))) | 1390 | (let ((no (archive-get-lineno))) |
| 1391 | (setq archive-files nil) | 1391 | (setq archive-files nil) |
| 1392 | (let ((revert-buffer-function nil) | 1392 | (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")) | |||
| 153 | ,(propertize | 153 | ,(propertize |
| 154 | "%z" | 154 | "%z" |
| 155 | 'help-echo | 155 | 'help-echo |
| 156 | #'(lambda (window object point) | 156 | (lambda (window _object _point) |
| 157 | (with-current-buffer (window-buffer window) | 157 | (with-current-buffer (window-buffer window) |
| 158 | ;; Don't show this tip if the coding system is nil, | 158 | ;; Don't show this tip if the coding system is nil, |
| 159 | ;; it reads like a bug, and is not useful anyway. | 159 | ;; it reads like a bug, and is not useful anyway. |
| 160 | (when buffer-file-coding-system | 160 | (when buffer-file-coding-system |
| 161 | (format "Buffer coding system %s\nmouse-1: describe coding system" | 161 | (format "Buffer coding system %s\nmouse-1: describe coding system" |
| 162 | (if enable-multibyte-characters | 162 | (if enable-multibyte-characters |
| 163 | (concat "(multi-byte): " | 163 | (concat "(multi-byte): " |
| 164 | (symbol-name buffer-file-coding-system)) | 164 | (symbol-name buffer-file-coding-system)) |
| 165 | (concat "(unibyte): " | 165 | (concat "(unibyte): " |
| 166 | (symbol-name buffer-file-coding-system))))))) | 166 | (symbol-name buffer-file-coding-system))))))) |
| 167 | 'mouse-face 'mode-line-highlight | 167 | 'mouse-face 'mode-line-highlight |
| 168 | 'local-map mode-line-coding-system-map) | 168 | 'local-map mode-line-coding-system-map) |
| 169 | (:eval (mode-line-eol-desc))) | 169 | (:eval (mode-line-eol-desc))) |
| @@ -209,7 +209,7 @@ Normally nil in most modes, since there is no process to display.") | |||
| 209 | (defvar mode-line-modified | 209 | (defvar mode-line-modified |
| 210 | (list (propertize | 210 | (list (propertize |
| 211 | "%1*" | 211 | "%1*" |
| 212 | 'help-echo (purecopy (lambda (window object point) | 212 | 'help-echo (purecopy (lambda (window _object _point) |
| 213 | (format "Buffer is %s\nmouse-1 toggles" | 213 | (format "Buffer is %s\nmouse-1 toggles" |
| 214 | (save-selected-window | 214 | (save-selected-window |
| 215 | (select-window window) | 215 | (select-window window) |
| @@ -222,7 +222,7 @@ Normally nil in most modes, since there is no process to display.") | |||
| 222 | 'mouse-face 'mode-line-highlight) | 222 | 'mouse-face 'mode-line-highlight) |
| 223 | (propertize | 223 | (propertize |
| 224 | "%1+" | 224 | "%1+" |
| 225 | 'help-echo (purecopy (lambda (window object point) | 225 | 'help-echo (purecopy (lambda (window _object _point) |
| 226 | (format "Buffer is %sodified\nmouse-1 toggles modified state" | 226 | (format "Buffer is %sodified\nmouse-1 toggles modified state" |
| 227 | (save-selected-window | 227 | (save-selected-window |
| 228 | (select-window window) | 228 | (select-window window) |
| @@ -242,7 +242,7 @@ Normally nil in most modes, since there is no process to display.") | |||
| 242 | (list (propertize | 242 | (list (propertize |
| 243 | "%1@" | 243 | "%1@" |
| 244 | 'mouse-face 'mode-line-highlight | 244 | 'mouse-face 'mode-line-highlight |
| 245 | 'help-echo (purecopy (lambda (window object point) | 245 | 'help-echo (purecopy (lambda (window _object _point) |
| 246 | (format "%s" | 246 | (format "%s" |
| 247 | (save-selected-window | 247 | (save-selected-window |
| 248 | (select-window window) | 248 | (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. | |||
| 264 | (set (make-local-variable 'revert-buffer-function) | 264 | (set (make-local-variable 'revert-buffer-function) |
| 265 | 'Buffer-menu-revert-function) | 265 | 'Buffer-menu-revert-function) |
| 266 | (set (make-local-variable 'buffer-stale-function) | 266 | (set (make-local-variable 'buffer-stale-function) |
| 267 | #'(lambda (&optional noconfirm) 'fast)) | 267 | (lambda (&optional _noconfirm) 'fast)) |
| 268 | (setq truncate-lines t) | 268 | (setq truncate-lines t) |
| 269 | (setq buffer-read-only t)) | 269 | (setq buffer-read-only t)) |
| 270 | 270 | ||
| 271 | (define-obsolete-variable-alias 'buffer-menu-mode-hook | 271 | (define-obsolete-variable-alias 'buffer-menu-mode-hook |
| 272 | 'Buffer-menu-mode-hook "23.1") | 272 | 'Buffer-menu-mode-hook "23.1") |
| 273 | 273 | ||
| 274 | (defun Buffer-menu-revert-function (ignore1 ignore2) | 274 | (defun Buffer-menu-revert-function (_ignore1 _ignore2) |
| 275 | (or (eq buffer-undo-list t) | 275 | (or (eq buffer-undo-list t) |
| 276 | (setq buffer-undo-list nil)) | 276 | (setq buffer-undo-list nil)) |
| 277 | ;; We can not use save-excursion here. The buffer gets erased. | 277 | ;; 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'." | |||
| 503 | (current-buffer) | 503 | (current-buffer) |
| 504 | scheme-buffer))) | 504 | scheme-buffer))) |
| 505 | 505 | ||
| 506 | (defun scheme-interactively-start-process (&optional cmd) | 506 | (defun scheme-interactively-start-process (&optional _cmd) |
| 507 | "Start an inferior Scheme process. Return the process started. | 507 | "Start an inferior Scheme process. Return the process started. |
| 508 | Since this command is run implicitly, always ask the user for the | 508 | Since this command is run implicitly, always ask the user for the |
| 509 | command to run." | 509 | 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." | |||
| 1529 | `(lambda (cmd) | 1529 | `(lambda (cmd) |
| 1530 | (comint-history-isearch-pop-state cmd ,comint-input-ring-index))) | 1530 | (comint-history-isearch-pop-state cmd ,comint-input-ring-index))) |
| 1531 | 1531 | ||
| 1532 | (defun comint-history-isearch-pop-state (cmd hist-pos) | 1532 | (defun comint-history-isearch-pop-state (_cmd hist-pos) |
| 1533 | "Restore the input history search state. | 1533 | "Restore the input history search state. |
| 1534 | Go to the history element by the absolute history position HIST-POS." | 1534 | Go to the history element by the absolute history position HIST-POS." |
| 1535 | (comint-goto-input hist-pos)) | 1535 | (comint-goto-input hist-pos)) |
| @@ -2053,7 +2053,7 @@ This function should be a pre-command hook." | |||
| 2053 | (select-window selected)))) | 2053 | (select-window selected)))) |
| 2054 | nil t)))))) | 2054 | nil t)))))) |
| 2055 | 2055 | ||
| 2056 | (defun comint-postoutput-scroll-to-bottom (string) | 2056 | (defun comint-postoutput-scroll-to-bottom (_string) |
| 2057 | "Go to the end of buffer in some or all windows showing it. | 2057 | "Go to the end of buffer in some or all windows showing it. |
| 2058 | Does not scroll if the current line is the last line in the buffer. | 2058 | Does not scroll if the current line is the last line in the buffer. |
| 2059 | Depends on the value of `comint-move-point-for-output' and | 2059 | 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'." | |||
| 2090 | nil t)) | 2090 | nil t)) |
| 2091 | (set-buffer current)))) | 2091 | (set-buffer current)))) |
| 2092 | 2092 | ||
| 2093 | (defun comint-truncate-buffer (&optional string) | 2093 | (defun comint-truncate-buffer (&optional _string) |
| 2094 | "Truncate the buffer to `comint-buffer-maximum-size'. | 2094 | "Truncate the buffer to `comint-buffer-maximum-size'. |
| 2095 | This function could be on `comint-output-filter-functions' or bound to a key." | 2095 | This function could be on `comint-output-filter-functions' or bound to a key." |
| 2096 | (interactive) | 2096 | (interactive) |
| @@ -2101,7 +2101,7 @@ This function could be on `comint-output-filter-functions' or bound to a key." | |||
| 2101 | (let ((inhibit-read-only t)) | 2101 | (let ((inhibit-read-only t)) |
| 2102 | (delete-region (point-min) (point))))) | 2102 | (delete-region (point-min) (point))))) |
| 2103 | 2103 | ||
| 2104 | (defun comint-strip-ctrl-m (&optional string) | 2104 | (defun comint-strip-ctrl-m (&optional _string) |
| 2105 | "Strip trailing `^M' characters from the current output group. | 2105 | "Strip trailing `^M' characters from the current output group. |
| 2106 | This function could be on `comint-output-filter-functions' or bound to a key." | 2106 | This function could be on `comint-output-filter-functions' or bound to a key." |
| 2107 | (interactive) | 2107 | (interactive) |
| @@ -2207,7 +2207,7 @@ a buffer local variable." | |||
| 2207 | (goto-char (comint-line-beginning-position)))) | 2207 | (goto-char (comint-line-beginning-position)))) |
| 2208 | 2208 | ||
| 2209 | ;; For compatibility. | 2209 | ;; For compatibility. |
| 2210 | (defun comint-read-noecho (prompt &optional ignore) | 2210 | (defun comint-read-noecho (prompt &optional _ignore) |
| 2211 | (read-passwd prompt)) | 2211 | (read-passwd prompt)) |
| 2212 | 2212 | ||
| 2213 | ;; These three functions are for entering text you don't want echoed or | 2213 | ;; 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. | |||
| 2933 | (defun comint-substitute-in-file-name (filename) | 2933 | (defun comint-substitute-in-file-name (filename) |
| 2934 | "Return FILENAME with environment variables substituted. | 2934 | "Return FILENAME with environment variables substituted. |
| 2935 | Supports additional environment variable syntax of the command | 2935 | Supports additional environment variable syntax of the command |
| 2936 | interpreter (e.g., the percent notation of cmd.exe on NT)." | 2936 | interpreter (e.g., the percent notation of cmd.exe on Windows)." |
| 2937 | (let ((name (substitute-in-file-name filename))) | 2937 | (let ((name (substitute-in-file-name filename))) |
| 2938 | (if (memq system-type '(ms-dos windows-nt)) | 2938 | (if (memq system-type '(ms-dos windows-nt)) |
| 2939 | (let (env-var-name | 2939 | (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'." | |||
| 695 | ;; Conditionalizing code on *record-cmpl-statistics-p* | 695 | ;; Conditionalizing code on *record-cmpl-statistics-p* |
| 696 | ;;----------------------------------------------- | 696 | ;;----------------------------------------------- |
| 697 | ;; All statistics code outside this block should use this | 697 | ;; All statistics code outside this block should use this |
| 698 | (defmacro cmpl-statistics-block (&rest body)) | 698 | (defmacro cmpl-statistics-block (&rest _body)) |
| 699 | ;; "Only executes body if we are recording statistics." | 699 | ;; "Only executes body if we are recording statistics." |
| 700 | ;; (list 'cond | 700 | ;; (list 'cond |
| 701 | ;; (list* '*record-cmpl-statistics-p* body) | 701 | ;; (list* '*record-cmpl-statistics-p* body) |
| @@ -1751,7 +1751,7 @@ Prefix args :: | |||
| 1751 | (save-excursion | 1751 | (save-excursion |
| 1752 | (goto-char (point-min)) | 1752 | (goto-char (point-min)) |
| 1753 | (let (string) | 1753 | (let (string) |
| 1754 | (condition-case e | 1754 | (condition-case nil |
| 1755 | (while t | 1755 | (while t |
| 1756 | (search-forward "\177") | 1756 | (search-forward "\177") |
| 1757 | (backward-char 3) | 1757 | (backward-char 3) |
| @@ -1788,7 +1788,7 @@ Prefix args :: | |||
| 1788 | (let (string) | 1788 | (let (string) |
| 1789 | (save-excursion | 1789 | (save-excursion |
| 1790 | (goto-char (point-min)) | 1790 | (goto-char (point-min)) |
| 1791 | (condition-case e | 1791 | (condition-case nil |
| 1792 | (while t | 1792 | (while t |
| 1793 | (re-search-forward *lisp-def-regexp*) | 1793 | (re-search-forward *lisp-def-regexp*) |
| 1794 | (and (setq string (symbol-under-point)) | 1794 | (and (setq string (symbol-under-point)) |
| @@ -2042,7 +2042,7 @@ If file name is not specified, use `save-completions-file-name'." | |||
| 2042 | last-use-time)) "\n")))) | 2042 | last-use-time)) "\n")))) |
| 2043 | 2043 | ||
| 2044 | ;; write the buffer | 2044 | ;; write the buffer |
| 2045 | (condition-case e | 2045 | (condition-case nil |
| 2046 | (let ((file-exists-p (file-exists-p filename))) | 2046 | (let ((file-exists-p (file-exists-p filename))) |
| 2047 | (if file-exists-p | 2047 | (if file-exists-p |
| 2048 | (progn | 2048 | (progn |
| @@ -2108,7 +2108,7 @@ If file is not specified, then use `save-completions-file-name'." | |||
| 2108 | (aref completion-add-count-vector cmpl-source-file-parsing))) | 2108 | (aref completion-add-count-vector cmpl-source-file-parsing))) |
| 2109 | (total-in-file 0) (total-perm 0)) | 2109 | (total-in-file 0) (total-perm 0)) |
| 2110 | ;; insert the file into a buffer | 2110 | ;; insert the file into a buffer |
| 2111 | (condition-case e | 2111 | (condition-case nil |
| 2112 | (progn (insert-file-contents filename t) | 2112 | (progn (insert-file-contents filename t) |
| 2113 | (setq insert-okay-p t)) | 2113 | (setq insert-okay-p t)) |
| 2114 | 2114 | ||
| @@ -2120,7 +2120,7 @@ If file is not specified, then use `save-completions-file-name'." | |||
| 2120 | (progn | 2120 | (progn |
| 2121 | (goto-char (point-min)) | 2121 | (goto-char (point-min)) |
| 2122 | 2122 | ||
| 2123 | (condition-case e | 2123 | (condition-case nil |
| 2124 | (while t | 2124 | (while t |
| 2125 | (setq entry (read buffer)) | 2125 | (setq entry (read buffer)) |
| 2126 | (setq total-in-file (1+ total-in-file)) | 2126 | (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 | |||
| 289 | (let (str components) | 289 | (let (str components) |
| 290 | (if (consp (car (cdr args))) | 290 | (if (consp (car (cdr args))) |
| 291 | ;; Rule-base composition. | 291 | ;; Rule-base composition. |
| 292 | (let ((len (length args)) | 292 | (let ((tail (encode-composition-components args 'nocopy))) |
| 293 | (tail (encode-composition-components args 'nocopy))) | ||
| 294 | |||
| 295 | (while tail | 293 | (while tail |
| 296 | (setq str (cons (car tail) str)) | 294 | (setq str (cons (car tail) str)) |
| 297 | (setq tail (nthcdr 2 tail))) | 295 | (setq tail (nthcdr 2 tail))) |
| @@ -448,8 +446,8 @@ after a sequence of character events." | |||
| 448 | 446 | ||
| 449 | (defun lgstring-insert-glyph (gstring idx glyph) | 447 | (defun lgstring-insert-glyph (gstring idx glyph) |
| 450 | (let ((nglyphs (lgstring-glyph-len gstring)) | 448 | (let ((nglyphs (lgstring-glyph-len gstring)) |
| 451 | (i idx) g) | 449 | (i idx)) |
| 452 | (while (and (< i nglyphs) (setq g (lgstring-glyph gstring i))) | 450 | (while (and (< i nglyphs) (lgstring-glyph gstring i)) |
| 453 | (setq i (1+ i))) | 451 | (setq i (1+ i))) |
| 454 | (if (= i nglyphs) | 452 | (if (= i nglyphs) |
| 455 | (setq gstring (vconcat gstring (vector glyph))) | 453 | (setq gstring (vconcat gstring (vector glyph))) |
| @@ -463,8 +461,7 @@ after a sequence of character events." | |||
| 463 | 461 | ||
| 464 | (defun compose-glyph-string (gstring from to) | 462 | (defun compose-glyph-string (gstring from to) |
| 465 | (let ((glyph (lgstring-glyph gstring from)) | 463 | (let ((glyph (lgstring-glyph gstring from)) |
| 466 | from-pos to-pos | 464 | from-pos to-pos) |
| 467 | ascent descent lbearing rbearing) | ||
| 468 | (setq from-pos (lglyph-from glyph) | 465 | (setq from-pos (lglyph-from glyph) |
| 469 | to-pos (lglyph-to (lgstring-glyph gstring (1- to)))) | 466 | to-pos (lglyph-to (lgstring-glyph gstring (1- to)))) |
| 470 | (lglyph-set-from-to glyph from-pos to-pos) | 467 | (lglyph-set-from-to glyph from-pos to-pos) |
| @@ -482,7 +479,7 @@ after a sequence of character events." | |||
| 482 | (let ((font-object (lgstring-font gstring)) | 479 | (let ((font-object (lgstring-font gstring)) |
| 483 | (glyph (lgstring-glyph gstring from)) | 480 | (glyph (lgstring-glyph gstring from)) |
| 484 | from-pos to-pos | 481 | from-pos to-pos |
| 485 | ascent descent lbearing rbearing) | 482 | ascent descent) |
| 486 | (if gap | 483 | (if gap |
| 487 | (setq gap (floor (* (font-get font-object :size) gap))) | 484 | (setq gap (floor (* (font-get font-object :size) gap))) |
| 488 | (setq gap 0)) | 485 | (setq gap 0)) |
| @@ -497,7 +494,7 @@ after a sequence of character events." | |||
| 497 | (lglyph-set-from-to glyph from-pos to-pos) | 494 | (lglyph-set-from-to glyph from-pos to-pos) |
| 498 | (let ((this-ascent (lglyph-ascent glyph)) | 495 | (let ((this-ascent (lglyph-ascent glyph)) |
| 499 | (this-descent (lglyph-descent glyph)) | 496 | (this-descent (lglyph-descent glyph)) |
| 500 | xoff yoff wadjust) | 497 | xoff yoff) |
| 501 | (setq xoff (if (<= (lglyph-rbearing glyph) 0) 0 | 498 | (setq xoff (if (<= (lglyph-rbearing glyph) 0) 0 |
| 502 | (- (lglyph-width glyph)))) | 499 | (- (lglyph-width glyph)))) |
| 503 | (if (> this-ascent 0) | 500 | (if (> this-ascent 0) |
| @@ -521,17 +518,16 @@ a padding space before and/or after the character. | |||
| 521 | 518 | ||
| 522 | All non-spacing characters have this function in | 519 | All non-spacing characters have this function in |
| 523 | `composition-function-table' unless overwritten." | 520 | `composition-function-table' unless overwritten." |
| 524 | (let* ((header (lgstring-header gstring)) | 521 | (let ((nchars (lgstring-char-len gstring)) |
| 525 | (nchars (lgstring-char-len gstring)) | 522 | (nglyphs (lgstring-glyph-len gstring)) |
| 526 | (nglyphs (lgstring-glyph-len gstring)) | 523 | (glyph (lgstring-glyph gstring 0))) |
| 527 | (glyph (lgstring-glyph gstring 0))) | ||
| 528 | (cond | 524 | (cond |
| 529 | ;; A non-spacing character not following a proper base character. | 525 | ;; A non-spacing character not following a proper base character. |
| 530 | ((= nchars 1) | 526 | ((= nchars 1) |
| 531 | (let ((lbearing (lglyph-lbearing glyph)) | 527 | (let ((lbearing (lglyph-lbearing glyph)) |
| 532 | (rbearing (lglyph-rbearing glyph)) | 528 | (rbearing (lglyph-rbearing glyph)) |
| 533 | (width (lglyph-width glyph)) | 529 | (width (lglyph-width glyph)) |
| 534 | xoff wadjust) | 530 | xoff) |
| 535 | (if (< lbearing 0) | 531 | (if (< lbearing 0) |
| 536 | (setq xoff (- lbearing)) | 532 | (setq xoff (- lbearing)) |
| 537 | (setq xoff 0 lbearing 0)) | 533 | (setq xoff 0 lbearing 0)) |
| @@ -561,8 +557,7 @@ All non-spacing characters have this function in | |||
| 561 | (rbearing (lglyph-rbearing glyph)) | 557 | (rbearing (lglyph-rbearing glyph)) |
| 562 | (lbearing (lglyph-lbearing glyph)) | 558 | (lbearing (lglyph-lbearing glyph)) |
| 563 | (center (/ (+ lbearing rbearing) 2)) | 559 | (center (/ (+ lbearing rbearing) 2)) |
| 564 | (gap (round (* (font-get (lgstring-font gstring) :size) 0.1))) | 560 | (gap (round (* (font-get (lgstring-font gstring) :size) 0.1)))) |
| 565 | xoff yoff) | ||
| 566 | (dotimes (i nchars) | 561 | (dotimes (i nchars) |
| 567 | (setq glyph (lgstring-glyph gstring i)) | 562 | (setq glyph (lgstring-glyph gstring i)) |
| 568 | (when (> i 0) | 563 | (when (> i 0) |
| @@ -652,12 +647,10 @@ Non-spacing characters are composed with the preceding base | |||
| 652 | character. If the preceding character is not a base character, | 647 | character. If the preceding character is not a base character, |
| 653 | each non-spacing character is composed as a spacing character by | 648 | each non-spacing character is composed as a spacing character by |
| 654 | prepending a space before it." | 649 | prepending a space before it." |
| 655 | (let* ((header (lgstring-header gstring)) | 650 | (let ((nglyphs (lgstring-glyph-len gstring)) |
| 656 | (nchars (lgstring-char-len gstring)) | 651 | (i 0) |
| 657 | (nglyphs (lgstring-glyph-len gstring)) | 652 | (coding (lgstring-font gstring)) |
| 658 | (i 0) | 653 | glyph) |
| 659 | (coding (lgstring-font gstring)) | ||
| 660 | glyph) | ||
| 661 | (while (and (< i nglyphs) | 654 | (while (and (< i nglyphs) |
| 662 | (setq glyph (lgstring-glyph gstring i))) | 655 | (setq glyph (lgstring-glyph gstring i))) |
| 663 | (if (not (char-charset (lglyph-char glyph) coding)) | 656 | (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." | |||
| 792 | (message "Aborted") | 792 | (message "Aborted") |
| 793 | nil)) | 793 | nil)) |
| 794 | 794 | ||
| 795 | (defun Custom-set (&rest ignore) | 795 | (defun Custom-set (&rest _ignore) |
| 796 | "Set the current value of all edited settings in the buffer." | 796 | "Set the current value of all edited settings in the buffer." |
| 797 | (interactive) | 797 | (interactive) |
| 798 | (custom-command-apply | 798 | (custom-command-apply |
| @@ -801,7 +801,7 @@ and `yes-or-no-p' otherwise." | |||
| 801 | (widget-apply child :custom-set))) | 801 | (widget-apply child :custom-set))) |
| 802 | "Set all values according to this buffer? ")) | 802 | "Set all values according to this buffer? ")) |
| 803 | 803 | ||
| 804 | (defun Custom-save (&rest ignore) | 804 | (defun Custom-save (&rest _ignore) |
| 805 | "Set all edited settings, then save all settings that have been set. | 805 | "Set all edited settings, then save all settings that have been set. |
| 806 | If a setting was edited and set before, this saves it. If a | 806 | If a setting was edited and set before, this saves it. If a |
| 807 | setting was merely edited before, this sets it then saves it." | 807 | 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." | |||
| 817 | (dolist (child custom-options) | 817 | (dolist (child custom-options) |
| 818 | (widget-apply child :custom-state-set-and-redraw)))) | 818 | (widget-apply child :custom-state-set-and-redraw)))) |
| 819 | 819 | ||
| 820 | (defun custom-reset (widget &optional event) | 820 | (defun custom-reset (_widget &optional event) |
| 821 | "Select item from reset menu." | 821 | "Select item from reset menu." |
| 822 | (let* ((completion-ignore-case t) | 822 | (let* ((completion-ignore-case t) |
| 823 | (answer (widget-choose "Reset settings" | 823 | (answer (widget-choose "Reset settings" |
| @@ -826,7 +826,7 @@ setting was merely edited before, this sets it then saves it." | |||
| 826 | (if answer | 826 | (if answer |
| 827 | (funcall answer)))) | 827 | (funcall answer)))) |
| 828 | 828 | ||
| 829 | (defun Custom-reset-current (&rest ignore) | 829 | (defun Custom-reset-current (&rest _ignore) |
| 830 | "Reset all edited settings in the buffer to show their current values." | 830 | "Reset all edited settings in the buffer to show their current values." |
| 831 | (interactive) | 831 | (interactive) |
| 832 | (custom-command-apply | 832 | (custom-command-apply |
| @@ -835,7 +835,7 @@ setting was merely edited before, this sets it then saves it." | |||
| 835 | (widget-apply widget :custom-reset-current))) | 835 | (widget-apply widget :custom-reset-current))) |
| 836 | "Reset all settings' buffer text to show current values? ")) | 836 | "Reset all settings' buffer text to show current values? ")) |
| 837 | 837 | ||
| 838 | (defun Custom-reset-saved (&rest ignore) | 838 | (defun Custom-reset-saved (&rest _ignore) |
| 839 | "Reset all edited or set settings in the buffer to their saved value. | 839 | "Reset all edited or set settings in the buffer to their saved value. |
| 840 | This also shows the saved values in the buffer." | 840 | This also shows the saved values in the buffer." |
| 841 | (interactive) | 841 | (interactive) |
| @@ -876,7 +876,6 @@ This also shows the saved values in the buffer." | |||
| 876 | (unless (eq widget t) | 876 | (unless (eq widget t) |
| 877 | (let* ((symbol (widget-value widget)) | 877 | (let* ((symbol (widget-value widget)) |
| 878 | (child (car (widget-get widget :children))) | 878 | (child (car (widget-get widget :children))) |
| 879 | (value (get symbol 'face-defface-spec)) | ||
| 880 | (comment-widget (widget-get widget :comment-widget))) | 879 | (comment-widget (widget-get widget :comment-widget))) |
| 881 | (put symbol 'face-comment nil) | 880 | (put symbol 'face-comment nil) |
| 882 | (widget-value-set child | 881 | (widget-value-set child |
| @@ -888,7 +887,7 @@ This also shows the saved values in the buffer." | |||
| 888 | (custom-face-state-set widget) | 887 | (custom-face-state-set widget) |
| 889 | (custom-redraw-magic widget)))))) | 888 | (custom-redraw-magic widget)))))) |
| 890 | 889 | ||
| 891 | (defun Custom-reset-standard (&rest ignore) | 890 | (defun Custom-reset-standard (&rest _ignore) |
| 892 | "Erase all customizations (either current or saved) in current buffer. | 891 | "Erase all customizations (either current or saved) in current buffer. |
| 893 | The immediate result is to restore them to their standard values. | 892 | The immediate result is to restore them to their standard values. |
| 894 | This operation eliminates any saved values for the group members, | 893 | 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. | |||
| 920 | 919 | ||
| 921 | If the variable has a `custom-type' property, it must be a widget and the | 920 | If the variable has a `custom-type' property, it must be a widget and the |
| 922 | `:prompt-value' property of that widget will be used for reading the value. | 921 | `:prompt-value' property of that widget will be used for reading the value. |
| 923 | If the variable also has a `custom-get' property, that is used for finding | 922 | If the variable also has a `custom-get' property, that is used for finding |
| 924 | the current value of the variable, otherwise `symbol-value' is used. | 923 | the current value of the variable, otherwise `symbol-value' is used. |
| 925 | 924 | ||
| 926 | If optional COMMENT argument is non-nil, also prompt for a comment and return | 925 | 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." | |||
| 943 | (widget-prompt-value type | 942 | (widget-prompt-value type |
| 944 | prompt | 943 | prompt |
| 945 | (if (boundp var) | 944 | (if (boundp var) |
| 946 | (funcall | 945 | (funcall |
| 947 | (or (get var 'custom-get) 'symbol-value) | 946 | (or (get var 'custom-get) 'symbol-value) |
| 948 | var)) | 947 | var)) |
| 949 | (not (boundp var)))) | 948 | (not (boundp var)))) |
| 950 | (t | 949 | (t |
| @@ -1401,7 +1400,7 @@ that are not customizable options, as well as faces and groups | |||
| 1401 | (interactive (list (apropos-read-pattern "symbol") current-prefix-arg)) | 1400 | (interactive (list (apropos-read-pattern "symbol") current-prefix-arg)) |
| 1402 | (require 'apropos) | 1401 | (require 'apropos) |
| 1403 | (apropos-parse-pattern pattern) | 1402 | (apropos-parse-pattern pattern) |
| 1404 | (let (found tests) | 1403 | (let (found) |
| 1405 | (mapatoms | 1404 | (mapatoms |
| 1406 | `(lambda (symbol) | 1405 | `(lambda (symbol) |
| 1407 | (when (string-match apropos-regexp (symbol-name symbol)) | 1406 | (when (string-match apropos-regexp (symbol-name symbol)) |
| @@ -1536,7 +1535,7 @@ This button will have a menu with all three reset operations." | |||
| 1536 | :type 'boolean | 1535 | :type 'boolean |
| 1537 | :group 'custom-buffer) | 1536 | :group 'custom-buffer) |
| 1538 | 1537 | ||
| 1539 | (defun Custom-buffer-done (&rest ignore) | 1538 | (defun Custom-buffer-done (&rest _ignore) |
| 1540 | "Exit current Custom buffer according to `custom-buffer-done-kill'." | 1539 | "Exit current Custom buffer according to `custom-buffer-done-kill'." |
| 1541 | (interactive) | 1540 | (interactive) |
| 1542 | (quit-window custom-buffer-done-kill)) | 1541 | (quit-window custom-buffer-done-kill)) |
| @@ -1574,7 +1573,7 @@ Otherwise use brackets." | |||
| 1574 | 'custom-button-pressed | 1573 | 'custom-button-pressed |
| 1575 | 'custom-button-pressed-unraised)))) | 1574 | 'custom-button-pressed-unraised)))) |
| 1576 | 1575 | ||
| 1577 | (defun custom-buffer-create-internal (options &optional description) | 1576 | (defun custom-buffer-create-internal (options &optional _description) |
| 1578 | (Custom-mode) | 1577 | (Custom-mode) |
| 1579 | (let ((init-file (or custom-file user-init-file))) | 1578 | (let ((init-file (or custom-file user-init-file))) |
| 1580 | ;; Insert verbose help at the top of the custom buffer. | 1579 | ;; Insert verbose help at the top of the custom buffer. |
| @@ -1609,7 +1608,7 @@ Otherwise use brackets." | |||
| 1609 | search-widget 'push-button | 1608 | search-widget 'push-button |
| 1610 | :tag " Search " | 1609 | :tag " Search " |
| 1611 | :help-echo echo :action | 1610 | :help-echo echo :action |
| 1612 | (lambda (widget &optional event) | 1611 | (lambda (widget &optional _event) |
| 1613 | (customize-apropos (widget-value (widget-get widget :parent))))) | 1612 | (customize-apropos (widget-value (widget-get widget :parent))))) |
| 1614 | (widget-insert "\n"))) | 1613 | (widget-insert "\n"))) |
| 1615 | 1614 | ||
| @@ -1623,7 +1622,7 @@ Otherwise use brackets." | |||
| 1623 | (if custom-buffer-verbose-help | 1622 | (if custom-buffer-verbose-help |
| 1624 | (widget-insert " | 1623 | (widget-insert " |
| 1625 | Operate on all settings in this buffer:\n")) | 1624 | Operate on all settings in this buffer:\n")) |
| 1626 | (let ((button (lambda (tag action active help icon label) | 1625 | (let ((button (lambda (tag action active help _icon _label) |
| 1627 | (widget-insert " ") | 1626 | (widget-insert " ") |
| 1628 | (if (eval active) | 1627 | (if (eval active) |
| 1629 | (widget-create 'push-button :tag tag | 1628 | (widget-create 'push-button :tag tag |
| @@ -1743,7 +1742,7 @@ item in another window.\n\n")) | |||
| 1743 | :format "%[[%t]%]" | 1742 | :format "%[[%t]%]" |
| 1744 | :action 'custom-browse-visibility-action) | 1743 | :action 'custom-browse-visibility-action) |
| 1745 | 1744 | ||
| 1746 | (defun custom-browse-visibility-action (widget &rest ignore) | 1745 | (defun custom-browse-visibility-action (widget &rest _ignore) |
| 1747 | (let ((custom-buffer-style 'tree)) | 1746 | (let ((custom-buffer-style 'tree)) |
| 1748 | (custom-toggle-parent widget))) | 1747 | (custom-toggle-parent widget))) |
| 1749 | 1748 | ||
| @@ -1753,7 +1752,7 @@ item in another window.\n\n")) | |||
| 1753 | :tag-glyph "folder" | 1752 | :tag-glyph "folder" |
| 1754 | :action 'custom-browse-group-tag-action) | 1753 | :action 'custom-browse-group-tag-action) |
| 1755 | 1754 | ||
| 1756 | (defun custom-browse-group-tag-action (widget &rest ignore) | 1755 | (defun custom-browse-group-tag-action (widget &rest _ignore) |
| 1757 | (let ((parent (widget-get widget :parent))) | 1756 | (let ((parent (widget-get widget :parent))) |
| 1758 | (customize-group-other-window (widget-value parent)))) | 1757 | (customize-group-other-window (widget-value parent)))) |
| 1759 | 1758 | ||
| @@ -1763,7 +1762,7 @@ item in another window.\n\n")) | |||
| 1763 | :tag-glyph "option" | 1762 | :tag-glyph "option" |
| 1764 | :action 'custom-browse-variable-tag-action) | 1763 | :action 'custom-browse-variable-tag-action) |
| 1765 | 1764 | ||
| 1766 | (defun custom-browse-variable-tag-action (widget &rest ignore) | 1765 | (defun custom-browse-variable-tag-action (widget &rest _ignore) |
| 1767 | (let ((parent (widget-get widget :parent))) | 1766 | (let ((parent (widget-get widget :parent))) |
| 1768 | (customize-variable-other-window (widget-value parent)))) | 1767 | (customize-variable-other-window (widget-value parent)))) |
| 1769 | 1768 | ||
| @@ -1773,7 +1772,7 @@ item in another window.\n\n")) | |||
| 1773 | :tag-glyph "face" | 1772 | :tag-glyph "face" |
| 1774 | :action 'custom-browse-face-tag-action) | 1773 | :action 'custom-browse-face-tag-action) |
| 1775 | 1774 | ||
| 1776 | (defun custom-browse-face-tag-action (widget &rest ignore) | 1775 | (defun custom-browse-face-tag-action (widget &rest _ignore) |
| 1777 | (let ((parent (widget-get widget :parent))) | 1776 | (let ((parent (widget-get widget :parent))) |
| 1778 | (customize-face-other-window (widget-value parent)))) | 1777 | (customize-face-other-window (widget-value parent)))) |
| 1779 | 1778 | ||
| @@ -1809,7 +1808,7 @@ item in another window.\n\n")) | |||
| 1809 | 1808 | ||
| 1810 | (widget-put (get 'item 'widget-type) :custom-show t) | 1809 | (widget-put (get 'item 'widget-type) :custom-show t) |
| 1811 | (widget-put (get 'editable-field 'widget-type) | 1810 | (widget-put (get 'editable-field 'widget-type) |
| 1812 | :custom-show (lambda (widget value) | 1811 | :custom-show (lambda (_widget value) |
| 1813 | (let ((pp (pp-to-string value))) | 1812 | (let ((pp (pp-to-string value))) |
| 1814 | (cond ((string-match "\n" pp) | 1813 | (cond ((string-match "\n" pp) |
| 1815 | nil) | 1814 | nil) |
| @@ -1998,7 +1997,7 @@ and `face'." | |||
| 1998 | :value-create 'custom-magic-value-create | 1997 | :value-create 'custom-magic-value-create |
| 1999 | :value-delete 'widget-children-value-delete) | 1998 | :value-delete 'widget-children-value-delete) |
| 2000 | 1999 | ||
| 2001 | (defun widget-magic-mouse-down-action (widget &optional event) | 2000 | (defun widget-magic-mouse-down-action (widget &optional _event) |
| 2002 | ;; Non-nil unless hidden. | 2001 | ;; Non-nil unless hidden. |
| 2003 | (not (eq (widget-get (widget-get (widget-get widget :parent) :parent) | 2002 | (not (eq (widget-get (widget-get (widget-get widget :parent) :parent) |
| 2004 | :custom-state) | 2003 | :custom-state) |
| @@ -2182,7 +2181,7 @@ and `face'." | |||
| 2182 | :value-delete 'widget-children-value-delete | 2181 | :value-delete 'widget-children-value-delete |
| 2183 | :value-get 'widget-value-value-get | 2182 | :value-get 'widget-value-value-get |
| 2184 | :validate 'widget-children-validate | 2183 | :validate 'widget-children-validate |
| 2185 | :match (lambda (widget value) (symbolp value))) | 2184 | :match (lambda (_widget value) (symbolp value))) |
| 2186 | 2185 | ||
| 2187 | (defun custom-convert-widget (widget) | 2186 | (defun custom-convert-widget (widget) |
| 2188 | "Initialize :value and :tag from :args in WIDGET." | 2187 | "Initialize :value and :tag from :args in WIDGET." |
| @@ -2282,7 +2281,7 @@ and `face'." | |||
| 2282 | (custom-redraw widget) | 2281 | (custom-redraw widget) |
| 2283 | (widget-setup))) | 2282 | (widget-setup))) |
| 2284 | 2283 | ||
| 2285 | (defun custom-toggle-parent (widget &rest ignore) | 2284 | (defun custom-toggle-parent (widget &rest _ignore) |
| 2286 | "Toggle visibility of parent of WIDGET." | 2285 | "Toggle visibility of parent of WIDGET." |
| 2287 | (custom-toggle-hide (widget-get widget :parent))) | 2286 | (custom-toggle-hide (widget-get widget :parent))) |
| 2288 | 2287 | ||
| @@ -2318,7 +2317,7 @@ Insert PREFIX first if non-nil." | |||
| 2318 | (insert ", ")))) | 2317 | (insert ", ")))) |
| 2319 | (widget-put widget :buttons buttons)))) | 2318 | (widget-put widget :buttons buttons)))) |
| 2320 | 2319 | ||
| 2321 | (defun custom-add-parent-links (widget &optional initial-string doc-initial-string) | 2320 | (defun custom-add-parent-links (widget &optional initial-string _doc-initial-string) |
| 2322 | "Add \"Parent groups: ...\" to WIDGET if the group has parents. | 2321 | "Add \"Parent groups: ...\" to WIDGET if the group has parents. |
| 2323 | The value is non-nil if any parents were found. | 2322 | The value is non-nil if any parents were found. |
| 2324 | If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | 2323 | 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'." | |||
| 2675 | (custom-add-parent-links widget)) | 2674 | (custom-add-parent-links widget)) |
| 2676 | (custom-add-see-also widget))))) | 2675 | (custom-add-see-also widget))))) |
| 2677 | 2676 | ||
| 2678 | (defun custom-toggle-hide-variable (visibility-widget &rest ignore) | 2677 | (defun custom-toggle-hide-variable (visibility-widget &rest _ignore) |
| 2679 | "Toggle the visibility of a `custom-variable' parent widget. | 2678 | "Toggle the visibility of a `custom-variable' parent widget. |
| 2680 | By default, this signals an error if the parent has unsaved | 2679 | By default, this signals an error if the parent has unsaved |
| 2681 | changes. If the parent has a `simple' :custom-style property, | 2680 | changes. If the parent has a `simple' :custom-style property, |
| @@ -3132,14 +3131,14 @@ face attributes (as specified by a `default' defface entry)." | |||
| 3132 | (widget-put widget :buttons buttons) | 3131 | (widget-put widget :buttons buttons) |
| 3133 | (widget-put widget :children (nreverse (widget-get widget :children))))) | 3132 | (widget-put widget :children (nreverse (widget-get widget :children))))) |
| 3134 | 3133 | ||
| 3135 | (defun custom-face-edit-value-visibility-action (widget &rest ignore) | 3134 | (defun custom-face-edit-value-visibility-action (widget &rest _ignore) |
| 3136 | ;; Toggle hiding of face attributes. | 3135 | ;; Toggle hiding of face attributes. |
| 3137 | (let ((parent (widget-get widget :parent))) | 3136 | (let ((parent (widget-get widget :parent))) |
| 3138 | (widget-put parent :show-all-attributes | 3137 | (widget-put parent :show-all-attributes |
| 3139 | (not (widget-get parent :show-all-attributes))) | 3138 | (not (widget-get parent :show-all-attributes))) |
| 3140 | (custom-redraw parent))) | 3139 | (custom-redraw parent))) |
| 3141 | 3140 | ||
| 3142 | (defun custom-face-edit-fix-value (widget value) | 3141 | (defun custom-face-edit-fix-value (_widget value) |
| 3143 | "Ignoring WIDGET, convert :bold and :italic in VALUE to new form. | 3142 | "Ignoring WIDGET, convert :bold and :italic in VALUE to new form. |
| 3144 | Also change :reverse-video to :inverse-video." | 3143 | Also change :reverse-video to :inverse-video." |
| 3145 | (custom-fix-face-spec value)) | 3144 | (custom-fix-face-spec value)) |
| @@ -3426,7 +3425,7 @@ WIDGET should be a `custom-face' widget." | |||
| 3426 | (setq spec `((t ,(face-attr-construct face (selected-frame)))))) | 3425 | (setq spec `((t ,(face-attr-construct face (selected-frame)))))) |
| 3427 | (custom-pre-filter-face-spec spec))) | 3426 | (custom-pre-filter-face-spec spec))) |
| 3428 | 3427 | ||
| 3429 | (defun custom-toggle-hide-face (visibility-widget &rest ignore) | 3428 | (defun custom-toggle-hide-face (visibility-widget &rest _ignore) |
| 3430 | "Toggle the visibility of a `custom-face' parent widget. | 3429 | "Toggle the visibility of a `custom-face' parent widget. |
| 3431 | By default, this signals an error if the parent has unsaved | 3430 | By default, this signals an error if the parent has unsaved |
| 3432 | changes. If the parent has a `simple' :custom-style property, | 3431 | 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." | |||
| 3830 | :value 'default | 3829 | :value 'default |
| 3831 | :sample-face-get 'widget-face-sample-face-get | 3830 | :sample-face-get 'widget-face-sample-face-get |
| 3832 | :notify 'widget-face-notify | 3831 | :notify 'widget-face-notify |
| 3833 | :match (lambda (widget value) (facep value)) | 3832 | :match (lambda (_widget value) (facep value)) |
| 3834 | :complete-function (lambda () | 3833 | :complete-function (lambda () |
| 3835 | (interactive) | 3834 | (interactive) |
| 3836 | (lisp-complete-symbol 'facep)) | 3835 | (lisp-complete-symbol 'facep)) |
| @@ -3860,7 +3859,7 @@ restoring it to the state of a face that has never been customized." | |||
| 3860 | 3859 | ||
| 3861 | (define-widget 'hook 'list | 3860 | (define-widget 'hook 'list |
| 3862 | "An Emacs Lisp hook." | 3861 | "An Emacs Lisp hook." |
| 3863 | :value-to-internal (lambda (widget value) | 3862 | :value-to-internal (lambda (_widget value) |
| 3864 | (if (and value (symbolp value)) | 3863 | (if (and value (symbolp value)) |
| 3865 | (list value) | 3864 | (list value) |
| 3866 | value)) | 3865 | value)) |
| @@ -3905,7 +3904,7 @@ restoring it to the state of a face that has never been customized." | |||
| 3905 | :follow-link 'mouse-face | 3904 | :follow-link 'mouse-face |
| 3906 | :action 'custom-group-link-action) | 3905 | :action 'custom-group-link-action) |
| 3907 | 3906 | ||
| 3908 | (defun custom-group-link-action (widget &rest ignore) | 3907 | (defun custom-group-link-action (widget &rest _ignore) |
| 3909 | (customize-group (widget-value widget))) | 3908 | (customize-group (widget-value widget))) |
| 3910 | 3909 | ||
| 3911 | ;;; The `custom-group' Widget. | 3910 | ;;; The `custom-group' Widget. |
| @@ -4202,8 +4201,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups." | |||
| 4202 | (widget-insert "\n") | 4201 | (widget-insert "\n") |
| 4203 | (progress-reporter-update reporter (setq count (1+ count))) | 4202 | (progress-reporter-update reporter (setq count (1+ count))) |
| 4204 | (let ((sym (nth 0 entry)) | 4203 | (let ((sym (nth 0 entry)) |
| 4205 | (type (nth 1 entry)) | 4204 | (type (nth 1 entry))) |
| 4206 | hidden-p) | ||
| 4207 | (prog1 | 4205 | (prog1 |
| 4208 | (widget-create-child-and-convert | 4206 | (widget-create-child-and-convert |
| 4209 | widget type | 4207 | widget type |
| @@ -4510,6 +4508,8 @@ This function does not save the buffer." | |||
| 4510 | (setq pos (line-beginning-position)))) | 4508 | (setq pos (line-beginning-position)))) |
| 4511 | (goto-char pos))))) | 4509 | (goto-char pos))))) |
| 4512 | 4510 | ||
| 4511 | (defvar sort-fold-case) ; defined in sort.el | ||
| 4512 | |||
| 4513 | (defun custom-save-variables () | 4513 | (defun custom-save-variables () |
| 4514 | "Save all customized variables in `custom-file'." | 4514 | "Save all customized variables in `custom-file'." |
| 4515 | (save-excursion | 4515 | (save-excursion |
| @@ -4648,13 +4648,13 @@ This function does not save the buffer." | |||
| 4648 | :type 'integer | 4648 | :type 'integer |
| 4649 | :group 'custom-menu) | 4649 | :group 'custom-menu) |
| 4650 | 4650 | ||
| 4651 | (defun custom-face-menu-create (widget symbol) | 4651 | (defun custom-face-menu-create (_widget symbol) |
| 4652 | "Ignoring WIDGET, create a menu entry for customization face SYMBOL." | 4652 | "Ignoring WIDGET, create a menu entry for customization face SYMBOL." |
| 4653 | (vector (custom-unlispify-menu-entry symbol) | 4653 | (vector (custom-unlispify-menu-entry symbol) |
| 4654 | `(customize-face ',symbol) | 4654 | `(customize-face ',symbol) |
| 4655 | t)) | 4655 | t)) |
| 4656 | 4656 | ||
| 4657 | (defun custom-variable-menu-create (widget symbol) | 4657 | (defun custom-variable-menu-create (_widget symbol) |
| 4658 | "Ignoring WIDGET, create a menu entry for customization variable SYMBOL." | 4658 | "Ignoring WIDGET, create a menu entry for customization variable SYMBOL." |
| 4659 | (let ((type (get symbol 'custom-type))) | 4659 | (let ((type (get symbol 'custom-type))) |
| 4660 | (unless (listp type) | 4660 | (unless (listp type) |
| @@ -4667,13 +4667,13 @@ This function does not save the buffer." | |||
| 4667 | 4667 | ||
| 4668 | ;; Add checkboxes to boolean variable entries. | 4668 | ;; Add checkboxes to boolean variable entries. |
| 4669 | (widget-put (get 'boolean 'widget-type) | 4669 | (widget-put (get 'boolean 'widget-type) |
| 4670 | :custom-menu (lambda (widget symbol) | 4670 | :custom-menu (lambda (_widget symbol) |
| 4671 | (vector (custom-unlispify-menu-entry symbol) | 4671 | (vector (custom-unlispify-menu-entry symbol) |
| 4672 | `(customize-variable ',symbol) | 4672 | `(customize-variable ',symbol) |
| 4673 | ':style 'toggle | 4673 | ':style 'toggle |
| 4674 | ':selected symbol))) | 4674 | ':selected symbol))) |
| 4675 | 4675 | ||
| 4676 | (defun custom-group-menu-create (widget symbol) | 4676 | (defun custom-group-menu-create (_widget symbol) |
| 4677 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." | 4677 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." |
| 4678 | `( ,(custom-unlispify-menu-entry symbol t) | 4678 | `( ,(custom-unlispify-menu-entry symbol t) |
| 4679 | :filter (lambda (&rest junk) | 4679 | :filter (lambda (&rest junk) |
| @@ -4747,7 +4747,7 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4747 | 4747 | ||
| 4748 | ;;; The Custom Mode. | 4748 | ;;; The Custom Mode. |
| 4749 | 4749 | ||
| 4750 | (defun Custom-no-edit (pos &optional event) | 4750 | (defun Custom-no-edit (_pos &optional _event) |
| 4751 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4751 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4752 | (interactive "@d") | 4752 | (interactive "@d") |
| 4753 | (error "You can't edit this part of the Custom buffer")) | 4753 | (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")) | |||
| 112 | (widget-create 'push-button | 112 | (widget-create 'push-button |
| 113 | :tag " Visit Theme " | 113 | :tag " Visit Theme " |
| 114 | :help-echo "Insert the settings of a pre-defined theme." | 114 | :help-echo "Insert the settings of a pre-defined theme." |
| 115 | :action (lambda (widget &optional event) | 115 | :action (lambda (_widget &optional _event) |
| 116 | (call-interactively 'custom-theme-visit-theme))) | 116 | (call-interactively 'custom-theme-visit-theme))) |
| 117 | (widget-insert " ") | 117 | (widget-insert " ") |
| 118 | (widget-create 'push-button | 118 | (widget-create 'push-button |
| 119 | :tag " Merge Theme " | 119 | :tag " Merge Theme " |
| 120 | :help-echo "Merge in the settings of a pre-defined theme." | 120 | :help-echo "Merge in the settings of a pre-defined theme." |
| 121 | :action (lambda (widget &optional event) | 121 | :action (lambda (_widget &optional _event) |
| 122 | (call-interactively 'custom-theme-merge-theme))) | 122 | (call-interactively 'custom-theme-merge-theme))) |
| 123 | (widget-insert " ") | 123 | (widget-insert " ") |
| 124 | (widget-create 'push-button | 124 | (widget-create 'push-button |
| @@ -182,7 +182,7 @@ remove them from your saved Custom file.\n\n")) | |||
| 182 | :button-face 'custom-link | 182 | :button-face 'custom-link |
| 183 | :mouse-face 'highlight | 183 | :mouse-face 'highlight |
| 184 | :pressed-face 'highlight | 184 | :pressed-face 'highlight |
| 185 | :action (lambda (widget &optional event) | 185 | :action (lambda (_widget &optional _event) |
| 186 | (call-interactively 'custom-theme-add-face))) | 186 | (call-interactively 'custom-theme-add-face))) |
| 187 | 187 | ||
| 188 | ;; If THEME is non-nil, insert all of that theme's variables. | 188 | ;; 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")) | |||
| 201 | :button-face 'custom-link | 201 | :button-face 'custom-link |
| 202 | :mouse-face 'highlight | 202 | :mouse-face 'highlight |
| 203 | :pressed-face 'highlight | 203 | :pressed-face 'highlight |
| 204 | :action (lambda (widget &optional event) | 204 | :action (lambda (_widget &optional _event) |
| 205 | (call-interactively 'custom-theme-add-variable))) | 205 | (call-interactively 'custom-theme-add-variable))) |
| 206 | (widget-insert ?\n) | 206 | (widget-insert ?\n) |
| 207 | (widget-setup) | 207 | (widget-setup) |
| 208 | (goto-char (point-min)) | 208 | (goto-char (point-min)) |
| 209 | (message ""))) | 209 | (message ""))) |
| 210 | 210 | ||
| 211 | (defun custom-theme-revert (ignore-auto noconfirm) | 211 | (defun custom-theme-revert (_ignore-auto noconfirm) |
| 212 | (when (or noconfirm (y-or-n-p "Discard current changes? ")) | 212 | (when (or noconfirm (y-or-n-p "Discard current changes? ")) |
| 213 | (customize-create-theme custom-theme--save-name (current-buffer)))) | 213 | (customize-create-theme custom-theme--save-name (current-buffer)))) |
| 214 | 214 | ||
| @@ -336,7 +336,11 @@ SPEC, if non-nil, should be a face spec to which to set the widget." | |||
| 336 | (nth 3 setting)))) | 336 | (nth 3 setting)))) |
| 337 | theme) | 337 | theme) |
| 338 | 338 | ||
| 339 | (defun custom-theme-write (&rest ignore) | 339 | ;; From cus-edit.el |
| 340 | (defvar custom-reset-standard-faces-list) | ||
| 341 | (defvar custom-reset-standard-variables-list) | ||
| 342 | |||
| 343 | (defun custom-theme-write (&rest _ignore) | ||
| 340 | "Write the current custom theme to its theme file." | 344 | "Write the current custom theme to its theme file." |
| 341 | (interactive) | 345 | (interactive) |
| 342 | (let* ((name (widget-value custom-theme-name)) | 346 | (let* ((name (widget-value custom-theme-name)) |
| @@ -533,7 +537,7 @@ Do not call this mode function yourself. It is meant for internal use." | |||
| 533 | (use-local-map custom-theme-choose-mode-map) | 537 | (use-local-map custom-theme-choose-mode-map) |
| 534 | (custom--initialize-widget-variables) | 538 | (custom--initialize-widget-variables) |
| 535 | (set (make-local-variable 'revert-buffer-function) | 539 | (set (make-local-variable 'revert-buffer-function) |
| 536 | (lambda (ignore-auto noconfirm) | 540 | (lambda (_ignore-auto noconfirm) |
| 537 | (when (or noconfirm (y-or-n-p "Discard current choices? ")) | 541 | (when (or noconfirm (y-or-n-p "Discard current choices? ")) |
| 538 | (customize-themes (current-buffer)))))) | 542 | (customize-themes (current-buffer)))))) |
| 539 | (put 'custom-theme-choose-mode 'mode-class 'special) | 543 | (put 'custom-theme-choose-mode 'mode-class 'special) |
| @@ -566,7 +570,7 @@ Theme files are named *-theme.el in `")) | |||
| 566 | :help-echo "Describe `custom-theme-load-path'." | 570 | :help-echo "Describe `custom-theme-load-path'." |
| 567 | :keymap custom-mode-link-map | 571 | :keymap custom-mode-link-map |
| 568 | :follow-link 'mouse-face | 572 | :follow-link 'mouse-face |
| 569 | :action (lambda (widget &rest ignore) | 573 | :action (lambda (_widget &rest _ignore) |
| 570 | (describe-variable 'custom-theme-load-path))) | 574 | (describe-variable 'custom-theme-load-path))) |
| 571 | (widget-insert "'.\n\n") | 575 | (widget-insert "'.\n\n") |
| 572 | 576 | ||
| @@ -589,7 +593,7 @@ Theme files are named *-theme.el in `")) | |||
| 589 | :help-echo "Migrate." | 593 | :help-echo "Migrate." |
| 590 | :keymap custom-mode-link-map | 594 | :keymap custom-mode-link-map |
| 591 | :follow-link 'mouse-face | 595 | :follow-link 'mouse-face |
| 592 | :action (lambda (widget &rest ignore) | 596 | :action (lambda (_widget &rest _ignore) |
| 593 | (customize-create-theme 'user))) | 597 | (customize-create-theme 'user))) |
| 594 | (widget-insert ".\n\n"))) | 598 | (widget-insert ".\n\n"))) |
| 595 | 599 | ||
| @@ -653,7 +657,7 @@ Theme files are named *-theme.el in `")) | |||
| 653 | (and widget | 657 | (and widget |
| 654 | (describe-theme (widget-get widget :theme-name))))) | 658 | (describe-theme (widget-get widget :theme-name))))) |
| 655 | 659 | ||
| 656 | (defun custom-theme-save (&rest ignore) | 660 | (defun custom-theme-save (&rest _ignore) |
| 657 | (interactive) | 661 | (interactive) |
| 658 | (customize-save-variable 'custom-enabled-themes custom-enabled-themes) | 662 | (customize-save-variable 'custom-enabled-themes custom-enabled-themes) |
| 659 | (message "Custom themes saved for future sessions.")) | 663 | (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'." | |||
| 109 | (defvar custom-delayed-init-variables nil | 109 | (defvar custom-delayed-init-variables nil |
| 110 | "List of variables whose initialization is pending.") | 110 | "List of variables whose initialization is pending.") |
| 111 | 111 | ||
| 112 | (defun custom-initialize-delay (symbol value) | 112 | (defun custom-initialize-delay (symbol _value) |
| 113 | "Delay initialization of SYMBOL to the next Emacs start. | 113 | "Delay initialization of SYMBOL to the next Emacs start. |
| 114 | This is used in files that are preloaded (or for autoloaded | 114 | This is used in files that are preloaded (or for autoloaded |
| 115 | variables), so that the initialization is done in the run-time | 115 | 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." | |||
| 391 | dabbrev-case-fold-search) | 391 | dabbrev-case-fold-search) |
| 392 | (or (not dabbrev-upcase-means-case-search) | 392 | (or (not dabbrev-upcase-means-case-search) |
| 393 | (string= abbrev (downcase abbrev))))) | 393 | (string= abbrev (downcase abbrev))))) |
| 394 | (my-obarray dabbrev--last-obarray) | 394 | (my-obarray dabbrev--last-obarray)) |
| 395 | init) | ||
| 396 | (save-excursion | 395 | (save-excursion |
| 397 | ;;-------------------------------- | 396 | ;;-------------------------------- |
| 398 | ;; New abbreviation to expand. | 397 | ;; 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." | |||
| 240 | ;; User Commands: | 240 | ;; User Commands: |
| 241 | 241 | ||
| 242 | 242 | ||
| 243 | ;; to avoid compilation gripes | ||
| 244 | (defvar delimit-columns-max nil) | ||
| 245 | (defvar delimit-columns-limit nil) | ||
| 246 | |||
| 247 | |||
| 243 | ;;;###autoload | 248 | ;;;###autoload |
| 244 | (defun delimit-columns-customize () | 249 | (defun delimit-columns-customize () |
| 245 | "Customization of `columns' group." | 250 | "Customization of `columns' group." |
| @@ -354,12 +359,7 @@ START and END delimits the corners of text rectangle." | |||
| 354 | ;; Internal Variables and Functions: | 359 | ;; Internal Variables and Functions: |
| 355 | 360 | ||
| 356 | 361 | ||
| 357 | ;; to avoid compilation gripes | 362 | (defun delimit-columns-rectangle-max (startpos &optional _ignore1 _ignore2) |
| 358 | (defvar delimit-columns-max nil) | ||
| 359 | (defvar delimit-columns-limit nil) | ||
| 360 | |||
| 361 | |||
| 362 | (defun delimit-columns-rectangle-max (startpos &optional ignore1 ignore2) | ||
| 363 | (set-marker delimit-columns-limit (point)) | 363 | (set-marker delimit-columns-limit (point)) |
| 364 | (goto-char startpos) | 364 | (goto-char startpos) |
| 365 | (let ((ncol 1) | 365 | (let ((ncol 1) |
| @@ -392,7 +392,7 @@ START and END delimits the corners of text rectangle." | |||
| 392 | (setq values (cdr values))))) | 392 | (setq values (cdr values))))) |
| 393 | 393 | ||
| 394 | 394 | ||
| 395 | (defun delimit-columns-rectangle-line (startpos &optional ignore1 ignore2) | 395 | (defun delimit-columns-rectangle-line (startpos &optional _ignore1 _ignore2) |
| 396 | (let ((len (length delimit-columns-max)) | 396 | (let ((len (length delimit-columns-max)) |
| 397 | (ncol 0) | 397 | (ncol 0) |
| 398 | origin) | 398 | 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'." | |||
| 364 | (let ((mnemonics (category-set-mnemonics category-set))) | 364 | (let ((mnemonics (category-set-mnemonics category-set))) |
| 365 | (unless (eq mnemonics "") | 365 | (unless (eq mnemonics "") |
| 366 | (list (mapconcat | 366 | (list (mapconcat |
| 367 | #'(lambda (x) | 367 | (lambda (x) |
| 368 | (let* ((c (category-docstring x)) | 368 | (let* ((c (category-docstring x)) |
| 369 | (doc (if (string-match "\\`\\(.*?\\)\n\\(.*\\)\\'" c) | 369 | (doc (if (string-match "\\`\\(.*?\\)\n\\(.*\\)\\'" c) |
| 370 | (propertize (match-string 1 c) | 370 | (propertize (match-string 1 c) |
| 371 | 'help-echo (match-string 2 c)) | 371 | 'help-echo (match-string 2 c)) |
| 372 | c))) | 372 | c))) |
| 373 | (format "%c:%s" x doc))) | 373 | (format "%c:%s" x doc))) |
| 374 | mnemonics ", "))))) | 374 | mnemonics ", "))))) |
| 375 | 375 | ||
| 376 | ;;;###autoload | 376 | ;;;###autoload |
| @@ -399,7 +399,7 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 399 | standard-display-table)) | 399 | standard-display-table)) |
| 400 | (disp-vector (and display-table (aref display-table char))) | 400 | (disp-vector (and display-table (aref display-table char))) |
| 401 | (multibyte-p enable-multibyte-characters) | 401 | (multibyte-p enable-multibyte-characters) |
| 402 | (overlays (mapcar #'(lambda (o) (overlay-properties o)) | 402 | (overlays (mapcar (lambda (o) (overlay-properties o)) |
| 403 | (overlays-at pos))) | 403 | (overlays-at pos))) |
| 404 | (char-description (if (not multibyte-p) | 404 | (char-description (if (not multibyte-p) |
| 405 | (single-key-description char) | 405 | (single-key-description char) |
| @@ -582,8 +582,8 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 582 | pos (glyph-char (aref disp-vector i)))))) | 582 | pos (glyph-char (aref disp-vector i)))))) |
| 583 | (format "by display table entry [%s] (see below)" | 583 | (format "by display table entry [%s] (see below)" |
| 584 | (mapconcat | 584 | (mapconcat |
| 585 | #'(lambda (x) | 585 | (lambda (x) |
| 586 | (format "?%c" (glyph-char (car x)))) | 586 | (format "?%c" (glyph-char (car x)))) |
| 587 | disp-vector " "))) | 587 | disp-vector " "))) |
| 588 | (composition | 588 | (composition |
| 589 | (cadr composition)) | 589 | (cadr composition)) |
| @@ -650,11 +650,11 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 650 | (goto-char (point-min)) | 650 | (goto-char (point-min)) |
| 651 | (re-search-forward "character:[ \t\n]+") | 651 | (re-search-forward "character:[ \t\n]+") |
| 652 | (let ((end (+ (point) (length char-description)))) | 652 | (let ((end (+ (point) (length char-description)))) |
| 653 | (mapc #'(lambda (props) | 653 | (mapc (lambda (props) |
| 654 | (let ((o (make-overlay (point) end))) | 654 | (let ((o (make-overlay (point) end))) |
| 655 | (while props | 655 | (while props |
| 656 | (overlay-put o (car props) (nth 1 props)) | 656 | (overlay-put o (car props) (nth 1 props)) |
| 657 | (setq props (cddr props))))) | 657 | (setq props (cddr props))))) |
| 658 | overlays)))) | 658 | overlays)))) |
| 659 | 659 | ||
| 660 | (when disp-vector | 660 | (when disp-vector |
| @@ -745,7 +745,7 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 745 | "\nCharacter code properties: ")) | 745 | "\nCharacter code properties: ")) |
| 746 | (insert-text-button | 746 | (insert-text-button |
| 747 | "customize what to show" | 747 | "customize what to show" |
| 748 | 'action (lambda (&rest ignore) | 748 | 'action (lambda (&rest _ignore) |
| 749 | (customize-variable | 749 | (customize-variable |
| 750 | 'describe-char-unidata-list)) | 750 | 'describe-char-unidata-list)) |
| 751 | 'follow-link t) | 751 | '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 | |||
| 811 | ")\n")))) | 811 | ")\n")))) |
| 812 | 812 | ||
| 813 | ;; ---------------------------------------------------------------------------- | 813 | ;; ---------------------------------------------------------------------------- |
| 814 | (defun desktop-save-buffer-p (filename bufname mode &rest dummy) | 814 | (defun desktop-save-buffer-p (filename bufname mode &rest _dummy) |
| 815 | "Return t if buffer should have its state saved in the desktop file. | 815 | "Return t if buffer should have its state saved in the desktop file. |
| 816 | FILENAME is the visited file name, BUFNAME is the buffer name, and | 816 | FILENAME is the visited file name, BUFNAME is the buffer name, and |
| 817 | MODE is the major mode. | 817 | MODE is the major mode. |
| @@ -1076,15 +1076,16 @@ directory DIRNAME." | |||
| 1076 | 1076 | ||
| 1077 | (defvar desktop-buffer-major-mode) | 1077 | (defvar desktop-buffer-major-mode) |
| 1078 | (defvar desktop-buffer-locals) | 1078 | (defvar desktop-buffer-locals) |
| 1079 | (defvar auto-insert) ; from autoinsert.el | ||
| 1079 | ;; ---------------------------------------------------------------------------- | 1080 | ;; ---------------------------------------------------------------------------- |
| 1080 | (defun desktop-restore-file-buffer (desktop-buffer-file-name | 1081 | (defun desktop-restore-file-buffer (buffer-filename |
| 1081 | desktop-buffer-name | 1082 | _buffer-name |
| 1082 | desktop-buffer-misc) | 1083 | _buffer-misc) |
| 1083 | "Restore a file buffer." | 1084 | "Restore a file buffer." |
| 1084 | (when desktop-buffer-file-name | 1085 | (when buffer-filename |
| 1085 | (if (or (file-exists-p desktop-buffer-file-name) | 1086 | (if (or (file-exists-p buffer-filename) |
| 1086 | (let ((msg (format "Desktop: File \"%s\" no longer exists." | 1087 | (let ((msg (format "Desktop: File \"%s\" no longer exists." |
| 1087 | desktop-buffer-file-name))) | 1088 | buffer-filename))) |
| 1088 | (if desktop-missing-file-warning | 1089 | (if desktop-missing-file-warning |
| 1089 | (y-or-n-p (concat msg " Re-create buffer? ")) | 1090 | (y-or-n-p (concat msg " Re-create buffer? ")) |
| 1090 | (message "%s" msg) | 1091 | (message "%s" msg) |
| @@ -1094,7 +1095,7 @@ directory DIRNAME." | |||
| 1094 | (or coding-system-for-read | 1095 | (or coding-system-for-read |
| 1095 | (cdr (assq 'buffer-file-coding-system | 1096 | (cdr (assq 'buffer-file-coding-system |
| 1096 | desktop-buffer-locals)))) | 1097 | desktop-buffer-locals)))) |
| 1097 | (buf (find-file-noselect desktop-buffer-file-name))) | 1098 | (buf (find-file-noselect buffer-filename))) |
| 1098 | (condition-case nil | 1099 | (condition-case nil |
| 1099 | (switch-to-buffer buf) | 1100 | (switch-to-buffer buf) |
| 1100 | (error (pop-to-buffer buf))) | 1101 | (error (pop-to-buffer buf))) |
| @@ -1125,104 +1126,114 @@ directory DIRNAME." | |||
| 1125 | (defvar desktop-buffer-fail-count) | 1126 | (defvar desktop-buffer-fail-count) |
| 1126 | 1127 | ||
| 1127 | (defun desktop-create-buffer | 1128 | (defun desktop-create-buffer |
| 1128 | (desktop-file-version | 1129 | (file-version |
| 1129 | desktop-buffer-file-name | 1130 | buffer-filename |
| 1130 | desktop-buffer-name | 1131 | buffer-name |
| 1131 | desktop-buffer-major-mode | 1132 | buffer-majormode |
| 1132 | desktop-buffer-minor-modes | 1133 | buffer-minormodes |
| 1133 | desktop-buffer-point | 1134 | buffer-point |
| 1134 | desktop-buffer-mark | 1135 | buffer-mark |
| 1135 | desktop-buffer-read-only | 1136 | buffer-readonly |
| 1136 | desktop-buffer-misc | 1137 | buffer-misc |
| 1137 | &optional | 1138 | &optional |
| 1138 | desktop-buffer-locals) | 1139 | buffer-locals) |
| 1139 | ;; To make desktop files with relative file names possible, we cannot | 1140 | |
| 1140 | ;; allow `default-directory' to change. Therefore we save current buffer. | 1141 | (let ((desktop-file-version file-version) |
| 1141 | (save-current-buffer | 1142 | (desktop-buffer-file-name buffer-filename) |
| 1142 | ;; Give major mode module a chance to add a handler. | 1143 | (desktop-buffer-name buffer-name) |
| 1143 | (desktop-load-file desktop-buffer-major-mode) | 1144 | (desktop-buffer-major-mode buffer-majormode) |
| 1144 | (let ((buffer-list (buffer-list)) | 1145 | (desktop-buffer-minor-modes buffer-minormodes) |
| 1145 | (result | 1146 | (desktop-buffer-point buffer-point) |
| 1146 | (condition-case-no-debug err | 1147 | (desktop-buffer-mark buffer-mark) |
| 1147 | (funcall (or (cdr (assq desktop-buffer-major-mode | 1148 | (desktop-buffer-read-only buffer-readonly) |
| 1148 | desktop-buffer-mode-handlers)) | 1149 | (desktop-buffer-misc buffer-misc) |
| 1149 | 'desktop-restore-file-buffer) | 1150 | (desktop-buffer-locals buffer-locals)) |
| 1150 | desktop-buffer-file-name | 1151 | ;; To make desktop files with relative file names possible, we cannot |
| 1151 | desktop-buffer-name | 1152 | ;; allow `default-directory' to change. Therefore we save current buffer. |
| 1152 | desktop-buffer-misc) | 1153 | (save-current-buffer |
| 1153 | (error | 1154 | ;; Give major mode module a chance to add a handler. |
| 1154 | (message "Desktop: Can't load buffer %s: %s" | 1155 | (desktop-load-file desktop-buffer-major-mode) |
| 1155 | desktop-buffer-name | 1156 | (let ((buffer-list (buffer-list)) |
| 1156 | (error-message-string err)) | 1157 | (result |
| 1157 | (when desktop-missing-file-warning (sit-for 1)) | 1158 | (condition-case-no-debug err |
| 1158 | nil)))) | 1159 | (funcall (or (cdr (assq desktop-buffer-major-mode |
| 1159 | (if (bufferp result) | 1160 | desktop-buffer-mode-handlers)) |
| 1160 | (setq desktop-buffer-ok-count (1+ desktop-buffer-ok-count)) | 1161 | 'desktop-restore-file-buffer) |
| 1161 | (setq desktop-buffer-fail-count (1+ desktop-buffer-fail-count)) | 1162 | desktop-buffer-file-name |
| 1162 | (setq result nil)) | 1163 | desktop-buffer-name |
| 1163 | ;; Restore buffer list order with new buffer at end. Don't change | 1164 | desktop-buffer-misc) |
| 1164 | ;; the order for old desktop files (old desktop module behaviour). | 1165 | (error |
| 1165 | (unless (< desktop-file-version 206) | 1166 | (message "Desktop: Can't load buffer %s: %s" |
| 1166 | (mapc 'bury-buffer buffer-list) | 1167 | desktop-buffer-name |
| 1167 | (when result (bury-buffer result))) | 1168 | (error-message-string err)) |
| 1168 | (when result | 1169 | (when desktop-missing-file-warning (sit-for 1)) |
| 1169 | (unless (or desktop-first-buffer (< desktop-file-version 206)) | 1170 | nil)))) |
| 1170 | (setq desktop-first-buffer result)) | 1171 | (if (bufferp result) |
| 1171 | (set-buffer result) | 1172 | (setq desktop-buffer-ok-count (1+ desktop-buffer-ok-count)) |
| 1172 | (unless (equal (buffer-name) desktop-buffer-name) | 1173 | (setq desktop-buffer-fail-count (1+ desktop-buffer-fail-count)) |
| 1173 | (rename-buffer desktop-buffer-name t)) | 1174 | (setq result nil)) |
| 1174 | ;; minor modes | 1175 | ;; Restore buffer list order with new buffer at end. Don't change |
| 1175 | (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible | 1176 | ;; the order for old desktop files (old desktop module behaviour). |
| 1176 | (auto-fill-mode 1)) | 1177 | (unless (< desktop-file-version 206) |
| 1177 | ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible | 1178 | (mapc 'bury-buffer buffer-list) |
| 1178 | (auto-fill-mode 0)) | 1179 | (when result (bury-buffer result))) |
| 1179 | (t | 1180 | (when result |
| 1180 | (dolist (minor-mode desktop-buffer-minor-modes) | 1181 | (unless (or desktop-first-buffer (< desktop-file-version 206)) |
| 1181 | ;; Give minor mode module a chance to add a handler. | 1182 | (setq desktop-first-buffer result)) |
| 1182 | (desktop-load-file minor-mode) | 1183 | (set-buffer result) |
| 1183 | (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) | 1184 | (unless (equal (buffer-name) desktop-buffer-name) |
| 1184 | (if handler | 1185 | (rename-buffer desktop-buffer-name t)) |
| 1185 | (funcall handler desktop-buffer-locals) | 1186 | ;; minor modes |
| 1186 | (when (functionp minor-mode) | 1187 | (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible |
| 1187 | (funcall minor-mode 1))))))) | 1188 | (auto-fill-mode 1)) |
| 1188 | ;; Even though point and mark are non-nil when written by | 1189 | ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible |
| 1189 | ;; `desktop-save', they may be modified by handlers wanting to set | 1190 | (auto-fill-mode 0)) |
| 1190 | ;; point or mark themselves. | 1191 | (t |
| 1191 | (when desktop-buffer-point | 1192 | (dolist (minor-mode desktop-buffer-minor-modes) |
| 1192 | (goto-char | 1193 | ;; Give minor mode module a chance to add a handler. |
| 1193 | (condition-case err | 1194 | (desktop-load-file minor-mode) |
| 1194 | ;; Evaluate point. Thus point can be something like | 1195 | (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) |
| 1195 | ;; '(search-forward ... | 1196 | (if handler |
| 1196 | (eval desktop-buffer-point) | 1197 | (funcall handler desktop-buffer-locals) |
| 1197 | (error (message "%s" (error-message-string err)) 1)))) | 1198 | (when (functionp minor-mode) |
| 1198 | (when desktop-buffer-mark | 1199 | (funcall minor-mode 1))))))) |
| 1199 | (if (consp desktop-buffer-mark) | 1200 | ;; Even though point and mark are non-nil when written by |
| 1200 | (progn | 1201 | ;; `desktop-save', they may be modified by handlers wanting to set |
| 1201 | (set-mark (car desktop-buffer-mark)) | 1202 | ;; point or mark themselves. |
| 1202 | (setq mark-active (car (cdr desktop-buffer-mark)))) | 1203 | (when desktop-buffer-point |
| 1203 | (set-mark desktop-buffer-mark))) | 1204 | (goto-char |
| 1204 | ;; Never override file system if the file really is read-only marked. | 1205 | (condition-case err |
| 1205 | (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only)) | 1206 | ;; Evaluate point. Thus point can be something like |
| 1206 | (while desktop-buffer-locals | 1207 | ;; '(search-forward ... |
| 1207 | (let ((this (car desktop-buffer-locals))) | 1208 | (eval desktop-buffer-point) |
| 1208 | (if (consp this) | 1209 | (error (message "%s" (error-message-string err)) 1)))) |
| 1209 | ;; an entry of this form `(symbol . value)' | 1210 | (when desktop-buffer-mark |
| 1211 | (if (consp desktop-buffer-mark) | ||
| 1210 | (progn | 1212 | (progn |
| 1211 | (make-local-variable (car this)) | 1213 | (set-mark (car desktop-buffer-mark)) |
| 1212 | (set (car this) (cdr this))) | 1214 | (setq mark-active (car (cdr desktop-buffer-mark)))) |
| 1213 | ;; an entry of the form `symbol' | 1215 | (set-mark desktop-buffer-mark))) |
| 1214 | (make-local-variable this) | 1216 | ;; Never override file system if the file really is read-only marked. |
| 1215 | (makunbound this))) | 1217 | (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only)) |
| 1216 | (setq desktop-buffer-locals (cdr desktop-buffer-locals))))))) | 1218 | (while desktop-buffer-locals |
| 1219 | (let ((this (car desktop-buffer-locals))) | ||
| 1220 | (if (consp this) | ||
| 1221 | ;; an entry of this form `(symbol . value)' | ||
| 1222 | (progn | ||
| 1223 | (make-local-variable (car this)) | ||
| 1224 | (set (car this) (cdr this))) | ||
| 1225 | ;; an entry of the form `symbol' | ||
| 1226 | (make-local-variable this) | ||
| 1227 | (makunbound this))) | ||
| 1228 | (setq desktop-buffer-locals (cdr desktop-buffer-locals)))))))) | ||
| 1217 | 1229 | ||
| 1218 | ;; ---------------------------------------------------------------------------- | 1230 | ;; ---------------------------------------------------------------------------- |
| 1219 | ;; Backward compatibility -- update parameters to 205 standards. | 1231 | ;; Backward compatibility -- update parameters to 205 standards. |
| 1220 | (defun desktop-buffer (desktop-buffer-file-name desktop-buffer-name | 1232 | (defun desktop-buffer (buffer-filename buffer-name buffer-majormode |
| 1221 | desktop-buffer-major-mode | 1233 | mim pt mk ro tl fc cfs cr buffer-misc) |
| 1222 | mim pt mk ro tl fc cfs cr desktop-buffer-misc) | 1234 | (desktop-create-buffer 205 buffer-filename buffer-name |
| 1223 | (desktop-create-buffer 205 desktop-buffer-file-name desktop-buffer-name | 1235 | buffer-majormode (cdr mim) pt mk ro |
| 1224 | desktop-buffer-major-mode (cdr mim) pt mk ro | 1236 | buffer-misc |
| 1225 | desktop-buffer-misc | ||
| 1226 | (list (cons 'truncate-lines tl) | 1237 | (list (cons 'truncate-lines tl) |
| 1227 | (cons 'fill-column fc) | 1238 | (cons 'fill-column fc) |
| 1228 | (cons 'case-fold-search cfs) | 1239 | (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.") | |||
| 243 | "Return non-nil if FRAME is currently available." | 243 | "Return non-nil if FRAME is currently available." |
| 244 | (and frame (frame-live-p frame) (frame-visible-p frame))) | 244 | (and frame (frame-live-p frame) (frame-visible-p frame))) |
| 245 | 245 | ||
| 246 | (defvar x-sensitive-text-pointer-shape) | ||
| 247 | (defvar x-pointer-shape) | ||
| 248 | |||
| 246 | (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name | 249 | (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name |
| 247 | local-mode-fn | 250 | local-mode-fn |
| 248 | &optional | 251 | &optional |
| @@ -503,7 +506,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." | |||
| 503 | (list (cons 'left newleft) | 506 | (list (cons 'left newleft) |
| 504 | (cons 'top newtop)))))) | 507 | (cons 'top newtop)))))) |
| 505 | 508 | ||
| 506 | (defun dframe-reposition-frame-xemacs (new-frame parent-frame location) | 509 | (defun dframe-reposition-frame-xemacs (_new-frame _parent-frame _location) |
| 507 | "Move NEW-FRAME to be relative to PARENT-FRAME. | 510 | "Move NEW-FRAME to be relative to PARENT-FRAME. |
| 508 | LOCATION can be one of 'random, 'left-right, or 'top-bottom." | 511 | LOCATION can be one of 'random, 'left-right, or 'top-bottom." |
| 509 | ;; Not yet implemented | 512 | ;; Not yet implemented |
| @@ -713,13 +716,12 @@ Argument PROMPT is the prompt to use." | |||
| 713 | (defvar dframe-client-functions nil | 716 | (defvar dframe-client-functions nil |
| 714 | "List of client functions using the dframe timer.") | 717 | "List of client functions using the dframe timer.") |
| 715 | 718 | ||
| 716 | (defun dframe-set-timer (timeout fn &optional null-on-error) | 719 | (defun dframe-set-timer (timeout fn &optional _null-on-error) |
| 717 | "Apply a timer with TIMEOUT, to call FN, or remove a timer if TIMEOUT is nil. | 720 | "Apply a timer with TIMEOUT, to call FN, or remove a timer if TIMEOUT is nil. |
| 718 | TIMEOUT is the number of seconds until the dframe controled program | 721 | TIMEOUT is the number of seconds until the dframe controled program |
| 719 | timer is called again. When TIMEOUT is nil, turn off all timeouts. | 722 | timer is called again. When TIMEOUT is nil, turn off all timeouts. |
| 720 | This function must be called from the buffer belonging to the program | 723 | This function must be called from the buffer belonging to the program |
| 721 | who requested the timer. | 724 | who requested the timer. NULL-ON-ERROR is ignored." |
| 722 | If NULL-ON-ERROR is a symbol, set it to nil if we cannot create a timer." | ||
| 723 | ;; First, fix up our list of client functions | 725 | ;; First, fix up our list of client functions |
| 724 | (if timeout | 726 | (if timeout |
| 725 | (add-to-list 'dframe-client-functions fn) | 727 | (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." | |||
| 732 | ;; functions are left, shut er down. | 734 | ;; functions are left, shut er down. |
| 733 | (and dframe-timer (not timeout) dframe-client-functions)) | 735 | (and dframe-timer (not timeout) dframe-client-functions)) |
| 734 | ;; Only call the low level function if we are changing the state. | 736 | ;; Only call the low level function if we are changing the state. |
| 735 | (dframe-set-timer-internal timeout null-on-error))) | 737 | (dframe-set-timer-internal timeout))) |
| 736 | 738 | ||
| 737 | (defun dframe-set-timer-internal (timeout &optional null-on-error) | 739 | (defun dframe-set-timer-internal (timeout &optional _null-on-error) |
| 738 | "Apply a timer with TIMEOUT to call the dframe timer manager." | 740 | "Apply a timer with TIMEOUT to call the dframe timer manager." |
| 739 | (when dframe-timer | 741 | (when dframe-timer |
| 740 | (if (featurep 'xemacs) | 742 | (if (featurep 'xemacs) |
| @@ -838,7 +840,7 @@ Must be bound to event E." | |||
| 838 | (if dframe-track-mouse-function | 840 | (if dframe-track-mouse-function |
| 839 | (funcall dframe-track-mouse-function event))) | 841 | (funcall dframe-track-mouse-function event))) |
| 840 | 842 | ||
| 841 | (defun dframe-help-echo (window &optional buffer position) | 843 | (defun dframe-help-echo (_window &optional buffer position) |
| 842 | "Display help based context. | 844 | "Display help based context. |
| 843 | The context is in WINDOW, viewing BUFFER, at POSITION. | 845 | The context is in WINDOW, viewing BUFFER, at POSITION. |
| 844 | BUFFER and POSITION are optional because XEmacs doesn't use them." | 846 | BUFFER and POSITION are optional because XEmacs doesn't use them." |
| @@ -933,7 +935,7 @@ redirected into a window on the attached frame." | |||
| 933 | (mapcar (function (lambda (hook) (funcall hook buffer))) | 935 | (mapcar (function (lambda (hook) (funcall hook buffer))) |
| 934 | temp-buffer-show-hook)))) | 936 | temp-buffer-show-hook)))) |
| 935 | 937 | ||
| 936 | (defun dframe-hack-buffer-menu (e) | 938 | (defun dframe-hack-buffer-menu (_e) |
| 937 | "Control mouse 1 is buffer menu. | 939 | "Control mouse 1 is buffer menu. |
| 938 | This hack overrides it so that the right thing happens in the main | 940 | This hack overrides it so that the right thing happens in the main |
| 939 | Emacs frame, not in the dedicated frame. | 941 | 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." | |||
| 459 | (funcall fun file)))) | 459 | (funcall fun file)))) |
| 460 | (forward-line 1))))) | 460 | (forward-line 1))))) |
| 461 | 461 | ||
| 462 | (defvar backup-extract-version-start) ; used in backup-extract-version | ||
| 463 | |||
| 462 | (defun dired-collect-file-versions (fn) | 464 | (defun dired-collect-file-versions (fn) |
| 463 | (let ((fn (file-name-sans-versions fn))) | 465 | (let ((fn (file-name-sans-versions fn))) |
| 464 | ;; Only do work if this file is not already in the alist. | 466 | ;; 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." | |||
| 628 | (defvar dired-mark-separator " " | 630 | (defvar dired-mark-separator " " |
| 629 | "Separates marked files in dired shell commands.") | 631 | "Separates marked files in dired shell commands.") |
| 630 | 632 | ||
| 631 | (defun dired-shell-stuff-it (command file-list on-each &optional raw-arg) | 633 | (defun dired-shell-stuff-it (command file-list on-each &optional _raw-arg) |
| 632 | ;; "Make up a shell command line from COMMAND and FILE-LIST. | 634 | ;; "Make up a shell command line from COMMAND and FILE-LIST. |
| 633 | ;; If ON-EACH is t, COMMAND should be applied to each file, else | 635 | ;; If ON-EACH is t, COMMAND should be applied to each file, else |
| 634 | ;; simply concat all files and apply COMMAND to this. | 636 | ;; simply concat all files and apply COMMAND to this. |
| @@ -1078,7 +1080,6 @@ files matching `dired-omit-regexp'." | |||
| 1078 | ;; Entry is always for files, even if they happen to also be directories | 1080 | ;; Entry is always for files, even if they happen to also be directories |
| 1079 | (let* ((opoint (point)) | 1081 | (let* ((opoint (point)) |
| 1080 | (cur-dir (dired-current-directory)) | 1082 | (cur-dir (dired-current-directory)) |
| 1081 | (orig-file-name filename) | ||
| 1082 | (directory (if relative cur-dir (file-name-directory filename))) | 1083 | (directory (if relative cur-dir (file-name-directory filename))) |
| 1083 | reason) | 1084 | reason) |
| 1084 | (setq filename | 1085 | (setq filename |
| @@ -1251,21 +1252,20 @@ Special value `always' suppresses confirmation." | |||
| 1251 | 1252 | ||
| 1252 | (defun dired-copy-file-recursive (from to ok-flag &optional | 1253 | (defun dired-copy-file-recursive (from to ok-flag &optional |
| 1253 | preserve-time top recursive) | 1254 | preserve-time top recursive) |
| 1254 | (let ((attrs (file-attributes from)) | 1255 | (let ((attrs (file-attributes from))) |
| 1255 | dirfailed) | ||
| 1256 | (if (and recursive | 1256 | (if (and recursive |
| 1257 | (eq t (car attrs)) | 1257 | (eq t (car attrs)) |
| 1258 | (or (eq recursive 'always) | 1258 | (or (eq recursive 'always) |
| 1259 | (yes-or-no-p (format "Recursive copies of %s? " from)))) | 1259 | (yes-or-no-p (format "Recursive copies of %s? " from)))) |
| 1260 | ;; This is a directory. | 1260 | ;; This is a directory. |
| 1261 | (copy-directory from to dired-copy-preserve-time) | 1261 | (copy-directory from to preserve-time) |
| 1262 | ;; Not a directory. | 1262 | ;; Not a directory. |
| 1263 | (or top (dired-handle-overwrite to)) | 1263 | (or top (dired-handle-overwrite to)) |
| 1264 | (condition-case err | 1264 | (condition-case err |
| 1265 | (if (stringp (car attrs)) | 1265 | (if (stringp (car attrs)) |
| 1266 | ;; It is a symlink | 1266 | ;; It is a symlink |
| 1267 | (make-symbolic-link (car attrs) to ok-flag) | 1267 | (make-symbolic-link (car attrs) to ok-flag) |
| 1268 | (copy-file from to ok-flag dired-copy-preserve-time)) | 1268 | (copy-file from to ok-flag preserve-time)) |
| 1269 | (file-date-error | 1269 | (file-date-error |
| 1270 | (push (dired-make-relative from) | 1270 | (push (dired-make-relative from) |
| 1271 | dired-create-files-failures) | 1271 | dired-create-files-failures) |
| @@ -1360,6 +1360,10 @@ Special value `always' suppresses confirmation." | |||
| 1360 | (setcar elt cur-dir) | 1360 | (setcar elt cur-dir) |
| 1361 | (when cons (setcar cons cur-dir)))))) | 1361 | (when cons (setcar cons cur-dir)))))) |
| 1362 | 1362 | ||
| 1363 | ;; Bound in dired-create-files | ||
| 1364 | (defvar overwrite-query) | ||
| 1365 | (defvar overwrite-backup-query) | ||
| 1366 | |||
| 1363 | ;; The basic function for half a dozen variations on cp/mv/ln/ln -s. | 1367 | ;; The basic function for half a dozen variations on cp/mv/ln/ln -s. |
| 1364 | (defun dired-create-files (file-creator operation fn-list name-constructor | 1368 | (defun dired-create-files (file-creator operation fn-list name-constructor |
| 1365 | &optional marker-char) | 1369 | &optional marker-char) |
| @@ -1546,7 +1550,7 @@ Optional arg HOW-TO determiness how to treat the target. | |||
| 1546 | (function | 1550 | (function |
| 1547 | (lambda (from) | 1551 | (lambda (from) |
| 1548 | (expand-file-name (file-name-nondirectory from) target))) | 1552 | (expand-file-name (file-name-nondirectory from) target))) |
| 1549 | (function (lambda (from) target))) | 1553 | (function (lambda (_from) target))) |
| 1550 | marker-char)))) | 1554 | marker-char)))) |
| 1551 | 1555 | ||
| 1552 | ;; Read arguments for a marked-files command that wants a file name, | 1556 | ;; Read arguments for a marked-files command that wants a file name, |
| @@ -1740,6 +1744,8 @@ of `dired-dwim-target', which see." | |||
| 1740 | 1744 | ||
| 1741 | ;;; 5K | 1745 | ;;; 5K |
| 1742 | ;;;###begin dired-re.el | 1746 | ;;;###begin dired-re.el |
| 1747 | (defvar rename-regexp-query) | ||
| 1748 | |||
| 1743 | (defun dired-do-create-files-regexp | 1749 | (defun dired-do-create-files-regexp |
| 1744 | (file-creator operation arg regexp newname &optional whole-name marker-char) | 1750 | (file-creator operation arg regexp newname &optional whole-name marker-char) |
| 1745 | ;; Create a new file for each marked file using regexps. | 1751 | ;; Create a new file for each marked file using regexps. |
| @@ -1751,7 +1757,6 @@ of `dired-dwim-target', which see." | |||
| 1751 | ;; instead of only the non-directory part of the file. | 1757 | ;; instead of only the non-directory part of the file. |
| 1752 | ;; Optional arg MARKER-CHAR as in dired-create-files. | 1758 | ;; Optional arg MARKER-CHAR as in dired-create-files. |
| 1753 | (let* ((fn-list (dired-get-marked-files nil arg)) | 1759 | (let* ((fn-list (dired-get-marked-files nil arg)) |
| 1754 | (fn-count (length fn-list)) | ||
| 1755 | (operation-prompt (concat operation " `%s' to `%s'?")) | 1760 | (operation-prompt (concat operation " `%s' to `%s'?")) |
| 1756 | (rename-regexp-help-form (format "\ | 1761 | (rename-regexp-help-form (format "\ |
| 1757 | Type SPC or `y' to %s one match, DEL or `n' to skip to next, | 1762 | 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." | |||
| 1860 | (function make-symbolic-link) | 1865 | (function make-symbolic-link) |
| 1861 | "SymLink" arg regexp newname whole-name dired-keep-marker-symlink)) | 1866 | "SymLink" arg regexp newname whole-name dired-keep-marker-symlink)) |
| 1862 | 1867 | ||
| 1868 | (defvar rename-non-directory-query) | ||
| 1869 | |||
| 1863 | (defun dired-create-files-non-directory | 1870 | (defun dired-create-files-non-directory |
| 1864 | (file-creator basename-constructor operation arg) | 1871 | (file-creator basename-constructor operation arg) |
| 1865 | ;; Perform FILE-CREATOR on the non-directory part of marked files | 1872 | ;; 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." | |||
| 2056 | (while alist | 2063 | (while alist |
| 2057 | (setq elt (car alist) | 2064 | (setq elt (car alist) |
| 2058 | alist (cdr alist) | 2065 | alist (cdr alist) |
| 2059 | dir (car elt) | 2066 | dir (car elt)) |
| 2060 | pos (dired-get-subdir-min elt)) | ||
| 2061 | (if (dired-tree-lessp dir new-dir) | 2067 | (if (dired-tree-lessp dir new-dir) |
| 2062 | ;; Insert NEW-DIR after DIR | 2068 | ;; Insert NEW-DIR after DIR |
| 2063 | (setq new-pos (dired-get-subdir-max elt) | 2069 | (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." | |||
| 126 | (other :tag "non-writable only" if-file-read-only)) | 126 | (other :tag "non-writable only" if-file-read-only)) |
| 127 | :group 'dired-x) | 127 | :group 'dired-x) |
| 128 | 128 | ||
| 129 | (defcustom dired-omit-size-limit 30000 | ||
| 130 | "Maximum size for the \"omitting\" feature. | ||
| 131 | If nil, there is no maximum size." | ||
| 132 | :type '(choice (const :tag "no maximum" nil) integer) | ||
| 133 | :group 'dired-x) | ||
| 134 | |||
| 129 | (define-minor-mode dired-omit-mode | 135 | (define-minor-mode dired-omit-mode |
| 130 | "Toggle Dired-Omit mode. | 136 | "Toggle Dired-Omit mode. |
| 131 | With numeric ARG, enable Dired-Omit mode if ARG is positive, disable | 137 | With numeric ARG, enable Dired-Omit mode if ARG is positive, disable |
| @@ -179,12 +185,6 @@ toggle between those two." | |||
| 179 | :type 'boolean | 185 | :type 'boolean |
| 180 | :group 'dired-x) | 186 | :group 'dired-x) |
| 181 | 187 | ||
| 182 | (defcustom dired-omit-size-limit 30000 | ||
| 183 | "Maximum size for the \"omitting\" feature. | ||
| 184 | If nil, there is no maximum size." | ||
| 185 | :type '(choice (const :tag "no maximum" nil) integer) | ||
| 186 | :group 'dired-x) | ||
| 187 | |||
| 188 | (defcustom dired-enable-local-variables t | 188 | (defcustom dired-enable-local-variables t |
| 189 | "Control use of local-variables lists in Dired. | 189 | "Control use of local-variables lists in Dired. |
| 190 | This temporarily overrides the value of `enable-local-variables' when | 190 | This temporarily overrides the value of `enable-local-variables' when |
| @@ -659,7 +659,7 @@ nil." | |||
| 659 | nil)))) | 659 | nil)))) |
| 660 | 660 | ||
| 661 | 661 | ||
| 662 | (defun dired-virtual-revert (&optional arg noconfirm) | 662 | (defun dired-virtual-revert (&optional _arg _noconfirm) |
| 663 | (if (not | 663 | (if (not |
| 664 | (y-or-n-p "Cannot revert a Virtual Dired buffer - switch to Real Dired mode? ")) | 664 | (y-or-n-p "Cannot revert a Virtual Dired buffer - switch to Real Dired mode? ")) |
| 665 | (error "Cannot revert a Virtual Dired buffer") | 665 | (error "Cannot revert a Virtual Dired buffer") |
| @@ -1180,7 +1180,7 @@ results in | |||
| 1180 | (setq count (1+ count) | 1180 | (setq count (1+ count) |
| 1181 | start (1+ start))) | 1181 | start (1+ start))) |
| 1182 | ;; ... and prepend a "../" for each slash found: | 1182 | ;; ... and prepend a "../" for each slash found: |
| 1183 | (dotimes (n count) | 1183 | (dotimes (_n count) |
| 1184 | (setq name1 (concat "../" name1))))) | 1184 | (setq name1 (concat "../" name1))))) |
| 1185 | (make-symbolic-link | 1185 | (make-symbolic-link |
| 1186 | (directory-file-name name1) ; must not link to foo/ | 1186 | (directory-file-name name1) ; must not link to foo/ |
| @@ -1293,6 +1293,8 @@ NOSELECT the files are merely found but not selected." | |||
| 1293 | 1293 | ||
| 1294 | (declare-function Man-getpage-in-background "man" (topic)) | 1294 | (declare-function Man-getpage-in-background "man" (topic)) |
| 1295 | 1295 | ||
| 1296 | (defvar manual-program) ; from man.el | ||
| 1297 | |||
| 1296 | (defun dired-man () | 1298 | (defun dired-man () |
| 1297 | "Run `man' on this file." | 1299 | "Run `man' on this file." |
| 1298 | ;; Used also to say: "Display old buffer if buffer name matches filename." | 1300 | ;; 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." | |||
| 1382 | 1384 | ||
| 1383 | ;; Does anyone use this? - lrd 6/29/93. | 1385 | ;; Does anyone use this? - lrd 6/29/93. |
| 1384 | ;; Apparently people do use it. - lrd 12/22/97. | 1386 | ;; Apparently people do use it. - lrd 12/22/97. |
| 1387 | |||
| 1388 | (with-no-warnings | ||
| 1389 | ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix". | ||
| 1390 | ;; This is unbearably ugly, but not more than having global variables | ||
| 1391 | ;; named size, time, name or s, however practical it can be while writing | ||
| 1392 | ;; `dired-mark-sexp' predicates. | ||
| 1393 | (defvar inode) | ||
| 1394 | (defvar s) | ||
| 1395 | (defvar mode) | ||
| 1396 | (defvar nlink) | ||
| 1397 | (defvar uid) | ||
| 1398 | (defvar gid) | ||
| 1399 | (defvar size) | ||
| 1400 | (defvar time) | ||
| 1401 | (defvar name) | ||
| 1402 | (defvar sym)) | ||
| 1403 | |||
| 1385 | (defun dired-mark-sexp (predicate &optional unflag-p) | 1404 | (defun dired-mark-sexp (predicate &optional unflag-p) |
| 1386 | "Mark files for which PREDICATE returns non-nil. | 1405 | "Mark files for which PREDICATE returns non-nil. |
| 1387 | With a prefix arg, unflag those files instead. | 1406 | With a prefix arg, unflag those files instead. |
| @@ -1487,8 +1506,8 @@ If you change this variable without using \\[customize] after `dired-x.el' | |||
| 1487 | is loaded then call \\[dired-x-bind-find-file]." | 1506 | is loaded then call \\[dired-x-bind-find-file]." |
| 1488 | :type 'boolean | 1507 | :type 'boolean |
| 1489 | :initialize 'custom-initialize-default | 1508 | :initialize 'custom-initialize-default |
| 1490 | :set (lambda (sym val) | 1509 | :set (lambda (symbol value) |
| 1491 | (set sym val) | 1510 | (set symbol value) |
| 1492 | (dired-x-bind-find-file)) | 1511 | (dired-x-bind-find-file)) |
| 1493 | :group 'dired-x) | 1512 | :group 'dired-x) |
| 1494 | 1513 | ||
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." | |||
| 230 | (let (prompt-path | 230 | (let (prompt-path |
| 231 | (current-dir default-directory) | 231 | (current-dir default-directory) |
| 232 | (dirtrack-regexp (nth 0 dirtrack-list)) | 232 | (dirtrack-regexp (nth 0 dirtrack-list)) |
| 233 | (match-num (nth 1 dirtrack-list)) | 233 | (match-num (nth 1 dirtrack-list))) |
| 234 | ;; Currently unimplemented, it seems. --Stef | 234 | ;; Currently unimplemented, it seems. --Stef |
| 235 | (multi-line (nth 2 dirtrack-list))) | 235 | ;; (multi-line (nth 2 dirtrack-list))) |
| 236 | (save-excursion | 236 | (save-excursion |
| 237 | ;; No match | 237 | ;; No match |
| 238 | (if (not (string-match dirtrack-regexp input)) | 238 | (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." | |||
| 160 | (setq f nil)) | 160 | (setq f nil)) |
| 161 | f)) | 161 | f)) |
| 162 | 162 | ||
| 163 | (defun dnd-open-local-file (uri action) | 163 | (defun dnd-open-local-file (uri _action) |
| 164 | "Open a local file. | 164 | "Open a local file. |
| 165 | The file is opened in the current window, or a new window if | 165 | The file is opened in the current window, or a new window if |
| 166 | `dnd-open-file-other-window' is set. URI is the url for the file, | 166 | `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 | |||
| 180 | 'private) | 180 | 'private) |
| 181 | (error "Can not read %s" uri)))) | 181 | (error "Can not read %s" uri)))) |
| 182 | 182 | ||
| 183 | (defun dnd-open-remote-url (uri action) | 183 | (defun dnd-open-remote-url (uri _action) |
| 184 | "Open a remote file with `find-file' and `url-handler-mode'. | 184 | "Open a remote file with `find-file' and `url-handler-mode'. |
| 185 | Turns `url-handler-mode' on if not on before. The file is opened in the | 185 | Turns `url-handler-mode' on if not on before. The file is opened in the |
| 186 | current window, or a new window if `dnd-open-file-other-window' is set. | 186 | 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." | |||
| 159 | (string (copy-sequence (file-name-nondirectory filename))) | 159 | (string (copy-sequence (file-name-nondirectory filename))) |
| 160 | (strlen (length string)) | 160 | (strlen (length string)) |
| 161 | (lastchar (aref string (1- strlen))) | 161 | (lastchar (aref string (1- strlen))) |
| 162 | i firstdot) | 162 | firstdot) |
| 163 | (setq firstdot (string-match "\\." string)) | 163 | (setq firstdot (string-match "\\." string)) |
| 164 | (cond | 164 | (cond |
| 165 | (firstdot | 165 | (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:\"." | |||
| 290 | (defun direct-print-region-helper (printer | 290 | (defun direct-print-region-helper (printer |
| 291 | start end | 291 | start end |
| 292 | lpr-prog | 292 | lpr-prog |
| 293 | delete-text buf display | 293 | _delete-text _buf _display |
| 294 | rest) | 294 | rest) |
| 295 | (let* (;; Ignore case when matching known external program names. | 295 | (let* (;; Ignore case when matching known external program names. |
| 296 | (case-fold-search t) | 296 | (case-fold-search t) |
| @@ -381,9 +381,9 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." | |||
| 381 | (declare-function default-printer-name "w32fns.c") | 381 | (declare-function default-printer-name "w32fns.c") |
| 382 | 382 | ||
| 383 | (defun direct-print-region-function (start end | 383 | (defun direct-print-region-function (start end |
| 384 | &optional lpr-prog | 384 | &optional lpr-prog |
| 385 | delete-text buf display | 385 | delete-text buf display |
| 386 | &rest rest) | 386 | &rest rest) |
| 387 | "DOS/Windows-specific function to print the region on a printer. | 387 | "DOS/Windows-specific function to print the region on a printer. |
| 388 | Writes the region to the device or file which is a value of | 388 | Writes the region to the device or file which is a value of |
| 389 | `printer-name' \(which see\), unless the value of `lpr-command' | 389 | `printer-name' \(which see\), unless the value of `lpr-command' |
| @@ -399,7 +399,7 @@ indicates a specific program should be invoked." | |||
| 399 | ;; paper if the file ends with a form-feed already. | 399 | ;; paper if the file ends with a form-feed already. |
| 400 | (write-region-annotate-functions | 400 | (write-region-annotate-functions |
| 401 | (cons | 401 | (cons |
| 402 | (lambda (start end) | 402 | (lambda (_start end) |
| 403 | (if (not (char-equal (char-before end) ?\C-l)) | 403 | (if (not (char-equal (char-before end) ?\C-l)) |
| 404 | `((,end . "\f")))) | 404 | `((,end . "\f")))) |
| 405 | write-region-annotate-functions)) | 405 | 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 @@ | |||
| 27 | (require 'electric) ; command loop | 27 | (require 'electric) ; command loop |
| 28 | (require 'chistory) ; history lister | 28 | (require 'chistory) ; history lister |
| 29 | 29 | ||
| 30 | ;; Dynamically bound in electric-command-history | ||
| 31 | (defvar electric-history-in-progress) | ||
| 32 | |||
| 30 | ;;;###autoload | 33 | ;;;###autoload |
| 31 | (defun Electric-command-history-redo-expression (&optional noconfirm) | 34 | (defun Electric-command-history-redo-expression (&optional noconfirm) |
| 32 | "Edit current history line in minibuffer and execute result. | 35 | "Edit current history line in minibuffer and execute result. |
| @@ -85,6 +88,8 @@ With prefix arg NOCONFIRM, execute current line as-is without editing." | |||
| 85 | (defvar electric-command-history-hook nil | 88 | (defvar electric-command-history-hook nil |
| 86 | "If non-nil, its value is called by `electric-command-history'.") | 89 | "If non-nil, its value is called by `electric-command-history'.") |
| 87 | 90 | ||
| 91 | (defvar Helper-return-blurb) ; from helper.el | ||
| 92 | |||
| 88 | (defun electric-command-history () | 93 | (defun electric-command-history () |
| 89 | "\\<electric-history-map>Major mode for examining and redoing commands from `command-history'. | 94 | "\\<electric-history-map>Major mode for examining and redoing commands from `command-history'. |
| 90 | This pops up a window with the Command History listing. | 95 | 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." | |||
| 225 | "This command is valid only in buffers created by `edit-kbd-macro'")) | 225 | "This command is valid only in buffers created by `edit-kbd-macro'")) |
| 226 | (run-hooks 'edmacro-finish-hook) | 226 | (run-hooks 'edmacro-finish-hook) |
| 227 | (let ((cmd nil) (keys nil) (no-keys nil) | 227 | (let ((cmd nil) (keys nil) (no-keys nil) |
| 228 | (mac-counter nil) (mac-format nil) (kmacro nil) | 228 | (mac-counter nil) (mac-format nil) |
| 229 | (top (point-min))) | 229 | (top (point-min))) |
| 230 | (goto-char top) | 230 | (goto-char top) |
| 231 | (let ((case-fold-search nil)) | 231 | (let ((case-fold-search nil)) |
| @@ -240,7 +240,7 @@ or nil, use a compact 80-column format." | |||
| 240 | (setq cmd (and (not (equal str "none")) | 240 | (setq cmd (and (not (equal str "none")) |
| 241 | (intern str))) | 241 | (intern str))) |
| 242 | (and (fboundp cmd) (not (arrayp (symbol-function cmd))) | 242 | (and (fboundp cmd) (not (arrayp (symbol-function cmd))) |
| 243 | (not (setq kmacro (get cmd 'kmacro))) | 243 | (not (get cmd 'kmacro)) |
| 244 | (not (y-or-n-p | 244 | (not (y-or-n-p |
| 245 | (format "Command %s is already defined; %s" | 245 | (format "Command %s is already defined; %s" |
| 246 | cmd "proceed? "))) | 246 | 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 @@ | |||
| 63 | ;; conditions for any error that occurred or nil if none. | 63 | ;; conditions for any error that occurred or nil if none. |
| 64 | 64 | ||
| 65 | (defun Electric-command-loop (return-tag | 65 | (defun Electric-command-loop (return-tag |
| 66 | &optional prompt inhibit-quit | 66 | &optional prompt inhibit-quitting |
| 67 | loop-function loop-state) | 67 | loop-function loop-state) |
| 68 | 68 | ||
| 69 | (let (cmd | 69 | (let (cmd |
| 70 | (err nil) | 70 | (err nil) |
| 71 | (inhibit-quit inhibit-quitting) | ||
| 71 | (prompt-string prompt)) | 72 | (prompt-string prompt)) |
| 72 | (while t | 73 | (while t |
| 73 | (if (functionp prompt) | 74 | (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." | |||
| 76 | (set-process-sentinel | 76 | (set-process-sentinel |
| 77 | (get-buffer-process (buffer-name)) (function emacs-lock-clear-sentinel))) | 77 | (get-buffer-process (buffer-name)) (function emacs-lock-clear-sentinel))) |
| 78 | 78 | ||
| 79 | (defun emacs-lock-clear-sentinel (proc str) | 79 | (defun emacs-lock-clear-sentinel (_proc _str) |
| 80 | (if emacs-lock-from-exiting | 80 | (if emacs-lock-from-exiting |
| 81 | (progn | 81 | (progn |
| 82 | (setq emacs-lock-from-exiting nil) | 82 | (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'." | |||
| 469 | (beginning-of-defun) | 469 | (beginning-of-defun) |
| 470 | (point)) | 470 | (point)) |
| 471 | (point-min))) | 471 | (point-min))) |
| 472 | (here (point)) | ||
| 473 | (state (parse-partial-sexp lim (point)))) | 472 | (state (parse-partial-sexp lim (point)))) |
| 474 | (cond | 473 | (cond |
| 475 | ((nth 3 state) 'string) | 474 | ((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." | |||
| 71 | ;; XEmacs. | 71 | ;; XEmacs. |
| 72 | (if (not (fboundp 'make-glyph)) | 72 | (if (not (fboundp 'make-glyph)) |
| 73 | 73 | ||
| 74 | (defmacro defezimage (variable imagespec docstring) | 74 | (defmacro defezimage (variable _imagespec docstring) |
| 75 | "Don't bother loading up an image... | 75 | "Don't bother loading up an image... |
| 76 | Argument VARIABLE is the variable to define. | 76 | Argument VARIABLE is the variable to define. |
| 77 | Argument IMAGESPEC is the list defining the image to create. | 77 | 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'. | |||
| 825 | Return the event type (a symbol) of the added menu entry. | 825 | Return the event type (a symbol) of the added menu entry. |
| 826 | 826 | ||
| 827 | This is called whenever you use a new color." | 827 | This is called whenever you use a new color." |
| 828 | (let (symbol docstring) | 828 | (let (symbol) |
| 829 | (unless (color-defined-p color) | 829 | (unless (color-defined-p color) |
| 830 | (error "Color `%s' undefined" color)) | 830 | (error "Color `%s' undefined" color)) |
| 831 | (cond ((eq menu 'facemenu-foreground-menu) | 831 | (cond ((eq menu 'facemenu-foreground-menu) |
| 832 | (setq docstring | 832 | (setq symbol (intern (concat "fg:" color)))) |
| 833 | (format "Select foreground color %s for subsequent insertion." | ||
| 834 | color) | ||
| 835 | symbol (intern (concat "fg:" color)))) | ||
| 836 | ((eq menu 'facemenu-background-menu) | 833 | ((eq menu 'facemenu-background-menu) |
| 837 | (setq docstring | 834 | (setq symbol (intern (concat "bg:" color)))) |
| 838 | (format "Select background color %s for subsequent insertion." | ||
| 839 | color) | ||
| 840 | symbol (intern (concat "bg:" color)))) | ||
| 841 | (t (error "MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'"))) | 835 | (t (error "MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'"))) |
| 842 | (unless (facemenu-iterate ; Check if color is already in the menu. | 836 | (unless (facemenu-iterate ; Check if color is already in the menu. |
| 843 | (lambda (m) (and (listp m) | 837 | (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." | |||
| 207 | ;; of realized faces. The ID assigned to Lisp faces is used to | 207 | ;; of realized faces. The ID assigned to Lisp faces is used to |
| 208 | ;; support faces in display table entries. | 208 | ;; support faces in display table entries. |
| 209 | 209 | ||
| 210 | (defun face-id (face &optional frame) | 210 | (defun face-id (face &optional _frame) |
| 211 | "Return the internal ID of face with name FACE. | 211 | "Return the internal ID of face with name FACE. |
| 212 | If FACE is a face-alias, return the ID of the target face. | 212 | If FACE is a face-alias, return the ID of the target face. |
| 213 | The optional argument FRAME is ignored, since the internal face ID | 213 | 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." | |||
| 724 | where)) | 724 | where)) |
| 725 | (setq args (cddr args))))) | 725 | (setq args (cddr args))))) |
| 726 | 726 | ||
| 727 | (defun make-face-bold (face &optional frame noerror) | 727 | (defun make-face-bold (face &optional frame _noerror) |
| 728 | "Make the font of FACE be bold, if possible. | 728 | "Make the font of FACE be bold, if possible. |
| 729 | FRAME nil or not specified means change face on all frames. | 729 | FRAME nil or not specified means change face on all frames. |
| 730 | Argument NOERROR is ignored and retained for compatibility. | 730 | Argument NOERROR is ignored and retained for compatibility. |
| @@ -733,7 +733,7 @@ Use `set-face-attribute' for finer control of the font weight." | |||
| 733 | (set-face-attribute face frame :weight 'bold)) | 733 | (set-face-attribute face frame :weight 'bold)) |
| 734 | 734 | ||
| 735 | 735 | ||
| 736 | (defun make-face-unbold (face &optional frame noerror) | 736 | (defun make-face-unbold (face &optional frame _noerror) |
| 737 | "Make the font of FACE be non-bold, if possible. | 737 | "Make the font of FACE be non-bold, if possible. |
| 738 | FRAME nil or not specified means change face on all frames. | 738 | FRAME nil or not specified means change face on all frames. |
| 739 | Argument NOERROR is ignored and retained for compatibility." | 739 | Argument NOERROR is ignored and retained for compatibility." |
| @@ -741,7 +741,7 @@ Argument NOERROR is ignored and retained for compatibility." | |||
| 741 | (set-face-attribute face frame :weight 'normal)) | 741 | (set-face-attribute face frame :weight 'normal)) |
| 742 | 742 | ||
| 743 | 743 | ||
| 744 | (defun make-face-italic (face &optional frame noerror) | 744 | (defun make-face-italic (face &optional frame _noerror) |
| 745 | "Make the font of FACE be italic, if possible. | 745 | "Make the font of FACE be italic, if possible. |
| 746 | FRAME nil or not specified means change face on all frames. | 746 | FRAME nil or not specified means change face on all frames. |
| 747 | Argument NOERROR is ignored and retained for compatibility. | 747 | Argument NOERROR is ignored and retained for compatibility. |
| @@ -750,7 +750,7 @@ Use `set-face-attribute' for finer control of the font slant." | |||
| 750 | (set-face-attribute face frame :slant 'italic)) | 750 | (set-face-attribute face frame :slant 'italic)) |
| 751 | 751 | ||
| 752 | 752 | ||
| 753 | (defun make-face-unitalic (face &optional frame noerror) | 753 | (defun make-face-unitalic (face &optional frame _noerror) |
| 754 | "Make the font of FACE be non-italic, if possible. | 754 | "Make the font of FACE be non-italic, if possible. |
| 755 | FRAME nil or not specified means change face on all frames. | 755 | FRAME nil or not specified means change face on all frames. |
| 756 | Argument NOERROR is ignored and retained for compatibility." | 756 | Argument NOERROR is ignored and retained for compatibility." |
| @@ -758,7 +758,7 @@ Argument NOERROR is ignored and retained for compatibility." | |||
| 758 | (set-face-attribute face frame :slant 'normal)) | 758 | (set-face-attribute face frame :slant 'normal)) |
| 759 | 759 | ||
| 760 | 760 | ||
| 761 | (defun make-face-bold-italic (face &optional frame noerror) | 761 | (defun make-face-bold-italic (face &optional frame _noerror) |
| 762 | "Make the font of FACE be bold and italic, if possible. | 762 | "Make the font of FACE be bold and italic, if possible. |
| 763 | FRAME nil or not specified means change face on all frames. | 763 | FRAME nil or not specified means change face on all frames. |
| 764 | Argument NOERROR is ignored and retained for compatibility. | 764 | Argument NOERROR is ignored and retained for compatibility. |
| @@ -1413,11 +1413,12 @@ If FRAME is omitted or nil, use the selected frame." | |||
| 1413 | ;; Parameter FRAME Is kept for call compatibility to with previous | 1413 | ;; Parameter FRAME Is kept for call compatibility to with previous |
| 1414 | ;; face implementation. | 1414 | ;; face implementation. |
| 1415 | 1415 | ||
| 1416 | (defun face-attr-construct (face &optional frame) | 1416 | (defun face-attr-construct (face &optional _frame) |
| 1417 | "Return a `defface'-style attribute list for FACE on FRAME. | 1417 | "Return a `defface'-style attribute list for FACE. |
| 1418 | Value is a property list of pairs ATTRIBUTE VALUE for all specified | 1418 | Value is a property list of pairs ATTRIBUTE VALUE for all specified |
| 1419 | face attributes of FACE where ATTRIBUTE is the attribute name and | 1419 | face attributes of FACE where ATTRIBUTE is the attribute name and |
| 1420 | VALUE is the specified value of that attribute." | 1420 | VALUE is the specified value of that attribute. |
| 1421 | Argument FRAME is ignored and retained for compatibility." | ||
| 1421 | (let (result) | 1422 | (let (result) |
| 1422 | (dolist (entry face-attribute-name-alist result) | 1423 | (dolist (entry face-attribute-name-alist result) |
| 1423 | (let* ((attribute (car entry)) | 1424 | (let* ((attribute (car entry)) |
| @@ -1750,8 +1751,7 @@ resulting color name in the echo area." | |||
| 1750 | ((eq flag 'lambda) ; Test completion. | 1751 | ((eq flag 'lambda) ; Test completion. |
| 1751 | (or (memq string colors) | 1752 | (or (memq string colors) |
| 1752 | (color-defined-p string))))) | 1753 | (color-defined-p string))))) |
| 1753 | nil t)) | 1754 | nil t))) |
| 1754 | hex-string) | ||
| 1755 | 1755 | ||
| 1756 | ;; Process named colors. | 1756 | ;; Process named colors. |
| 1757 | (when (member color colors) | 1757 | (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." | |||
| 299 | (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") | 299 | (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") |
| 300 | (throw 'exit (message "Malformed -*- line"))) | 300 | (throw 'exit (message "Malformed -*- line"))) |
| 301 | (goto-char (match-end 0)) | 301 | (goto-char (match-end 0)) |
| 302 | (let ((key (intern (match-string 1))) | 302 | (let ((key (intern (match-string 1)))) |
| 303 | (val (save-restriction | 303 | (save-restriction |
| 304 | (narrow-to-region (point) end) | 304 | (narrow-to-region (point) end) |
| 305 | (let ((read-circle nil)) | 305 | (let ((read-circle nil)) |
| 306 | (read (current-buffer)))))) | 306 | (read (current-buffer)))) |
| 307 | (skip-chars-forward " \t;") | 307 | (skip-chars-forward " \t;") |
| 308 | (when (eq key variable) | 308 | (when (eq key variable) |
| 309 | (delete-region (match-beginning 0) (point)) | 309 | (delete-region (match-beginning 0) (point)) |
| @@ -344,6 +344,8 @@ then this function adds it." | |||
| 344 | (list (read-file-local-variable "Delete -*- file-local variable"))) | 344 | (list (read-file-local-variable "Delete -*- file-local variable"))) |
| 345 | (modify-file-local-variable-prop-line variable nil 'delete)) | 345 | (modify-file-local-variable-prop-line variable nil 'delete)) |
| 346 | 346 | ||
| 347 | (defvar auto-insert) ; from autoinsert.el | ||
| 348 | |||
| 347 | (defun modify-dir-local-variable (mode variable value op) | 349 | (defun modify-dir-local-variable (mode variable value op) |
| 348 | "Modify directory-local VARIABLE in .dir-locals.el depending on operation OP. | 350 | "Modify directory-local VARIABLE in .dir-locals.el depending on operation OP. |
| 349 | 351 | ||
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'." | |||
| 635 | "Value of the CDPATH environment variable, as a list. | 635 | "Value of the CDPATH environment variable, as a list. |
| 636 | Not actually set up until the first time you use it.") | 636 | Not actually set up until the first time you use it.") |
| 637 | 637 | ||
| 638 | (defun parse-colon-path (cd-path) | 638 | (defun parse-colon-path (search-path) |
| 639 | "Explode a search path into a list of directory names. | 639 | "Explode a search path into a list of directory names. |
| 640 | Directories are separated by occurrences of `path-separator' | 640 | Directories are separated by occurrences of `path-separator' |
| 641 | \(which is colon in GNU and GNU-like systems)." | 641 | \(which is colon in GNU and GNU-like systems)." |
| 642 | ;; We could use split-string here. | 642 | ;; We could use split-string here. |
| 643 | (and cd-path | 643 | (and search-path |
| 644 | (let (cd-list (cd-start 0) cd-colon) | 644 | (let (cd-list (cd-start 0) cd-colon) |
| 645 | (setq cd-path (concat cd-path path-separator)) | 645 | (setq search-path (concat search-path path-separator)) |
| 646 | (while (setq cd-colon (string-match path-separator cd-path cd-start)) | 646 | (while (setq cd-colon (string-match path-separator search-path cd-start)) |
| 647 | (setq cd-list | 647 | (setq cd-list |
| 648 | (nconc cd-list | 648 | (nconc cd-list |
| 649 | (list (if (= cd-start cd-colon) | 649 | (list (if (= cd-start cd-colon) |
| 650 | nil | 650 | nil |
| 651 | (substitute-in-file-name | 651 | (substitute-in-file-name |
| 652 | (file-name-as-directory | 652 | (file-name-as-directory |
| 653 | (substring cd-path cd-start cd-colon))))))) | 653 | (substring search-path cd-start cd-colon))))))) |
| 654 | (setq cd-start (+ cd-colon 1))) | 654 | (setq cd-start (+ cd-colon 1))) |
| 655 | cd-list))) | 655 | cd-list))) |
| 656 | 656 | ||
| @@ -866,11 +866,10 @@ and return the directory. Return nil if not found." | |||
| 866 | ;; `name' in /home or in /. | 866 | ;; `name' in /home or in /. |
| 867 | (setq file (abbreviate-file-name file)) | 867 | (setq file (abbreviate-file-name file)) |
| 868 | (let ((root nil) | 868 | (let ((root nil) |
| 869 | (prev-file file) | ||
| 870 | ;; `user' is not initialized outside the loop because | 869 | ;; `user' is not initialized outside the loop because |
| 871 | ;; `file' may not exist, so we may have to walk up part of the | 870 | ;; `file' may not exist, so we may have to walk up part of the |
| 872 | ;; hierarchy before we find the "initial UID". | 871 | ;; hierarchy before we find the "initial UID". Note: currently unused |
| 873 | (user nil) | 872 | ;; (user nil) |
| 874 | try) | 873 | try) |
| 875 | (while (not (or root | 874 | (while (not (or root |
| 876 | (null file) | 875 | (null file) |
| @@ -887,8 +886,7 @@ and return the directory. Return nil if not found." | |||
| 887 | (string-match locate-dominating-stop-dir-regexp file))) | 886 | (string-match locate-dominating-stop-dir-regexp file))) |
| 888 | (setq try (file-exists-p (expand-file-name name file))) | 887 | (setq try (file-exists-p (expand-file-name name file))) |
| 889 | (cond (try (setq root file)) | 888 | (cond (try (setq root file)) |
| 890 | ((equal file (setq prev-file file | 889 | ((equal file (setq file (file-name-directory |
| 891 | file (file-name-directory | ||
| 892 | (directory-file-name file)))) | 890 | (directory-file-name file)))) |
| 893 | (setq file nil)))) | 891 | (setq file nil)))) |
| 894 | root)) | 892 | root)) |
| @@ -958,10 +956,10 @@ reasonable to let-bind this variable to a value less then the | |||
| 958 | time period between two checks. | 956 | time period between two checks. |
| 959 | Example: | 957 | Example: |
| 960 | 958 | ||
| 961 | \(defun display-time-file-nonempty-p \(file) | 959 | (defun display-time-file-nonempty-p (file) |
| 962 | \(let \(\(remote-file-name-inhibit-cache \(- display-time-interval 5))) | 960 | (let ((remote-file-name-inhibit-cache (- display-time-interval 5))) |
| 963 | \(and \(file-exists-p file) | 961 | (and (file-exists-p file) |
| 964 | \(< 0 \(nth 7 \(file-attributes \(file-chase-links file)))))))" | 962 | (< 0 (nth 7 (file-attributes (file-chase-links file)))))))" |
| 965 | :group 'files | 963 | :group 'files |
| 966 | :version "24.1" | 964 | :version "24.1" |
| 967 | :type `(choice | 965 | :type `(choice |
| @@ -1368,7 +1366,7 @@ its documentation for additional customization information." | |||
| 1368 | (interactive "BDisplay buffer in other frame: ") | 1366 | (interactive "BDisplay buffer in other frame: ") |
| 1369 | (let ((pop-up-frames t) | 1367 | (let ((pop-up-frames t) |
| 1370 | same-window-buffer-names same-window-regexps | 1368 | same-window-buffer-names same-window-regexps |
| 1371 | (old-window (selected-window)) | 1369 | ;;(old-window (selected-window)) |
| 1372 | new-window) | 1370 | new-window) |
| 1373 | (setq new-window (display-buffer buffer t)) | 1371 | (setq new-window (display-buffer buffer t)) |
| 1374 | ;; This may have been here in order to prevent the new frame from hiding | 1372 | ;; 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." | |||
| 1575 | (other-window 1) | 1573 | (other-window 1) |
| 1576 | (find-alternate-file filename wildcards)))) | 1574 | (find-alternate-file filename wildcards)))) |
| 1577 | 1575 | ||
| 1576 | (defvar kill-buffer-hook) ; from buffer.c | ||
| 1577 | |||
| 1578 | (defun find-alternate-file (filename &optional wildcards) | 1578 | (defun find-alternate-file (filename &optional wildcards) |
| 1579 | "Find file FILENAME, select its buffer, kill previous buffer. | 1579 | "Find file FILENAME, select its buffer, kill previous buffer. |
| 1580 | If the current buffer now contains an empty file that you just visited | 1580 | 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." | |||
| 2073 | (inhibit-file-name-operation 'insert-file-contents)) | 2073 | (inhibit-file-name-operation 'insert-file-contents)) |
| 2074 | (unwind-protect | 2074 | (unwind-protect |
| 2075 | (progn | 2075 | (progn |
| 2076 | (fset 'find-buffer-file-type (lambda (filename) t)) | 2076 | (fset 'find-buffer-file-type (lambda (_filename) t)) |
| 2077 | (insert-file-contents filename visit beg end replace)) | 2077 | (insert-file-contents filename visit beg end replace)) |
| 2078 | (if find-buffer-file-type-function | 2078 | (if find-buffer-file-type-function |
| 2079 | (fset 'find-buffer-file-type find-buffer-file-type-function) | 2079 | (fset 'find-buffer-file-type find-buffer-file-type-function) |
| @@ -2182,7 +2182,7 @@ unless NOMODES is non-nil." | |||
| 2182 | (message "%s" msg) | 2182 | (message "%s" msg) |
| 2183 | (or not-serious (sit-for 1 t)))) | 2183 | (or not-serious (sit-for 1 t)))) |
| 2184 | (when (and auto-save-default (not noauto)) | 2184 | (when (and auto-save-default (not noauto)) |
| 2185 | (auto-save-mode t))) | 2185 | (auto-save-mode 1))) |
| 2186 | ;; Make people do a little extra work (C-x C-q) | 2186 | ;; Make people do a little extra work (C-x C-q) |
| 2187 | ;; before altering a backup file. | 2187 | ;; before altering a backup file. |
| 2188 | (when (backup-file-name-p buffer-file-name) | 2188 | (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." | |||
| 2691 | (min (point-max) | 2691 | (min (point-max) |
| 2692 | (+ (point-min) magic-mode-regexp-match-limit))) | 2692 | (+ (point-min) magic-mode-regexp-match-limit))) |
| 2693 | (assoc-default nil magic-mode-alist | 2693 | (assoc-default nil magic-mode-alist |
| 2694 | (lambda (re dummy) | 2694 | (lambda (re _dummy) |
| 2695 | (if (functionp re) | 2695 | (if (functionp re) |
| 2696 | (funcall re) | 2696 | (funcall re) |
| 2697 | (looking-at re))))))) | 2697 | (looking-at re))))))) |
| @@ -2744,7 +2744,7 @@ we don't actually set it to the same mode the buffer already has." | |||
| 2744 | (min (point-max) | 2744 | (min (point-max) |
| 2745 | (+ (point-min) magic-mode-regexp-match-limit))) | 2745 | (+ (point-min) magic-mode-regexp-match-limit))) |
| 2746 | (assoc-default nil magic-fallback-mode-alist | 2746 | (assoc-default nil magic-fallback-mode-alist |
| 2747 | (lambda (re dummy) | 2747 | (lambda (re _dummy) |
| 2748 | (if (functionp re) | 2748 | (if (functionp re) |
| 2749 | (funcall re) | 2749 | (funcall re) |
| 2750 | (looking-at re))))))) | 2750 | (looking-at re))))))) |
| @@ -3269,7 +3269,7 @@ It is safe if any of these conditions are met: | |||
| 3269 | ;; can't assure us that the value is safe. | 3269 | ;; can't assure us that the value is safe. |
| 3270 | (with-demoted-errors (funcall safep val)))))) | 3270 | (with-demoted-errors (funcall safep val)))))) |
| 3271 | 3271 | ||
| 3272 | (defun risky-local-variable-p (sym &optional ignored) | 3272 | (defun risky-local-variable-p (sym &optional _ignored) |
| 3273 | "Non-nil if SYM could be dangerous as a file-local variable. | 3273 | "Non-nil if SYM could be dangerous as a file-local variable. |
| 3274 | It is dangerous if either of these conditions are met: | 3274 | It is dangerous if either of these conditions are met: |
| 3275 | 3275 | ||
| @@ -5059,7 +5059,7 @@ sake of backward compatibility. IGNORE-AUTO is optional, defaulting | |||
| 5059 | to nil. | 5059 | to nil. |
| 5060 | 5060 | ||
| 5061 | Optional second argument NOCONFIRM means don't ask for confirmation | 5061 | Optional second argument NOCONFIRM means don't ask for confirmation |
| 5062 | at all. \(The variable `revert-without-query' offers another way to | 5062 | at all. (The variable `revert-without-query' offers another way to |
| 5063 | revert buffers without querying for confirmation.) | 5063 | revert buffers without querying for confirmation.) |
| 5064 | 5064 | ||
| 5065 | Optional third argument PRESERVE-MODES non-nil means don't alter | 5065 | 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." | |||
| 192 | directory-predicate buffer-name) | 192 | directory-predicate buffer-name) |
| 193 | "Run find (Lisp version) and go into Dired mode on a buffer of the output." | 193 | "Run find (Lisp version) and go into Dired mode on a buffer of the output." |
| 194 | (let ((dired-buffers dired-buffers) | 194 | (let ((dired-buffers dired-buffers) |
| 195 | buf | ||
| 196 | (regexp find-lisp-regexp)) | 195 | (regexp find-lisp-regexp)) |
| 197 | ;; Expand DIR ("" means default-directory), and make sure it has a | 196 | ;; Expand DIR ("" means default-directory), and make sure it has a |
| 198 | ;; trailing slash. | 197 | ;; trailing slash. |
| @@ -203,7 +202,7 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 203 | (or | 202 | (or |
| 204 | (and (buffer-name) | 203 | (and (buffer-name) |
| 205 | (string= buffer-name (buffer-name))) | 204 | (string= buffer-name (buffer-name))) |
| 206 | (switch-to-buffer (setq buf (get-buffer-create buffer-name)))) | 205 | (switch-to-buffer (get-buffer-create buffer-name))) |
| 207 | (widen) | 206 | (widen) |
| 208 | (kill-all-local-variables) | 207 | (kill-all-local-variables) |
| 209 | (setq buffer-read-only nil) | 208 | (setq buffer-read-only nil) |
| @@ -223,7 +222,7 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 223 | (make-local-variable 'revert-buffer-function) | 222 | (make-local-variable 'revert-buffer-function) |
| 224 | (setq revert-buffer-function | 223 | (setq revert-buffer-function |
| 225 | (function | 224 | (function |
| 226 | (lambda(ignore1 ignore2) | 225 | (lambda (_ignore1 _ignore2) |
| 227 | (find-lisp-insert-directory | 226 | (find-lisp-insert-directory |
| 228 | default-directory | 227 | default-directory |
| 229 | find-lisp-file-predicate | 228 | find-lisp-file-predicate |
| @@ -246,10 +245,10 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 246 | (goto-char (point-min)) | 245 | (goto-char (point-min)) |
| 247 | (dired-goto-next-file))) | 246 | (dired-goto-next-file))) |
| 248 | 247 | ||
| 249 | (defun find-lisp-insert-directory (dir | 248 | (defun find-lisp-insert-directory (dir |
| 250 | file-predicate | 249 | file-predicate |
| 251 | directory-predicate | 250 | directory-predicate |
| 252 | sort-function) | 251 | _sort-function) |
| 253 | "Insert the results of `find-lisp-find-files' in the current buffer." | 252 | "Insert the results of `find-lisp-find-files' in the current buffer." |
| 254 | (let ((buffer-read-only nil) | 253 | (let ((buffer-read-only nil) |
| 255 | (files (find-lisp-find-files-internal | 254 | (files (find-lisp-find-files-internal |
| @@ -269,7 +268,7 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 269 | ;; Run the find function | 268 | ;; Run the find function |
| 270 | (mapc | 269 | (mapc |
| 271 | (function | 270 | (function |
| 272 | (lambda(file) | 271 | (lambda (file) |
| 273 | (find-lisp-find-dired-insert-file | 272 | (find-lisp-find-dired-insert-file |
| 274 | (substring file len) | 273 | (substring file len) |
| 275 | (current-buffer)))) | 274 | (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." | |||
| 1260 | ;; especially if it is placed in the debug filter section. I must | 1260 | ;; especially if it is placed in the debug filter section. I must |
| 1261 | ;; investigate this further... | 1261 | ;; investigate this further... |
| 1262 | 1262 | ||
| 1263 | (defun follow-avoid-tail-recenter (&rest rest) | 1263 | (defun follow-avoid-tail-recenter (&rest _rest) |
| 1264 | "Make sure windows displaying the end of a buffer aren't recentered. | 1264 | "Make sure windows displaying the end of a buffer aren't recentered. |
| 1265 | 1265 | ||
| 1266 | This is done by reading and rewriting the start position of | 1266 | 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 @@ | |||
| 90 | ,(purecopy "diac") iso-iso2duden t nil) | 90 | ,(purecopy "diac") iso-iso2duden t nil) |
| 91 | (de646 ,(purecopy "German ASCII (ISO 646)") | 91 | (de646 ,(purecopy "German ASCII (ISO 646)") |
| 92 | nil | 92 | nil |
| 93 | ,(purecopy "recode -f iso646-ge:latin1") | 93 | ,(purecopy "recode -f iso646-ge:latin1") |
| 94 | ,(purecopy "recode -f latin1:iso646-ge") t nil) | 94 | ,(purecopy "recode -f latin1:iso646-ge") t nil) |
| 95 | (denet ,(purecopy "net German") | 95 | (denet ,(purecopy "net German") |
| 96 | nil | 96 | nil |
| @@ -167,10 +167,10 @@ BUFFER should be the buffer that the output originally came from." | |||
| 167 | (error "Format encoding failed"))) | 167 | (error "Format encoding failed"))) |
| 168 | (funcall method from to buffer))) | 168 | (funcall method from to buffer))) |
| 169 | 169 | ||
| 170 | (defun format-decode-run-method (method from to &optional buffer) | 170 | (defun format-decode-run-method (method from to &optional _buffer) |
| 171 | "Decode using METHOD the text from FROM to TO. | 171 | "Decode using METHOD the text from FROM to TO. |
| 172 | If METHOD is a string, it is a shell command (including options); otherwise, | 172 | If METHOD is a string, it is a shell command (including options); otherwise, |
| 173 | it should be a Lisp function. Decoding is done for the given BUFFER." | 173 | it should be a Lisp function. BUFFER is currently ignored." |
| 174 | (if (stringp method) | 174 | (if (stringp method) |
| 175 | (let ((error-buff (get-buffer-create "*Format Errors*")) | 175 | (let ((error-buff (get-buffer-create "*Format Errors*")) |
| 176 | (coding-system-for-write 'no-conversion) | 176 | (coding-system-for-write 'no-conversion) |
| @@ -356,13 +356,11 @@ one of the formats defined in `format-alist', or a list of such symbols." | |||
| 356 | (if (symbolp format) (setq format (list format))) | 356 | (if (symbolp format) (setq format (list format))) |
| 357 | (save-excursion | 357 | (save-excursion |
| 358 | (goto-char end) | 358 | (goto-char end) |
| 359 | (let ((cur-buf (current-buffer)) | 359 | (let ((end (point-marker))) |
| 360 | (end (point-marker))) | ||
| 361 | (while format | 360 | (while format |
| 362 | (let* ((info (assq (car format) format-alist)) | 361 | (let* ((info (assq (car format) format-alist)) |
| 363 | (to-fn (nth 4 info)) | 362 | (to-fn (nth 4 info)) |
| 364 | (modify (nth 5 info)) | 363 | (modify (nth 5 info))) |
| 365 | result) | ||
| 366 | (if to-fn | 364 | (if to-fn |
| 367 | (if modify | 365 | (if modify |
| 368 | (setq end (format-encode-run-method to-fn beg end | 366 | (setq end (format-encode-run-method to-fn beg end |
| @@ -539,22 +537,6 @@ Compare using `equal'." | |||
| 539 | (setq tail next))) | 537 | (setq tail next))) |
| 540 | (cons acopy bcopy))) | 538 | (cons acopy bcopy))) |
| 541 | 539 | ||
| 542 | (defun format-common-tail (a b) | ||
| 543 | "Given two lists that have a common tail, return it. | ||
| 544 | Compare with `equal', and return the part of A that is equal to the | ||
| 545 | equivalent part of B. If even the last items of the two are not equal, | ||
| 546 | return nil." | ||
| 547 | (let ((la (length a)) | ||
| 548 | (lb (length b))) | ||
| 549 | ;; Make sure they are the same length | ||
| 550 | (if (> la lb) | ||
| 551 | (setq a (nthcdr (- la lb) a)) | ||
| 552 | (setq b (nthcdr (- lb la) b)))) | ||
| 553 | (while (not (equal a b)) | ||
| 554 | (setq a (cdr a) | ||
| 555 | b (cdr b))) | ||
| 556 | a) | ||
| 557 | |||
| 558 | (defun format-proper-list-p (list) | 540 | (defun format-proper-list-p (list) |
| 559 | "Return t if LIST is a proper list. | 541 | "Return t if LIST is a proper list. |
| 560 | A proper list is a list ending with a nil cdr, not with an atom " | 542 | 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." | |||
| 641 | (save-restriction | 623 | (save-restriction |
| 642 | (narrow-to-region (point-min) to) | 624 | (narrow-to-region (point-min) to) |
| 643 | (goto-char from) | 625 | (goto-char from) |
| 644 | (let (next open-ans todo loc unknown-ans) | 626 | (let (next open-ans todo unknown-ans) |
| 645 | (while (setq next (funcall next-fn)) | 627 | (while (setq next (funcall next-fn)) |
| 646 | (let* ((loc (nth 0 next)) | 628 | (let* ((loc (nth 0 next)) |
| 647 | (end (nth 1 next)) | 629 | (end (nth 1 next)) |
| @@ -932,12 +914,11 @@ The same TRANSLATIONS structure can be used in reverse for reading files." | |||
| 932 | all-ans)) | 914 | all-ans)) |
| 933 | (setq neg-ans (cdr neg-ans))) | 915 | (setq neg-ans (cdr neg-ans))) |
| 934 | ;; Now deal with positive (opening) annotations | 916 | ;; Now deal with positive (opening) annotations |
| 935 | (let ((p pos-ans)) | 917 | (while pos-ans |
| 936 | (while pos-ans | 918 | (push (car pos-ans) open-ans) |
| 937 | (push (car pos-ans) open-ans) | 919 | (push (cons loc (funcall format-fn (car pos-ans) t)) |
| 938 | (push (cons loc (funcall format-fn (car pos-ans) t)) | 920 | all-ans) |
| 939 | all-ans) | 921 | (setq pos-ans (cdr pos-ans))))) |
| 940 | (setq pos-ans (cdr pos-ans)))))) | ||
| 941 | 922 | ||
| 942 | ;; Close any annotations still open | 923 | ;; Close any annotations still open |
| 943 | (while open-ans | 924 | (while open-ans |
| @@ -1016,8 +997,7 @@ They can be whatever the FORMAT-FN in `format-annotate-region' | |||
| 1016 | can handle. If that is `enriched-make-annotation', they can be | 997 | can handle. If that is `enriched-make-annotation', they can be |
| 1017 | either strings, or lists of the form (PARAMETER VALUE)." | 998 | either strings, or lists of the form (PARAMETER VALUE)." |
| 1018 | 999 | ||
| 1019 | (let ((prop-alist (cdr (assoc prop translations))) | 1000 | (let ((prop-alist (cdr (assoc prop translations)))) |
| 1020 | default) | ||
| 1021 | (if (not prop-alist) | 1001 | (if (not prop-alist) |
| 1022 | nil | 1002 | nil |
| 1023 | ;; If either old or new is a list, have to treat both that way. | 1003 | ;; 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)." | |||
| 1028 | (format-annotate-atomic-property-change prop-alist old new) | 1008 | (format-annotate-atomic-property-change prop-alist old new) |
| 1029 | (let* ((old (if (listp old) old (list old))) | 1009 | (let* ((old (if (listp old) old (list old))) |
| 1030 | (new (if (listp new) new (list new))) | 1010 | (new (if (listp new) new (list new))) |
| 1031 | (tail (format-common-tail old new)) | ||
| 1032 | close open) | 1011 | close open) |
| 1033 | (while old | 1012 | (while old |
| 1034 | (setq close | 1013 | (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: | |||
| 845 | (defvar forms--iif-properties nil | 845 | (defvar forms--iif-properties nil |
| 846 | "Original properties of the character being overridden.") | 846 | "Original properties of the character being overridden.") |
| 847 | 847 | ||
| 848 | (defun forms--iif-hook (begin end) | 848 | (defun forms--iif-hook (_begin _end) |
| 849 | "`insert-in-front-hooks' function for read-only segments." | 849 | "`insert-in-front-hooks' function for read-only segments." |
| 850 | 850 | ||
| 851 | ;; Note start location. By making it a marker that points one | 851 | ;; Note start location. By making it a marker that points one |
| @@ -1197,6 +1197,8 @@ Commands: Equivalent keys in read-only mode: | |||
| 1197 | (setq forms--field nil))) | 1197 | (setq forms--field nil))) |
| 1198 | )) | 1198 | )) |
| 1199 | 1199 | ||
| 1200 | (defvar read-file-filter) ; bound in forms--intuit-from-file | ||
| 1201 | |||
| 1200 | (defun forms--intuit-from-file () | 1202 | (defun forms--intuit-from-file () |
| 1201 | "Get number of fields and a default form using the data file." | 1203 | "Get number of fields and a default form using the data file." |
| 1202 | 1204 | ||
| @@ -1919,7 +1921,7 @@ after writing out the data." | |||
| 1919 | (forms-jump-record cur)) | 1921 | (forms-jump-record cur)) |
| 1920 | t) | 1922 | t) |
| 1921 | 1923 | ||
| 1922 | (defun forms--revert-buffer (&optional arg noconfirm) | 1924 | (defun forms--revert-buffer (&optional _arg noconfirm) |
| 1923 | "Reverts current form to un-modified." | 1925 | "Reverts current form to un-modified." |
| 1924 | (interactive "P") | 1926 | (interactive "P") |
| 1925 | (if (or noconfirm | 1927 | (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 @@ | |||
| 31 | (list (cons nil | 31 | (list (cons nil |
| 32 | (if (fboundp 'tty-create-frame-with-faces) | 32 | (if (fboundp 'tty-create-frame-with-faces) |
| 33 | 'tty-create-frame-with-faces | 33 | 'tty-create-frame-with-faces |
| 34 | (lambda (parameters) | 34 | (lambda (_parameters) |
| 35 | (error "Can't create multiple frames without a window system"))))) | 35 | (error "Can't create multiple frames without a window system"))))) |
| 36 | "Alist of window-system dependent functions to call to create a new frame. | 36 | "Alist of window-system dependent functions to call to create a new frame. |
| 37 | The window system startup file should add its frame creation | 37 | The window system startup file should add its frame creation |
| @@ -1430,7 +1430,7 @@ Examples (measures in pixels) - | |||
| 1430 | 1430 | ||
| 1431 | In the 3rd, 4th, and 6th examples, the returned value is relative to | 1431 | In the 3rd, 4th, and 6th examples, the returned value is relative to |
| 1432 | the opposite frame edge from the edge indicated in the input spec." | 1432 | the opposite frame edge from the edge indicated in the input spec." |
| 1433 | (cons (car spec) (frame-geom-value-cons (car spec) (cdr spec)))) | 1433 | (cons (car spec) (frame-geom-value-cons (car spec) (cdr spec) frame))) |
| 1434 | 1434 | ||
| 1435 | 1435 | ||
| 1436 | (defun delete-other-frames (&optional frame) | 1436 | (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 @@ | |||
| 96 | "Non-nil means `set-fringe-mode' should really do something. | 96 | "Non-nil means `set-fringe-mode' should really do something. |
| 97 | This is nil while loading `fringe.el', and t afterward.") | 97 | This is nil while loading `fringe.el', and t afterward.") |
| 98 | 98 | ||
| 99 | (defun set-fringe-mode-1 (ignore value) | 99 | (defun set-fringe-mode-1 (_ignore value) |
| 100 | "Call `set-fringe-mode' with VALUE. | 100 | "Call `set-fringe-mode' with VALUE. |
| 101 | See `fringe-mode' for valid values and their effect. | 101 | See `fringe-mode' for valid values and their effect. |
| 102 | This is usually invoked when setting `fringe-mode' via customize." | 102 | 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'." | |||
| 543 | (interactive) | 543 | (interactive) |
| 544 | (let ((compilation-buffer-name-function | 544 | (let ((compilation-buffer-name-function |
| 545 | (function | 545 | (function |
| 546 | (lambda(ign) | 546 | (lambda (_ign) |
| 547 | (concat "*" (buffer-file-name) "*"))))) | 547 | (concat "*" (buffer-file-name) "*"))))) |
| 548 | (compile | 548 | (compile |
| 549 | (concat (w32-shell-name) " -c " (buffer-file-name))))) | 549 | (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...).") | |||
| 162 | (define-button-type 'help-info-variable | 162 | (define-button-type 'help-info-variable |
| 163 | :supertype 'help-xref | 163 | :supertype 'help-xref |
| 164 | ;; the name of the variable is put before the argument to Info | 164 | ;; the name of the variable is put before the argument to Info |
| 165 | 'help-function (lambda (a v) (info v)) | 165 | 'help-function (lambda (_a v) (info v)) |
| 166 | 'help-echo (purecopy "mouse-2, RET: read this Info node")) | 166 | 'help-echo (purecopy "mouse-2, RET: read this Info node")) |
| 167 | 167 | ||
| 168 | (define-button-type 'help-info | 168 | (define-button-type 'help-info |
| @@ -778,7 +778,7 @@ help buffer." | |||
| 778 | (help-xref-go-forward (current-buffer)) | 778 | (help-xref-go-forward (current-buffer)) |
| 779 | (error "No next help buffer"))) | 779 | (error "No next help buffer"))) |
| 780 | 780 | ||
| 781 | (defun help-do-xref (pos function args) | 781 | (defun help-do-xref (_pos function args) |
| 782 | "Call the help cross-reference function FUNCTION with args ARGS. | 782 | "Call the help cross-reference function FUNCTION with args ARGS. |
| 783 | Things are set up properly so that the resulting help-buffer has | 783 | Things are set up properly so that the resulting help-buffer has |
| 784 | a proper [back] button." | 784 | a proper [back] button." |
| @@ -819,7 +819,7 @@ Show all docs for that symbol as either a variable, function or face." | |||
| 819 | (fboundp sym) (facep sym)) | 819 | (fboundp sym) (facep sym)) |
| 820 | (help-do-xref pos #'help-xref-interned (list sym))))) | 820 | (help-do-xref pos #'help-xref-interned (list sym))))) |
| 821 | 821 | ||
| 822 | (defun help-mode-revert-buffer (ignore-auto noconfirm) | 822 | (defun help-mode-revert-buffer (_ignore-auto noconfirm) |
| 823 | (when (or noconfirm (yes-or-no-p "Revert help buffer? ")) | 823 | (when (or noconfirm (yes-or-no-p "Revert help buffer? ")) |
| 824 | (let ((pos (point)) | 824 | (let ((pos (point)) |
| 825 | (item help-xref-stack-item) | 825 | (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." | |||
| 415 | (beginning-of-line) | 415 | (beginning-of-line) |
| 416 | (point))))))) | 416 | (point))))))) |
| 417 | 417 | ||
| 418 | (defun view-emacs-todo (&optional arg) | 418 | (defun view-emacs-todo (&optional _arg) |
| 419 | "Display the Emacs TODO list." | 419 | "Display the Emacs TODO list." |
| 420 | (interactive "P") | 420 | (interactive "P") |
| 421 | (view-help-file "TODO")) | 421 | (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." | |||
| 385 | ) | 385 | ) |
| 386 | 386 | ||
| 387 | 387 | ||
| 388 | (defun hilit-chg-cust-fix-changes-face-list (w wc &optional event) | 388 | (defun hilit-chg-cust-fix-changes-face-list (w _wc &optional event) |
| 389 | ;; When customization function `highlight-changes-face-list' inserts a new | 389 | ;; When customization function `highlight-changes-face-list' inserts a new |
| 390 | ;; face it uses the default face. We don't want the user to modify this | 390 | ;; face it uses the default face. We don't want the user to modify this |
| 391 | ;; face, so we rename the faces in the list on an insert. The rename is | 391 | ;; 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." | |||
| 557 | ;; otherwise an undone change shows up as changed. While the properties | 557 | ;; otherwise an undone change shows up as changed. While the properties |
| 558 | ;; are automatically restored by undo, we must fix up the overlay. | 558 | ;; are automatically restored by undo, we must fix up the overlay. |
| 559 | (save-match-data | 559 | (save-match-data |
| 560 | (let ((beg-decr 1) (end-incr 1) | 560 | (let (;;(beg-decr 1) |
| 561 | (type 'hilit-chg) | 561 | (end-incr 1) |
| 562 | old) | 562 | (type 'hilit-chg)) |
| 563 | (if undo-in-progress | 563 | (if undo-in-progress |
| 564 | (if (and highlight-changes-mode | 564 | (if (and highlight-changes-mode |
| 565 | highlight-changes-visible-mode) | 565 | highlight-changes-visible-mode) |
| @@ -632,7 +632,7 @@ This removes all saved change information." | |||
| 632 | (highlight-save-buffer-state | 632 | (highlight-save-buffer-state |
| 633 | (hilit-chg-hide-changes) | 633 | (hilit-chg-hide-changes) |
| 634 | (hilit-chg-map-changes | 634 | (hilit-chg-map-changes |
| 635 | (lambda (prop start stop) | 635 | (lambda (_prop start stop) |
| 636 | (remove-text-properties start stop '(hilit-chg nil))))) | 636 | (remove-text-properties start stop '(hilit-chg nil))))) |
| 637 | (setq highlight-changes-mode nil) | 637 | (setq highlight-changes-mode nil) |
| 638 | (force-mode-line-update))) | 638 | (force-mode-line-update))) |
| @@ -911,8 +911,7 @@ changes are made, so \\[highlight-changes-next-change] and | |||
| 911 | (file-a (buffer-file-name)) | 911 | (file-a (buffer-file-name)) |
| 912 | (existing-buf (get-file-buffer file-b)) | 912 | (existing-buf (get-file-buffer file-b)) |
| 913 | (buf-b (or existing-buf | 913 | (buf-b (or existing-buf |
| 914 | (find-file-noselect file-b))) | 914 | (find-file-noselect file-b)))) |
| 915 | (buf-b-read-only (with-current-buffer buf-b buffer-read-only))) | ||
| 916 | (highlight-markup-buffers buf-a file-a buf-b file-b (not existing-buf)) | 915 | (highlight-markup-buffers buf-a file-a buf-b file-b (not existing-buf)) |
| 917 | (unless existing-buf | 916 | (unless existing-buf |
| 918 | (kill-buffer buf-b)) | 917 | (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)." | |||
| 710 | <body onload=\"stripe('index'); return true;\">\n" | 710 | <body onload=\"stripe('index'); return true;\">\n" |
| 711 | file style)) | 711 | file style)) |
| 712 | 712 | ||
| 713 | (defun hfy-default-footer (file) | 713 | (defun hfy-default-footer (_file) |
| 714 | "Default value for `hfy-page-footer'. | 714 | "Default value for `hfy-page-footer'. |
| 715 | FILE is the name of the file being rendered, in case it is needed." | 715 | FILE is the name of the file being rendered, in case it is needed." |
| 716 | "\n </body>\n</html>\n") | 716 | "\n </body>\n</html>\n") |
| @@ -825,7 +825,7 @@ regular specifiers." | |||
| 825 | ((stringp box) (list (cons "border" (format "solid %s 1px" box)))) | 825 | ((stringp box) (list (cons "border" (format "solid %s 1px" box)))) |
| 826 | ((listp box) (hfy-box-to-style box) ))) ) | 826 | ((listp box) (hfy-box-to-style box) ))) ) |
| 827 | 827 | ||
| 828 | (defun hfy-decor (tag val) | 828 | (defun hfy-decor (tag _val) |
| 829 | "Derive CSS text-decoration specifiers from various Emacs font attributes. | 829 | "Derive CSS text-decoration specifiers from various Emacs font attributes. |
| 830 | TAG is an Emacs font attribute key (eg :underline). | 830 | TAG is an Emacs font attribute key (eg :underline). |
| 831 | VAL is ignored." | 831 | VAL is ignored." |
| @@ -836,7 +836,7 @@ VAL is ignored." | |||
| 836 | (:overline (cons "text-decoration" "overline" )) | 836 | (:overline (cons "text-decoration" "overline" )) |
| 837 | (:strike-through (cons "text-decoration" "line-through"))))) | 837 | (:strike-through (cons "text-decoration" "line-through"))))) |
| 838 | 838 | ||
| 839 | (defun hfy-invisible (&optional val) | 839 | (defun hfy-invisible (&optional _val) |
| 840 | "This text should be invisible. | 840 | "This text should be invisible. |
| 841 | Do something in CSS to make that happen. | 841 | Do something in CSS to make that happen. |
| 842 | VAL is ignored here." | 842 | VAL is ignored here." |
| @@ -1149,7 +1149,7 @@ See also `hfy-face-to-style'." | |||
| 1149 | (setq p (next-char-property-change p))) | 1149 | (setq p (next-char-property-change p))) |
| 1150 | ;; still invisible at buffer end? | 1150 | ;; still invisible at buffer end? |
| 1151 | (when i | 1151 | (when i |
| 1152 | (setq invisible (cons (cons s (point-max)) invisible))) | 1152 | (setq invisible (cons (cons s (point-max)) invisible))) |
| 1153 | invisible))) | 1153 | invisible))) |
| 1154 | 1154 | ||
| 1155 | (defun hfy-invisible-name (point map) | 1155 | (defun hfy-invisible-name (point map) |
| @@ -1759,7 +1759,7 @@ hyperlinks as appropriate." | |||
| 1759 | (if (not (hfy-opt 'skip-refontification)) | 1759 | (if (not (hfy-opt 'skip-refontification)) |
| 1760 | (save-excursion ;; Keep region | 1760 | (save-excursion ;; Keep region |
| 1761 | (hfy-force-fontification))) | 1761 | (hfy-force-fontification))) |
| 1762 | (if (interactive-p) ;; display the buffer in interactive mode: | 1762 | (if (called-interactively-p 'any) ;; display the buffer in interactive mode: |
| 1763 | (switch-to-buffer (hfy-fontify-buffer srcdir file)) | 1763 | (switch-to-buffer (hfy-fontify-buffer srcdir file)) |
| 1764 | (hfy-fontify-buffer srcdir file))) | 1764 | (hfy-fontify-buffer srcdir file))) |
| 1765 | 1765 | ||
| @@ -2061,7 +2061,7 @@ FILE is the specific file we are rendering." | |||
| 2061 | (puthash tag-string hash-entry cache-hash)))) ))) | 2061 | (puthash tag-string hash-entry cache-hash)))) ))) |
| 2062 | 2062 | ||
| 2063 | ;; cache a list of tags in descending length order: | 2063 | ;; cache a list of tags in descending length order: |
| 2064 | (maphash (lambda (K V) (push K tags-list)) cache-hash) | 2064 | (maphash (lambda (K _V) (push K tags-list)) cache-hash) |
| 2065 | (setq tags-list (sort tags-list (lambda (A B) (< (length B) (length A))))) | 2065 | (setq tags-list (sort tags-list (lambda (A B) (< (length B) (length A))))) |
| 2066 | 2066 | ||
| 2067 | ;; put the tag list into the cache: | 2067 | ;; put the tag list into the cache: |
| @@ -2092,7 +2092,7 @@ DSTDIR is the output directory, where files will be written." | |||
| 2092 | (setq cache-hash (cadr cache-entry)) | 2092 | (setq cache-hash (cadr cache-entry)) |
| 2093 | (setq index-buf (get-buffer-create index-file)))) | 2093 | (setq index-buf (get-buffer-create index-file)))) |
| 2094 | nil ;; noop | 2094 | nil ;; noop |
| 2095 | (maphash (lambda (K V) (push K tag-list)) cache-hash) | 2095 | (maphash (lambda (K _V) (push K tag-list)) cache-hash) |
| 2096 | (setq tag-list (sort tag-list 'string<)) | 2096 | (setq tag-list (sort tag-list 'string<)) |
| 2097 | (set-buffer index-buf) | 2097 | (set-buffer index-buf) |
| 2098 | (erase-buffer) | 2098 | (erase-buffer) |
| @@ -2136,7 +2136,7 @@ SRCDIR and DSTDIR are the source and output directories respectively." | |||
| 2136 | (cache-entry (assoc srcdir hfy-tags-cache))) | 2136 | (cache-entry (assoc srcdir hfy-tags-cache))) |
| 2137 | (if (and cache-entry (setq cache-hash (cadr cache-entry))) | 2137 | (if (and cache-entry (setq cache-hash (cadr cache-entry))) |
| 2138 | (maphash | 2138 | (maphash |
| 2139 | (lambda (K V) | 2139 | (lambda (K _V) |
| 2140 | (let ((stub (upcase (substring K 0 1)))) | 2140 | (let ((stub (upcase (substring K 0 1)))) |
| 2141 | (if (member stub stub-list) | 2141 | (if (member stub stub-list) |
| 2142 | nil ;; seen this already: NOOP | 2142 | nil ;; seen this already: NOOP |
| @@ -2169,7 +2169,7 @@ See also `hfy-prepare-index', `hfy-split-index'." | |||
| 2169 | 2169 | ||
| 2170 | (if (and cache-entry (setq cache-hash (cadr cache-entry))) | 2170 | (if (and cache-entry (setq cache-hash (cadr cache-entry))) |
| 2171 | (maphash | 2171 | (maphash |
| 2172 | (lambda (K V) | 2172 | (lambda (K _V) |
| 2173 | (let ((stub (upcase (substring K 0 1)))) | 2173 | (let ((stub (upcase (substring K 0 1)))) |
| 2174 | (if (member stub stub-list) | 2174 | (if (member stub stub-list) |
| 2175 | nil ;; seen this already: NOOP | 2175 | 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." | |||
| 1219 | (setq direction 1)) | 1219 | (setq direction 1)) |
| 1220 | ;; Skip the title | 1220 | ;; Skip the title |
| 1221 | (ibuffer-forward-line 0) | 1221 | (ibuffer-forward-line 0) |
| 1222 | (let ((opos (point)) | 1222 | (let ((opos (point))) |
| 1223 | curmark) | ||
| 1224 | (ibuffer-forward-line direction) | 1223 | (ibuffer-forward-line direction) |
| 1225 | (while (not (or (= (point) opos) | 1224 | (while (not (or (= (point) opos) |
| 1226 | (eq (setq curmark (ibuffer-current-mark)) | 1225 | (eq (ibuffer-current-mark) mark))) |
| 1227 | mark))) | ||
| 1228 | (ibuffer-forward-line direction)) | 1226 | (ibuffer-forward-line direction)) |
| 1229 | (when (and (= (point) opos) | 1227 | (when (and (= (point) opos) |
| 1230 | (not (eq (ibuffer-current-mark) mark))) | 1228 | (not (eq (ibuffer-current-mark) mark))) |
| @@ -1247,7 +1245,7 @@ to move by. The default is `ibuffer-marked-char'." | |||
| 1247 | (message "No buffers marked; use 'm' to mark a buffer") | 1245 | (message "No buffers marked; use 'm' to mark a buffer") |
| 1248 | (let ((count | 1246 | (let ((count |
| 1249 | (ibuffer-map-marked-lines | 1247 | (ibuffer-map-marked-lines |
| 1250 | #'(lambda (buf mark) | 1248 | #'(lambda (_buf _mark) |
| 1251 | 'kill)))) | 1249 | 'kill)))) |
| 1252 | (message "Killed %s lines" count)))) | 1250 | (message "Killed %s lines" count)))) |
| 1253 | 1251 | ||
| @@ -1279,7 +1277,7 @@ a prefix argument reverses the meaning of that variable." | |||
| 1279 | (let (buf-point) | 1277 | (let (buf-point) |
| 1280 | ;; Blindly search for our buffer: it is very likely that it is | 1278 | ;; Blindly search for our buffer: it is very likely that it is |
| 1281 | ;; not in a hidden filter group. | 1279 | ;; not in a hidden filter group. |
| 1282 | (ibuffer-map-lines #'(lambda (buf marks) | 1280 | (ibuffer-map-lines #'(lambda (buf _marks) |
| 1283 | (when (string= (buffer-name buf) name) | 1281 | (when (string= (buffer-name buf) name) |
| 1284 | (setq buf-point (point)) | 1282 | (setq buf-point (point)) |
| 1285 | nil)) | 1283 | nil)) |
| @@ -1293,7 +1291,7 @@ a prefix argument reverses the meaning of that variable." | |||
| 1293 | (dolist (group ibuffer-hidden-filter-groups) | 1291 | (dolist (group ibuffer-hidden-filter-groups) |
| 1294 | (ibuffer-jump-to-filter-group group) | 1292 | (ibuffer-jump-to-filter-group group) |
| 1295 | (ibuffer-toggle-filter-group) | 1293 | (ibuffer-toggle-filter-group) |
| 1296 | (ibuffer-map-lines #'(lambda (buf marks) | 1294 | (ibuffer-map-lines #'(lambda (buf _marks) |
| 1297 | (when (string= (buffer-name buf) name) | 1295 | (when (string= (buffer-name buf) name) |
| 1298 | (setq buf-point (point)) | 1296 | (setq buf-point (point)) |
| 1299 | nil)) | 1297 | nil)) |
| @@ -1336,8 +1334,7 @@ a prefix argument reverses the meaning of that variable." | |||
| 1336 | (format "Buffer %s" (buffer-name buffer))))) | 1334 | (format "Buffer %s" (buffer-name buffer))))) |
| 1337 | ,(shell-quote-argument (or oldtmp old)) | 1335 | ,(shell-quote-argument (or oldtmp old)) |
| 1338 | ,(shell-quote-argument (or newtmp new))) | 1336 | ,(shell-quote-argument (or newtmp new))) |
| 1339 | " ")) | 1337 | " "))) |
| 1340 | proc) | ||
| 1341 | (let ((inhibit-read-only t)) | 1338 | (let ((inhibit-read-only t)) |
| 1342 | (insert command "\n") | 1339 | (insert command "\n") |
| 1343 | (diff-sentinel | 1340 | (diff-sentinel |
| @@ -1396,7 +1393,7 @@ You can then feed the file name(s) to other commands with \\[yank]." | |||
| 1396 | (t | 1393 | (t |
| 1397 | 'name)))) | 1394 | 'name)))) |
| 1398 | (ibuffer-map-marked-lines | 1395 | (ibuffer-map-marked-lines |
| 1399 | #'(lambda (buf mark) | 1396 | #'(lambda (buf _mark) |
| 1400 | (setq ibuffer-copy-filename-as-kill-result | 1397 | (setq ibuffer-copy-filename-as-kill-result |
| 1401 | (concat ibuffer-copy-filename-as-kill-result | 1398 | (concat ibuffer-copy-filename-as-kill-result |
| 1402 | (let ((name (buffer-file-name buf))) | 1399 | (let ((name (buffer-file-name buf))) |
| @@ -1417,7 +1414,7 @@ You can then feed the file name(s) to other commands with \\[yank]." | |||
| 1417 | (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group) | 1414 | (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group) |
| 1418 | (let ((count | 1415 | (let ((count |
| 1419 | (ibuffer-map-lines | 1416 | (ibuffer-map-lines |
| 1420 | #'(lambda (buf mark) | 1417 | #'(lambda (buf _mark) |
| 1421 | (when (funcall func buf) | 1418 | (when (funcall func buf) |
| 1422 | (ibuffer-set-mark-1 (or ibuffer-mark-on-buffer-mark | 1419 | (ibuffer-set-mark-1 (or ibuffer-mark-on-buffer-mark |
| 1423 | ibuffer-marked-char)) | 1420 | ibuffer-marked-char)) |
| @@ -1585,7 +1582,7 @@ defaults to one." | |||
| 1585 | (let ((ibuffer-do-occur-bufs nil)) | 1582 | (let ((ibuffer-do-occur-bufs nil)) |
| 1586 | ;; Accumulate a list of marked buffers | 1583 | ;; Accumulate a list of marked buffers |
| 1587 | (ibuffer-map-marked-lines | 1584 | (ibuffer-map-marked-lines |
| 1588 | #'(lambda (buf mark) | 1585 | #'(lambda (buf _mark) |
| 1589 | (push buf ibuffer-do-occur-bufs))) | 1586 | (push buf ibuffer-do-occur-bufs))) |
| 1590 | (occur-1 regexp nlines ibuffer-do-occur-bufs))) | 1587 | (occur-1 regexp nlines ibuffer-do-occur-bufs))) |
| 1591 | 1588 | ||
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." | |||
| 1137 | (frame-height))) | 1137 | (frame-height))) |
| 1138 | (1+ (length marked-bufs))))) | 1138 | (1+ (length marked-bufs))))) |
| 1139 | (mapcar (if (eq type 'other-frame) | 1139 | (mapcar (if (eq type 'other-frame) |
| 1140 | #'(lambda (buf) | 1140 | (lambda (buf) |
| 1141 | (let ((curframe (selected-frame))) | 1141 | (let ((curframe (selected-frame))) |
| 1142 | (select-frame (make-frame)) | 1142 | (select-frame (make-frame)) |
| 1143 | (switch-to-buffer buf) | 1143 | (switch-to-buffer buf) |
| 1144 | (select-frame curframe))) | 1144 | (select-frame curframe))) |
| 1145 | #'(lambda (buf) | 1145 | (lambda (buf) |
| 1146 | (split-window nil height (eq type 'horizontally)) | 1146 | (split-window nil height (eq type 'horizontally)) |
| 1147 | (other-window 1) | 1147 | (other-window 1) |
| 1148 | (switch-to-buffer buf))) | 1148 | (switch-to-buffer buf))) |
| 1149 | marked-bufs))))) | 1149 | marked-bufs))))) |
| 1150 | 1150 | ||
| 1151 | (defun ibuffer-do-view-other-frame () | 1151 | (defun ibuffer-do-view-other-frame () |
| @@ -1214,10 +1214,10 @@ a new window in the current frame, splitting vertically." | |||
| 1214 | (defun ibuffer-buffer-names-with-mark (mark) | 1214 | (defun ibuffer-buffer-names-with-mark (mark) |
| 1215 | (let ((ibuffer-buffer-names-with-mark-result nil)) | 1215 | (let ((ibuffer-buffer-names-with-mark-result nil)) |
| 1216 | (ibuffer-map-lines-nomodify | 1216 | (ibuffer-map-lines-nomodify |
| 1217 | #'(lambda (buf mk) | 1217 | (lambda (buf mk) |
| 1218 | (when (char-equal mark mk) | 1218 | (when (char-equal mark mk) |
| 1219 | (push (buffer-name buf) | 1219 | (push (buffer-name buf) |
| 1220 | ibuffer-buffer-names-with-mark-result)))) | 1220 | ibuffer-buffer-names-with-mark-result)))) |
| 1221 | ibuffer-buffer-names-with-mark-result)) | 1221 | ibuffer-buffer-names-with-mark-result)) |
| 1222 | 1222 | ||
| 1223 | (defsubst ibuffer-marked-buffer-names () | 1223 | (defsubst ibuffer-marked-buffer-names () |
| @@ -1229,16 +1229,16 @@ a new window in the current frame, splitting vertically." | |||
| 1229 | (defun ibuffer-count-marked-lines (&optional all) | 1229 | (defun ibuffer-count-marked-lines (&optional all) |
| 1230 | (if all | 1230 | (if all |
| 1231 | (ibuffer-map-lines-nomodify | 1231 | (ibuffer-map-lines-nomodify |
| 1232 | #'(lambda (buf mark) | 1232 | (lambda (_buf mark) |
| 1233 | (not (char-equal mark ?\s)))) | 1233 | (not (char-equal mark ?\s)))) |
| 1234 | (ibuffer-map-lines-nomodify | 1234 | (ibuffer-map-lines-nomodify |
| 1235 | #'(lambda (buf mark) | 1235 | (lambda (_buf mark) |
| 1236 | (char-equal mark ibuffer-marked-char))))) | 1236 | (char-equal mark ibuffer-marked-char))))) |
| 1237 | 1237 | ||
| 1238 | (defsubst ibuffer-count-deletion-lines () | 1238 | (defsubst ibuffer-count-deletion-lines () |
| 1239 | (ibuffer-map-lines-nomodify | 1239 | (ibuffer-map-lines-nomodify |
| 1240 | #'(lambda (buf mark) | 1240 | (lambda (_buf mark) |
| 1241 | (char-equal mark ibuffer-deletion-char)))) | 1241 | (char-equal mark ibuffer-deletion-char)))) |
| 1242 | 1242 | ||
| 1243 | (defsubst ibuffer-map-deletion-lines (func) | 1243 | (defsubst ibuffer-map-deletion-lines (func) |
| 1244 | (ibuffer-map-on-mark ibuffer-deletion-char func)) | 1244 | (ibuffer-map-on-mark ibuffer-deletion-char func)) |
| @@ -1317,20 +1317,20 @@ With optional ARG, make read-only only if ARG is positive." | |||
| 1317 | (cond | 1317 | (cond |
| 1318 | ((char-equal mark ibuffer-marked-char) | 1318 | ((char-equal mark ibuffer-marked-char) |
| 1319 | (ibuffer-map-marked-lines | 1319 | (ibuffer-map-marked-lines |
| 1320 | #'(lambda (buf mark) | 1320 | (lambda (_buf _mark) |
| 1321 | (ibuffer-set-mark-1 ?\s) | 1321 | (ibuffer-set-mark-1 ?\s) |
| 1322 | t))) | 1322 | t))) |
| 1323 | ((char-equal mark ibuffer-deletion-char) | 1323 | ((char-equal mark ibuffer-deletion-char) |
| 1324 | (ibuffer-map-deletion-lines | 1324 | (ibuffer-map-deletion-lines |
| 1325 | #'(lambda (buf mark) | 1325 | (lambda (_buf _mark) |
| 1326 | (ibuffer-set-mark-1 ?\s) | 1326 | (ibuffer-set-mark-1 ?\s) |
| 1327 | t))) | 1327 | t))) |
| 1328 | (t | 1328 | (t |
| 1329 | (ibuffer-map-lines | 1329 | (ibuffer-map-lines |
| 1330 | #'(lambda (buf mark) | 1330 | (lambda (_buf mark) |
| 1331 | (when (not (char-equal mark ?\s)) | 1331 | (when (not (char-equal mark ?\s)) |
| 1332 | (ibuffer-set-mark-1 ?\s)) | 1332 | (ibuffer-set-mark-1 ?\s)) |
| 1333 | t))))) | 1333 | t))))) |
| 1334 | (ibuffer-redisplay t)) | 1334 | (ibuffer-redisplay t)) |
| 1335 | 1335 | ||
| 1336 | (defun ibuffer-toggle-marks (&optional group) | 1336 | (defun ibuffer-toggle-marks (&optional group) |
| @@ -1344,15 +1344,15 @@ group." | |||
| 1344 | (setq group it)) | 1344 | (setq group it)) |
| 1345 | (let ((count | 1345 | (let ((count |
| 1346 | (ibuffer-map-lines | 1346 | (ibuffer-map-lines |
| 1347 | #'(lambda (buf mark) | 1347 | (lambda (_buf mark) |
| 1348 | (cond ((eq mark ibuffer-marked-char) | 1348 | (cond ((eq mark ibuffer-marked-char) |
| 1349 | (ibuffer-set-mark-1 ?\s) | 1349 | (ibuffer-set-mark-1 ?\s) |
| 1350 | nil) | 1350 | nil) |
| 1351 | ((eq mark ?\s) | 1351 | ((eq mark ?\s) |
| 1352 | (ibuffer-set-mark-1 ibuffer-marked-char) | 1352 | (ibuffer-set-mark-1 ibuffer-marked-char) |
| 1353 | t) | 1353 | t) |
| 1354 | (t | 1354 | (t |
| 1355 | nil))) | 1355 | nil))) |
| 1356 | nil group))) | 1356 | nil group))) |
| 1357 | (message "%s buffers marked" count)) | 1357 | (message "%s buffers marked" count)) |
| 1358 | (ibuffer-redisplay t)) | 1358 | (ibuffer-redisplay t)) |
| @@ -1663,11 +1663,11 @@ If point is on a group name, this function operates on that group." | |||
| 1663 | (mapcar #'ibuffer-compile-format ibuffer-formats)) | 1663 | (mapcar #'ibuffer-compile-format ibuffer-formats)) |
| 1664 | (when (boundp 'ibuffer-filter-format-alist) | 1664 | (when (boundp 'ibuffer-filter-format-alist) |
| 1665 | (setq ibuffer-compiled-filter-formats | 1665 | (setq ibuffer-compiled-filter-formats |
| 1666 | (mapcar #'(lambda (entry) | 1666 | (mapcar (lambda (entry) |
| 1667 | (cons (car entry) | 1667 | (cons (car entry) |
| 1668 | (mapcar #'(lambda (formats) | 1668 | (mapcar (lambda (formats) |
| 1669 | (mapcar #'ibuffer-compile-format formats)) | 1669 | (mapcar #'ibuffer-compile-format formats)) |
| 1670 | (cdr entry)))) | 1670 | (cdr entry)))) |
| 1671 | ibuffer-filter-format-alist)))) | 1671 | ibuffer-filter-format-alist)))) |
| 1672 | 1672 | ||
| 1673 | (defun ibuffer-clear-summary-columns (format) | 1673 | (defun ibuffer-clear-summary-columns (format) |
| @@ -1864,10 +1864,10 @@ If point is on a group name, this function operates on that group." | |||
| 1864 | 1864 | ||
| 1865 | (defun ibuffer-map-on-mark (mark func) | 1865 | (defun ibuffer-map-on-mark (mark func) |
| 1866 | (ibuffer-map-lines | 1866 | (ibuffer-map-lines |
| 1867 | #'(lambda (buf mk) | 1867 | (lambda (buf mk) |
| 1868 | (if (char-equal mark mk) | 1868 | (if (char-equal mark mk) |
| 1869 | (funcall func buf mark) | 1869 | (funcall func buf mark) |
| 1870 | nil)))) | 1870 | nil)))) |
| 1871 | 1871 | ||
| 1872 | (defun ibuffer-map-lines (function &optional nomodify group) | 1872 | (defun ibuffer-map-lines (function &optional nomodify group) |
| 1873 | "Call FUNCTION for each buffer. | 1873 | "Call FUNCTION for each buffer. |
| @@ -1939,9 +1939,9 @@ the buffer object itself and the current mark symbol." | |||
| 1939 | (defun ibuffer-get-marked-buffers () | 1939 | (defun ibuffer-get-marked-buffers () |
| 1940 | "Return a list of buffer objects currently marked." | 1940 | "Return a list of buffer objects currently marked." |
| 1941 | (delq nil | 1941 | (delq nil |
| 1942 | (mapcar #'(lambda (e) | 1942 | (mapcar (lambda (e) |
| 1943 | (when (eq (cdr e) ibuffer-marked-char) | 1943 | (when (eq (cdr e) ibuffer-marked-char) |
| 1944 | (car e))) | 1944 | (car e))) |
| 1945 | (ibuffer-current-state-list)))) | 1945 | (ibuffer-current-state-list)))) |
| 1946 | 1946 | ||
| 1947 | (defun ibuffer-current-state-list (&optional pos) | 1947 | (defun ibuffer-current-state-list (&optional pos) |
| @@ -1953,22 +1953,22 @@ the value of point at the beginning of the line for that buffer." | |||
| 1953 | ;; break later. Don't blame me. | 1953 | ;; break later. Don't blame me. |
| 1954 | (if pos | 1954 | (if pos |
| 1955 | (ibuffer-map-lines-nomodify | 1955 | (ibuffer-map-lines-nomodify |
| 1956 | #'(lambda (buf mark) | 1956 | (lambda (buf mark) |
| 1957 | (when (buffer-live-p buf) | ||
| 1958 | (push (list buf mark (point)) ibuffer-current-state-list-tmp)))) | ||
| 1959 | (ibuffer-map-lines-nomodify | ||
| 1960 | #'(lambda (buf mark) | ||
| 1961 | (when (buffer-live-p buf) | 1957 | (when (buffer-live-p buf) |
| 1962 | (push (cons buf mark) ibuffer-current-state-list-tmp))))) | 1958 | (push (list buf mark (point)) ibuffer-current-state-list-tmp)))) |
| 1959 | (ibuffer-map-lines-nomodify | ||
| 1960 | (lambda (buf mark) | ||
| 1961 | (when (buffer-live-p buf) | ||
| 1962 | (push (cons buf mark) ibuffer-current-state-list-tmp))))) | ||
| 1963 | (nreverse ibuffer-current-state-list-tmp))) | 1963 | (nreverse ibuffer-current-state-list-tmp))) |
| 1964 | 1964 | ||
| 1965 | (defun ibuffer-current-buffers-with-marks (curbufs) | 1965 | (defun ibuffer-current-buffers-with-marks (curbufs) |
| 1966 | "Return a list like (BUF . MARK) of all open buffers." | 1966 | "Return a list like (BUF . MARK) of all open buffers." |
| 1967 | (let ((bufs (ibuffer-current-state-list))) | 1967 | (let ((bufs (ibuffer-current-state-list))) |
| 1968 | (mapcar #'(lambda (buf) (let ((e (assq buf bufs))) | 1968 | (mapcar (lambda (buf) (let ((e (assq buf bufs))) |
| 1969 | (if e | 1969 | (if e |
| 1970 | e | 1970 | e |
| 1971 | (cons buf ?\s)))) | 1971 | (cons buf ?\s)))) |
| 1972 | curbufs))) | 1972 | curbufs))) |
| 1973 | 1973 | ||
| 1974 | (defun ibuffer-buf-matches-predicates (buf predicates) | 1974 | (defun ibuffer-buf-matches-predicates (buf predicates) |
| @@ -1986,17 +1986,17 @@ the value of point at the beginning of the line for that buffer." | |||
| 1986 | (delq nil | 1986 | (delq nil |
| 1987 | (mapcar | 1987 | (mapcar |
| 1988 | ;; element should be like (BUFFER . MARK) | 1988 | ;; element should be like (BUFFER . MARK) |
| 1989 | #'(lambda (e) | 1989 | (lambda (e) |
| 1990 | (let* ((buf (car e))) | 1990 | (let* ((buf (car e))) |
| 1991 | (when | 1991 | (when |
| 1992 | ;; This takes precedence over anything else | 1992 | ;; This takes precedence over anything else |
| 1993 | (or (and ibuffer-always-show-last-buffer | 1993 | (or (and ibuffer-always-show-last-buffer |
| 1994 | (eq last buf)) | 1994 | (eq last buf)) |
| 1995 | (funcall (if ext-loaded | 1995 | (funcall (if ext-loaded |
| 1996 | #'ibuffer-ext-visible-p | 1996 | #'ibuffer-ext-visible-p |
| 1997 | #'ibuffer-visible-p) | 1997 | #'ibuffer-visible-p) |
| 1998 | buf all ibuffer-buf)) | 1998 | buf all ibuffer-buf)) |
| 1999 | e))) | 1999 | e))) |
| 2000 | bmarklist)))) | 2000 | bmarklist)))) |
| 2001 | 2001 | ||
| 2002 | (defun ibuffer-visible-p (buf all &optional ibuffer-buf) | 2002 | (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." | |||
| 2084 | (beginning-of-line) | 2084 | (beginning-of-line) |
| 2085 | (buffer-substring (point) (line-end-position))))) | 2085 | (buffer-substring (point) (line-end-position))))) |
| 2086 | (apply #'insert (mapcar | 2086 | (apply #'insert (mapcar |
| 2087 | #'(lambda (c) | 2087 | (lambda (c) |
| 2088 | (if (not (or (char-equal c ?\s) | 2088 | (if (not (or (char-equal c ?\s) |
| 2089 | (char-equal c ?\n))) | 2089 | (char-equal c ?\n))) |
| 2090 | ?- | 2090 | ?- |
| 2091 | ?\s)) | 2091 | ?\s)) |
| 2092 | str))) | 2092 | str))) |
| 2093 | (insert "\n")) | 2093 | (insert "\n")) |
| 2094 | (point)) | 2094 | (point)) |
| @@ -2244,7 +2244,7 @@ If optional arg SILENT is non-nil, do not display progress messages." | |||
| 2244 | 'ibuffer-filter-group | 2244 | 'ibuffer-filter-group |
| 2245 | name))) | 2245 | name))) |
| 2246 | 2246 | ||
| 2247 | (defun ibuffer-redisplay-engine (bmarklist &optional ignore) | 2247 | (defun ibuffer-redisplay-engine (bmarklist &optional _ignore) |
| 2248 | (ibuffer-assert-ibuffer-mode) | 2248 | (ibuffer-assert-ibuffer-mode) |
| 2249 | (let* ((--ibuffer-insert-buffers-and-marks-format | 2249 | (let* ((--ibuffer-insert-buffers-and-marks-format |
| 2250 | (ibuffer-current-format)) | 2250 | (ibuffer-current-format)) |
| @@ -2345,7 +2345,7 @@ FORMATS is the value to use for `ibuffer-formats'. | |||
| 2345 | (setq ibuffer-prev-window-config (current-window-configuration)) | 2345 | (setq ibuffer-prev-window-config (current-window-configuration)) |
| 2346 | (let ((buf (get-buffer-create (or name "*Ibuffer*")))) | 2346 | (let ((buf (get-buffer-create (or name "*Ibuffer*")))) |
| 2347 | (if other-window-p | 2347 | (if other-window-p |
| 2348 | (funcall (if noselect #'(lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf) | 2348 | (funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf) |
| 2349 | (funcall (if noselect #'display-buffer #'switch-to-buffer) buf)) | 2349 | (funcall (if noselect #'display-buffer #'switch-to-buffer) buf)) |
| 2350 | (with-current-buffer buf | 2350 | (with-current-buffer buf |
| 2351 | (save-selected-window | 2351 | (save-selected-window |
| @@ -2648,7 +2648,7 @@ will be inserted before the group at point." | |||
| 2648 | ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group | 2648 | ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group |
| 2649 | ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group | 2649 | ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group |
| 2650 | ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode | 2650 | ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode |
| 2651 | ;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "eb3de21aef70e4ca75f611f1c3c56aa1") | 2651 | ;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "001cd83e8e1ff27c9a61097c840a984d") |
| 2652 | ;;; Generated autoloads from ibuf-ext.el | 2652 | ;;; Generated autoloads from ibuf-ext.el |
| 2653 | 2653 | ||
| 2654 | (autoload 'ibuffer-auto-mode "ibuf-ext" "\ | 2654 | (autoload 'ibuffer-auto-mode "ibuf-ext" "\ |
| @@ -2701,7 +2701,7 @@ Move point backwards by COUNT filtering groups. | |||
| 2701 | (autoload 'ibuffer-do-print "ibuf-ext") | 2701 | (autoload 'ibuffer-do-print "ibuf-ext") |
| 2702 | 2702 | ||
| 2703 | (autoload 'ibuffer-included-in-filters-p "ibuf-ext" "\ | 2703 | (autoload 'ibuffer-included-in-filters-p "ibuf-ext" "\ |
| 2704 | Not documented | 2704 | |
| 2705 | 2705 | ||
| 2706 | \(fn BUF FILTERS)" nil nil) | 2706 | \(fn BUF FILTERS)" nil nil) |
| 2707 | 2707 | ||
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 @@ | |||
| 1 | ;;; ido.el --- interactively do things with buffers and files. | 1 | ;;; ido.el --- interactively do things with buffers and files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -350,7 +350,7 @@ should be enabled. The following values are possible: | |||
| 350 | 350 | ||
| 351 | Setting this variable directly does not take effect; | 351 | Setting this variable directly does not take effect; |
| 352 | use either \\[customize] or the function `ido-mode'." | 352 | use either \\[customize] or the function `ido-mode'." |
| 353 | :set #'(lambda (symbol value) | 353 | :set #'(lambda (_symbol value) |
| 354 | (ido-mode value)) | 354 | (ido-mode value)) |
| 355 | :initialize 'custom-initialize-default | 355 | :initialize 'custom-initialize-default |
| 356 | :require 'ido | 356 | :require 'ido |
| @@ -1134,6 +1134,9 @@ Only used if `ido-use-virtual-buffers' is non-nil.") | |||
| 1134 | ;; Set to 'ignore to inhibit switching between find-file/switch-buffer. | 1134 | ;; Set to 'ignore to inhibit switching between find-file/switch-buffer. |
| 1135 | (defvar ido-context-switch-command) | 1135 | (defvar ido-context-switch-command) |
| 1136 | 1136 | ||
| 1137 | ;; Dynamically bound in ido-read-internal. | ||
| 1138 | (defvar ido-completing-read) | ||
| 1139 | |||
| 1137 | ;;; FUNCTIONS | 1140 | ;;; FUNCTIONS |
| 1138 | 1141 | ||
| 1139 | (defun ido-active (&optional merge) | 1142 | (defun ido-active (&optional merge) |
| @@ -2912,7 +2915,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one. | |||
| 2912 | (setq ido-rotate-temp t) | 2915 | (setq ido-rotate-temp t) |
| 2913 | (exit-minibuffer))) | 2916 | (exit-minibuffer))) |
| 2914 | 2917 | ||
| 2915 | (defun ido-wide-find-dir-or-delete-dir (&optional dir) | 2918 | (defun ido-wide-find-dir-or-delete-dir (&optional _dir) |
| 2916 | "Prompt for DIR to search for using find, starting from current directory. | 2919 | "Prompt for DIR to search for using find, starting from current directory. |
| 2917 | If input stack is non-empty, delete current directory component." | 2920 | If input stack is non-empty, delete current directory component." |
| 2918 | (interactive) | 2921 | (interactive) |
| @@ -3021,11 +3024,11 @@ If repeated, insert text from buffer instead." | |||
| 3021 | ido-try-merged-list nil) | 3024 | ido-try-merged-list nil) |
| 3022 | (exit-minibuffer)))) | 3025 | (exit-minibuffer)))) |
| 3023 | 3026 | ||
| 3024 | (defun ido-copy-current-word (all) | 3027 | (defun ido-copy-current-word (_all) |
| 3025 | "Insert current word (file or directory name) from current buffer." | 3028 | "Insert current word (file or directory name) from current buffer." |
| 3026 | (interactive "P") | 3029 | (interactive "P") |
| 3027 | (let ((word (with-current-buffer ido-entry-buffer | 3030 | (let ((word (with-current-buffer ido-entry-buffer |
| 3028 | (let ((p (point)) start-line end-line start-name name) | 3031 | (let ((p (point)) start-line end-line start-name) |
| 3029 | (if (and mark-active (/= p (mark))) | 3032 | (if (and mark-active (/= p (mark))) |
| 3030 | (setq start-name (mark)) | 3033 | (setq start-name (mark)) |
| 3031 | (beginning-of-line) | 3034 | (beginning-of-line) |
| @@ -3232,7 +3235,7 @@ for first matching file." | |||
| 3232 | ;; Input is list of ("file" . "dir") cons cells. | 3235 | ;; Input is list of ("file" . "dir") cons cells. |
| 3233 | ;; Output is sorted list of ("file "dir" ...) lists | 3236 | ;; Output is sorted list of ("file "dir" ...) lists |
| 3234 | (let ((l (sort items (lambda (a b) (string-lessp (car b) (car a))))) | 3237 | (let ((l (sort items (lambda (a b) (string-lessp (car b) (car a))))) |
| 3235 | res a cur dirs) | 3238 | res a cur) |
| 3236 | (while l | 3239 | (while l |
| 3237 | (setq a (car l) | 3240 | (setq a (car l) |
| 3238 | l (cdr l)) | 3241 | l (cdr l)) |
| @@ -4734,7 +4737,8 @@ See `read-directory-name' for additional parameters." | |||
| 4734 | (concat ido-current-directory filename))))) | 4737 | (concat ido-current-directory filename))))) |
| 4735 | 4738 | ||
| 4736 | ;;;###autoload | 4739 | ;;;###autoload |
| 4737 | (defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def inherit-input-method) | 4740 | (defun ido-completing-read (prompt choices &optional _predicate require-match |
| 4741 | initial-input hist def _inherit-input-method) | ||
| 4738 | "Ido replacement for the built-in `completing-read'. | 4742 | "Ido replacement for the built-in `completing-read'. |
| 4739 | Read a string in the minibuffer with ido-style completion. | 4743 | Read a string in the minibuffer with ido-style completion. |
| 4740 | PROMPT is a string to prompt with; normally it ends in a colon and a space. | 4744 | 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." | |||
| 282 | 282 | ||
| 283 | (defvar ielm-input) | 283 | (defvar ielm-input) |
| 284 | 284 | ||
| 285 | (defun ielm-input-sender (proc input) | 285 | (defun ielm-input-sender (_proc input) |
| 286 | ;; Just sets the variable ielm-input, which is in the scope of | 286 | ;; Just sets the variable ielm-input, which is in the scope of |
| 287 | ;; `ielm-send-input's call. | 287 | ;; `ielm-send-input's call. |
| 288 | (setq ielm-input input)) | 288 | (setq ielm-input input)) |
| @@ -303,8 +303,17 @@ simply inserts a newline." | |||
| 303 | 303 | ||
| 304 | ;;; Evaluation | 304 | ;;; Evaluation |
| 305 | 305 | ||
| 306 | (defun ielm-eval-input (ielm-string) | 306 | (defvar ielm-string) |
| 307 | "Evaluate the Lisp expression IELM-STRING, and pretty-print the result." | 307 | (defvar ielm-form) |
| 308 | (defvar ielm-pos) | ||
| 309 | (defvar ielm-result) | ||
| 310 | (defvar ielm-error-type) | ||
| 311 | (defvar ielm-output) | ||
| 312 | (defvar ielm-wbuf) | ||
| 313 | (defvar ielm-pmark) | ||
| 314 | |||
| 315 | (defun ielm-eval-input (input-string) | ||
| 316 | "Evaluate the Lisp expression INPUT-STRING, and pretty-print the result." | ||
| 308 | ;; This is the function that actually `sends' the input to the | 317 | ;; This is the function that actually `sends' the input to the |
| 309 | ;; `inferior Lisp process'. All comint-send-input does is works out | 318 | ;; `inferior Lisp process'. All comint-send-input does is works out |
| 310 | ;; what that input is. What this function does is evaluates that | 319 | ;; what that input is. What this function does is evaluates that |
| @@ -317,7 +326,8 @@ simply inserts a newline." | |||
| 317 | ;; | 326 | ;; |
| 318 | ;; NOTE: all temporary variables in this function will be in scope | 327 | ;; NOTE: all temporary variables in this function will be in scope |
| 319 | ;; during the eval, and so need to have non-clashing names. | 328 | ;; during the eval, and so need to have non-clashing names. |
| 320 | (let (ielm-form ; form to evaluate | 329 | (let ((ielm-string input-string) ; input expression, as a string |
| 330 | ielm-form ; form to evaluate | ||
| 321 | ielm-pos ; End posn of parse in string | 331 | ielm-pos ; End posn of parse in string |
| 322 | ielm-result ; Result, or error message | 332 | ielm-result ; Result, or error message |
| 323 | ielm-error-type ; string, nil if no error | 333 | ielm-error-type ; string, nil if no error |
| @@ -395,7 +405,7 @@ simply inserts a newline." | |||
| 395 | 405 | ||
| 396 | (goto-char ielm-pmark) | 406 | (goto-char ielm-pmark) |
| 397 | (unless ielm-error-type | 407 | (unless ielm-error-type |
| 398 | (condition-case err | 408 | (condition-case nil |
| 399 | ;; Self-referential objects cause loops in the printer, so | 409 | ;; Self-referential objects cause loops in the printer, so |
| 400 | ;; trap quits here. May as well do errors, too | 410 | ;; trap quits here. May as well do errors, too |
| 401 | (setq ielm-output (concat ielm-output (pp-to-string ielm-result))) | 411 | (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." | |||
| 551 | )) | 551 | )) |
| 552 | 552 | ||
| 553 | (defun image-dired-insert-thumbnail (file original-file-name | 553 | (defun image-dired-insert-thumbnail (file original-file-name |
| 554 | associated-dired-buffer) | 554 | associated-dired-buffer) |
| 555 | "Insert thumbnail image FILE. | 555 | "Insert thumbnail image FILE. |
| 556 | Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." | 556 | Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." |
| 557 | (let (beg end) | 557 | (let (beg end) |
| @@ -816,7 +816,7 @@ used or not. If non-nil, use `display-buffer' instead of | |||
| 816 | thumbnail buffer to be selected." | 816 | thumbnail buffer to be selected." |
| 817 | (interactive "P") | 817 | (interactive "P") |
| 818 | (let ((buf (image-dired-create-thumbnail-buffer)) | 818 | (let ((buf (image-dired-create-thumbnail-buffer)) |
| 819 | curr-file thumb-name files count dired-buf beg) | 819 | thumb-name files dired-buf) |
| 820 | (if arg | 820 | (if arg |
| 821 | (setq files (list (dired-get-filename))) | 821 | (setq files (list (dired-get-filename))) |
| 822 | (setq files (dired-get-marked-files))) | 822 | (setq files (dired-get-marked-files))) |
| @@ -918,7 +918,7 @@ FILE-TAGS is an alist in the following form: | |||
| 918 | "For all FILES, remove TAG from the image database." | 918 | "For all FILES, remove TAG from the image database." |
| 919 | (image-dired-sane-db-file) | 919 | (image-dired-sane-db-file) |
| 920 | (save-excursion | 920 | (save-excursion |
| 921 | (let (end buf start) | 921 | (let (end buf) |
| 922 | (setq buf (find-file image-dired-db-file)) | 922 | (setq buf (find-file image-dired-db-file)) |
| 923 | (if (not (listp files)) | 923 | (if (not (listp files)) |
| 924 | (if (stringp files) | 924 | (if (stringp files) |
| @@ -974,7 +974,7 @@ FILE-TAGS is an alist in the following form: | |||
| 974 | "Tag marked file(s) in dired. With prefix ARG, tag file at point." | 974 | "Tag marked file(s) in dired. With prefix ARG, tag file at point." |
| 975 | (interactive "P") | 975 | (interactive "P") |
| 976 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")) | 976 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")) |
| 977 | curr-file files) | 977 | files) |
| 978 | (if arg | 978 | (if arg |
| 979 | (setq files (list (dired-get-filename))) | 979 | (setq files (list (dired-get-filename))) |
| 980 | (setq files (dired-get-marked-files))) | 980 | (setq files (dired-get-marked-files))) |
| @@ -1598,7 +1598,7 @@ Note that n, p and <down> and <up> will be hijacked and bound to | |||
| 1598 | With prefix argument ARG, create thumbnails even if they already exist | 1598 | With prefix argument ARG, create thumbnails even if they already exist |
| 1599 | \(i.e. use this to refresh your thumbnails)." | 1599 | \(i.e. use this to refresh your thumbnails)." |
| 1600 | (interactive "P") | 1600 | (interactive "P") |
| 1601 | (let (curr-file thumb-name files count) | 1601 | (let (thumb-name files) |
| 1602 | (setq files (dired-get-marked-files)) | 1602 | (setq files (dired-get-marked-files)) |
| 1603 | (mapcar | 1603 | (mapcar |
| 1604 | (lambda (curr-file) | 1604 | (lambda (curr-file) |
| @@ -1906,7 +1906,7 @@ overwritten. This confirmation can be turned off using | |||
| 1906 | (if (not (image-dired-image-at-point-p)) | 1906 | (if (not (image-dired-image-at-point-p)) |
| 1907 | (message "No image at point") | 1907 | (message "No image at point") |
| 1908 | (let ((file (image-dired-original-file-name)) | 1908 | (let ((file (image-dired-original-file-name)) |
| 1909 | command temp-file) | 1909 | command) |
| 1910 | (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) | 1910 | (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) |
| 1911 | (error "Only JPEG images can be rotated!")) | 1911 | (error "Only JPEG images can be rotated!")) |
| 1912 | (setq command (format-spec | 1912 | (setq command (format-spec |
| @@ -2209,11 +2209,10 @@ non-nil." | |||
| 2209 | Track this in associated dired buffer if `image-dired-track-movement' is | 2209 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2210 | non-nil." | 2210 | non-nil." |
| 2211 | (interactive "e") | 2211 | (interactive "e") |
| 2212 | (let (file) | 2212 | (mouse-set-point event) |
| 2213 | (mouse-set-point event) | 2213 | (goto-char (posn-point (event-end event))) |
| 2214 | (goto-char (posn-point (event-end event))) | 2214 | (if image-dired-track-movement |
| 2215 | (if image-dired-track-movement | 2215 | (image-dired-track-original-file)) |
| 2216 | (image-dired-track-original-file))) | ||
| 2217 | (image-dired-display-thumb-properties)) | 2216 | (image-dired-display-thumb-properties)) |
| 2218 | 2217 | ||
| 2219 | (defun image-dired-mouse-toggle-mark (event) | 2218 | (defun image-dired-mouse-toggle-mark (event) |
| @@ -2221,11 +2220,10 @@ non-nil." | |||
| 2221 | Track this in associated dired buffer if `image-dired-track-movement' is | 2220 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2222 | non-nil." | 2221 | non-nil." |
| 2223 | (interactive "e") | 2222 | (interactive "e") |
| 2224 | (let (file) | 2223 | (mouse-set-point event) |
| 2225 | (mouse-set-point event) | 2224 | (goto-char (posn-point (event-end event))) |
| 2226 | (goto-char (posn-point (event-end event))) | 2225 | (if image-dired-track-movement |
| 2227 | (if image-dired-track-movement | 2226 | (image-dired-track-original-file)) |
| 2228 | (image-dired-track-original-file))) | ||
| 2229 | (image-dired-toggle-mark-thumb-original-file)) | 2227 | (image-dired-toggle-mark-thumb-original-file)) |
| 2230 | 2228 | ||
| 2231 | (defun image-dired-dired-display-properties () | 2229 | (defun image-dired-dired-display-properties () |
| @@ -2374,7 +2372,7 @@ it easier to generate, then HTML-files are created in | |||
| 2374 | when using per-directory thumbnail file storage")) | 2372 | when using per-directory thumbnail file storage")) |
| 2375 | (image-dired-create-gallery-lists) | 2373 | (image-dired-create-gallery-lists) |
| 2376 | (let ((tags image-dired-tag-file-list) | 2374 | (let ((tags image-dired-tag-file-list) |
| 2377 | count curr tag index-buf tag-buf | 2375 | count tag index-buf tag-buf |
| 2378 | comment file-tags tag-link tag-link-list) | 2376 | comment file-tags tag-link tag-link-list) |
| 2379 | ;; Make sure gallery root exist | 2377 | ;; Make sure gallery root exist |
| 2380 | (if (file-exists-p image-dired-gallery-dir) | 2378 | (if (file-exists-p image-dired-gallery-dir) |
| @@ -2533,7 +2531,7 @@ the operation by activating the Cancel button.\n\n") | |||
| 2533 | (widget-insert "\n") | 2531 | (widget-insert "\n") |
| 2534 | (widget-create 'push-button | 2532 | (widget-create 'push-button |
| 2535 | :notify | 2533 | :notify |
| 2536 | (lambda (&rest ignore) | 2534 | (lambda (&rest _ignore) |
| 2537 | (image-dired-save-information-from-widgets) | 2535 | (image-dired-save-information-from-widgets) |
| 2538 | (bury-buffer) | 2536 | (bury-buffer) |
| 2539 | (message "Done.")) | 2537 | (message "Done.")) |
| @@ -2541,7 +2539,7 @@ the operation by activating the Cancel button.\n\n") | |||
| 2541 | (widget-insert " ") | 2539 | (widget-insert " ") |
| 2542 | (widget-create 'push-button | 2540 | (widget-create 'push-button |
| 2543 | :notify | 2541 | :notify |
| 2544 | (lambda (&rest ignore) | 2542 | (lambda (&rest _ignore) |
| 2545 | (bury-buffer) | 2543 | (bury-buffer) |
| 2546 | (message "Operation canceled.")) | 2544 | (message "Operation canceled.")) |
| 2547 | "Cancel") | 2545 | "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." | |||
| 561 | (while (and tabs (>= (current-column) (car tabs))) | 561 | (while (and tabs (>= (current-column) (car tabs))) |
| 562 | (setq tabs (cdr tabs))) | 562 | (setq tabs (cdr tabs))) |
| 563 | (if tabs | 563 | (if tabs |
| 564 | (let ((opoint (point))) | 564 | (progn |
| 565 | (delete-horizontal-space t) | 565 | (delete-horizontal-space t) |
| 566 | (indent-to (car tabs))) | 566 | (indent-to (car tabs))) |
| 567 | (insert ?\s)))) | 567 | (insert ?\s)))) |
| 568 | 568 | ||
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." | |||
| 151 | (unless info-xref-in-progress | 151 | (unless info-xref-in-progress |
| 152 | (info-xref-output "done, %d good, %d bad, %d unavailable" | 152 | (info-xref-output "done, %d good, %d bad, %d unavailable" |
| 153 | info-xref-good info-xref-bad info-xref-unavail)))) | 153 | info-xref-good info-xref-bad info-xref-unavail)))) |
| 154 | 154 | ||
| 155 | (defun info-xref-output (fmt &rest args) | 155 | (defun info-xref-output (fmt &rest args) |
| 156 | "Emit a `format'-ed message FMT+ARGS to the `info-xref-output-buffer'." | 156 | "Emit a `format'-ed message FMT+ARGS to the `info-xref-output-buffer'." |
| 157 | (with-current-buffer info-xref-output-buffer | 157 | (with-current-buffer info-xref-output-buffer |
| @@ -200,7 +200,7 @@ buffer's line and column of point." | |||
| 200 | (save-excursion | 200 | (save-excursion |
| 201 | (save-window-excursion | 201 | (save-window-excursion |
| 202 | (prog1 | 202 | (prog1 |
| 203 | (condition-case err | 203 | (condition-case nil |
| 204 | (progn | 204 | (progn |
| 205 | (Info-goto-node node | 205 | (Info-goto-node node |
| 206 | (when (get-buffer "*info*") | 206 | (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 @@ | |||
| 31 | 31 | ||
| 32 | (declare-function texinfo-format-refill "texinfmt" ()) | 32 | (declare-function texinfo-format-refill "texinfmt" ()) |
| 33 | 33 | ||
| 34 | ;; From texinfmt.el | ||
| 35 | (defvar texinfo-command-start) | ||
| 36 | (defvar texinfo-command-end) | ||
| 37 | |||
| 34 | ;;;###autoload | 38 | ;;;###autoload |
| 35 | (defun Info-tagify (&optional input-buffer-name) | 39 | (defun Info-tagify (&optional input-buffer-name) |
| 36 | "Create or update Info file tag table in current buffer or in a region." | 40 | "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'." | |||
| 1058 | (isearch-done) | 1058 | (isearch-done) |
| 1059 | (isearch-clean-overlays)) | 1059 | (isearch-clean-overlays)) |
| 1060 | 1060 | ||
| 1061 | (defvar minibuffer-history-symbol) ;; from external package gmhist.el | ||
| 1061 | 1062 | ||
| 1062 | (defun isearch-edit-string () | 1063 | (defun isearch-edit-string () |
| 1063 | "Edit the search string in the minibuffer. | 1064 | "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 | |||
| 1077 | ;; this could be simplified greatly. | 1078 | ;; this could be simplified greatly. |
| 1078 | ;; Editing doesn't back up the search point. Should it? | 1079 | ;; Editing doesn't back up the search point. Should it? |
| 1079 | (interactive) | 1080 | (interactive) |
| 1080 | (condition-case err | 1081 | (condition-case nil |
| 1081 | (progn | 1082 | (progn |
| 1082 | (let ((isearch-nonincremental isearch-nonincremental) | 1083 | (let ((isearch-nonincremental isearch-nonincremental) |
| 1083 | 1084 | ||
| @@ -1122,7 +1123,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 1122 | ;; Actually terminate isearching until editing is done. | 1123 | ;; Actually terminate isearching until editing is done. |
| 1123 | ;; This is so that the user can do anything without failure, | 1124 | ;; This is so that the user can do anything without failure, |
| 1124 | ;; like switch buffers and start another isearch, and return. | 1125 | ;; like switch buffers and start another isearch, and return. |
| 1125 | (condition-case err | 1126 | (condition-case nil |
| 1126 | (isearch-done t t) | 1127 | (isearch-done t t) |
| 1127 | (exit nil)) ; was recursive editing | 1128 | (exit nil)) ; was recursive editing |
| 1128 | 1129 | ||
| @@ -2151,7 +2152,7 @@ If there is no completion possible, say so and continue searching." | |||
| 2151 | (isearch-message-suffix c-q-hack ellipsis))) | 2152 | (isearch-message-suffix c-q-hack ellipsis))) |
| 2152 | (if c-q-hack m (let ((message-log-max nil)) (message "%s" m))))) | 2153 | (if c-q-hack m (let ((message-log-max nil)) (message "%s" m))))) |
| 2153 | 2154 | ||
| 2154 | (defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) | 2155 | (defun isearch-message-prefix (&optional _c-q-hack ellipsis nonincremental) |
| 2155 | ;; If about to search, and previous search regexp was invalid, | 2156 | ;; If about to search, and previous search regexp was invalid, |
| 2156 | ;; check that it still is. If it is valid now, | 2157 | ;; check that it still is. If it is valid now, |
| 2157 | ;; let the message we display while searching say that it is valid. | 2158 | ;; 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." | |||
| 2184 | (propertize (concat (upcase (substring m 0 1)) (substring m 1)) | 2185 | (propertize (concat (upcase (substring m 0 1)) (substring m 1)) |
| 2185 | 'face 'minibuffer-prompt))) | 2186 | 'face 'minibuffer-prompt))) |
| 2186 | 2187 | ||
| 2187 | (defun isearch-message-suffix (&optional c-q-hack ellipsis) | 2188 | (defun isearch-message-suffix (&optional c-q-hack _ellipsis) |
| 2188 | (concat (if c-q-hack "^Q" "") | 2189 | (concat (if c-q-hack "^Q" "") |
| 2189 | (if isearch-error | 2190 | (if isearch-error |
| 2190 | (concat " [" isearch-error "]") | 2191 | (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." | |||
| 658 | (not (iswitchb-existing-buffer-p))) | 658 | (not (iswitchb-existing-buffer-p))) |
| 659 | (let ((virt (car iswitchb-virtual-buffers)) | 659 | (let ((virt (car iswitchb-virtual-buffers)) |
| 660 | (new-buf)) | 660 | (new-buf)) |
| 661 | ;; Keep the name of the buffer returned by find-file-noselect, as | 661 | ;; Keep the name of the buffer returned by find-file-noselect, as |
| 662 | ;; the buffer 'virt' could be a symlink to a file of a different name. | 662 | ;; the buffer 'virt' could be a symlink to a file of a different name. |
| 663 | (setq new-buf (buffer-name (find-file-noselect (cdr virt)))) | 663 | (setq new-buf (buffer-name (find-file-noselect (cdr virt)))) |
| 664 | (setq iswitchb-matches (list new-buf) | 664 | (setq iswitchb-matches (list new-buf) |
| @@ -1015,7 +1015,7 @@ Return the modified list with the last element prepended to it." | |||
| 1015 | (display-completion-list (or iswitchb-matches iswitchb-buflist) | 1015 | (display-completion-list (or iswitchb-matches iswitchb-buflist) |
| 1016 | :help-string "iswitchb " | 1016 | :help-string "iswitchb " |
| 1017 | :activate-callback | 1017 | :activate-callback |
| 1018 | (lambda (x y z) | 1018 | (lambda (_x _y _z) |
| 1019 | (message "doesn't work yet, sorry!"))) | 1019 | (message "doesn't work yet, sorry!"))) |
| 1020 | ;; else running Emacs | 1020 | ;; else running Emacs |
| 1021 | (display-completion-list (or iswitchb-matches iswitchb-buflist)))) | 1021 | (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 `/'." | |||
| 247 | :type 'string | 247 | :type 'string |
| 248 | :group 'jka-compr) | 248 | :group 'jka-compr) |
| 249 | 249 | ||
| 250 | (defun jka-compr-make-temp-name (&optional local-copy) | 250 | (defun jka-compr-make-temp-name (&optional _local-copy) |
| 251 | "This routine will return the name of a new file." | 251 | "This routine will return the name of a new file." |
| 252 | (make-temp-file jka-compr-temp-name-template)) | 252 | (make-temp-file jka-compr-temp-name-template)) |
| 253 | 253 | ||
| @@ -572,7 +572,7 @@ There should be no more than seven characters after the final `/'." | |||
| 572 | 572 | ||
| 573 | 573 | ||
| 574 | ;; Support for loading compressed files. | 574 | ;; Support for loading compressed files. |
| 575 | (defun jka-compr-load (file &optional noerror nomessage nosuffix) | 575 | (defun jka-compr-load (file &optional noerror nomessage _nosuffix) |
| 576 | "Documented as original." | 576 | "Documented as original." |
| 577 | 577 | ||
| 578 | (let* ((local-copy (jka-compr-file-local-copy file)) | 578 | (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." | |||
| 479 | (kmacro-display (car (car kmacro-ring)) "2nd macro"))) | 479 | (kmacro-display (car (car kmacro-ring)) "2nd macro"))) |
| 480 | 480 | ||
| 481 | 481 | ||
| 482 | (defun kmacro-cycle-ring-next (&optional arg) | 482 | (defun kmacro-cycle-ring-next (&optional _arg) |
| 483 | "Move to next keyboard macro in keyboard macro ring. | 483 | "Move to next keyboard macro in keyboard macro ring. |
| 484 | Displays the selected macro in the echo area." | 484 | Displays the selected macro in the echo area." |
| 485 | (interactive) | 485 | (interactive) |
| @@ -498,7 +498,7 @@ Displays the selected macro in the echo area." | |||
| 498 | (put 'kmacro-cycle-ring-next 'kmacro-repeat 'ring) | 498 | (put 'kmacro-cycle-ring-next 'kmacro-repeat 'ring) |
| 499 | 499 | ||
| 500 | 500 | ||
| 501 | (defun kmacro-cycle-ring-previous (&optional arg) | 501 | (defun kmacro-cycle-ring-previous (&optional _arg) |
| 502 | "Move to previous keyboard macro in keyboard macro ring. | 502 | "Move to previous keyboard macro in keyboard macro ring. |
| 503 | Displays the selected macro in the echo area." | 503 | Displays the selected macro in the echo area." |
| 504 | (interactive) | 504 | (interactive) |
| @@ -526,7 +526,7 @@ Displays the selected macro in the echo area." | |||
| 526 | (kmacro-display last-kbd-macro t))) | 526 | (kmacro-display last-kbd-macro t))) |
| 527 | 527 | ||
| 528 | 528 | ||
| 529 | (defun kmacro-delete-ring-head (&optional arg) | 529 | (defun kmacro-delete-ring-head (&optional _arg) |
| 530 | "Delete current macro from keyboard macro ring." | 530 | "Delete current macro from keyboard macro ring." |
| 531 | (interactive) | 531 | (interactive) |
| 532 | (unless (kmacro-ring-empty-p t) | 532 | (unless (kmacro-ring-empty-p t) |
| @@ -777,7 +777,7 @@ If kbd macro currently being defined end it before activating it." | |||
| 777 | mac)) | 777 | mac)) |
| 778 | 778 | ||
| 779 | 779 | ||
| 780 | (defun kmacro-bind-to-key (arg) | 780 | (defun kmacro-bind-to-key (_arg) |
| 781 | "When not defining or executing a macro, offer to bind last macro to a key. | 781 | "When not defining or executing a macro, offer to bind last macro to a key. |
| 782 | The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A] | 782 | The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A] |
| 783 | through [C-x C-k Z] are reserved for user bindings, and to bind to | 783 | 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 | |||
| 837 | (put symbol 'kmacro t)) | 837 | (put symbol 'kmacro t)) |
| 838 | 838 | ||
| 839 | 839 | ||
| 840 | (defun kmacro-view-macro (&optional arg) | 840 | (defun kmacro-view-macro (&optional _arg) |
| 841 | "Display the last keyboard macro. | 841 | "Display the last keyboard macro. |
| 842 | If repeated, it shows previous elements in the macro ring." | 842 | If repeated, it shows previous elements in the macro ring." |
| 843 | (interactive) | 843 | (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. | |||
| 588 | (message "This command only works inside main listing."))) | 588 | (message "This command only works inside main listing."))) |
| 589 | 589 | ||
| 590 | ;; From Stephen Eglen <stephen@cns.ed.ac.uk> | 590 | ;; From Stephen Eglen <stephen@cns.ed.ac.uk> |
| 591 | (defun locate-update (ignore1 ignore2) | 591 | (defun locate-update (_ignore1 _ignore2) |
| 592 | "Revert the *Locate* buffer. | 592 | "Revert the *Locate* buffer. |
| 593 | If `locate-update-when-revert' is non-nil, offer to update the | 593 | If `locate-update-when-revert' is non-nil, offer to update the |
| 594 | locate database using the shell command in `locate-update-command'." | 594 | 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." | |||
| 370 | "Turn all newlines in the buffer into hard newlines." | 370 | "Turn all newlines in the buffer into hard newlines." |
| 371 | (longlines-decode-region (point-min) (point-max))) | 371 | (longlines-decode-region (point-min) (point-max))) |
| 372 | 372 | ||
| 373 | (defun longlines-encode-region (beg end &optional buffer) | 373 | (defun longlines-encode-region (beg end &optional _buffer) |
| 374 | "Replace each soft newline between BEG and END with exactly one space. | 374 | "Replace each soft newline between BEG and END with exactly one space. |
| 375 | Hard newlines are left intact. The optional argument BUFFER exists for | 375 | Hard newlines are left intact. The optional argument BUFFER exists for |
| 376 | compatibility with `format-alist', and is ignored." | 376 | compatibility with `format-alist', and is ignored." |
| @@ -413,7 +413,7 @@ If automatic line wrapping is turned on, wrap the entire buffer." | |||
| 413 | (setq longlines-auto-wrap nil) | 413 | (setq longlines-auto-wrap nil) |
| 414 | (message "Auto wrap disabled."))) | 414 | (message "Auto wrap disabled."))) |
| 415 | 415 | ||
| 416 | (defun longlines-after-change-function (beg end len) | 416 | (defun longlines-after-change-function (beg end _len) |
| 417 | "Update `longlines-wrap-beg' and `longlines-wrap-end'. | 417 | "Update `longlines-wrap-beg' and `longlines-wrap-end'. |
| 418 | This is called by `after-change-functions' to keep track of the region | 418 | This is called by `after-change-functions' to keep track of the region |
| 419 | that has changed." | 419 | 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." | |||
| 329 | (max-gid-len 0) | 329 | (max-gid-len 0) |
| 330 | (max-file-size 0) | 330 | (max-file-size 0) |
| 331 | ;; do all bindings here for speed | 331 | ;; do all bindings here for speed |
| 332 | total-line files elt short file-size fil attr | 332 | total-line files elt short file-size attr |
| 333 | fuid fgid uid-len gid-len) | 333 | fuid fgid uid-len gid-len) |
| 334 | (cond ((memq ?A switches) | 334 | (cond ((memq ?A switches) |
| 335 | (setq file-alist | 335 | (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." | |||
| 127 | (delete-region (point) (1+ (point))) | 127 | (delete-region (point) (1+ (point))) |
| 128 | (insert "\\M-\\C-?")))))) | 128 | (insert "\\M-\\C-?")))))) |
| 129 | (if (vectorp definition) | 129 | (if (vectorp definition) |
| 130 | (let ((len (length definition)) (i 0) char mods) | 130 | (let ((len (length definition)) (i 0) char) |
| 131 | (while (< i len) | 131 | (while (< i len) |
| 132 | (insert (if (zerop i) ?\[ ?\s)) | 132 | (insert (if (zerop i) ?\[ ?\s)) |
| 133 | (setq char (aref definition i) | 133 | (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." | |||
| 85 | 85 | ||
| 86 | (defun double-column (start end) | 86 | (defun double-column (start end) |
| 87 | (interactive "r") | 87 | (interactive "r") |
| 88 | (let (half cnt | 88 | (let (half line lines nlines |
| 89 | line lines nlines | ||
| 90 | (from-end (- (point-max) end))) | 89 | (from-end (- (point-max) end))) |
| 91 | (setq nlines (count-lines start end)) | 90 | (setq nlines (count-lines start end)) |
| 92 | (if (<= nlines 1) | 91 | (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." | |||
| 201 | `(lambda (cmd) | 201 | `(lambda (cmd) |
| 202 | (multi-isearch-pop-state cmd ,(current-buffer)))) | 202 | (multi-isearch-pop-state cmd ,(current-buffer)))) |
| 203 | 203 | ||
| 204 | (defun multi-isearch-pop-state (cmd buffer) | 204 | (defun multi-isearch-pop-state (_cmd buffer) |
| 205 | "Restore the multiple buffers search state. | 205 | "Restore the multiple buffers search state. |
| 206 | Switch to the buffer restored from the search status stack." | 206 | Switch to the buffer restored from the search status stack." |
| 207 | (unless (equal buffer (current-buffer)) | 207 | (unless (equal buffer (current-buffer)) |
| @@ -224,6 +224,8 @@ set in `multi-isearch-buffers' or `multi-isearch-buffers-regexp'." | |||
| 224 | (car buffers) | 224 | (car buffers) |
| 225 | (cadr (member buffer buffers))))) | 225 | (cadr (member buffer buffers))))) |
| 226 | 226 | ||
| 227 | (defvar ido-ignore-item-temp-list) ; from ido.el | ||
| 228 | |||
| 227 | (defun multi-isearch-read-buffers () | 229 | (defun multi-isearch-read-buffers () |
| 228 | "Return a list of buffers specified interactively, one by one." | 230 | "Return a list of buffers specified interactively, one by one." |
| 229 | ;; Most code from `multi-occur'. | 231 | ;; 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: | |||
| 214 | (start-row (cdr (posn-col-row start-posn))) | 214 | (start-row (cdr (posn-col-row start-posn))) |
| 215 | (start-col (car (posn-col-row start-posn))) | 215 | (start-col (car (posn-col-row start-posn))) |
| 216 | (old-selected-window (selected-window)) | 216 | (old-selected-window (selected-window)) |
| 217 | event end row mouse-delta scroll-delta | 217 | event end row scroll-delta |
| 218 | have-scrolled | 218 | have-scrolled |
| 219 | window-last-row | 219 | col |
| 220 | col mouse-col-delta window-last-col | ||
| 221 | (scroll-col-delta 0) | 220 | (scroll-col-delta 0) |
| 222 | adjusted-mouse-col-delta | ||
| 223 | adjusted-mouse-delta | ||
| 224 | ;; be conservative about allowing horizontal scrolling | 221 | ;; be conservative about allowing horizontal scrolling |
| 225 | (col-scrolling-p (mouse-drag-should-do-col-scrolling))) | 222 | (col-scrolling-p (mouse-drag-should-do-col-scrolling))) |
| 226 | (select-window start-window) | 223 | (select-window start-window) |
| @@ -275,10 +272,10 @@ To test this function, evaluate: | |||
| 275 | (start-row (cdr (posn-col-row start-posn))) | 272 | (start-row (cdr (posn-col-row start-posn))) |
| 276 | (start-col (car (posn-col-row start-posn))) | 273 | (start-col (car (posn-col-row start-posn))) |
| 277 | (old-selected-window (selected-window)) | 274 | (old-selected-window (selected-window)) |
| 278 | event end row mouse-delta scroll-delta | 275 | event end row scroll-delta |
| 279 | have-scrolled | 276 | have-scrolled |
| 280 | window-last-row | 277 | window-last-row |
| 281 | col mouse-col-delta window-last-col | 278 | col window-last-col |
| 282 | (scroll-col-delta 0) | 279 | (scroll-col-delta 0) |
| 283 | ;; be conservative about allowing horizontal scrolling | 280 | ;; be conservative about allowing horizontal scrolling |
| 284 | (col-scrolling-p (mouse-drag-should-do-col-scrolling))) | 281 | (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." | |||
| 548 | (let* ((thing-symbol (mouse-sel-selection-thing selection)) | 548 | (let* ((thing-symbol (mouse-sel-selection-thing selection)) |
| 549 | (overlay (mouse-sel-selection-overlay selection)) | 549 | (overlay (mouse-sel-selection-overlay selection)) |
| 550 | (orig-window (selected-window)) | 550 | (orig-window (selected-window)) |
| 551 | (orig-window-frame (window-frame orig-window)) | ||
| 552 | (top (nth 1 (window-edges orig-window))) | 551 | (top (nth 1 (window-edges orig-window))) |
| 553 | (bottom (nth 3 (window-edges orig-window))) | 552 | (bottom (nth 3 (window-edges orig-window))) |
| 554 | (mark-active nil) ; inhibit normal region highlight | 553 | (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." | |||
| 800 | ;; Function to be set as an outline-isearch-open-invisible' property | 800 | ;; Function to be set as an outline-isearch-open-invisible' property |
| 801 | ;; to the overlay that makes the outline invisible (see | 801 | ;; to the overlay that makes the outline invisible (see |
| 802 | ;; `outline-flag-region'). | 802 | ;; `outline-flag-region'). |
| 803 | (defun outline-isearch-open-invisible (overlay) | 803 | (defun outline-isearch-open-invisible (_overlay) |
| 804 | ;; We rely on the fact that isearch places point on the matched text. | 804 | ;; We rely on the fact that isearch places point on the matched text. |
| 805 | (show-entry)) | 805 | (show-entry)) |
| 806 | 806 | ||
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." | |||
| 348 | (defvar pcomplete-show-list nil) | 348 | (defvar pcomplete-show-list nil) |
| 349 | (defvar pcomplete-expand-only-p nil) | 349 | (defvar pcomplete-expand-only-p nil) |
| 350 | 350 | ||
| 351 | ;; for the sake of the bye-compiler, when compiling other files that | ||
| 352 | ;; contain completion functions | ||
| 353 | (defvar pcomplete-args nil) | ||
| 354 | (defvar pcomplete-begins nil) | ||
| 355 | (defvar pcomplete-last nil) | ||
| 356 | (defvar pcomplete-index nil) | ||
| 357 | (defvar pcomplete-stub nil) | ||
| 358 | (defvar pcomplete-seen nil) | ||
| 359 | (defvar pcomplete-norm-func nil) | ||
| 360 | |||
| 351 | ;;; User Functions: | 361 | ;;; User Functions: |
| 352 | 362 | ||
| 353 | ;;; Alternative front-end using the standard completion facilities. | 363 | ;;; 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)." | |||
| 439 | (if (string-match re c) | 449 | (if (string-match re c) |
| 440 | (substring c (match-end 0)))) | 450 | (substring c (match-end 0)))) |
| 441 | res)))))))))) | 451 | res)))))))))) |
| 442 | 452 | ||
| 443 | ;; I don't think such commands are usable before first setting up buffer-local | 453 | ;; I don't think such commands are usable before first setting up buffer-local |
| 444 | ;; variables to parse args, so there's no point autoloading it. | 454 | ;; variables to parse args, so there's no point autoloading it. |
| 445 | ;; ;;;###autoload | 455 | ;; ;;;###autoload |
| @@ -468,7 +478,7 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 468 | ;; pcomplete-parse-arguments-function does, that connection | 478 | ;; pcomplete-parse-arguments-function does, that connection |
| 469 | ;; might not be that close. E.g. in eshell, | 479 | ;; might not be that close. E.g. in eshell, |
| 470 | ;; pcomplete-parse-arguments-function expands envvars. | 480 | ;; pcomplete-parse-arguments-function expands envvars. |
| 471 | ;; | 481 | ;; |
| 472 | ;; Since we use minibuffer-complete, which doesn't know | 482 | ;; Since we use minibuffer-complete, which doesn't know |
| 473 | ;; pcomplete-stub and works from the buffer's text instead, | 483 | ;; pcomplete-stub and works from the buffer's text instead, |
| 474 | ;; we need to trick minibuffer-complete, into using | 484 | ;; we need to trick minibuffer-complete, into using |
| @@ -647,17 +657,6 @@ This will modify the current buffer." | |||
| 647 | ;;; Internal Functions: | 657 | ;;; Internal Functions: |
| 648 | 658 | ||
| 649 | ;; argument handling | 659 | ;; argument handling |
| 650 | |||
| 651 | ;; for the sake of the bye-compiler, when compiling other files that | ||
| 652 | ;; contain completion functions | ||
| 653 | (defvar pcomplete-args nil) | ||
| 654 | (defvar pcomplete-begins nil) | ||
| 655 | (defvar pcomplete-last nil) | ||
| 656 | (defvar pcomplete-index nil) | ||
| 657 | (defvar pcomplete-stub nil) | ||
| 658 | (defvar pcomplete-seen nil) | ||
| 659 | (defvar pcomplete-norm-func nil) | ||
| 660 | |||
| 661 | (defun pcomplete-arg (&optional index offset) | 660 | (defun pcomplete-arg (&optional index offset) |
| 662 | "Return the textual content of the INDEXth argument. | 661 | "Return the textual content of the INDEXth argument. |
| 663 | INDEX is based from the current processing position. If INDEX is | 662 | 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." | |||
| 995 | (pcomplete-next-arg) | 994 | (pcomplete-next-arg) |
| 996 | (funcall sym))))))) | 995 | (funcall sym))))))) |
| 997 | 996 | ||
| 998 | (defun pcomplete-opt (options &optional prefix no-ganging args-follow) | 997 | (defun pcomplete-opt (options &optional prefix _no-ganging _args-follow) |
| 999 | "Complete a set of OPTIONS, each beginning with PREFIX (?- by default). | 998 | "Complete a set of OPTIONS, each beginning with PREFIX (?- by default). |
| 1000 | PREFIX may be t, in which case no PREFIX character is necessary. | 999 | PREFIX may be t, in which case no PREFIX character is necessary. |
| 1001 | If NO-GANGING is non-nil, each option is separate (-xy is not allowed). | 1000 | If NO-GANGING is non-nil, each option is separate (-xy is not allowed). |
| 1002 | If ARGS-FOLLOW is non-nil, then options which take arguments may have | 1001 | If ARGS-FOLLOW is non-nil, then options which take arguments may have |
| 1003 | the argument appear after a ganged set of options. This is how tar | 1002 | the argument appear after a ganged set of options. This is how tar |
| 1004 | behaves, for example." | 1003 | behaves, for example. |
| 1004 | Arguments NO-GANGING and ARGS-FOLLOW are currently ignored." | ||
| 1005 | (if (and (= pcomplete-index pcomplete-last) | 1005 | (if (and (= pcomplete-index pcomplete-last) |
| 1006 | (string= (pcomplete-arg) "-")) | 1006 | (string= (pcomplete-arg) "-")) |
| 1007 | (let ((len (length options)) | 1007 | (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 | |||
| 1676 | (message (if revert "Updating process information...done." | 1676 | (message (if revert "Updating process information...done." |
| 1677 | "Updating process display...done."))))) | 1677 | "Updating process display...done."))))) |
| 1678 | 1678 | ||
| 1679 | (defun proced-revert (&rest args) | 1679 | (defun proced-revert (&rest _args) |
| 1680 | "Reevaluate the process listing based on the currently running processes. | 1680 | "Reevaluate the process listing based on the currently running processes. |
| 1681 | Preserves point and marks." | 1681 | Preserves point and marks." |
| 1682 | (proced-update t)) | 1682 | (proced-update t)) |
| @@ -1770,7 +1770,7 @@ After sending the signal, this command runs the normal hook | |||
| 1770 | (number-to-string signal) signal)))) | 1770 | (number-to-string signal) signal)))) |
| 1771 | (dolist (process process-alist) | 1771 | (dolist (process process-alist) |
| 1772 | (with-temp-buffer | 1772 | (with-temp-buffer |
| 1773 | (condition-case err | 1773 | (condition-case nil |
| 1774 | (if (zerop (call-process | 1774 | (if (zerop (call-process |
| 1775 | proced-signal-function nil t nil | 1775 | proced-signal-function nil t nil |
| 1776 | signal (number-to-string (car process)))) | 1776 | 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 @@ | |||
| 32 | ;;; Code: | 32 | ;;; Code: |
| 33 | 33 | ||
| 34 | (eval-and-compile | 34 | (eval-and-compile |
| 35 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | 35 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) |
| 36 | 36 | ||
| 37 | (declare-function ps-plot-with-face "ps-print" (from to face)) | 37 | (declare-function ps-plot-with-face "ps-print" (from to face)) |
| 38 | (declare-function ps-plot-string "ps-print" (string)) | 38 | (declare-function ps-plot-string "ps-print" (string)) |
| @@ -60,13 +60,13 @@ | |||
| 60 | ;; ps-mule | 60 | ;; ps-mule |
| 61 | 61 | ||
| 62 | (or (fboundp 'charset-dimension) | 62 | (or (fboundp 'charset-dimension) |
| 63 | (defun charset-dimension (charset) 1)) ; ascii | 63 | (defun charset-dimension (_charset) 1)) ; ascii |
| 64 | 64 | ||
| 65 | (or (fboundp 'char-width) | 65 | (or (fboundp 'char-width) |
| 66 | (defun char-width (char) 1)) ; ascii | 66 | (defun char-width (_char) 1)) ; ascii |
| 67 | 67 | ||
| 68 | (or (fboundp 'encode-char) | 68 | (or (fboundp 'encode-char) |
| 69 | (defun encode-char (ch ccs) | 69 | (defun encode-char (ch _ccs) |
| 70 | ch)) | 70 | ch)) |
| 71 | 71 | ||
| 72 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 72 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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." | |||
| 632 | (ps-output "]")))))) | 632 | (ps-output "]")))))) |
| 633 | (ps-output " ] " (if (nth 3 composition) "RLC" "RBC") "\n")) | 633 | (ps-output " ] " (if (nth 3 composition) "RLC" "RBC") "\n")) |
| 634 | 634 | ||
| 635 | (defun ps-mule-plot-string (from to &optional bg-color) | 635 | (defun ps-mule-plot-string (from to &optional _bg-color) |
| 636 | "Generate PostScript code for plotting characters in the region FROM and TO. | 636 | "Generate PostScript code for plotting characters in the region FROM and TO. |
| 637 | 637 | ||
| 638 | Optional argument BG-COLOR is ignored. | 638 | 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 | |||
| 4592 | ps-print-height)))))) | 4592 | ps-print-height)))))) |
| 4593 | 4593 | ||
| 4594 | 4594 | ||
| 4595 | (defun ps-print-preprint-region (prefix-arg) | 4595 | (defun ps-print-preprint-region (prefix) |
| 4596 | (or (ps-mark-active-p) | 4596 | (or (ps-mark-active-p) |
| 4597 | (error "The mark is not set now")) | 4597 | (error "The mark is not set now")) |
| 4598 | (list (point) (mark) (ps-print-preprint prefix-arg))) | 4598 | (list (point) (mark) (ps-print-preprint prefix))) |
| 4599 | 4599 | ||
| 4600 | 4600 | ||
| 4601 | (defun ps-print-preprint (prefix-arg) | 4601 | (defun ps-print-preprint (prefix) |
| 4602 | (and prefix-arg | 4602 | (and prefix |
| 4603 | (or (numberp prefix-arg) | 4603 | (or (numberp prefix) |
| 4604 | (listp prefix-arg)) | 4604 | (listp prefix)) |
| 4605 | (let* ((name (concat (file-name-nondirectory (or (buffer-file-name) | 4605 | (let* ((name (concat (file-name-nondirectory (or (buffer-file-name) |
| 4606 | (buffer-name))) | 4606 | (buffer-name))) |
| 4607 | ".ps")) | 4607 | ".ps")) |
| @@ -6020,7 +6020,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 6020 | (ps-output " S\n") | 6020 | (ps-output " S\n") |
| 6021 | wrappoint)) | 6021 | wrappoint)) |
| 6022 | 6022 | ||
| 6023 | (defun ps-basic-plot-string (from to &optional bg-color) | 6023 | (defun ps-basic-plot-string (from to &optional _bg-color) |
| 6024 | (let* ((wrappoint (ps-find-wrappoint from to | 6024 | (let* ((wrappoint (ps-find-wrappoint from to |
| 6025 | (ps-avg-char-width 'ps-font-for-text))) | 6025 | (ps-avg-char-width 'ps-font-for-text))) |
| 6026 | (to (car wrappoint)) | 6026 | (to (car wrappoint)) |
| @@ -6029,7 +6029,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 6029 | (ps-output " S\n") | 6029 | (ps-output " S\n") |
| 6030 | wrappoint)) | 6030 | wrappoint)) |
| 6031 | 6031 | ||
| 6032 | (defun ps-basic-plot-whitespace (from to &optional bg-color) | 6032 | (defun ps-basic-plot-whitespace (from to &optional _bg-color) |
| 6033 | (let* ((wrappoint (ps-find-wrappoint from to | 6033 | (let* ((wrappoint (ps-find-wrappoint from to |
| 6034 | (ps-space-width 'ps-font-for-text))) | 6034 | (ps-space-width 'ps-font-for-text))) |
| 6035 | (to (car wrappoint))) | 6035 | (to (car wrappoint))) |
| @@ -6658,7 +6658,7 @@ If FACE is not a valid face name, use default face." | |||
| 6658 | ;; But autoload them here to make the separation invisible. | 6658 | ;; But autoload them here to make the separation invisible. |
| 6659 | 6659 | ||
| 6660 | ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize | 6660 | ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize |
| 6661 | ;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "14536f28e0dcaa956901bb59ad86a875") | 6661 | ;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "179b43ee432338186dde9e8c4fe761af") |
| 6662 | ;;; Generated autoloads from ps-mule.el | 6662 | ;;; Generated autoloads from ps-mule.el |
| 6663 | 6663 | ||
| 6664 | (defvar ps-multibyte-buffer nil "\ | 6664 | (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)." | |||
| 590 | ;; Count the number of assigned menu shortcuts. | 590 | ;; Count the number of assigned menu shortcuts. |
| 591 | (defvar recentf-menu-shortcuts) | 591 | (defvar recentf-menu-shortcuts) |
| 592 | 592 | ||
| 593 | (defun recentf-make-menu-items (&optional menu) | 593 | (defun recentf-make-menu-items (&optional _menu) |
| 594 | "Make menu items from the recent list. | 594 | "Make menu items from the recent list. |
| 595 | This is a menu filter function which ignores the MENU argument." | 595 | This is a menu filter function which ignores the MENU argument." |
| 596 | (setq recentf-menu-filter-commands nil) | 596 | (setq recentf-menu-filter-commands nil) |
| @@ -1036,7 +1036,7 @@ That is, remove a non kept file from the recent list." | |||
| 1036 | 1036 | ||
| 1037 | ;;; Common dialog stuff | 1037 | ;;; Common dialog stuff |
| 1038 | ;; | 1038 | ;; |
| 1039 | (defun recentf-cancel-dialog (&rest ignore) | 1039 | (defun recentf-cancel-dialog (&rest _ignore) |
| 1040 | "Cancel the current dialog. | 1040 | "Cancel the current dialog. |
| 1041 | IGNORE arguments." | 1041 | IGNORE arguments." |
| 1042 | (interactive) | 1042 | (interactive) |
| @@ -1092,7 +1092,7 @@ Go to the beginning of buffer if not found." | |||
| 1092 | ;; | 1092 | ;; |
| 1093 | (defvar recentf-edit-list nil) | 1093 | (defvar recentf-edit-list nil) |
| 1094 | 1094 | ||
| 1095 | (defun recentf-edit-list-select (widget &rest ignore) | 1095 | (defun recentf-edit-list-select (widget &rest _ignore) |
| 1096 | "Toggle a file selection based on the checkbox WIDGET state. | 1096 | "Toggle a file selection based on the checkbox WIDGET state. |
| 1097 | IGNORE other arguments." | 1097 | IGNORE other arguments." |
| 1098 | (let ((value (widget-get widget :tag)) | 1098 | (let ((value (widget-get widget :tag)) |
| @@ -1102,7 +1102,7 @@ IGNORE other arguments." | |||
| 1102 | (setq recentf-edit-list (delq value recentf-edit-list))) | 1102 | (setq recentf-edit-list (delq value recentf-edit-list))) |
| 1103 | (message "%s %sselected" value (if check "" "un")))) | 1103 | (message "%s %sselected" value (if check "" "un")))) |
| 1104 | 1104 | ||
| 1105 | (defun recentf-edit-list-validate (&rest ignore) | 1105 | (defun recentf-edit-list-validate (&rest _ignore) |
| 1106 | "Process the recent list when the edit list dialog is committed. | 1106 | "Process the recent list when the edit list dialog is committed. |
| 1107 | IGNORE arguments." | 1107 | IGNORE arguments." |
| 1108 | (if recentf-edit-list | 1108 | (if recentf-edit-list |
| @@ -1146,7 +1146,7 @@ Click on Cancel or type `q' to cancel.\n") | |||
| 1146 | 1146 | ||
| 1147 | ;;; Open file dialog | 1147 | ;;; Open file dialog |
| 1148 | ;; | 1148 | ;; |
| 1149 | (defun recentf-open-files-action (widget &rest ignore) | 1149 | (defun recentf-open-files-action (widget &rest _ignore) |
| 1150 | "Open the file stored in WIDGET's value when notified. | 1150 | "Open the file stored in WIDGET's value when notified. |
| 1151 | IGNORE other arguments." | 1151 | IGNORE other arguments." |
| 1152 | (kill-buffer (current-buffer)) | 1152 | (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." | |||
| 281 | (= (point) (point-at-eol))) | 281 | (= (point) (point-at-eol))) |
| 282 | (indent-to endcol)))) | 282 | (indent-to endcol)))) |
| 283 | 283 | ||
| 284 | (defun delete-whitespace-rectangle-line (startcol endcol fill) | 284 | (defun delete-whitespace-rectangle-line (startcol _endcol fill) |
| 285 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) | 285 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
| 286 | (unless (= (point) (point-at-eol)) | 286 | (unless (= (point) (point-at-eol)) |
| 287 | (delete-region (point) (progn (skip-syntax-forward " ") (point)))))) | 287 | (delete-region (point) (progn (skip-syntax-forward " ") (point)))))) |
| @@ -373,7 +373,7 @@ rectangle which were empty." | |||
| 373 | ;; Line numbers for `rectangle-number-line-callback'. | 373 | ;; Line numbers for `rectangle-number-line-callback'. |
| 374 | (defvar rectangle-number-line-counter) | 374 | (defvar rectangle-number-line-counter) |
| 375 | 375 | ||
| 376 | (defun rectangle-number-line-callback (start end format-string) | 376 | (defun rectangle-number-line-callback (start _end format-string) |
| 377 | (move-to-column start t) | 377 | (move-to-column start t) |
| 378 | (insert (format format-string rectangle-number-line-counter)) | 378 | (insert (format format-string rectangle-number-line-counter)) |
| 379 | (setq rectangle-number-line-counter | 379 | (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." | |||
| 88 | (if arg (list (current-frame-configuration) (point-marker)) | 88 | (if arg (list (current-frame-configuration) (point-marker)) |
| 89 | (point-marker)))) | 89 | (point-marker)))) |
| 90 | 90 | ||
| 91 | (defun window-configuration-to-register (register &optional arg) | 91 | (defun window-configuration-to-register (register &optional _arg) |
| 92 | "Store the window configuration of the selected frame in register REGISTER. | 92 | "Store the window configuration of the selected frame in register REGISTER. |
| 93 | Use \\[jump-to-register] to restore the configuration. | 93 | Use \\[jump-to-register] to restore the configuration. |
| 94 | Argument is a character, naming the register." | 94 | Argument is a character, naming the register." |
| @@ -97,7 +97,7 @@ Argument is a character, naming the register." | |||
| 97 | ;; of point in the current buffer, so record that separately. | 97 | ;; of point in the current buffer, so record that separately. |
| 98 | (set-register register (list (current-window-configuration) (point-marker)))) | 98 | (set-register register (list (current-window-configuration) (point-marker)))) |
| 99 | 99 | ||
| 100 | (defun frame-configuration-to-register (register &optional arg) | 100 | (defun frame-configuration-to-register (register &optional _arg) |
| 101 | "Store the window configuration of all frames in register REGISTER. | 101 | "Store the window configuration of all frames in register REGISTER. |
| 102 | Use \\[jump-to-register] to restore the configuration. | 102 | Use \\[jump-to-register] to restore the configuration. |
| 103 | Argument is a character, naming the register." | 103 | 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 | |||
| 98 | :group 'matching | 98 | :group 'matching |
| 99 | :version "22.1") | 99 | :version "22.1") |
| 100 | 100 | ||
| 101 | (defvar replace-count 0 | ||
| 102 | "Number of replacements done so far. | ||
| 103 | See `replace-regexp' and `query-replace-regexp-eval'.") | ||
| 104 | |||
| 101 | (defun query-replace-descr (string) | 105 | (defun query-replace-descr (string) |
| 102 | (mapconcat 'isearch-text-char-description string "")) | 106 | (mapconcat 'isearch-text-char-description string "")) |
| 103 | 107 | ||
| @@ -849,7 +853,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. | |||
| 849 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 853 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) |
| 850 | (setq next-error-function 'occur-next-error)) | 854 | (setq next-error-function 'occur-next-error)) |
| 851 | 855 | ||
| 852 | (defun occur-revert-function (ignore1 ignore2) | 856 | (defun occur-revert-function (_ignore1 _ignore2) |
| 853 | "Handle `revert-buffer' for Occur mode buffers." | 857 | "Handle `revert-buffer' for Occur mode buffers." |
| 854 | (apply 'occur-1 (append occur-revert-arguments (list (buffer-name))))) | 858 | (apply 'occur-1 (append occur-revert-arguments (list (buffer-name))))) |
| 855 | 859 | ||
| @@ -1069,6 +1073,8 @@ are not modified." | |||
| 1069 | (interactive (occur-read-primary-args)) | 1073 | (interactive (occur-read-primary-args)) |
| 1070 | (occur-1 regexp nlines (list (current-buffer)))) | 1074 | (occur-1 regexp nlines (list (current-buffer)))) |
| 1071 | 1075 | ||
| 1076 | (defvar ido-ignore-item-temp-list) | ||
| 1077 | |||
| 1072 | (defun multi-occur (bufs regexp &optional nlines) | 1078 | (defun multi-occur (bufs regexp &optional nlines) |
| 1073 | "Show all lines in buffers BUFS containing a match for REGEXP. | 1079 | "Show all lines in buffers BUFS containing a match for REGEXP. |
| 1074 | This function acts on multiple buffers; otherwise, it is exactly like | 1080 | This function acts on multiple buffers; otherwise, it is exactly like |
| @@ -1204,11 +1210,12 @@ See also `multi-occur'." | |||
| 1204 | (set-buffer-modified-p nil) | 1210 | (set-buffer-modified-p nil) |
| 1205 | (run-hooks 'occur-hook))))))) | 1211 | (run-hooks 'occur-hook))))))) |
| 1206 | 1212 | ||
| 1207 | (defun occur-engine (regexp buffers out-buf nlines case-fold-search | 1213 | (defun occur-engine (regexp buffers out-buf nlines case-fold |
| 1208 | title-face prefix-face match-face keep-props) | 1214 | title-face prefix-face match-face keep-props) |
| 1209 | (with-current-buffer out-buf | 1215 | (with-current-buffer out-buf |
| 1210 | (let ((globalcount 0) | 1216 | (let ((globalcount 0) |
| 1211 | (coding nil)) | 1217 | (coding nil) |
| 1218 | (case-fold-search case-fold)) | ||
| 1212 | ;; Map over all the buffers | 1219 | ;; Map over all the buffers |
| 1213 | (dolist (buf buffers) | 1220 | (dolist (buf buffers) |
| 1214 | (when (buffer-live-p buf) | 1221 | (when (buffer-live-p buf) |
| @@ -1308,8 +1315,7 @@ See also `multi-occur'." | |||
| 1308 | (nth 0 ret)))) | 1315 | (nth 0 ret)))) |
| 1309 | ;; Actually insert the match display data | 1316 | ;; Actually insert the match display data |
| 1310 | (with-current-buffer out-buf | 1317 | (with-current-buffer out-buf |
| 1311 | (let ((beg (point)) | 1318 | (insert data))) |
| 1312 | (end (progn (insert data) (point))))))) | ||
| 1313 | (goto-char endpt)) | 1319 | (goto-char endpt)) |
| 1314 | (if endpt | 1320 | (if endpt |
| 1315 | (progn | 1321 | (progn |
| @@ -1557,8 +1563,9 @@ type them using Lisp syntax." | |||
| 1557 | (setcar n 'replace-count)))))) | 1563 | (setcar n 'replace-count)))))) |
| 1558 | (setq n (cdr n)))) | 1564 | (setq n (cdr n)))) |
| 1559 | 1565 | ||
| 1560 | (defun replace-eval-replacement (expression replace-count) | 1566 | (defun replace-eval-replacement (expression count) |
| 1561 | (let ((replacement (eval expression))) | 1567 | (let* ((replace-count count) |
| 1568 | (replacement (eval expression))) | ||
| 1562 | (if (stringp replacement) | 1569 | (if (stringp replacement) |
| 1563 | replacement | 1570 | replacement |
| 1564 | (prin1-to-string replacement t)))) | 1571 | (prin1-to-string replacement t)))) |
| @@ -1578,15 +1585,15 @@ with the `noescape' argument set. | |||
| 1578 | (prin1-to-string replacement t)) | 1585 | (prin1-to-string replacement t)) |
| 1579 | t t))) | 1586 | t t))) |
| 1580 | 1587 | ||
| 1581 | (defun replace-loop-through-replacements (data replace-count) | 1588 | (defun replace-loop-through-replacements (data count) |
| 1582 | ;; DATA is a vector contaning the following values: | 1589 | ;; DATA is a vector contaning the following values: |
| 1583 | ;; 0 next-rotate-count | 1590 | ;; 0 next-rotate-count |
| 1584 | ;; 1 repeat-count | 1591 | ;; 1 repeat-count |
| 1585 | ;; 2 next-replacement | 1592 | ;; 2 next-replacement |
| 1586 | ;; 3 replacements | 1593 | ;; 3 replacements |
| 1587 | (if (= (aref data 0) replace-count) | 1594 | (if (= (aref data 0) count) |
| 1588 | (progn | 1595 | (progn |
| 1589 | (aset data 0 (+ replace-count (aref data 1))) | 1596 | (aset data 0 (+ count (aref data 1))) |
| 1590 | (let ((next (cdr (aref data 2)))) | 1597 | (let ((next (cdr (aref data 2)))) |
| 1591 | (aset data 2 (if (consp next) next (aref data 3)))))) | 1598 | (aset data 2 (if (consp next) next (aref data 3)))))) |
| 1592 | (car (aref data 2))) | 1599 | (car (aref data 2))) |
| @@ -2011,6 +2018,11 @@ make, or the user didn't cancel the call." | |||
| 2011 | (if (= replace-count 1) "" "s"))) | 2018 | (if (= replace-count 1) "" "s"))) |
| 2012 | (or (and keep-going stack) multi-buffer))) | 2019 | (or (and keep-going stack) multi-buffer))) |
| 2013 | 2020 | ||
| 2021 | (defvar isearch-error) | ||
| 2022 | (defvar isearch-forward) | ||
| 2023 | (defvar isearch-case-fold-search) | ||
| 2024 | (defvar isearch-string) | ||
| 2025 | |||
| 2014 | (defvar replace-overlay nil) | 2026 | (defvar replace-overlay nil) |
| 2015 | 2027 | ||
| 2016 | (defun replace-highlight (match-beg match-end range-beg range-end | 2028 | (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 @@ | |||
| 1 | ;;; savehist.el --- Save minibuffer history. | 1 | ;;; savehist.el --- Save minibuffer history |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2005-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2005-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -254,6 +254,10 @@ Normally invoked by calling `savehist-mode' to unset the minor mode." | |||
| 254 | (cancel-timer savehist-timer)) | 254 | (cancel-timer savehist-timer)) |
| 255 | (setq savehist-timer nil))) | 255 | (setq savehist-timer nil))) |
| 256 | 256 | ||
| 257 | ;; From XEmacs? | ||
| 258 | (defvar print-readably) | ||
| 259 | (defvar print-string-length) | ||
| 260 | |||
| 257 | (defun savehist-save (&optional auto-save) | 261 | (defun savehist-save (&optional auto-save) |
| 258 | "Save the values of minibuffer history variables. | 262 | "Save the values of minibuffer history variables. |
| 259 | Unbound symbols referenced in `savehist-additional-variables' are ignored. | 263 | 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." | |||
| 105 | ;; The default value for :initialize would try to use :set | 105 | ;; The default value for :initialize would try to use :set |
| 106 | ;; when processing the file in cus-dep.el. | 106 | ;; when processing the file in cus-dep.el. |
| 107 | :initialize 'custom-initialize-default | 107 | :initialize 'custom-initialize-default |
| 108 | :set (lambda (sym val) (set-scroll-bar-mode val))) | 108 | :set (lambda (_sym val) (set-scroll-bar-mode val))) |
| 109 | 109 | ||
| 110 | ;; We just set scroll-bar-mode, but that was the default. | 110 | ;; We just set scroll-bar-mode, but that was the default. |
| 111 | ;; If it is set again, that is for real. | 111 | ;; 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." | |||
| 141 | (if (> arg 0) | 141 | (if (> arg 0) |
| 142 | (or scroll-bar-mode default-frame-scroll-bars)))))) | 142 | (or scroll-bar-mode default-frame-scroll-bars)))))) |
| 143 | 143 | ||
| 144 | (defun toggle-horizontal-scroll-bar (arg) | 144 | (defun toggle-horizontal-scroll-bar (_arg) |
| 145 | "Toggle whether or not the selected frame has horizontal scroll bars. | 145 | "Toggle whether or not the selected frame has horizontal scroll bars. |
| 146 | With arg, turn horizontal scroll bars on if and only if arg is positive. | 146 | With arg, turn horizontal scroll bars on if and only if arg is positive. |
| 147 | Horizontal scroll bars aren't implemented yet." | 147 | Horizontal scroll bars aren't implemented yet." |
| @@ -204,7 +204,7 @@ EVENT should be a scroll bar click or drag event." | |||
| 204 | (let* ((start-position (event-start event)) | 204 | (let* ((start-position (event-start event)) |
| 205 | (window (nth 0 start-position)) | 205 | (window (nth 0 start-position)) |
| 206 | (portion-whole (nth 2 start-position))) | 206 | (portion-whole (nth 2 start-position))) |
| 207 | (save-excursion | 207 | (save-excursion |
| 208 | (with-current-buffer (window-buffer window) | 208 | (with-current-buffer (window-buffer window) |
| 209 | ;; Calculate position relative to the accessible part of the buffer. | 209 | ;; Calculate position relative to the accessible part of the buffer. |
| 210 | (goto-char (+ (point-min) | 210 | (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." | |||
| 213 | (defun xselect--int-to-cons (n) | 213 | (defun xselect--int-to-cons (n) |
| 214 | (cons (ash n -16) (logand n 65535))) | 214 | (cons (ash n -16) (logand n 65535))) |
| 215 | 215 | ||
| 216 | (defun xselect-convert-to-string (selection type value) | 216 | (defun xselect-convert-to-string (_selection type value) |
| 217 | (let (str coding) | 217 | (let (str coding) |
| 218 | ;; Get the actual string from VALUE. | 218 | ;; Get the actual string from VALUE. |
| 219 | (cond ((stringp value) | 219 | (cond ((stringp value) |
| @@ -279,7 +279,7 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 279 | (setq next-selection-coding-system nil) | 279 | (setq next-selection-coding-system nil) |
| 280 | (cons type str)))) | 280 | (cons type str)))) |
| 281 | 281 | ||
| 282 | (defun xselect-convert-to-length (selection type value) | 282 | (defun xselect-convert-to-length (_selection _type value) |
| 283 | (let ((len (cond ((stringp value) | 283 | (let ((len (cond ((stringp value) |
| 284 | (length value)) | 284 | (length value)) |
| 285 | ((setq value (xselect--selection-bounds value)) | 285 | ((setq value (xselect--selection-bounds value)) |
| @@ -287,7 +287,7 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 287 | (if len | 287 | (if len |
| 288 | (xselect--int-to-cons len)))) | 288 | (xselect--int-to-cons len)))) |
| 289 | 289 | ||
| 290 | (defun xselect-convert-to-targets (selection type value) | 290 | (defun xselect-convert-to-targets (_selection _type _value) |
| 291 | ;; return a vector of atoms, but remove duplicates first. | 291 | ;; return a vector of atoms, but remove duplicates first. |
| 292 | (let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist))) | 292 | (let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist))) |
| 293 | (rest all)) | 293 | (rest all)) |
| @@ -300,25 +300,25 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 300 | (setq rest (cdr rest))))) | 300 | (setq rest (cdr rest))))) |
| 301 | (apply 'vector all))) | 301 | (apply 'vector all))) |
| 302 | 302 | ||
| 303 | (defun xselect-convert-to-delete (selection type value) | 303 | (defun xselect-convert-to-delete (selection _type _value) |
| 304 | (x-disown-selection-internal selection) | 304 | (x-disown-selection-internal selection) |
| 305 | ;; A return value of nil means that we do not know how to do this conversion, | 305 | ;; A return value of nil means that we do not know how to do this conversion, |
| 306 | ;; and replies with an "error". A return value of NULL means that we have | 306 | ;; and replies with an "error". A return value of NULL means that we have |
| 307 | ;; done the conversion (and any side-effects) but have no value to return. | 307 | ;; done the conversion (and any side-effects) but have no value to return. |
| 308 | 'NULL) | 308 | 'NULL) |
| 309 | 309 | ||
| 310 | (defun xselect-convert-to-filename (selection type value) | 310 | (defun xselect-convert-to-filename (_selection _type value) |
| 311 | (when (setq value (xselect--selection-bounds value)) | 311 | (when (setq value (xselect--selection-bounds value)) |
| 312 | (buffer-file-name (nth 2 value)))) | 312 | (buffer-file-name (nth 2 value)))) |
| 313 | 313 | ||
| 314 | (defun xselect-convert-to-charpos (selection type value) | 314 | (defun xselect-convert-to-charpos (_selection _type value) |
| 315 | (when (setq value (xselect--selection-bounds value)) | 315 | (when (setq value (xselect--selection-bounds value)) |
| 316 | (let ((beg (1- (nth 0 value))) ; zero-based | 316 | (let ((beg (1- (nth 0 value))) ; zero-based |
| 317 | (end (1- (nth 1 value)))) | 317 | (end (1- (nth 1 value)))) |
| 318 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) | 318 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) |
| 319 | (xselect--int-to-cons (max beg end))))))) | 319 | (xselect--int-to-cons (max beg end))))))) |
| 320 | 320 | ||
| 321 | (defun xselect-convert-to-lineno (selection type value) | 321 | (defun xselect-convert-to-lineno (_selection _type value) |
| 322 | (when (setq value (xselect--selection-bounds value)) | 322 | (when (setq value (xselect--selection-bounds value)) |
| 323 | (with-current-buffer (nth 2 value) | 323 | (with-current-buffer (nth 2 value) |
| 324 | (let ((beg (line-number-at-pos (nth 0 value))) | 324 | (let ((beg (line-number-at-pos (nth 0 value))) |
| @@ -326,7 +326,7 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 326 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) | 326 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) |
| 327 | (xselect--int-to-cons (max beg end)))))))) | 327 | (xselect--int-to-cons (max beg end)))))))) |
| 328 | 328 | ||
| 329 | (defun xselect-convert-to-colno (selection type value) | 329 | (defun xselect-convert-to-colno (_selection _type value) |
| 330 | (when (setq value (xselect--selection-bounds value)) | 330 | (when (setq value (xselect--selection-bounds value)) |
| 331 | (with-current-buffer (nth 2 value) | 331 | (with-current-buffer (nth 2 value) |
| 332 | (let ((beg (progn (goto-char (nth 0 value)) (current-column))) | 332 | (let ((beg (progn (goto-char (nth 0 value)) (current-column))) |
| @@ -334,35 +334,35 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 334 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) | 334 | (cons 'SPAN (vector (xselect--int-to-cons (min beg end)) |
| 335 | (xselect--int-to-cons (max beg end)))))))) | 335 | (xselect--int-to-cons (max beg end)))))))) |
| 336 | 336 | ||
| 337 | (defun xselect-convert-to-os (selection type size) | 337 | (defun xselect-convert-to-os (_selection _type _size) |
| 338 | (symbol-name system-type)) | 338 | (symbol-name system-type)) |
| 339 | 339 | ||
| 340 | (defun xselect-convert-to-host (selection type size) | 340 | (defun xselect-convert-to-host (_selection _type _size) |
| 341 | (system-name)) | 341 | (system-name)) |
| 342 | 342 | ||
| 343 | (defun xselect-convert-to-user (selection type size) | 343 | (defun xselect-convert-to-user (_selection _type _size) |
| 344 | (user-full-name)) | 344 | (user-full-name)) |
| 345 | 345 | ||
| 346 | (defun xselect-convert-to-class (selection type size) | 346 | (defun xselect-convert-to-class (_selection _type _size) |
| 347 | "Convert selection to class. | 347 | "Convert selection to class. |
| 348 | This function returns the string \"Emacs\"." | 348 | This function returns the string \"Emacs\"." |
| 349 | "Emacs") | 349 | "Emacs") |
| 350 | 350 | ||
| 351 | ;; We do not try to determine the name Emacs was invoked with, | 351 | ;; We do not try to determine the name Emacs was invoked with, |
| 352 | ;; because it is not clean for a program's behavior to depend on that. | 352 | ;; because it is not clean for a program's behavior to depend on that. |
| 353 | (defun xselect-convert-to-name (selection type size) | 353 | (defun xselect-convert-to-name (_selection _type _size) |
| 354 | "Convert selection to name. | 354 | "Convert selection to name. |
| 355 | This function returns the string \"emacs\"." | 355 | This function returns the string \"emacs\"." |
| 356 | "emacs") | 356 | "emacs") |
| 357 | 357 | ||
| 358 | (defun xselect-convert-to-integer (selection type value) | 358 | (defun xselect-convert-to-integer (_selection _type value) |
| 359 | (and (integerp value) | 359 | (and (integerp value) |
| 360 | (xselect--int-to-cons value))) | 360 | (xselect--int-to-cons value))) |
| 361 | 361 | ||
| 362 | (defun xselect-convert-to-atom (selection type value) | 362 | (defun xselect-convert-to-atom (_selection _type value) |
| 363 | (and (symbolp value) value)) | 363 | (and (symbolp value) value)) |
| 364 | 364 | ||
| 365 | (defun xselect-convert-to-identity (selection type value) ; used internally | 365 | (defun xselect-convert-to-identity (_selection _type value) ; used internally |
| 366 | (vector value)) | 366 | (vector value)) |
| 367 | 367 | ||
| 368 | (setq selection-converter-alist | 368 | (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 @@ | |||
| 88 | 88 | ||
| 89 | (defcustom shadow-noquery nil | 89 | (defcustom shadow-noquery nil |
| 90 | "If t, always copy shadow files without asking. | 90 | "If t, always copy shadow files without asking. |
| 91 | If nil \(the default), always ask. If not nil and not t, ask only if there | 91 | If nil (the default), always ask. If not nil and not t, ask only if there |
| 92 | is no buffer currently visiting the file." | 92 | is no buffer currently visiting the file." |
| 93 | :type '(choice (const t) (const nil) (other :tag "Ask if no buffer" maybe)) | 93 | :type '(choice (const t) (const nil) (other :tag "Ask if no buffer" maybe)) |
| 94 | :group 'shadow) | 94 | :group 'shadow) |
| @@ -125,7 +125,7 @@ Default: ~/.shadow_todo" | |||
| 125 | 125 | ||
| 126 | ;;; The following two variables should in most cases initialize themselves | 126 | ;;; The following two variables should in most cases initialize themselves |
| 127 | ;;; correctly. They are provided as variables in case the defaults are wrong | 127 | ;;; correctly. They are provided as variables in case the defaults are wrong |
| 128 | ;;; on your machine \(and for efficiency). | 128 | ;;; on your machine (and for efficiency). |
| 129 | 129 | ||
| 130 | (defvar shadow-system-name (system-name) | 130 | (defvar shadow-system-name (system-name) |
| 131 | "The complete hostname of this machine.") | 131 | "The complete hostname of this machine.") |
| @@ -138,7 +138,7 @@ Default: ~/.shadow_todo" | |||
| 138 | ;;; | 138 | ;;; |
| 139 | 139 | ||
| 140 | (defvar shadow-clusters nil | 140 | (defvar shadow-clusters nil |
| 141 | "List of host clusters \(see `shadow-define-cluster').") | 141 | "List of host clusters (see `shadow-define-cluster').") |
| 142 | 142 | ||
| 143 | (defvar shadow-literal-groups nil | 143 | (defvar shadow-literal-groups nil |
| 144 | "List of files that are shared between hosts. | 144 | "List of files that are shared between hosts. |
| @@ -259,7 +259,7 @@ information defining the cluster. For interactive use, call | |||
| 259 | ;;; SITES | 259 | ;;; SITES |
| 260 | 260 | ||
| 261 | (defun shadow-site-cluster (site) | 261 | (defun shadow-site-cluster (site) |
| 262 | "Given a SITE \(hostname or cluster name), return cluster it is in, or nil." | 262 | "Given a SITE (hostname or cluster name), return cluster it is in, or nil." |
| 263 | (or (assoc site shadow-clusters) | 263 | (or (assoc site shadow-clusters) |
| 264 | (shadow-find | 264 | (shadow-find |
| 265 | (function (lambda (x) | 265 | (function (lambda (x) |
| @@ -295,7 +295,7 @@ be matched against the primary of SITE2." | |||
| 295 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 295 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 296 | 296 | ||
| 297 | (defun shadow-parse-fullname (fullname) | 297 | (defun shadow-parse-fullname (fullname) |
| 298 | "Parse FULLNAME into \(site user path) list. | 298 | "Parse FULLNAME into (site user path) list. |
| 299 | Leave it alone if it already is one. Return nil if the argument is | 299 | Leave it alone if it already is one. Return nil if the argument is |
| 300 | not a full ange-ftp pathname." | 300 | not a full ange-ftp pathname." |
| 301 | (if (listp fullname) | 301 | (if (listp fullname) |
| @@ -303,7 +303,7 @@ not a full ange-ftp pathname." | |||
| 303 | (ange-ftp-ftp-name fullname))) | 303 | (ange-ftp-ftp-name fullname))) |
| 304 | 304 | ||
| 305 | (defun shadow-parse-name (name) | 305 | (defun shadow-parse-name (name) |
| 306 | "Parse any NAME into \(site user name) list. | 306 | "Parse any NAME into (site user name) list. |
| 307 | Argument can be a simple name, full ange-ftp name, or already a hup list." | 307 | Argument can be a simple name, full ange-ftp name, or already a hup list." |
| 308 | (or (shadow-parse-fullname name) | 308 | (or (shadow-parse-fullname name) |
| 309 | (list shadow-system-name | 309 | (list shadow-system-name |
| @@ -337,8 +337,7 @@ return nil." | |||
| 337 | (defun shadow-expand-cluster-in-file-name (file) | 337 | (defun shadow-expand-cluster-in-file-name (file) |
| 338 | "If hostname part of FILE is a cluster, expand it to cluster's primary hostname. | 338 | "If hostname part of FILE is a cluster, expand it to cluster's primary hostname. |
| 339 | Will return the name bare if it is a local file." | 339 | Will return the name bare if it is a local file." |
| 340 | (let ((hup (shadow-parse-name file)) | 340 | (let ((hup (shadow-parse-name file))) |
| 341 | cluster) | ||
| 342 | (cond ((null hup) file) | 341 | (cond ((null hup) file) |
| 343 | ((shadow-local-file hup)) | 342 | ((shadow-local-file hup)) |
| 344 | ((shadow-make-fullname (shadow-site-primary (nth 0 hup)) | 343 | ((shadow-make-fullname (shadow-site-primary (nth 0 hup)) |
| @@ -405,10 +404,10 @@ filename expansion or contraction, you must do that yourself first." | |||
| 405 | 404 | ||
| 406 | ;;;###autoload | 405 | ;;;###autoload |
| 407 | (defun shadow-define-cluster (name) | 406 | (defun shadow-define-cluster (name) |
| 408 | "Edit \(or create) the definition of a cluster NAME. | 407 | "Edit (or create) the definition of a cluster NAME. |
| 409 | This is a group of hosts that share directories, so that copying to or from | 408 | This is a group of hosts that share directories, so that copying to or from |
| 410 | one of them is sufficient to update the file on all of them. Clusters are | 409 | one of them is sufficient to update the file on all of them. Clusters are |
| 411 | defined by a name, the network address of a primary host \(the one we copy | 410 | defined by a name, the network address of a primary host (the one we copy |
| 412 | files to), and a regular expression that matches the hostnames of all the | 411 | files to), and a regular expression that matches the hostnames of all the |
| 413 | sites in the cluster." | 412 | sites in the cluster." |
| 414 | (interactive (list (completing-read "Cluster name: " shadow-clusters () ()))) | 413 | (interactive (list (completing-read "Cluster name: " shadow-clusters () ()))) |
| @@ -442,7 +441,7 @@ sites in the cluster." | |||
| 442 | "Declare a single file to be shared between sites. | 441 | "Declare a single file to be shared between sites. |
| 443 | It may have different filenames on each site. When this file is edited, the | 442 | It may have different filenames on each site. When this file is edited, the |
| 444 | new version will be copied to each of the other locations. Sites can be | 443 | new version will be copied to each of the other locations. Sites can be |
| 445 | specific hostnames, or names of clusters \(see `shadow-define-cluster')." | 444 | specific hostnames, or names of clusters (see `shadow-define-cluster')." |
| 446 | (interactive) | 445 | (interactive) |
| 447 | (let* ((hup (shadow-parse-fullname | 446 | (let* ((hup (shadow-parse-fullname |
| 448 | (shadow-contract-file-name (buffer-file-name)))) | 447 | (shadow-contract-file-name (buffer-file-name)))) |
| @@ -466,8 +465,8 @@ specific hostnames, or names of clusters \(see `shadow-define-cluster')." | |||
| 466 | "Make each of a group of files be shared between hosts. | 465 | "Make each of a group of files be shared between hosts. |
| 467 | Prompts for regular expression; files matching this are shared between a list | 466 | Prompts for regular expression; files matching this are shared between a list |
| 468 | of sites, which are also prompted for. The filenames must be identical on all | 467 | of sites, which are also prompted for. The filenames must be identical on all |
| 469 | hosts \(if they aren't, use `shadow-define-literal-group' instead of this | 468 | hosts (if they aren't, use `shadow-define-literal-group' instead of this |
| 470 | function). Each site can be either a hostname or the name of a cluster \(see | 469 | function). Each site can be either a hostname or the name of a cluster (see |
| 471 | `shadow-define-cluster')." | 470 | `shadow-define-cluster')." |
| 472 | (interactive) | 471 | (interactive) |
| 473 | (let ((regexp (read-string | 472 | (let ((regexp (read-string |
| @@ -545,7 +544,7 @@ permanently, remove the group from `shadow-literal-groups' or | |||
| 545 | 544 | ||
| 546 | (defun shadow-make-group (regexp sites usernames) | 545 | (defun shadow-make-group (regexp sites usernames) |
| 547 | "Make a description of a file group--- | 546 | "Make a description of a file group--- |
| 548 | actually a list of regexp ange-ftp file names---from REGEXP \(name of file to | 547 | actually a list of regexp ange-ftp file names---from REGEXP (name of file to |
| 549 | be shadowed), list of SITES, and corresponding list of USERNAMES for each | 548 | be shadowed), list of SITES, and corresponding list of USERNAMES for each |
| 550 | site." | 549 | site." |
| 551 | (if sites | 550 | (if sites |
| @@ -572,7 +571,7 @@ site." | |||
| 572 | (to (shadow-expand-cluster-in-file-name (cdr s)))) | 571 | (to (shadow-expand-cluster-in-file-name (cdr s)))) |
| 573 | (when buffer | 572 | (when buffer |
| 574 | (set-buffer buffer) | 573 | (set-buffer buffer) |
| 575 | (condition-case i | 574 | (condition-case nil |
| 576 | (progn | 575 | (progn |
| 577 | (write-region nil nil to) | 576 | (write-region nil nil to) |
| 578 | (shadow-remove-from-todo s)) | 577 | (shadow-remove-from-todo s)) |
| @@ -581,7 +580,7 @@ site." | |||
| 581 | (defun shadow-shadows-of (file) | 580 | (defun shadow-shadows-of (file) |
| 582 | "Return copy operations needed to update FILE. | 581 | "Return copy operations needed to update FILE. |
| 583 | Filename should have clusters expanded, but otherwise can have any format. | 582 | Filename should have clusters expanded, but otherwise can have any format. |
| 584 | Return value is a list of dotted pairs like \(from . to), where from | 583 | Return value is a list of dotted pairs like (from . to), where from |
| 585 | and to are absolute file names." | 584 | and to are absolute file names." |
| 586 | (or (symbol-value (intern-soft file shadow-hashtable)) | 585 | (or (symbol-value (intern-soft file shadow-hashtable)) |
| 587 | (let* ((absolute-file (shadow-expand-file-name | 586 | (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." | |||
| 494 | 'shell-dir-cookie-watcher nil t)) | 494 | 'shell-dir-cookie-watcher nil t)) |
| 495 | (comint-read-input-ring t))) | 495 | (comint-read-input-ring t))) |
| 496 | 496 | ||
| 497 | (defun shell-filter-ctrl-a-ctrl-b (string) | 497 | (defun shell-filter-ctrl-a-ctrl-b (_string) |
| 498 | "Remove `^A' and `^B' characters from comint output. | 498 | "Remove `^A' and `^B' characters from comint output. |
| 499 | 499 | ||
| 500 | Bash uses these characters as internal quoting characters in its | 500 | Bash uses these characters as internal quoting characters in its |
| @@ -585,7 +585,7 @@ Otherwise, one argument `-i' is passed to the shell. | |||
| 585 | (current-buffer))) | 585 | (current-buffer))) |
| 586 | 586 | ||
| 587 | ;; On remote hosts, the local `shell-file-name' might be useless. | 587 | ;; On remote hosts, the local `shell-file-name' might be useless. |
| 588 | (if (and (interactive-p) | 588 | (if (and (called-interactively-p 'any) |
| 589 | (file-remote-p default-directory) | 589 | (file-remote-p default-directory) |
| 590 | (null explicit-shell-file-name) | 590 | (null explicit-shell-file-name) |
| 591 | (null (getenv "ESHELL"))) | 591 | (null (getenv "ESHELL"))) |
| @@ -692,7 +692,7 @@ and `shell-pushd-dunique' control the behavior of the relevant command. | |||
| 692 | Environment variables are expanded, see function `substitute-in-file-name'." | 692 | Environment variables are expanded, see function `substitute-in-file-name'." |
| 693 | (if shell-dirtrackp | 693 | (if shell-dirtrackp |
| 694 | ;; We fail gracefully if we think the command will fail in the shell. | 694 | ;; We fail gracefully if we think the command will fail in the shell. |
| 695 | (condition-case chdir-failure | 695 | (condition-case nil |
| 696 | (let ((start (progn (string-match | 696 | (let ((start (progn (string-match |
| 697 | (concat "^" shell-command-separator-regexp) | 697 | (concat "^" shell-command-separator-regexp) |
| 698 | str) ; skip whitespace | 698 | 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 @@ | |||
| 33 | (declare-function widget-convert "wid-edit" (type &rest args)) | 33 | (declare-function widget-convert "wid-edit" (type &rest args)) |
| 34 | (declare-function shell-mode "shell" ()) | 34 | (declare-function shell-mode "shell" ()) |
| 35 | 35 | ||
| 36 | ;;; From compile.el | ||
| 36 | (defvar compilation-current-error) | 37 | (defvar compilation-current-error) |
| 38 | (defvar compilation-context-lines) | ||
| 39 | ;;; From comint.el | ||
| 40 | (defvar comint-file-name-quote-list) | ||
| 41 | (defvar comint-file-name-chars) | ||
| 42 | (defvar comint-delimiter-argument-list) | ||
| 37 | 43 | ||
| 38 | (defcustom idle-update-delay 0.5 | 44 | (defcustom idle-update-delay 0.5 |
| 39 | "Idle time delay before updating various things on the screen. | 45 | "Idle time delay before updating various things on the screen. |
| @@ -889,8 +895,8 @@ the end of the line." | |||
| 889 | (memq (char-before) '(?\t ?\n)) | 895 | (memq (char-before) '(?\t ?\n)) |
| 890 | (eobp) | 896 | (eobp) |
| 891 | (eq (char-after) ?\n))) | 897 | (eq (char-after) ?\n))) |
| 892 | (let* ((ocol (current-column)) | 898 | (let ((ocol (current-column))) |
| 893 | (val (delete-char (- n) killflag))) | 899 | (delete-char (- n) killflag) |
| 894 | (save-excursion | 900 | (save-excursion |
| 895 | (insert-char ?\s (- ocol (current-column)) nil)))) | 901 | (insert-char ?\s (- ocol (current-column)) nil)))) |
| 896 | ;; Otherwise, do simple deletion. | 902 | ;; Otherwise, do simple deletion. |
| @@ -1365,7 +1371,7 @@ in this use of the minibuffer.") | |||
| 1365 | (defun minibuffer-history-initialize () | 1371 | (defun minibuffer-history-initialize () |
| 1366 | (setq minibuffer-text-before-history nil)) | 1372 | (setq minibuffer-text-before-history nil)) |
| 1367 | 1373 | ||
| 1368 | (defun minibuffer-avoid-prompt (new old) | 1374 | (defun minibuffer-avoid-prompt (_new _old) |
| 1369 | "A point-motion hook for the minibuffer, that moves point out of the prompt." | 1375 | "A point-motion hook for the minibuffer, that moves point out of the prompt." |
| 1370 | (constrain-to-field nil (point-max))) | 1376 | (constrain-to-field nil (point-max))) |
| 1371 | 1377 | ||
| @@ -1731,7 +1737,7 @@ in the search status stack." | |||
| 1731 | `(lambda (cmd) | 1737 | `(lambda (cmd) |
| 1732 | (minibuffer-history-isearch-pop-state cmd ,minibuffer-history-position))) | 1738 | (minibuffer-history-isearch-pop-state cmd ,minibuffer-history-position))) |
| 1733 | 1739 | ||
| 1734 | (defun minibuffer-history-isearch-pop-state (cmd hist-pos) | 1740 | (defun minibuffer-history-isearch-pop-state (_cmd hist-pos) |
| 1735 | "Restore the minibuffer history search state. | 1741 | "Restore the minibuffer history search state. |
| 1736 | Go to the history element by the absolute history position HIST-POS." | 1742 | Go to the history element by the absolute history position HIST-POS." |
| 1737 | (goto-history-element hist-pos)) | 1743 | (goto-history-element hist-pos)) |
| @@ -1923,7 +1929,7 @@ we stop and ignore all further elements." | |||
| 1923 | (undo-list (list nil)) | 1929 | (undo-list (list nil)) |
| 1924 | undo-adjusted-markers | 1930 | undo-adjusted-markers |
| 1925 | some-rejected | 1931 | some-rejected |
| 1926 | undo-elt undo-elt temp-undo-list delta) | 1932 | undo-elt temp-undo-list delta) |
| 1927 | (while undo-list-copy | 1933 | (while undo-list-copy |
| 1928 | (setq undo-elt (car undo-list-copy)) | 1934 | (setq undo-elt (car undo-list-copy)) |
| 1929 | (let ((keep-this | 1935 | (let ((keep-this |
| @@ -4404,7 +4410,7 @@ If nil, `line-move' moves point by logical lines." | |||
| 4404 | ;; This is the guts of next-line and previous-line. | 4410 | ;; This is the guts of next-line and previous-line. |
| 4405 | ;; Arg says how many lines to move. | 4411 | ;; Arg says how many lines to move. |
| 4406 | ;; The value is t if we can move the specified number of lines. | 4412 | ;; The value is t if we can move the specified number of lines. |
| 4407 | (defun line-move-1 (arg &optional noerror to-end) | 4413 | (defun line-move-1 (arg &optional noerror _to-end) |
| 4408 | ;; Don't run any point-motion hooks, and disregard intangibility, | 4414 | ;; Don't run any point-motion hooks, and disregard intangibility, |
| 4409 | ;; for intermediate positions. | 4415 | ;; for intermediate positions. |
| 4410 | (let ((inhibit-point-motion-hooks t) | 4416 | (let ((inhibit-point-motion-hooks t) |
| @@ -6265,27 +6271,27 @@ select the completion near point.\n\n")))))) | |||
| 6265 | ;; These functions -- which are not commands -- each add one modifier | 6271 | ;; These functions -- which are not commands -- each add one modifier |
| 6266 | ;; to the following event. | 6272 | ;; to the following event. |
| 6267 | 6273 | ||
| 6268 | (defun event-apply-alt-modifier (ignore-prompt) | 6274 | (defun event-apply-alt-modifier (_ignore-prompt) |
| 6269 | "\\<function-key-map>Add the Alt modifier to the following event. | 6275 | "\\<function-key-map>Add the Alt modifier to the following event. |
| 6270 | For example, type \\[event-apply-alt-modifier] & to enter Alt-&." | 6276 | For example, type \\[event-apply-alt-modifier] & to enter Alt-&." |
| 6271 | (vector (event-apply-modifier (read-event) 'alt 22 "A-"))) | 6277 | (vector (event-apply-modifier (read-event) 'alt 22 "A-"))) |
| 6272 | (defun event-apply-super-modifier (ignore-prompt) | 6278 | (defun event-apply-super-modifier (_ignore-prompt) |
| 6273 | "\\<function-key-map>Add the Super modifier to the following event. | 6279 | "\\<function-key-map>Add the Super modifier to the following event. |
| 6274 | For example, type \\[event-apply-super-modifier] & to enter Super-&." | 6280 | For example, type \\[event-apply-super-modifier] & to enter Super-&." |
| 6275 | (vector (event-apply-modifier (read-event) 'super 23 "s-"))) | 6281 | (vector (event-apply-modifier (read-event) 'super 23 "s-"))) |
| 6276 | (defun event-apply-hyper-modifier (ignore-prompt) | 6282 | (defun event-apply-hyper-modifier (_ignore-prompt) |
| 6277 | "\\<function-key-map>Add the Hyper modifier to the following event. | 6283 | "\\<function-key-map>Add the Hyper modifier to the following event. |
| 6278 | For example, type \\[event-apply-hyper-modifier] & to enter Hyper-&." | 6284 | For example, type \\[event-apply-hyper-modifier] & to enter Hyper-&." |
| 6279 | (vector (event-apply-modifier (read-event) 'hyper 24 "H-"))) | 6285 | (vector (event-apply-modifier (read-event) 'hyper 24 "H-"))) |
| 6280 | (defun event-apply-shift-modifier (ignore-prompt) | 6286 | (defun event-apply-shift-modifier (_ignore-prompt) |
| 6281 | "\\<function-key-map>Add the Shift modifier to the following event. | 6287 | "\\<function-key-map>Add the Shift modifier to the following event. |
| 6282 | For example, type \\[event-apply-shift-modifier] & to enter Shift-&." | 6288 | For example, type \\[event-apply-shift-modifier] & to enter Shift-&." |
| 6283 | (vector (event-apply-modifier (read-event) 'shift 25 "S-"))) | 6289 | (vector (event-apply-modifier (read-event) 'shift 25 "S-"))) |
| 6284 | (defun event-apply-control-modifier (ignore-prompt) | 6290 | (defun event-apply-control-modifier (_ignore-prompt) |
| 6285 | "\\<function-key-map>Add the Ctrl modifier to the following event. | 6291 | "\\<function-key-map>Add the Ctrl modifier to the following event. |
| 6286 | For example, type \\[event-apply-control-modifier] & to enter Ctrl-&." | 6292 | For example, type \\[event-apply-control-modifier] & to enter Ctrl-&." |
| 6287 | (vector (event-apply-modifier (read-event) 'control 26 "C-"))) | 6293 | (vector (event-apply-modifier (read-event) 'control 26 "C-"))) |
| 6288 | (defun event-apply-meta-modifier (ignore-prompt) | 6294 | (defun event-apply-meta-modifier (_ignore-prompt) |
| 6289 | "\\<function-key-map>Add the Meta modifier to the following event. | 6295 | "\\<function-key-map>Add the Meta modifier to the following event. |
| 6290 | For example, type \\[event-apply-meta-modifier] & to enter Meta-&." | 6296 | For example, type \\[event-apply-meta-modifier] & to enter Meta-&." |
| 6291 | (vector (event-apply-modifier (read-event) 'meta 27 "M-"))) | 6297 | (vector (event-apply-modifier (read-event) 'meta 27 "M-"))) |
| @@ -6636,11 +6642,10 @@ See also `normal-erase-is-backspace'." | |||
| 6636 | 6642 | ||
| 6637 | (cond ((or (memq window-system '(x w32 ns pc)) | 6643 | (cond ((or (memq window-system '(x w32 ns pc)) |
| 6638 | (memq system-type '(ms-dos windows-nt))) | 6644 | (memq system-type '(ms-dos windows-nt))) |
| 6639 | (let* ((bindings | 6645 | (let ((bindings |
| 6640 | `(([M-delete] [M-backspace]) | 6646 | `(([M-delete] [M-backspace]) |
| 6641 | ([C-M-delete] [C-M-backspace]) | 6647 | ([C-M-delete] [C-M-backspace]) |
| 6642 | ([?\e C-delete] [?\e C-backspace]))) | 6648 | ([?\e C-delete] [?\e C-backspace])))) |
| 6643 | (old-state (lookup-key local-function-key-map [delete]))) | ||
| 6644 | 6649 | ||
| 6645 | (if enabled | 6650 | (if enabled |
| 6646 | (progn | 6651 | (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 | |||
| 659 | before speedbar has been loaded." | 659 | before speedbar has been loaded." |
| 660 | :group 'speedbar | 660 | :group 'speedbar |
| 661 | :type '(repeat (regexp :tag "Directory Regexp")) | 661 | :type '(repeat (regexp :tag "Directory Regexp")) |
| 662 | :set (lambda (sym val) | 662 | :set (lambda (_sym val) |
| 663 | (setq speedbar-ignored-directory-expressions val | 663 | (setq speedbar-ignored-directory-expressions val |
| 664 | speedbar-ignored-directory-regexp | 664 | speedbar-ignored-directory-regexp |
| 665 | (speedbar-extension-list-to-regex val)))) | 665 | (speedbar-extension-list-to-regex val)))) |
| @@ -713,7 +713,7 @@ need to also modify `completion-ignored-extension' which will also help | |||
| 713 | file completion." | 713 | file completion." |
| 714 | :group 'speedbar | 714 | :group 'speedbar |
| 715 | :type '(repeat (regexp :tag "Extension Regexp")) | 715 | :type '(repeat (regexp :tag "Extension Regexp")) |
| 716 | :set (lambda (sym val) | 716 | :set (lambda (_sym val) |
| 717 | (set 'speedbar-supported-extension-expressions val) | 717 | (set 'speedbar-supported-extension-expressions val) |
| 718 | (set 'speedbar-file-regexp (speedbar-extension-list-to-regex val)))) | 718 | (set 'speedbar-file-regexp (speedbar-extension-list-to-regex val)))) |
| 719 | 719 | ||
| @@ -1922,7 +1922,7 @@ the file-system." | |||
| 1922 | nl)) | 1922 | nl)) |
| 1923 | )) | 1923 | )) |
| 1924 | 1924 | ||
| 1925 | (defun speedbar-directory-buttons (directory index) | 1925 | (defun speedbar-directory-buttons (directory _index) |
| 1926 | "Insert a single button group at point for DIRECTORY. | 1926 | "Insert a single button group at point for DIRECTORY. |
| 1927 | Each directory part is a different button. If part of the directory | 1927 | Each directory part is a different button. If part of the directory |
| 1928 | matches the user directory ~, then it is replaced with a ~. | 1928 | matches the user directory ~, then it is replaced with a ~. |
| @@ -3313,7 +3313,7 @@ Optional argument ARG indicates that any cache should be flushed." | |||
| 3313 | ;; hidden by default anyway. Yay! It's easy. | 3313 | ;; hidden by default anyway. Yay! It's easy. |
| 3314 | ) | 3314 | ) |
| 3315 | 3315 | ||
| 3316 | (defun speedbar-find-file (text token indent) | 3316 | (defun speedbar-find-file (text _token indent) |
| 3317 | "Speedbar click handler for filenames. | 3317 | "Speedbar click handler for filenames. |
| 3318 | TEXT, the file will be displayed in the attached frame. | 3318 | TEXT, the file will be displayed in the attached frame. |
| 3319 | TOKEN is unused, but required by the click handler. INDENT is the | 3319 | TOKEN is unused, but required by the click handler. INDENT is the |
| @@ -3333,7 +3333,7 @@ current indentation level." | |||
| 3333 | (speedbar-set-timer dframe-update-speed)) | 3333 | (speedbar-set-timer dframe-update-speed)) |
| 3334 | (dframe-maybee-jump-to-attached-frame)) | 3334 | (dframe-maybee-jump-to-attached-frame)) |
| 3335 | 3335 | ||
| 3336 | (defun speedbar-dir-follow (text token indent) | 3336 | (defun speedbar-dir-follow (text _token indent) |
| 3337 | "Speedbar click handler for directory names. | 3337 | "Speedbar click handler for directory names. |
| 3338 | Clicking a directory will cause the speedbar to list files in | 3338 | Clicking a directory will cause the speedbar to list files in |
| 3339 | the subdirectory TEXT. TOKEN is an unused requirement. The | 3339 | the subdirectory TEXT. TOKEN is an unused requirement. The |
| @@ -3401,7 +3401,7 @@ expanded. INDENT is the current indentation level." | |||
| 3401 | (speedbar-center-buffer-smartly) | 3401 | (speedbar-center-buffer-smartly) |
| 3402 | (save-excursion (speedbar-stealthy-updates))) | 3402 | (save-excursion (speedbar-stealthy-updates))) |
| 3403 | 3403 | ||
| 3404 | (defun speedbar-directory-buttons-follow (text token indent) | 3404 | (defun speedbar-directory-buttons-follow (_text token _indent) |
| 3405 | "Speedbar click handler for default directory buttons. | 3405 | "Speedbar click handler for default directory buttons. |
| 3406 | TEXT is the button clicked on. TOKEN is the directory to follow. | 3406 | TEXT is the button clicked on. TOKEN is the directory to follow. |
| 3407 | INDENT is the current indentation level and is unused." | 3407 | INDENT is the current indentation level and is unused." |
| @@ -3422,7 +3422,6 @@ indentation level." | |||
| 3422 | (cond ((string-match "+" text) ;we have to expand this file | 3422 | (cond ((string-match "+" text) ;we have to expand this file |
| 3423 | (let* ((fn (expand-file-name (concat (speedbar-line-directory indent) | 3423 | (let* ((fn (expand-file-name (concat (speedbar-line-directory indent) |
| 3424 | token))) | 3424 | token))) |
| 3425 | (mode nil) | ||
| 3426 | (lst (speedbar-fetch-dynamic-tags fn))) | 3425 | (lst (speedbar-fetch-dynamic-tags fn))) |
| 3427 | ;; if no list, then remove expando button | 3426 | ;; if no list, then remove expando button |
| 3428 | (if (not lst) | 3427 | (if (not lst) |
| @@ -3438,7 +3437,7 @@ indentation level." | |||
| 3438 | (t (error "Ooops... not sure what to do"))) | 3437 | (t (error "Ooops... not sure what to do"))) |
| 3439 | (speedbar-center-buffer-smartly)) | 3438 | (speedbar-center-buffer-smartly)) |
| 3440 | 3439 | ||
| 3441 | (defun speedbar-tag-find (text token indent) | 3440 | (defun speedbar-tag-find (_text token indent) |
| 3442 | "For the tag TEXT in a file TOKEN, go to that position. | 3441 | "For the tag TEXT in a file TOKEN, go to that position. |
| 3443 | INDENT is the current indentation level." | 3442 | INDENT is the current indentation level." |
| 3444 | (let ((file (speedbar-line-directory indent))) | 3443 | (let ((file (speedbar-line-directory indent))) |
| @@ -3838,12 +3837,12 @@ regular expression EXPR." | |||
| 3838 | ) | 3837 | ) |
| 3839 | "Menu item elements shown when displaying a buffer list.") | 3838 | "Menu item elements shown when displaying a buffer list.") |
| 3840 | 3839 | ||
| 3841 | (defun speedbar-buffer-buttons (directory zero) | 3840 | (defun speedbar-buffer-buttons (_directory _zero) |
| 3842 | "Create speedbar buttons based on the buffers currently loaded. | 3841 | "Create speedbar buttons based on the buffers currently loaded. |
| 3843 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." | 3842 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." |
| 3844 | (speedbar-buffer-buttons-engine nil)) | 3843 | (speedbar-buffer-buttons-engine nil)) |
| 3845 | 3844 | ||
| 3846 | (defun speedbar-buffer-buttons-temp (directory zero) | 3845 | (defun speedbar-buffer-buttons-temp (_directory _zero) |
| 3847 | "Create speedbar buttons based on the buffers currently loaded. | 3846 | "Create speedbar buttons based on the buffers currently loaded. |
| 3848 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." | 3847 | DIRECTORY is the directory of the currently active buffer, and ZERO is 0." |
| 3849 | (speedbar-buffer-buttons-engine t)) | 3848 | (speedbar-buffer-buttons-engine t)) |
| @@ -3901,11 +3900,8 @@ If TEMP is non-nil, then clicking on a buffer restores the previous display." | |||
| 3901 | (defun speedbar-buffers-tail-notes (buffer) | 3900 | (defun speedbar-buffers-tail-notes (buffer) |
| 3902 | "Add a note to the end of the last tag line. | 3901 | "Add a note to the end of the last tag line. |
| 3903 | Argument BUFFER is the buffer being tested." | 3902 | Argument BUFFER is the buffer being tested." |
| 3904 | (let (mod ro) | 3903 | (when (with-current-buffer buffer buffer-read-only) |
| 3905 | (with-current-buffer buffer | 3904 | (speedbar-insert-button "%" nil nil nil nil t))) |
| 3906 | (setq mod (buffer-modified-p) | ||
| 3907 | ro buffer-read-only)) | ||
| 3908 | (if ro (speedbar-insert-button "%" nil nil nil nil t)))) | ||
| 3909 | 3905 | ||
| 3910 | (defun speedbar-buffers-item-info () | 3906 | (defun speedbar-buffers-item-info () |
| 3911 | "Display information about the current buffer on the current line." | 3907 | "Display information about the current buffer on the current line." |
| @@ -3920,7 +3916,7 @@ Argument BUFFER is the buffer being tested." | |||
| 3920 | (with-current-buffer buffer (buffer-size)) | 3916 | (with-current-buffer buffer (buffer-size)) |
| 3921 | (or (buffer-file-name buffer) "<No file>")))))) | 3917 | (or (buffer-file-name buffer) "<No file>")))))) |
| 3922 | 3918 | ||
| 3923 | (defun speedbar-buffers-line-directory (&optional depth) | 3919 | (defun speedbar-buffers-line-directory (&optional _depth) |
| 3924 | "Fetch the directory of the file (buffer) specified on the current line. | 3920 | "Fetch the directory of the file (buffer) specified on the current line. |
| 3925 | Optional argument DEPTH specifies the current depth of the back search." | 3921 | Optional argument DEPTH specifies the current depth of the back search." |
| 3926 | (save-excursion | 3922 | (save-excursion |
| @@ -3937,7 +3933,7 @@ Optional argument DEPTH specifies the current depth of the back search." | |||
| 3937 | "") | 3933 | "") |
| 3938 | (buffer-file-name buffer)))))))) | 3934 | (buffer-file-name buffer)))))))) |
| 3939 | 3935 | ||
| 3940 | (defun speedbar-buffer-click (text token indent) | 3936 | (defun speedbar-buffer-click (text token _indent) |
| 3941 | "When the users clicks on a buffer-button in speedbar. | 3937 | "When the users clicks on a buffer-button in speedbar. |
| 3942 | TEXT is the buffer's name, TOKEN and INDENT are unused." | 3938 | TEXT is the buffer's name, TOKEN and INDENT are unused." |
| 3943 | (if dframe-power-click | 3939 | (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." | |||
| 1631 | (let ((inhibit-read-only t)) | 1631 | (let ((inhibit-read-only t)) |
| 1632 | (message "Strokifying %s..." buffer) | 1632 | (message "Strokifying %s..." buffer) |
| 1633 | (goto-char (point-min)) | 1633 | (goto-char (point-min)) |
| 1634 | (let (ext string image) | 1634 | (let (string image) |
| 1635 | ;; The comment below is what I'd have to do if I wanted to | 1635 | ;; The comment below is what I'd have to do if I wanted to |
| 1636 | ;; deal with random newlines in the midst of the compressed | 1636 | ;; deal with random newlines in the midst of the compressed |
| 1637 | ;; strings. If I do this, I'll also have to change | 1637 | ;; 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). | |||
| 245 | (setq ,(car spec) (1+ ,(car spec)))) | 245 | (setq ,(car spec) (1+ ,(car spec)))) |
| 246 | ,@(cdr (cdr spec)))))) | 246 | ,@(cdr (cdr spec)))))) |
| 247 | 247 | ||
| 248 | (defmacro declare (&rest specs) | 248 | (defmacro declare (&rest _specs) |
| 249 | "Do not evaluate any arguments and return nil. | 249 | "Do not evaluate any arguments and return nil. |
| 250 | Treated as a declaration when used at the right place in a | 250 | Treated as a declaration when used at the right place in a |
| 251 | `defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" | 251 | `defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" |
| @@ -260,7 +260,7 @@ Otherwise, return result of last form in BODY." | |||
| 260 | 260 | ||
| 261 | ;;;; Basic Lisp functions. | 261 | ;;;; Basic Lisp functions. |
| 262 | 262 | ||
| 263 | (defun ignore (&rest ignore) | 263 | (defun ignore (&rest _ignore) |
| 264 | "Do nothing and return nil. | 264 | "Do nothing and return nil. |
| 265 | This function accepts any number of arguments, but ignores them." | 265 | This function accepts any number of arguments, but ignores them." |
| 266 | (interactive) | 266 | (interactive) |
| @@ -1798,7 +1798,7 @@ Signal an error if the program returns with a non-zero exit status." | |||
| 1798 | 'process-kill-without-query | 1798 | 'process-kill-without-query |
| 1799 | "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'." | 1799 | "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'." |
| 1800 | "22.1") | 1800 | "22.1") |
| 1801 | (defun process-kill-without-query (process &optional flag) | 1801 | (defun process-kill-without-query (process &optional _flag) |
| 1802 | "Say no query needed if PROCESS is running when Emacs is exited. | 1802 | "Say no query needed if PROCESS is running when Emacs is exited. |
| 1803 | Optional second argument if non-nil says to require a query. | 1803 | Optional second argument if non-nil says to require a query. |
| 1804 | Value is t if a query was formerly required." | 1804 | Value is t if a query was formerly required." |
| @@ -3445,7 +3445,7 @@ If SYNTAX is nil, return nil." | |||
| 3445 | 3445 | ||
| 3446 | ;;;; Text clones | 3446 | ;;;; Text clones |
| 3447 | 3447 | ||
| 3448 | (defun text-clone-maintain (ol1 after beg end &optional len) | 3448 | (defun text-clone-maintain (ol1 after beg end &optional _len) |
| 3449 | "Propagate the changes made under the overlay OL1 to the other clones. | 3449 | "Propagate the changes made under the overlay OL1 to the other clones. |
| 3450 | This is used on the `modification-hooks' property of text clones." | 3450 | This is used on the `modification-hooks' property of text clones." |
| 3451 | (when (and after (not undo-in-progress) (overlay-start ol1)) | 3451 | (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).") | |||
| 47 | (defun talk () | 47 | (defun talk () |
| 48 | "Connect to the Emacs talk group from the current X display or tty frame." | 48 | "Connect to the Emacs talk group from the current X display or tty frame." |
| 49 | (interactive) | 49 | (interactive) |
| 50 | (let ((type (frame-live-p (selected-frame))) | 50 | (let ((type (frame-live-p (selected-frame)))) |
| 51 | (display (frame-terminal (selected-frame)))) | ||
| 52 | (if (or (eq type t) (eq type 'x)) | 51 | (if (or (eq type t) (eq type 'x)) |
| 53 | (talk-add-display | 52 | (talk-add-display |
| 54 | (terminal-name (frame-terminal (selected-frame)))) | 53 | (terminal-name (frame-terminal (selected-frame)))) |
| 55 | (error "Unknown frame type"))) | 54 | (error "Unknown frame type"))) |
| 56 | (talk-update-buffers)) | 55 | (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 @@ | |||
| 1 | ;;; tar-mode.el --- simple editing of tar files from GNU emacs | 1 | ;;; tar-mode.el --- simple editing of tar files from GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1990-1991, 1993-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990-1991, 1993-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1152,7 +1152,6 @@ to make your changes permanent." | |||
| 1152 | subfile-size) | 1152 | subfile-size) |
| 1153 | (with-current-buffer tar-superior-buffer | 1153 | (with-current-buffer tar-superior-buffer |
| 1154 | (let* ((start (tar-header-data-start descriptor)) | 1154 | (let* ((start (tar-header-data-start descriptor)) |
| 1155 | (name (tar-header-name descriptor)) | ||
| 1156 | (size (tar-header-size descriptor)) | 1155 | (size (tar-header-size descriptor)) |
| 1157 | (head (memq descriptor tar-parse-info))) | 1156 | (head (memq descriptor tar-parse-info))) |
| 1158 | (if (not head) | 1157 | (if (not head) |
| @@ -1232,7 +1231,7 @@ Leaves the region wide." | |||
| 1232 | 1231 | ||
| 1233 | 1232 | ||
| 1234 | ;; Used in write-region-annotate-functions to write tar-files out correctly. | 1233 | ;; Used in write-region-annotate-functions to write tar-files out correctly. |
| 1235 | (defun tar-write-region-annotate (start end) | 1234 | (defun tar-write-region-annotate (start _end) |
| 1236 | ;; When called from write-file (and auto-save), `start' is nil. | 1235 | ;; When called from write-file (and auto-save), `start' is nil. |
| 1237 | ;; When called from M-x write-region, we assume the user wants to save | 1236 | ;; When called from M-x write-region, we assume the user wants to save |
| 1238 | ;; (part of) the summary, not the tar data. | 1237 | ;; (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." | |||
| 1005 | (unwind-protect | 1005 | (unwind-protect |
| 1006 | (progn | 1006 | (progn |
| 1007 | (set-process-filter te-process | 1007 | (set-process-filter te-process |
| 1008 | (function (lambda (p s) | 1008 | (function (lambda (_p s) |
| 1009 | (or (eq (length s) 1) | 1009 | (or (eq (length s) 1) |
| 1010 | (setq te-pending-output (list 1 s))) | 1010 | (setq te-pending-output (list 1 s))) |
| 1011 | (throw 'char (aref s 0))))) | 1011 | (throw 'char (aref s 0))))) |
| @@ -1327,7 +1327,7 @@ in the directory specified by `te-terminfo-directory'." | |||
| 1327 | "im=:ei=:dm=:ed=:mi:do=^p^j:nl=^p^j:bs:") | 1327 | "im=:ei=:dm=:ed=:mi:do=^p^j:nl=^p^j:bs:") |
| 1328 | ) | 1328 | ) |
| 1329 | 1329 | ||
| 1330 | (defun te-tic-sentinel (proc state-change) | 1330 | (defun te-tic-sentinel (_proc state-change) |
| 1331 | "If tic has finished, delete the .tif file" | 1331 | "If tic has finished, delete the .tif file" |
| 1332 | (if (equal state-change "finished | 1332 | (if (equal state-change "finished |
| 1333 | ") | 1333 | ") |
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." | |||
| 470 | (result "") | 470 | (result "") |
| 471 | field-width | 471 | field-width |
| 472 | field-result | 472 | field-result |
| 473 | alt-form change-case require-padding | 473 | alt-form change-case |
| 474 | (paren-level 0)) | 474 | (paren-level 0)) |
| 475 | (while (< ind fmt-len) | 475 | (while (< ind fmt-len) |
| 476 | (setq cur-char (aref format ind)) | 476 | (setq cur-char (aref format ind)) |
| @@ -480,7 +480,7 @@ and all `time-stamp-format' compatibility." | |||
| 480 | (cond | 480 | (cond |
| 481 | ((eq cur-char ?%) | 481 | ((eq cur-char ?%) |
| 482 | ;; eat any additional args to allow for future expansion | 482 | ;; eat any additional args to allow for future expansion |
| 483 | (setq alt-form nil change-case nil require-padding nil field-width "") | 483 | (setq alt-form nil change-case nil field-width "") |
| 484 | (while (progn | 484 | (while (progn |
| 485 | (setq ind (1+ ind)) | 485 | (setq ind (1+ ind)) |
| 486 | (setq cur-char (if (< ind fmt-len) | 486 | (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)'." | |||
| 365 | size | 365 | size |
| 366 | nil))) | 366 | nil))) |
| 367 | 367 | ||
| 368 | (with-no-warnings | ||
| 369 | ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix". | ||
| 370 | (defvar now) | ||
| 371 | (defvar time) | ||
| 372 | (defvar load) | ||
| 373 | (defvar mail) | ||
| 374 | (defvar 24-hours) | ||
| 375 | (defvar hour) | ||
| 376 | (defvar 12-hours) | ||
| 377 | (defvar am-pm) | ||
| 378 | (defvar minutes) | ||
| 379 | (defvar seconds) | ||
| 380 | (defvar time-zone) | ||
| 381 | (defvar day) | ||
| 382 | (defvar year) | ||
| 383 | (defvar monthname) | ||
| 384 | (defvar month) | ||
| 385 | (defvar dayname)) | ||
| 386 | |||
| 368 | (defun display-time-update () | 387 | (defun display-time-update () |
| 369 | "Update the display-time info for the mode line. | 388 | "Update the display-time info for the mode line. |
| 370 | However, don't redisplay right now. | 389 | 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.") | |||
| 88 | 88 | ||
| 89 | (defconst tool-bar-keymap-cache (make-hash-table :weakness t :test 'equal)) | 89 | (defconst tool-bar-keymap-cache (make-hash-table :weakness t :test 'equal)) |
| 90 | 90 | ||
| 91 | (defun tool-bar-make-keymap (&optional ignore) | 91 | (defun tool-bar-make-keymap (&optional _ignore) |
| 92 | "Generate an actual keymap from `tool-bar-map'. | 92 | "Generate an actual keymap from `tool-bar-map'. |
| 93 | Its main job is to figure out which images to use based on the display's | 93 | Its main job is to figure out which images to use based on the display's |
| 94 | color capability and based on the available image libraries." | 94 | 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." | |||
| 198 | (setq tooltip-timeout-id | 198 | (setq tooltip-timeout-id |
| 199 | (add-timeout (tooltip-delay) 'tooltip-timeout nil))) | 199 | (add-timeout (tooltip-delay) 'tooltip-timeout nil))) |
| 200 | 200 | ||
| 201 | (defun tooltip-timeout (object) | 201 | (defun tooltip-timeout (_object) |
| 202 | "Function called when timer with id `tooltip-timeout-id' fires." | 202 | "Function called when timer with id `tooltip-timeout-id' fires." |
| 203 | (run-hook-with-args-until-success 'tooltip-functions | 203 | (run-hook-with-args-until-success 'tooltip-functions |
| 204 | tooltip-last-mouse-motion-event)) | 204 | tooltip-last-mouse-motion-event)) |
| @@ -256,7 +256,7 @@ in echo area." | |||
| 256 | 256 | ||
| 257 | (declare-function x-hide-tip "xfns.c" ()) | 257 | (declare-function x-hide-tip "xfns.c" ()) |
| 258 | 258 | ||
| 259 | (defun tooltip-hide (&optional ignored-arg) | 259 | (defun tooltip-hide (&optional _ignored-arg) |
| 260 | "Hide a tooltip, if one is displayed. | 260 | "Hide a tooltip, if one is displayed. |
| 261 | Value is non-nil if tooltip was open." | 261 | Value is non-nil if tooltip was open." |
| 262 | (tooltip-cancel-delayed-tip) | 262 | (tooltip-cancel-delayed-tip) |
| @@ -373,7 +373,7 @@ MSG is either a help string to display, or nil to cancel the display." | |||
| 373 | ;; On text-only displays, try `tooltip-show-help-non-mode'. | 373 | ;; On text-only displays, try `tooltip-show-help-non-mode'. |
| 374 | (tooltip-show-help-non-mode msg))) | 374 | (tooltip-show-help-non-mode msg))) |
| 375 | 375 | ||
| 376 | (defun tooltip-help-tips (event) | 376 | (defun tooltip-help-tips (_event) |
| 377 | "Hook function to display a help tooltip. | 377 | "Hook function to display a help tooltip. |
| 378 | This is installed on the hook `tooltip-functions', which | 378 | This is installed on the hook `tooltip-functions', which |
| 379 | is run when the timer with id `tooltip-timeout-id' fires. | 379 | 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.") | |||
| 657 | (widget-get tree :dynargs))) | 657 | (widget-get tree :dynargs))) |
| 658 | tree)) | 658 | tree)) |
| 659 | 659 | ||
| 660 | (defvar widget-glyph-enable) ; XEmacs | ||
| 661 | |||
| 660 | (defun tree-widget-value-create (tree) | 662 | (defun tree-widget-value-create (tree) |
| 661 | "Create the TREE tree-widget." | 663 | "Create the TREE tree-widget." |
| 662 | (let* ((node (tree-widget-node tree)) | 664 | (let* ((node (tree-widget-node tree)) |
| @@ -792,7 +794,7 @@ Each function is passed a tree-widget. If the value of the :open | |||
| 792 | property is non-nil the tree has been expanded, else collapsed. | 794 | property is non-nil the tree has been expanded, else collapsed. |
| 793 | This hook should be local in the buffer setup to display widgets.") | 795 | This hook should be local in the buffer setup to display widgets.") |
| 794 | 796 | ||
| 795 | (defun tree-widget-action (tree &optional event) | 797 | (defun tree-widget-action (tree &optional _event) |
| 796 | "Handle the :action of the TREE tree-widget. | 798 | "Handle the :action of the TREE tree-widget. |
| 797 | That is, toggle expansion of the TREE tree-widget. | 799 | That is, toggle expansion of the TREE tree-widget. |
| 798 | Ignore the EVENT argument." | 800 | 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 @@ | |||
| 76 | See the docstring for the `type-break-mode' command for more information. | 76 | See the docstring for the `type-break-mode' command for more information. |
| 77 | Setting this variable directly does not take effect; | 77 | Setting this variable directly does not take effect; |
| 78 | use either \\[customize] or the function `type-break-mode'." | 78 | use either \\[customize] or the function `type-break-mode'." |
| 79 | :set (lambda (symbol value) | 79 | :set (lambda (_symbol value) |
| 80 | (type-break-mode (if value 1 -1))) | 80 | (type-break-mode (if value 1 -1))) |
| 81 | :initialize 'custom-initialize-default | 81 | :initialize 'custom-initialize-default |
| 82 | :type 'boolean | 82 | :type 'boolean |
| @@ -831,7 +831,7 @@ keystroke threshold has been exceeded." | |||
| 831 | (quit | 831 | (quit |
| 832 | (type-break-schedule type-break-query-interval)))))) | 832 | (type-break-schedule type-break-query-interval)))))) |
| 833 | 833 | ||
| 834 | (defun type-break-noninteractive-query (&optional ignored-args) | 834 | (defun type-break-noninteractive-query (&optional _ignored-args) |
| 835 | "Null query function which doesn't interrupt user and assumes `no'. | 835 | "Null query function which doesn't interrupt user and assumes `no'. |
| 836 | It prints a reminder in the echo area to take a break, but doesn't enforce | 836 | It prints a reminder in the echo area to take a break, but doesn't enforce |
| 837 | this or ask the user to start one right now." | 837 | 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." | |||
| 807 | (forward-line (1- line)) | 807 | (forward-line (1- line)) |
| 808 | (view-recenter)) | 808 | (view-recenter)) |
| 809 | 809 | ||
| 810 | (defun View-back-to-mark (&optional ignore) | 810 | (defun View-back-to-mark (&optional _ignore) |
| 811 | "Return to last mark set in View mode, else beginning of file. | 811 | "Return to last mark set in View mode, else beginning of file. |
| 812 | Display that line at the center of the window. | 812 | Display that line at the center of the window. |
| 813 | This command pops the mark ring, so that successive | 813 | 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 @@ | |||
| 1 | ;;; w32-fns.el --- Lisp routines for Windows NT | 1 | ;;; w32-fns.el --- Lisp routines for 32-bit Windows |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -285,7 +285,7 @@ Note that on MS-Windows, primary and secondary selections set by Emacs | |||
| 285 | are not available to other programs." | 285 | are not available to other programs." |
| 286 | (put 'x-selections (or type 'PRIMARY) data)) | 286 | (put 'x-selections (or type 'PRIMARY) data)) |
| 287 | 287 | ||
| 288 | (defun x-get-selection (&optional type data-type) | 288 | (defun x-get-selection (&optional type _data-type) |
| 289 | "Return the value of an X Windows selection. | 289 | "Return the value of an X Windows selection. |
| 290 | The argument TYPE (default `PRIMARY') says which selection, | 290 | The argument TYPE (default `PRIMARY') says which selection, |
| 291 | and the argument DATA-TYPE (default `STRING') says | 291 | and the argument DATA-TYPE (default `STRING') says |
| @@ -431,6 +431,11 @@ Consult the selection. Treat empty strings as if they were unset." | |||
| 431 | 431 | ||
| 432 | 432 | ||
| 433 | ;;;; Support for build process | 433 | ;;;; Support for build process |
| 434 | |||
| 435 | ;; From autoload.el | ||
| 436 | (defvar autoload-make-program) | ||
| 437 | (defvar generated-autoload-file) | ||
| 438 | |||
| 434 | (defun w32-batch-update-autoloads () | 439 | (defun w32-batch-update-autoloads () |
| 435 | "Like `batch-update-autoloads', but takes the name of the autoloads file | 440 | "Like `batch-update-autoloads', but takes the name of the autoloads file |
| 436 | from the command line. | 441 | 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." | |||
| 540 | (interactive) | 540 | (interactive) |
| 541 | (customize-apropos "wdired" 'groups)) | 541 | (customize-apropos "wdired" 'groups)) |
| 542 | 542 | ||
| 543 | (defun wdired-revert (&optional arg noconfirm) | 543 | (defun wdired-revert (&optional _arg _noconfirm) |
| 544 | "Discard changes in the buffer and update it based on changes on disk. | 544 | "Discard changes in the buffer and update it based on changes on disk. |
| 545 | Optional arguments are ignored." | 545 | Optional arguments are ignored." |
| 546 | (wdired-change-to-dired-mode) | 546 | (wdired-change-to-dired-mode) |
| @@ -648,7 +648,7 @@ If OLD, return the old target. If MOVE, move point before it." | |||
| 648 | (if (< arg 0) | 648 | (if (< arg 0) |
| 649 | (funcall command arg) | 649 | (funcall command arg) |
| 650 | (while (> arg 0) | 650 | (while (> arg 0) |
| 651 | (condition-case err | 651 | (condition-case nil |
| 652 | (progn | 652 | (progn |
| 653 | (funcall command 1) | 653 | (funcall command 1) |
| 654 | (setq arg (1- arg))) | 654 | (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")) | |||
| 2046 | "Scroll help window, if it exists. | 2046 | "Scroll help window, if it exists. |
| 2047 | 2047 | ||
| 2048 | If UP is non-nil, scroll up; otherwise, scroll down." | 2048 | If UP is non-nil, scroll up; otherwise, scroll down." |
| 2049 | (condition-case data-help | 2049 | (condition-case nil |
| 2050 | (let ((buffer (get-buffer whitespace-help-buffer-name))) | 2050 | (let ((buffer (get-buffer whitespace-help-buffer-name))) |
| 2051 | (if buffer | 2051 | (if buffer |
| 2052 | (with-selected-window (get-buffer-window buffer) | 2052 | (with-selected-window (get-buffer-window buffer) |
| @@ -2494,7 +2494,7 @@ buffer." | |||
| 2494 | r)) | 2494 | r)) |
| 2495 | 2495 | ||
| 2496 | 2496 | ||
| 2497 | (defun whitespace-buffer-changed (beg end) | 2497 | (defun whitespace-buffer-changed (_beg _end) |
| 2498 | "Set `whitespace-buffer-changed' variable to t." | 2498 | "Set `whitespace-buffer-changed' variable to t." |
| 2499 | (setq whitespace-buffer-changed t)) | 2499 | (setq whitespace-buffer-changed t)) |
| 2500 | 2500 | ||
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." | |||
| 189 | :value-create 'widget-browse-value-create | 189 | :value-create 'widget-browse-value-create |
| 190 | :action 'widget-browse-action) | 190 | :action 'widget-browse-action) |
| 191 | 191 | ||
| 192 | (defun widget-browse-action (widget &optional event) | 192 | (defun widget-browse-action (widget &optional _event) |
| 193 | ;; Create widget browser for WIDGET's :value. | 193 | ;; Create widget browser for WIDGET's :value. |
| 194 | (widget-browse (widget-get widget :value))) | 194 | (widget-browse (widget-get widget :value))) |
| 195 | 195 | ||
| @@ -205,12 +205,12 @@ The :value of the widget shuld be the widget to be browsed." | |||
| 205 | 205 | ||
| 206 | ;;; Keyword Printer Functions. | 206 | ;;; Keyword Printer Functions. |
| 207 | 207 | ||
| 208 | (defun widget-browse-widget (widget key value) | 208 | (defun widget-browse-widget (_widget _key value) |
| 209 | "Insert description of WIDGET's KEY VALUE. | 209 | "Insert description of WIDGET's KEY VALUE. |
| 210 | VALUE is assumed to be a widget." | 210 | VALUE is assumed to be a widget." |
| 211 | (widget-create 'widget-browse value)) | 211 | (widget-create 'widget-browse value)) |
| 212 | 212 | ||
| 213 | (defun widget-browse-widgets (widget key value) | 213 | (defun widget-browse-widgets (_widget _key value) |
| 214 | "Insert description of WIDGET's KEY VALUE. | 214 | "Insert description of WIDGET's KEY VALUE. |
| 215 | VALUE is assumed to be a list of widgets." | 215 | VALUE is assumed to be a list of widgets." |
| 216 | (while value | 216 | (while value |
| @@ -220,7 +220,7 @@ VALUE is assumed to be a list of widgets." | |||
| 220 | (when value | 220 | (when value |
| 221 | (widget-insert " ")))) | 221 | (widget-insert " ")))) |
| 222 | 222 | ||
| 223 | (defun widget-browse-sexp (widget key value) | 223 | (defun widget-browse-sexp (_widget _key value) |
| 224 | "Insert description of WIDGET's KEY VALUE. | 224 | "Insert description of WIDGET's KEY VALUE. |
| 225 | Nothing is assumed about value." | 225 | Nothing is assumed about value." |
| 226 | (let ((pp (condition-case signal | 226 | (let ((pp (condition-case signal |
| @@ -236,7 +236,7 @@ Nothing is assumed about value." | |||
| 236 | (widget-insert pp) | 236 | (widget-insert pp) |
| 237 | (widget-create 'push-button | 237 | (widget-create 'push-button |
| 238 | :tag "show" | 238 | :tag "show" |
| 239 | :action (lambda (widget &optional event) | 239 | :action (lambda (widget &optional _event) |
| 240 | (with-output-to-temp-buffer | 240 | (with-output-to-temp-buffer |
| 241 | "*Pp Eval Output*" | 241 | "*Pp Eval Output*" |
| 242 | (princ (widget-get widget :value)))) | 242 | (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.") | |||
| 414 | (overlay-put overlay 'follow-link follow-link) | 414 | (overlay-put overlay 'follow-link follow-link) |
| 415 | (overlay-put overlay 'help-echo help-echo))) | 415 | (overlay-put overlay 'help-echo help-echo))) |
| 416 | 416 | ||
| 417 | (defun widget-mouse-help (window overlay point) | 417 | (defun widget-mouse-help (_window overlay _point) |
| 418 | "Help-echo callback for widgets whose :help-echo is a function." | 418 | "Help-echo callback for widgets whose :help-echo is a function." |
| 419 | (with-current-buffer (overlay-buffer overlay) | 419 | (with-current-buffer (overlay-buffer overlay) |
| 420 | (let* ((widget (widget-at (overlay-start overlay))) | 420 | (let* ((widget (widget-at (overlay-start overlay))) |
| @@ -466,7 +466,7 @@ the :notify function can't know the new value.") | |||
| 466 | (overlay-put overlay 'modification-hooks '(widget-overlay-inactive)) | 466 | (overlay-put overlay 'modification-hooks '(widget-overlay-inactive)) |
| 467 | (widget-put widget :inactive overlay)))) | 467 | (widget-put widget :inactive overlay)))) |
| 468 | 468 | ||
| 469 | (defun widget-overlay-inactive (&rest junk) | 469 | (defun widget-overlay-inactive (&rest _junk) |
| 470 | "Ignoring the arguments, signal an error." | 470 | "Ignoring the arguments, signal an error." |
| 471 | (unless inhibit-read-only | 471 | (unless inhibit-read-only |
| 472 | (error "The widget here is not active"))) | 472 | (error "The widget here is not active"))) |
| @@ -648,7 +648,7 @@ extension (xpm, xbm, gif, jpg, or png) located in | |||
| 648 | This exists as a variable so it can be set locally in certain | 648 | This exists as a variable so it can be set locally in certain |
| 649 | buffers.") | 649 | buffers.") |
| 650 | 650 | ||
| 651 | (defun widget-image-insert (widget tag image &optional down inactive) | 651 | (defun widget-image-insert (widget tag image &optional _down _inactive) |
| 652 | "In WIDGET, insert the text TAG or, if supported, IMAGE. | 652 | "In WIDGET, insert the text TAG or, if supported, IMAGE. |
| 653 | IMAGE should either be an image or an image file name sans extension | 653 | IMAGE should either be an image or an image file name sans extension |
| 654 | \(xpm, xbm, gif, jpg, or png) located in `widget-image-directory'. | 654 | \(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." | |||
| 1307 | (add-hook 'before-change-functions 'widget-before-change nil t) | 1307 | (add-hook 'before-change-functions 'widget-before-change nil t) |
| 1308 | (add-hook 'after-change-functions 'widget-after-change nil t)) | 1308 | (add-hook 'after-change-functions 'widget-after-change nil t)) |
| 1309 | 1309 | ||
| 1310 | (defun widget-after-change (from to old) | 1310 | (defun widget-after-change (from to _old) |
| 1311 | "Adjust field size and text properties." | 1311 | "Adjust field size and text properties." |
| 1312 | (let ((field (widget-field-find from)) | 1312 | (let ((field (widget-field-find from)) |
| 1313 | (other (widget-field-find to))) | 1313 | (other (widget-field-find to))) |
| @@ -1431,8 +1431,8 @@ The value of the :type attribute should be an unconverted widget type." | |||
| 1431 | 1431 | ||
| 1432 | (define-widget 'default nil | 1432 | (define-widget 'default nil |
| 1433 | "Basic widget other widgets are derived from." | 1433 | "Basic widget other widgets are derived from." |
| 1434 | :value-to-internal (lambda (widget value) value) | 1434 | :value-to-internal (lambda (_widget value) value) |
| 1435 | :value-to-external (lambda (widget value) value) | 1435 | :value-to-external (lambda (_widget value) value) |
| 1436 | :button-prefix 'widget-button-prefix | 1436 | :button-prefix 'widget-button-prefix |
| 1437 | :button-suffix 'widget-button-suffix | 1437 | :button-suffix 'widget-button-suffix |
| 1438 | :complete 'widget-default-complete | 1438 | :complete 'widget-default-complete |
| @@ -1544,7 +1544,7 @@ During this call, `widget--completing-widget' is bound to WIDGET." | |||
| 1544 | (widget-put widget :to to))) | 1544 | (widget-put widget :to to))) |
| 1545 | (widget-clear-undo)) | 1545 | (widget-clear-undo)) |
| 1546 | 1546 | ||
| 1547 | (defun widget-default-format-handler (widget escape) | 1547 | (defun widget-default-format-handler (_widget escape) |
| 1548 | (error "Unknown escape `%c'" escape)) | 1548 | (error "Unknown escape `%c'" escape)) |
| 1549 | 1549 | ||
| 1550 | (defun widget-default-button-face-get (widget) | 1550 | (defun widget-default-button-face-get (widget) |
| @@ -1652,11 +1652,11 @@ During this call, `widget--completing-widget' is bound to WIDGET." | |||
| 1652 | (when parent | 1652 | (when parent |
| 1653 | (widget-apply parent :notify widget event)))) | 1653 | (widget-apply parent :notify widget event)))) |
| 1654 | 1654 | ||
| 1655 | (defun widget-default-notify (widget child &optional event) | 1655 | (defun widget-default-notify (widget _child &optional event) |
| 1656 | "Pass notification to parent." | 1656 | "Pass notification to parent." |
| 1657 | (widget-default-action widget event)) | 1657 | (widget-default-action widget event)) |
| 1658 | 1658 | ||
| 1659 | (defun widget-default-prompt-value (widget prompt value unbound) | 1659 | (defun widget-default-prompt-value (_widget prompt _value _unbound) |
| 1660 | "Read an arbitrary value." | 1660 | "Read an arbitrary value." |
| 1661 | (eval-minibuffer prompt)) | 1661 | (eval-minibuffer prompt)) |
| 1662 | 1662 | ||
| @@ -1704,14 +1704,14 @@ as the argument to `documentation-property'." | |||
| 1704 | ;; Match if the value is the same. | 1704 | ;; Match if the value is the same. |
| 1705 | (equal (widget-get widget :value) value)) | 1705 | (equal (widget-get widget :value) value)) |
| 1706 | 1706 | ||
| 1707 | (defun widget-item-match-inline (widget values) | 1707 | (defun widget-item-match-inline (widget vals) |
| 1708 | ;; Match if the value is the same. | 1708 | ;; Match if the value is the same. |
| 1709 | (let ((value (widget-get widget :value))) | 1709 | (let ((value (widget-get widget :value))) |
| 1710 | (and (listp value) | 1710 | (and (listp value) |
| 1711 | (<= (length value) (length values)) | 1711 | (<= (length value) (length vals)) |
| 1712 | (let ((head (widget-sublist values 0 (length value)))) | 1712 | (let ((head (widget-sublist vals 0 (length value)))) |
| 1713 | (and (equal head value) | 1713 | (and (equal head value) |
| 1714 | (cons head (widget-sublist values (length value)))))))) | 1714 | (cons head (widget-sublist vals (length value)))))))) |
| 1715 | 1715 | ||
| 1716 | (defun widget-sublist (list start &optional end) | 1716 | (defun widget-sublist (list start &optional end) |
| 1717 | "Return the sublist of LIST from START to END. | 1717 | "Return the sublist of LIST from START to END. |
| @@ -1796,7 +1796,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1796 | "A link to an info file." | 1796 | "A link to an info file." |
| 1797 | :action 'widget-info-link-action) | 1797 | :action 'widget-info-link-action) |
| 1798 | 1798 | ||
| 1799 | (defun widget-info-link-action (widget &optional event) | 1799 | (defun widget-info-link-action (widget &optional _event) |
| 1800 | "Open the info node specified by WIDGET." | 1800 | "Open the info node specified by WIDGET." |
| 1801 | (info (widget-value widget))) | 1801 | (info (widget-value widget))) |
| 1802 | 1802 | ||
| @@ -1806,7 +1806,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1806 | "A link to an www page." | 1806 | "A link to an www page." |
| 1807 | :action 'widget-url-link-action) | 1807 | :action 'widget-url-link-action) |
| 1808 | 1808 | ||
| 1809 | (defun widget-url-link-action (widget &optional event) | 1809 | (defun widget-url-link-action (widget &optional _event) |
| 1810 | "Open the URL specified by WIDGET." | 1810 | "Open the URL specified by WIDGET." |
| 1811 | (browse-url (widget-value widget))) | 1811 | (browse-url (widget-value widget))) |
| 1812 | 1812 | ||
| @@ -1816,7 +1816,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1816 | "A link to an Emacs function." | 1816 | "A link to an Emacs function." |
| 1817 | :action 'widget-function-link-action) | 1817 | :action 'widget-function-link-action) |
| 1818 | 1818 | ||
| 1819 | (defun widget-function-link-action (widget &optional event) | 1819 | (defun widget-function-link-action (widget &optional _event) |
| 1820 | "Show the function specified by WIDGET." | 1820 | "Show the function specified by WIDGET." |
| 1821 | (describe-function (widget-value widget))) | 1821 | (describe-function (widget-value widget))) |
| 1822 | 1822 | ||
| @@ -1826,7 +1826,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1826 | "A link to an Emacs variable." | 1826 | "A link to an Emacs variable." |
| 1827 | :action 'widget-variable-link-action) | 1827 | :action 'widget-variable-link-action) |
| 1828 | 1828 | ||
| 1829 | (defun widget-variable-link-action (widget &optional event) | 1829 | (defun widget-variable-link-action (widget &optional _event) |
| 1830 | "Show the variable specified by WIDGET." | 1830 | "Show the variable specified by WIDGET." |
| 1831 | (describe-variable (widget-value widget))) | 1831 | (describe-variable (widget-value widget))) |
| 1832 | 1832 | ||
| @@ -1836,7 +1836,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1836 | "A link to a file." | 1836 | "A link to a file." |
| 1837 | :action 'widget-file-link-action) | 1837 | :action 'widget-file-link-action) |
| 1838 | 1838 | ||
| 1839 | (defun widget-file-link-action (widget &optional event) | 1839 | (defun widget-file-link-action (widget &optional _event) |
| 1840 | "Find the file specified by WIDGET." | 1840 | "Find the file specified by WIDGET." |
| 1841 | (find-file (widget-value widget))) | 1841 | (find-file (widget-value widget))) |
| 1842 | 1842 | ||
| @@ -1846,7 +1846,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1846 | "A link to an Emacs Lisp library file." | 1846 | "A link to an Emacs Lisp library file." |
| 1847 | :action 'widget-emacs-library-link-action) | 1847 | :action 'widget-emacs-library-link-action) |
| 1848 | 1848 | ||
| 1849 | (defun widget-emacs-library-link-action (widget &optional event) | 1849 | (defun widget-emacs-library-link-action (widget &optional _event) |
| 1850 | "Find the Emacs library file specified by WIDGET." | 1850 | "Find the Emacs library file specified by WIDGET." |
| 1851 | (find-file (locate-library (widget-value widget)))) | 1851 | (find-file (locate-library (widget-value widget)))) |
| 1852 | 1852 | ||
| @@ -1856,7 +1856,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1856 | "A link to Commentary in an Emacs Lisp library file." | 1856 | "A link to Commentary in an Emacs Lisp library file." |
| 1857 | :action 'widget-emacs-commentary-link-action) | 1857 | :action 'widget-emacs-commentary-link-action) |
| 1858 | 1858 | ||
| 1859 | (defun widget-emacs-commentary-link-action (widget &optional event) | 1859 | (defun widget-emacs-commentary-link-action (widget &optional _event) |
| 1860 | "Find the Commentary section of the Emacs file specified by WIDGET." | 1860 | "Find the Commentary section of the Emacs file specified by WIDGET." |
| 1861 | (finder-commentary (widget-value widget))) | 1861 | (finder-commentary (widget-value widget))) |
| 1862 | 1862 | ||
| @@ -1887,7 +1887,7 @@ by some other text in the `:format' string (if specified)." | |||
| 1887 | (defvar widget-field-history nil | 1887 | (defvar widget-field-history nil |
| 1888 | "History of field minibuffer edits.") | 1888 | "History of field minibuffer edits.") |
| 1889 | 1889 | ||
| 1890 | (defun widget-field-prompt-internal (widget prompt initial history) | 1890 | (defun widget-field-prompt-internal (_widget prompt initial history) |
| 1891 | "Read string for WIDGET prompting with PROMPT. | 1891 | "Read string for WIDGET prompting with PROMPT. |
| 1892 | INITIAL is the initial input and HISTORY is a symbol containing | 1892 | INITIAL is the initial input and HISTORY is a symbol containing |
| 1893 | the earlier input." | 1893 | the earlier input." |
| @@ -1907,7 +1907,7 @@ the earlier input." | |||
| 1907 | 1907 | ||
| 1908 | (defvar widget-edit-functions nil) | 1908 | (defvar widget-edit-functions nil) |
| 1909 | 1909 | ||
| 1910 | (defun widget-field-action (widget &optional event) | 1910 | (defun widget-field-action (widget &optional _event) |
| 1911 | "Move to next field." | 1911 | "Move to next field." |
| 1912 | (widget-forward 1) | 1912 | (widget-forward 1) |
| 1913 | (run-hook-with-args 'widget-edit-functions widget)) | 1913 | (run-hook-with-args 'widget-edit-functions widget)) |
| @@ -1922,8 +1922,7 @@ the earlier input." | |||
| 1922 | "Set an editable text field WIDGET to VALUE" | 1922 | "Set an editable text field WIDGET to VALUE" |
| 1923 | (let ((from (widget-field-start widget)) | 1923 | (let ((from (widget-field-start widget)) |
| 1924 | (to (widget-field-text-end widget)) | 1924 | (to (widget-field-text-end widget)) |
| 1925 | (buffer (widget-field-buffer widget)) | 1925 | (buffer (widget-field-buffer widget))) |
| 1926 | (size (widget-get widget :size))) | ||
| 1927 | (when (and from to (buffer-live-p buffer)) | 1926 | (when (and from to (buffer-live-p buffer)) |
| 1928 | (with-current-buffer buffer | 1927 | (with-current-buffer buffer |
| 1929 | (goto-char from) | 1928 | (goto-char from) |
| @@ -1983,7 +1982,7 @@ the earlier input." | |||
| 1983 | result)) | 1982 | result)) |
| 1984 | (widget-get widget :value)))) | 1983 | (widget-get widget :value)))) |
| 1985 | 1984 | ||
| 1986 | (defun widget-field-match (widget value) | 1985 | (defun widget-field-match (_widget value) |
| 1987 | ;; Match any string. | 1986 | ;; Match any string. |
| 1988 | (stringp value)) | 1987 | (stringp value)) |
| 1989 | 1988 | ||
| @@ -2054,7 +2053,7 @@ when he invoked the menu." | |||
| 2054 | :type 'boolean | 2053 | :type 'boolean |
| 2055 | :group 'widgets) | 2054 | :group 'widgets) |
| 2056 | 2055 | ||
| 2057 | (defun widget-choice-mouse-down-action (widget &optional event) | 2056 | (defun widget-choice-mouse-down-action (widget &optional _event) |
| 2058 | ;; Return non-nil if we need a menu. | 2057 | ;; Return non-nil if we need a menu. |
| 2059 | (let ((args (widget-get widget :args)) | 2058 | (let ((args (widget-get widget :args)) |
| 2060 | (old (widget-get widget :choice))) | 2059 | (old (widget-get widget :choice))) |
| @@ -2138,14 +2137,14 @@ when he invoked the menu." | |||
| 2138 | found (widget-apply current :match value))) | 2137 | found (widget-apply current :match value))) |
| 2139 | found)) | 2138 | found)) |
| 2140 | 2139 | ||
| 2141 | (defun widget-choice-match-inline (widget values) | 2140 | (defun widget-choice-match-inline (widget vals) |
| 2142 | ;; Matches if one of the choices matches. | 2141 | ;; Matches if one of the choices matches. |
| 2143 | (let ((args (widget-get widget :args)) | 2142 | (let ((args (widget-get widget :args)) |
| 2144 | current found) | 2143 | current found) |
| 2145 | (while (and args (null found)) | 2144 | (while (and args (null found)) |
| 2146 | (setq current (car args) | 2145 | (setq current (car args) |
| 2147 | args (cdr args) | 2146 | args (cdr args) |
| 2148 | found (widget-match-inline current values))) | 2147 | found (widget-match-inline current vals))) |
| 2149 | found)) | 2148 | found)) |
| 2150 | 2149 | ||
| 2151 | ;;; The `toggle' Widget. | 2150 | ;;; The `toggle' Widget. |
| @@ -2155,7 +2154,7 @@ when he invoked the menu." | |||
| 2155 | :format "%[%v%]\n" | 2154 | :format "%[%v%]\n" |
| 2156 | :value-create 'widget-toggle-value-create | 2155 | :value-create 'widget-toggle-value-create |
| 2157 | :action 'widget-toggle-action | 2156 | :action 'widget-toggle-action |
| 2158 | :match (lambda (widget value) t) | 2157 | :match (lambda (_widget _value) t) |
| 2159 | :on "on" | 2158 | :on "on" |
| 2160 | :off "off") | 2159 | :off "off") |
| 2161 | 2160 | ||
| @@ -2271,29 +2270,29 @@ If the item is checked, CHOSEN is a cons whose cdr is the value." | |||
| 2271 | (and button (widget-put widget :buttons (cons button buttons))) | 2270 | (and button (widget-put widget :buttons (cons button buttons))) |
| 2272 | (and child (widget-put widget :children (cons child children)))))) | 2271 | (and child (widget-put widget :children (cons child children)))))) |
| 2273 | 2272 | ||
| 2274 | (defun widget-checklist-match (widget values) | 2273 | (defun widget-checklist-match (widget vals) |
| 2275 | ;; All values must match a type in the checklist. | 2274 | ;; All values must match a type in the checklist. |
| 2276 | (and (listp values) | 2275 | (and (listp vals) |
| 2277 | (null (cdr (widget-checklist-match-inline widget values))))) | 2276 | (null (cdr (widget-checklist-match-inline widget vals))))) |
| 2278 | 2277 | ||
| 2279 | (defun widget-checklist-match-inline (widget values) | 2278 | (defun widget-checklist-match-inline (widget vals) |
| 2280 | ;; Find the values which match a type in the checklist. | 2279 | ;; Find the values which match a type in the checklist. |
| 2281 | (let ((greedy (widget-get widget :greedy)) | 2280 | (let ((greedy (widget-get widget :greedy)) |
| 2282 | (args (copy-sequence (widget-get widget :args))) | 2281 | (args (copy-sequence (widget-get widget :args))) |
| 2283 | found rest) | 2282 | found rest) |
| 2284 | (while values | 2283 | (while vals |
| 2285 | (let ((answer (widget-checklist-match-up args values))) | 2284 | (let ((answer (widget-checklist-match-up args vals))) |
| 2286 | (cond (answer | 2285 | (cond (answer |
| 2287 | (let ((vals (widget-match-inline answer values))) | 2286 | (let ((vals (widget-match-inline answer vals))) |
| 2288 | (setq found (append found (car vals)) | 2287 | (setq found (append found (car vals)) |
| 2289 | values (cdr vals) | 2288 | vals (cdr vals) |
| 2290 | args (delq answer args)))) | 2289 | args (delq answer args)))) |
| 2291 | (greedy | 2290 | (greedy |
| 2292 | (setq rest (append rest (list (car values))) | 2291 | (setq rest (append rest (list (car vals))) |
| 2293 | values (cdr values))) | 2292 | vals (cdr vals))) |
| 2294 | (t | 2293 | (t |
| 2295 | (setq rest (append rest values) | 2294 | (setq rest (append rest vals) |
| 2296 | values nil))))) | 2295 | vals nil))))) |
| 2297 | (cons found rest))) | 2296 | (cons found rest))) |
| 2298 | 2297 | ||
| 2299 | (defun widget-checklist-match-find (widget &optional vals) | 2298 | (defun widget-checklist-match-find (widget &optional vals) |
| @@ -2375,7 +2374,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2375 | :off "( )" | 2374 | :off "( )" |
| 2376 | :off-glyph "radio0") | 2375 | :off-glyph "radio0") |
| 2377 | 2376 | ||
| 2378 | (defun widget-radio-button-notify (widget child &optional event) | 2377 | (defun widget-radio-button-notify (widget _child &optional event) |
| 2379 | ;; Tell daddy. | 2378 | ;; Tell daddy. |
| 2380 | (widget-apply (widget-get widget :parent) :action widget event)) | 2379 | (widget-apply (widget-get widget :parent) :action widget event)) |
| 2381 | 2380 | ||
| @@ -2544,7 +2543,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2544 | :help-echo "Insert a new item into the list at this position." | 2543 | :help-echo "Insert a new item into the list at this position." |
| 2545 | :action 'widget-insert-button-action) | 2544 | :action 'widget-insert-button-action) |
| 2546 | 2545 | ||
| 2547 | (defun widget-insert-button-action (widget &optional event) | 2546 | (defun widget-insert-button-action (widget &optional _event) |
| 2548 | ;; Ask the parent to insert a new item. | 2547 | ;; Ask the parent to insert a new item. |
| 2549 | (widget-apply (widget-get widget :parent) | 2548 | (widget-apply (widget-get widget :parent) |
| 2550 | :insert-before (widget-get widget :widget))) | 2549 | :insert-before (widget-get widget :widget))) |
| @@ -2557,7 +2556,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2557 | :help-echo "Delete this item from the list." | 2556 | :help-echo "Delete this item from the list." |
| 2558 | :action 'widget-delete-button-action) | 2557 | :action 'widget-delete-button-action) |
| 2559 | 2558 | ||
| 2560 | (defun widget-delete-button-action (widget &optional event) | 2559 | (defun widget-delete-button-action (widget &optional _event) |
| 2561 | ;; Ask the parent to insert a new item. | 2560 | ;; Ask the parent to insert a new item. |
| 2562 | (widget-apply (widget-get widget :parent) | 2561 | (widget-apply (widget-get widget :parent) |
| 2563 | :delete-at (widget-get widget :widget))) | 2562 | :delete-at (widget-get widget :widget))) |
| @@ -2780,10 +2779,10 @@ Return an alist of (TYPE MATCH)." | |||
| 2780 | ;; Get the default of the components. | 2779 | ;; Get the default of the components. |
| 2781 | (mapcar 'widget-default-get (widget-get widget :args))) | 2780 | (mapcar 'widget-default-get (widget-get widget :args))) |
| 2782 | 2781 | ||
| 2783 | (defun widget-group-match (widget values) | 2782 | (defun widget-group-match (widget vals) |
| 2784 | ;; Match if the components match. | 2783 | ;; Match if the components match. |
| 2785 | (and (listp values) | 2784 | (and (listp vals) |
| 2786 | (let ((match (widget-group-match-inline widget values))) | 2785 | (let ((match (widget-group-match-inline widget vals))) |
| 2787 | (and match (null (cdr match)))))) | 2786 | (and match (null (cdr match)))))) |
| 2788 | 2787 | ||
| 2789 | (defun widget-group-match-inline (widget vals) | 2788 | (defun widget-group-match-inline (widget vals) |
| @@ -2820,7 +2819,7 @@ The following properties have special meanings for this widget: | |||
| 2820 | :off "Show" | 2819 | :off "Show" |
| 2821 | :value-create 'widget-visibility-value-create | 2820 | :value-create 'widget-visibility-value-create |
| 2822 | :action 'widget-toggle-action | 2821 | :action 'widget-toggle-action |
| 2823 | :match (lambda (widget value) t)) | 2822 | :match (lambda (_widget _value) t)) |
| 2824 | 2823 | ||
| 2825 | (defalias 'widget-visibility-value-create 'widget-toggle-value-create) | 2824 | (defalias 'widget-visibility-value-create 'widget-toggle-value-create) |
| 2826 | 2825 | ||
| @@ -2834,7 +2833,7 @@ The following properties have special meanings for this widget: | |||
| 2834 | :help-echo "Describe this symbol" | 2833 | :help-echo "Describe this symbol" |
| 2835 | :action 'widget-documentation-link-action) | 2834 | :action 'widget-documentation-link-action) |
| 2836 | 2835 | ||
| 2837 | (defun widget-documentation-link-action (widget &optional event) | 2836 | (defun widget-documentation-link-action (widget &optional _event) |
| 2838 | "Display documentation for WIDGET's value. Ignore optional argument EVENT." | 2837 | "Display documentation for WIDGET's value. Ignore optional argument EVENT." |
| 2839 | (let* ((string (widget-get widget :value)) | 2838 | (let* ((string (widget-get widget :value)) |
| 2840 | (symbol (intern string))) | 2839 | (symbol (intern string))) |
| @@ -2943,7 +2942,7 @@ link for that string." | |||
| 2943 | (widget-documentation-link-add widget start (point)))) | 2942 | (widget-documentation-link-add widget start (point)))) |
| 2944 | (insert ?\n)) | 2943 | (insert ?\n)) |
| 2945 | 2944 | ||
| 2946 | (defun widget-documentation-string-action (widget &rest ignore) | 2945 | (defun widget-documentation-string-action (widget &rest _ignore) |
| 2947 | ;; Toggle documentation. | 2946 | ;; Toggle documentation. |
| 2948 | (let ((parent (widget-get widget :parent))) | 2947 | (let ((parent (widget-get widget :parent))) |
| 2949 | (widget-put parent :documentation-shown | 2948 | (widget-put parent :documentation-shown |
| @@ -2981,7 +2980,7 @@ Optional ARGS specifies additional keyword arguments for the | |||
| 2981 | :prompt-value 'widget-const-prompt-value | 2980 | :prompt-value 'widget-const-prompt-value |
| 2982 | :format "%t\n%d") | 2981 | :format "%t\n%d") |
| 2983 | 2982 | ||
| 2984 | (defun widget-const-prompt-value (widget prompt value unbound) | 2983 | (defun widget-const-prompt-value (widget _prompt _value _unbound) |
| 2985 | ;; Return the value of the const. | 2984 | ;; Return the value of the const. |
| 2986 | (widget-value widget)) | 2985 | (widget-value widget)) |
| 2987 | 2986 | ||
| @@ -3041,7 +3040,7 @@ widget. If that isn't a list, it's evalled and expected to yield a list." | |||
| 3041 | ;; :value-face 'widget-single-line-field | 3040 | ;; :value-face 'widget-single-line-field |
| 3042 | :tag "Regexp") | 3041 | :tag "Regexp") |
| 3043 | 3042 | ||
| 3044 | (defun widget-regexp-match (widget value) | 3043 | (defun widget-regexp-match (_widget value) |
| 3045 | ;; Match valid regexps. | 3044 | ;; Match valid regexps. |
| 3046 | (and (stringp value) | 3045 | (and (stringp value) |
| 3047 | (condition-case nil | 3046 | (condition-case nil |
| @@ -3113,16 +3112,16 @@ It reads a directory name from an editable text field." | |||
| 3113 | :value nil | 3112 | :value nil |
| 3114 | :tag "Symbol" | 3113 | :tag "Symbol" |
| 3115 | :format "%{%t%}: %v" | 3114 | :format "%{%t%}: %v" |
| 3116 | :match (lambda (widget value) (symbolp value)) | 3115 | :match (lambda (_widget value) (symbolp value)) |
| 3117 | :complete-function 'lisp-complete-symbol | 3116 | :complete-function 'lisp-complete-symbol |
| 3118 | :prompt-internal 'widget-symbol-prompt-internal | 3117 | :prompt-internal 'widget-symbol-prompt-internal |
| 3119 | :prompt-match 'symbolp | 3118 | :prompt-match 'symbolp |
| 3120 | :prompt-history 'widget-symbol-prompt-value-history | 3119 | :prompt-history 'widget-symbol-prompt-value-history |
| 3121 | :value-to-internal (lambda (widget value) | 3120 | :value-to-internal (lambda (_widget value) |
| 3122 | (if (symbolp value) | 3121 | (if (symbolp value) |
| 3123 | (symbol-name value) | 3122 | (symbol-name value) |
| 3124 | value)) | 3123 | value)) |
| 3125 | :value-to-external (lambda (widget value) | 3124 | :value-to-external (lambda (_widget value) |
| 3126 | (if (stringp value) | 3125 | (if (stringp value) |
| 3127 | (intern value) | 3126 | (intern value) |
| 3128 | value))) | 3127 | value))) |
| @@ -3190,7 +3189,7 @@ It reads a directory name from an editable text field." | |||
| 3190 | :value 'undecided | 3189 | :value 'undecided |
| 3191 | :prompt-match 'coding-system-p) | 3190 | :prompt-match 'coding-system-p) |
| 3192 | 3191 | ||
| 3193 | (defun widget-coding-system-prompt-value (widget prompt value unbound) | 3192 | (defun widget-coding-system-prompt-value (widget prompt value _unbound) |
| 3194 | "Read coding-system from minibuffer." | 3193 | "Read coding-system from minibuffer." |
| 3195 | (if (widget-get widget :base-only) | 3194 | (if (widget-get widget :base-only) |
| 3196 | (intern | 3195 | (intern |
| @@ -3280,7 +3279,7 @@ It reads a directory name from an editable text field." | |||
| 3280 | (key-description value)) | 3279 | (key-description value)) |
| 3281 | value)) | 3280 | value)) |
| 3282 | 3281 | ||
| 3283 | (defun widget-key-sequence-value-to-external (widget value) | 3282 | (defun widget-key-sequence-value-to-external (_widget value) |
| 3284 | (if (stringp value) | 3283 | (if (stringp value) |
| 3285 | (if (string-match "\\`[[:space:]]*\\'" value) | 3284 | (if (string-match "\\`[[:space:]]*\\'" value) |
| 3286 | widget-key-sequence-default-value | 3285 | widget-key-sequence-default-value |
| @@ -3294,13 +3293,13 @@ It reads a directory name from an editable text field." | |||
| 3294 | :format "%{%t%}: %v" | 3293 | :format "%{%t%}: %v" |
| 3295 | :value nil | 3294 | :value nil |
| 3296 | :validate 'widget-sexp-validate | 3295 | :validate 'widget-sexp-validate |
| 3297 | :match (lambda (widget value) t) | 3296 | :match (lambda (_widget _value) t) |
| 3298 | :value-to-internal 'widget-sexp-value-to-internal | 3297 | :value-to-internal 'widget-sexp-value-to-internal |
| 3299 | :value-to-external (lambda (widget value) (read value)) | 3298 | :value-to-external (lambda (_widget value) (read value)) |
| 3300 | :prompt-history 'widget-sexp-prompt-value-history | 3299 | :prompt-history 'widget-sexp-prompt-value-history |
| 3301 | :prompt-value 'widget-sexp-prompt-value) | 3300 | :prompt-value 'widget-sexp-prompt-value) |
| 3302 | 3301 | ||
| 3303 | (defun widget-sexp-value-to-internal (widget value) | 3302 | (defun widget-sexp-value-to-internal (_widget value) |
| 3304 | ;; Use pp for printer representation. | 3303 | ;; Use pp for printer representation. |
| 3305 | (let ((pp (if (symbolp value) | 3304 | (let ((pp (if (symbolp value) |
| 3306 | (prin1-to-string value) | 3305 | (prin1-to-string value) |
| @@ -3407,15 +3406,15 @@ To use this type, you must define :match or :match-alternatives." | |||
| 3407 | :format "%{%t%}: %v\n" | 3406 | :format "%{%t%}: %v\n" |
| 3408 | :valid-regexp "\\`.\\'" | 3407 | :valid-regexp "\\`.\\'" |
| 3409 | :error "This field should contain a single character" | 3408 | :error "This field should contain a single character" |
| 3410 | :value-to-internal (lambda (widget value) | 3409 | :value-to-internal (lambda (_widget value) |
| 3411 | (if (stringp value) | 3410 | (if (stringp value) |
| 3412 | value | 3411 | value |
| 3413 | (char-to-string value))) | 3412 | (char-to-string value))) |
| 3414 | :value-to-external (lambda (widget value) | 3413 | :value-to-external (lambda (_widget value) |
| 3415 | (if (stringp value) | 3414 | (if (stringp value) |
| 3416 | (aref value 0) | 3415 | (aref value 0) |
| 3417 | value)) | 3416 | value)) |
| 3418 | :match (lambda (widget value) | 3417 | :match (lambda (_widget value) |
| 3419 | (characterp value))) | 3418 | (characterp value))) |
| 3420 | 3419 | ||
| 3421 | (define-widget 'list 'group | 3420 | (define-widget 'list 'group |
| @@ -3428,8 +3427,8 @@ To use this type, you must define :match or :match-alternatives." | |||
| 3428 | :tag "Vector" | 3427 | :tag "Vector" |
| 3429 | :format "%{%t%}:\n%v" | 3428 | :format "%{%t%}:\n%v" |
| 3430 | :match 'widget-vector-match | 3429 | :match 'widget-vector-match |
| 3431 | :value-to-internal (lambda (widget value) (append value nil)) | 3430 | :value-to-internal (lambda (_widget value) (append value nil)) |
| 3432 | :value-to-external (lambda (widget value) (apply 'vector value))) | 3431 | :value-to-external (lambda (_widget value) (apply 'vector value))) |
| 3433 | 3432 | ||
| 3434 | (defun widget-vector-match (widget value) | 3433 | (defun widget-vector-match (widget value) |
| 3435 | (and (vectorp value) | 3434 | (and (vectorp value) |
| @@ -3441,9 +3440,9 @@ To use this type, you must define :match or :match-alternatives." | |||
| 3441 | :tag "Cons-cell" | 3440 | :tag "Cons-cell" |
| 3442 | :format "%{%t%}:\n%v" | 3441 | :format "%{%t%}:\n%v" |
| 3443 | :match 'widget-cons-match | 3442 | :match 'widget-cons-match |
| 3444 | :value-to-internal (lambda (widget value) | 3443 | :value-to-internal (lambda (_widget value) |
| 3445 | (list (car value) (cdr value))) | 3444 | (list (car value) (cdr value))) |
| 3446 | :value-to-external (lambda (widget value) | 3445 | :value-to-external (lambda (_widget value) |
| 3447 | (apply 'cons value))) | 3446 | (apply 'cons value))) |
| 3448 | 3447 | ||
| 3449 | (defun widget-cons-match (widget value) | 3448 | (defun widget-cons-match (widget value) |
| @@ -3604,7 +3603,7 @@ example: | |||
| 3604 | :button-suffix 'widget-push-button-suffix | 3603 | :button-suffix 'widget-push-button-suffix |
| 3605 | :prompt-value 'widget-choice-prompt-value) | 3604 | :prompt-value 'widget-choice-prompt-value) |
| 3606 | 3605 | ||
| 3607 | (defun widget-choice-prompt-value (widget prompt value unbound) | 3606 | (defun widget-choice-prompt-value (widget prompt value _unbound) |
| 3608 | "Make a choice." | 3607 | "Make a choice." |
| 3609 | (let ((args (widget-get widget :args)) | 3608 | (let ((args (widget-get widget :args)) |
| 3610 | (completion-ignore-case (widget-get widget :case-fold)) | 3609 | (completion-ignore-case (widget-get widget :case-fold)) |
| @@ -3672,7 +3671,7 @@ example: | |||
| 3672 | :on "on (non-nil)" | 3671 | :on "on (non-nil)" |
| 3673 | :off "off (nil)") | 3672 | :off "off (nil)") |
| 3674 | 3673 | ||
| 3675 | (defun widget-boolean-prompt-value (widget prompt value unbound) | 3674 | (defun widget-boolean-prompt-value (_widget prompt _value _unbound) |
| 3676 | ;; Toggle a boolean. | 3675 | ;; Toggle a boolean. |
| 3677 | (y-or-n-p prompt)) | 3676 | (y-or-n-p prompt)) |
| 3678 | 3677 | ||
| @@ -3699,7 +3698,7 @@ example: | |||
| 3699 | :tag " Choose " :action 'widget-color--choose-action) | 3698 | :tag " Choose " :action 'widget-color--choose-action) |
| 3700 | (widget-insert " ")) | 3699 | (widget-insert " ")) |
| 3701 | 3700 | ||
| 3702 | (defun widget-color--choose-action (widget &optional event) | 3701 | (defun widget-color--choose-action (widget &optional _event) |
| 3703 | (list-colors-display | 3702 | (list-colors-display |
| 3704 | nil nil | 3703 | nil nil |
| 3705 | `(lambda (color) | 3704 | `(lambda (color) |
| @@ -3732,8 +3731,6 @@ example: | |||
| 3732 | "Prompt for a color." | 3731 | "Prompt for a color." |
| 3733 | (let* ((tag (widget-apply widget :menu-tag-get)) | 3732 | (let* ((tag (widget-apply widget :menu-tag-get)) |
| 3734 | (prompt (concat tag ": ")) | 3733 | (prompt (concat tag ": ")) |
| 3735 | (value (widget-value widget)) | ||
| 3736 | (start (widget-field-start widget)) | ||
| 3737 | (answer (facemenu-read-color prompt))) | 3734 | (answer (facemenu-read-color prompt))) |
| 3738 | (unless (zerop (length answer)) | 3735 | (unless (zerop (length answer)) |
| 3739 | (widget-value-set widget answer) | 3736 | (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 @@ | |||
| 36 | ;; Doing this is unnecessary in Emacs 20. Kept as dummy in case | 36 | ;; Doing this is unnecessary in Emacs 20. Kept as dummy in case |
| 37 | ;; external libraries call it. We save a kb or two of purespace by | 37 | ;; external libraries call it. We save a kb or two of purespace by |
| 38 | ;; dummying-out such definitions generally. | 38 | ;; dummying-out such definitions generally. |
| 39 | (defmacro define-widget-keywords (&rest keys) | 39 | (defmacro define-widget-keywords (&rest _keys) |
| 40 | ;; ;; Don't use backquote, since that makes trouble trying to | 40 | ;; ;; Don't use backquote, since that makes trouble trying to |
| 41 | ;; ;; re-bootstrap from just the .el files. | 41 | ;; ;; re-bootstrap from just the .el files. |
| 42 | ;; (list 'eval-and-compile | 42 | ;; (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." | |||
| 373 | ;; otherwise would be. the only complication is that we need to check | 373 | ;; otherwise would be. the only complication is that we need to check |
| 374 | ;; if the minibuffer is active, and, if not, pretend that it's not | 374 | ;; if the minibuffer is active, and, if not, pretend that it's not |
| 375 | ;; even part of the frame. | 375 | ;; even part of the frame. |
| 376 | (defun windmove-wrap-loc-for-movement (coord window dir) | 376 | (defun windmove-wrap-loc-for-movement (coord window) |
| 377 | "Takes the constrained COORD and wraps it around for the movement. | 377 | "Takes the constrained COORD and wraps it around for the movement. |
| 378 | This makes an out-of-range x or y coordinate and wraps it around the | 378 | This makes an out-of-range x or y coordinate and wraps it around the |
| 379 | frame, giving a coordinate (hopefully) in the window on the other edge | 379 | frame, giving a coordinate (hopefully) in the window on the other edge |
| 380 | of the frame. WINDOW is the window that movement is relative to (nil | 380 | of the frame. WINDOW is the window that movement is relative to (nil |
| 381 | means the currently selected window); DIR is the direction of the | 381 | means the currently selected window). Returns the wrapped coordinate." |
| 382 | movement, one of `left', `up', `right',or `down'. | ||
| 383 | Returns the wrapped coordinate." | ||
| 384 | (let* ((frame-edges (windmove-frame-edges window)) | 382 | (let* ((frame-edges (windmove-frame-edges window)) |
| 385 | (frame-minibuffer (minibuffer-window (if window | 383 | (frame-minibuffer (minibuffer-window (if window |
| 386 | (window-frame window) | 384 | (window-frame window) |
| @@ -474,8 +472,7 @@ DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'." | |||
| 474 | (other-window-loc | 472 | (other-window-loc |
| 475 | (if windmove-wrap-around | 473 | (if windmove-wrap-around |
| 476 | (windmove-wrap-loc-for-movement constrained-other-window-loc | 474 | (windmove-wrap-loc-for-movement constrained-other-window-loc |
| 477 | actual-current-window | 475 | actual-current-window) |
| 478 | dir) | ||
| 479 | constrained-other-window-loc))) | 476 | constrained-other-window-loc))) |
| 480 | (window-at (car other-window-loc) | 477 | (window-at (car other-window-loc) |
| 481 | (cdr other-window-loc)))) | 478 | (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 | |||
| 251 | window shall be counted. See `walk-windows' for the precise | 251 | window shall be counted. See `walk-windows' for the precise |
| 252 | meaning of this argument." | 252 | meaning of this argument." |
| 253 | (let ((count 0)) | 253 | (let ((count 0)) |
| 254 | (walk-windows (lambda (w) (setq count (+ count 1))) | 254 | (walk-windows (lambda (_w) (setq count (+ count 1))) |
| 255 | minibuf) | 255 | minibuf) |
| 256 | count)) | 256 | count)) |
| 257 | 257 | ||
| @@ -423,7 +423,7 @@ subtree is balanced." | |||
| 423 | Arguments WINDOW, DELTA and HORIZONTAL are passed on to that function." | 423 | Arguments WINDOW, DELTA and HORIZONTAL are passed on to that function." |
| 424 | ;; `adjust-window-trailing-edge' may fail if delta is too large. | 424 | ;; `adjust-window-trailing-edge' may fail if delta is too large. |
| 425 | (while (>= (abs delta) 1) | 425 | (while (>= (abs delta) 1) |
| 426 | (condition-case err | 426 | (condition-case nil |
| 427 | (progn | 427 | (progn |
| 428 | (adjust-window-trailing-edge window delta horizontal) | 428 | (adjust-window-trailing-edge window delta horizontal) |
| 429 | (setq delta 0)) | 429 | (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.") | |||
| 1086 | (defvar woman-nospace nil | 1086 | (defvar woman-nospace nil |
| 1087 | "Current no-space mode: nil for normal spacing. | 1087 | "Current no-space mode: nil for normal spacing. |
| 1088 | Set by `.ns' request; reset by any output or `.rs' request") | 1088 | Set by `.ns' request; reset by any output or `.rs' request") |
| 1089 | ;; Used for message logging | ||
| 1090 | (defvar WoMan-current-file nil) ; bound in woman-really-find-file | ||
| 1091 | (defvar WoMan-Log-header-point-max nil) | ||
| 1089 | 1092 | ||
| 1090 | (defsubst woman-reset-nospace () | 1093 | (defsubst woman-reset-nospace () |
| 1091 | "Set `woman-nospace' to nil." | 1094 | "Set `woman-nospace' to nil." |
| @@ -1281,8 +1284,7 @@ cache to be re-read." | |||
| 1281 | ;; completions, but to return only a case-sensitive match. This | 1284 | ;; completions, but to return only a case-sensitive match. This |
| 1282 | ;; does not seem to work properly by default, so I re-do the | 1285 | ;; does not seem to work properly by default, so I re-do the |
| 1283 | ;; completion if necessary. | 1286 | ;; completion if necessary. |
| 1284 | (let (files | 1287 | (let (files) |
| 1285 | (default (current-word))) | ||
| 1286 | (or (stringp topic) | 1288 | (or (stringp topic) |
| 1287 | (and (if (boundp 'woman-use-topic-at-point) | 1289 | (and (if (boundp 'woman-use-topic-at-point) |
| 1288 | woman-use-topic-at-point | 1290 | woman-use-topic-at-point |
| @@ -1367,16 +1369,17 @@ regexp that is the final component of DIR. Log a warning if list is empty." | |||
| 1367 | (or (file-accessible-directory-p dir) | 1369 | (or (file-accessible-directory-p dir) |
| 1368 | (WoMan-warn "Ignoring inaccessible `man-page' directory `%s'!" dir))) | 1370 | (WoMan-warn "Ignoring inaccessible `man-page' directory `%s'!" dir))) |
| 1369 | 1371 | ||
| 1370 | (defun woman-expand-directory-path (woman-manpath woman-path) | 1372 | (defun woman-expand-directory-path (path-dirs path-regexps) |
| 1371 | "Expand the manual directories in WOMAN-MANPATH and WOMAN-PATH. | 1373 | "Expand the manual directories in PATH-DIRS and PATH-REGEXPS. |
| 1372 | WOMAN-MANPATH should be a list of general manual directories, while | 1374 | PATH-DIRS should be a list of general manual directories (like |
| 1373 | WOMAN-PATH should be a list of specific manual directory regexps. | 1375 | `woman-manpath'), while PATH-REGEXPS should be a list of specific |
| 1376 | manual directory regexps (like `woman-path'). | ||
| 1374 | Ignore any paths that are unreadable or not directories." | 1377 | Ignore any paths that are unreadable or not directories." |
| 1375 | ;; Allow each path to be a single string or a list of strings: | 1378 | ;; Allow each path to be a single string or a list of strings: |
| 1376 | (if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath))) | 1379 | (if (not (listp path-dirs)) (setq path-dirs (list path-dirs))) |
| 1377 | (if (not (listp woman-path)) (setq woman-path (list woman-path))) | 1380 | (if (not (listp path-regexps)) (setq path-regexps (list path-regexps))) |
| 1378 | (let (head dirs path) | 1381 | (let (head dirs path) |
| 1379 | (dolist (dir woman-manpath) | 1382 | (dolist (dir path-dirs) |
| 1380 | (when (consp dir) | 1383 | (when (consp dir) |
| 1381 | (unless path | 1384 | (unless path |
| 1382 | (setq path (split-string (getenv "PATH") path-separator t))) | 1385 | (setq path (split-string (getenv "PATH") path-separator t))) |
| @@ -1390,7 +1393,7 @@ Ignore any paths that are unreadable or not directories." | |||
| 1390 | (setq dir (woman-canonicalize-dir dir) | 1393 | (setq dir (woman-canonicalize-dir dir) |
| 1391 | dirs (nconc dirs (directory-files | 1394 | dirs (nconc dirs (directory-files |
| 1392 | dir t woman-manpath-man-regexp))))) | 1395 | dir t woman-manpath-man-regexp))))) |
| 1393 | (dolist (dir woman-path) | 1396 | (dolist (dir path-regexps) |
| 1394 | (if (or (null dir) | 1397 | (if (or (null dir) |
| 1395 | (null (setq dir (woman-canonicalize-dir dir) | 1398 | (null (setq dir (woman-canonicalize-dir dir) |
| 1396 | head (file-name-directory dir))) | 1399 | head (file-name-directory dir))) |
| @@ -1576,6 +1579,8 @@ Also make each path-info component into a list. | |||
| 1576 | 1579 | ||
| 1577 | ;;; tar-mode support | 1580 | ;;; tar-mode support |
| 1578 | 1581 | ||
| 1582 | (defvar global-font-lock-mode) ; defined in font-core.el | ||
| 1583 | |||
| 1579 | (defun woman-tar-extract-file () | 1584 | (defun woman-tar-extract-file () |
| 1580 | "In tar mode, run the WoMan man-page browser on this file." | 1585 | "In tar mode, run the WoMan man-page browser on this file." |
| 1581 | (interactive) | 1586 | (interactive) |
| @@ -2243,7 +2248,7 @@ To be called on original buffer and any .so insertions." | |||
| 2243 | This applies to text between .TE and .TS directives. | 2248 | This applies to text between .TE and .TS directives. |
| 2244 | Currently set only from '\" t in the first line of the source file.") | 2249 | Currently set only from '\" t in the first line of the source file.") |
| 2245 | 2250 | ||
| 2246 | (defun woman-decode-region (from to) | 2251 | (defun woman-decode-region (from _to) |
| 2247 | "Decode the region between FROM and TO in UN*X man-page source format." | 2252 | "Decode the region between FROM and TO in UN*X man-page source format." |
| 2248 | ;; Suitable for use in format-alist. | 2253 | ;; Suitable for use in format-alist. |
| 2249 | ;; But this requires care to control major mode implied font locking. | 2254 | ;; But this requires care to control major mode implied font locking. |
| @@ -4364,9 +4369,9 @@ Format paragraphs upto TO." | |||
| 4364 | (setq tab-stop-list (reverse tab-stop-list)) | 4369 | (setq tab-stop-list (reverse tab-stop-list)) |
| 4365 | (woman2-format-paragraphs to)) | 4370 | (woman2-format-paragraphs to)) |
| 4366 | 4371 | ||
| 4367 | (defsubst woman-get-tab-stop (tab-stop-list) | 4372 | (defsubst woman-get-tab-stop (tab-stops) |
| 4368 | "If TAB-STOP-LIST is a cons, return its car, else return TAB-STOP-LIST." | 4373 | "If TAB-STOPS is a cons, return its car, else return TAB-STOPS." |
| 4369 | (if (consp tab-stop-list) (car tab-stop-list) tab-stop-list)) | 4374 | (if (consp tab-stops) (car tab-stops) tab-stops)) |
| 4370 | 4375 | ||
| 4371 | (defun woman-tab-to-tab-stop () | 4376 | (defun woman-tab-to-tab-stop () |
| 4372 | "Insert spaces to next defined tab-stop column. | 4377 | "Insert spaces to next defined tab-stop column. |
| @@ -4484,9 +4489,6 @@ Format paragraphs upto TO." | |||
| 4484 | ;; The basis for this logging code was shamelessly pirated from bytecomp.el | 4489 | ;; The basis for this logging code was shamelessly pirated from bytecomp.el |
| 4485 | ;; by Jamie Zawinski <jwz@lucid.com> & Hallvard Furuseth <hbf@ulrik.uio.no> | 4490 | ;; by Jamie Zawinski <jwz@lucid.com> & Hallvard Furuseth <hbf@ulrik.uio.no> |
| 4486 | 4491 | ||
| 4487 | (defvar WoMan-current-file nil) ; bound in woman-really-find-file | ||
| 4488 | (defvar WoMan-Log-header-point-max nil) | ||
| 4489 | |||
| 4490 | (defun WoMan-log-begin () | 4492 | (defun WoMan-log-begin () |
| 4491 | "Log the beginning of formatting in *WoMan-Log*." | 4493 | "Log the beginning of formatting in *WoMan-Log*." |
| 4492 | (let ((WoMan-current-buffer (buffer-name))) | 4494 | (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.") | |||
| 145 | "Return the state in `x-dnd-current-state' for a frame or window." | 145 | "Return the state in `x-dnd-current-state' for a frame or window." |
| 146 | (cdr (x-dnd-get-state-cons-for-frame frame-or-window))) | 146 | (cdr (x-dnd-get-state-cons-for-frame frame-or-window))) |
| 147 | 147 | ||
| 148 | (defun x-dnd-default-test-function (window action types) | 148 | (defun x-dnd-default-test-function (_window _action types) |
| 149 | "The default test function for drag and drop. | 149 | "The default test function for drag and drop. |
| 150 | WINDOW is where the mouse is when this function is called. It may be | 150 | WINDOW is where the mouse is when this function is called. It may be |
| 151 | a frame if the mouse is over the menu bar, scroll bar or tool bar. | 151 | 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'." | |||
| 225 | (string (decode-coding-string data coding)) | 225 | (string (decode-coding-string data coding)) |
| 226 | (strings (split-string string "[\r\n]" t)) | 226 | (strings (split-string string "[\r\n]" t)) |
| 227 | ;; Can one drop more than one moz-url ?? Assume not. | 227 | ;; Can one drop more than one moz-url ?? Assume not. |
| 228 | (url (car strings)) | 228 | (url (car strings))) |
| 229 | (title (car (cdr strings)))) | ||
| 230 | (x-dnd-handle-uri-list window action url))) | 229 | (x-dnd-handle-uri-list window action url))) |
| 231 | 230 | ||
| 232 | (defun x-dnd-insert-utf8-text (window action text) | 231 | (defun x-dnd-insert-utf8-text (window action text) |
| @@ -361,7 +360,7 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized." | |||
| 361 | (declare-function x-window-property "xfns.c" | 360 | (declare-function x-window-property "xfns.c" |
| 362 | (prop &optional frame type source delete-p vector-ret-p)) | 361 | (prop &optional frame type source delete-p vector-ret-p)) |
| 363 | 362 | ||
| 364 | (defun x-dnd-handle-old-kde (event frame window message format data) | 363 | (defun x-dnd-handle-old-kde (_event frame window _message _format _data) |
| 365 | "Open the files in a KDE 1.x drop." | 364 | "Open the files in a KDE 1.x drop." |
| 366 | (let ((values (x-window-property "DndSelection" frame nil 0 t))) | 365 | (let ((values (x-window-property "DndSelection" frame nil 0 t))) |
| 367 | (x-dnd-handle-uri-list window 'private | 366 | (x-dnd-handle-uri-list window 'private |
| @@ -434,7 +433,7 @@ otherwise return the frame coordinates." | |||
| 434 | (declare-function x-get-selection-internal "xselect.c" | 433 | (declare-function x-get-selection-internal "xselect.c" |
| 435 | (selection-symbol target-type &optional time-stamp)) | 434 | (selection-symbol target-type &optional time-stamp)) |
| 436 | 435 | ||
| 437 | (defun x-dnd-handle-xdnd (event frame window message format data) | 436 | (defun x-dnd-handle-xdnd (event frame window message _format data) |
| 438 | "Receive one XDND event (client message) and send the appropriate reply. | 437 | "Receive one XDND event (client message) and send the appropriate reply. |
| 439 | EVENT is the client message. FRAME is where the mouse is now. | 438 | EVENT is the client message. FRAME is where the mouse is now. |
| 440 | WINDOW is the window within FRAME where the mouse is now. | 439 | 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." | |||
| 456 | (x-get-atom-name (aref data 4)))))))) | 455 | (x-get-atom-name (aref data 4)))))))) |
| 457 | 456 | ||
| 458 | ((equal "XdndPosition" message) | 457 | ((equal "XdndPosition" message) |
| 459 | (let* ((x (car (aref data 2))) | 458 | (let* ((action (x-get-atom-name (aref data 4))) |
| 460 | (y (cdr (aref data 2))) | ||
| 461 | (action (x-get-atom-name (aref data 4))) | ||
| 462 | (dnd-source (aref data 0)) | 459 | (dnd-source (aref data 0)) |
| 463 | (dnd-time (aref data 3)) | ||
| 464 | (action-type (x-dnd-maybe-call-test-function | 460 | (action-type (x-dnd-maybe-call-test-function |
| 465 | window | 461 | window |
| 466 | (cdr (assoc action x-dnd-xdnd-to-action)))) | 462 | (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." | |||
| 491 | (x-get-selection-internal | 487 | (x-get-selection-internal |
| 492 | 'XdndSelection | 488 | 'XdndSelection |
| 493 | (intern (x-dnd-current-type window))))) | 489 | (intern (x-dnd-current-type window))))) |
| 494 | success action ret-action) | 490 | success action) |
| 495 | 491 | ||
| 496 | (setq action (if value | 492 | (setq action (if value |
| 497 | (condition-case info | 493 | (condition-case info |
| @@ -502,11 +498,6 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." | |||
| 502 | nil)))) | 498 | nil)))) |
| 503 | 499 | ||
| 504 | (setq success (if action 1 0)) | 500 | (setq success (if action 1 0)) |
| 505 | (setq ret-action | ||
| 506 | (if (eq success 1) | ||
| 507 | (or (car (rassoc action x-dnd-xdnd-to-action)) | ||
| 508 | "XdndActionPrivate") | ||
| 509 | 0)) | ||
| 510 | 501 | ||
| 511 | (x-send-client-message | 502 | (x-send-client-message |
| 512 | frame dnd-source frame "XdndFinished" 32 | 503 | frame dnd-source frame "XdndFinished" 32 |
| @@ -591,7 +582,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." | |||
| 591 | (2 . private)) ; Motif does not have private, so use copy for private. | 582 | (2 . private)) ; Motif does not have private, so use copy for private. |
| 592 | "Mapping from number to operation for Motif DND.") | 583 | "Mapping from number to operation for Motif DND.") |
| 593 | 584 | ||
| 594 | (defun x-dnd-handle-motif (event frame window message-atom format data) | 585 | (defun x-dnd-handle-motif (event frame window message-atom _format data) |
| 595 | (let* ((message-type (cdr (assoc (aref data 0) x-dnd-motif-message-types))) | 586 | (let* ((message-type (cdr (assoc (aref data 0) x-dnd-motif-message-types))) |
| 596 | (source-byteorder (aref data 1)) | 587 | (source-byteorder (aref data 1)) |
| 597 | (my-byteorder (byteorder)) | 588 | (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." | |||
| 188 | (name-chars (concat "-[:digit:]." start-chars)) | 188 | (name-chars (concat "-[:digit:]." start-chars)) |
| 189 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ | 189 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ |
| 190 | (whitespace "[ \t\n\r]")) | 190 | (whitespace "[ \t\n\r]")) |
| 191 | ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | 191 | ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] |
| 192 | ;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | 192 | ;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] |
| 193 | ;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | 193 | ;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] |
| 194 | ;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] | 194 | ;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] |
| @@ -226,7 +226,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded." | |||
| 226 | (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re | 226 | (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re |
| 227 | "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)")) | 227 | "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)")) |
| 228 | ;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens] | 228 | ;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens] |
| 229 | (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re | 229 | (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re |
| 230 | "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*" | 230 | "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*" |
| 231 | whitespace ")\\)")) | 231 | whitespace ")\\)")) |
| 232 | ;;[57] EnumeratedType ::= NotationType | Enumeration | 232 | ;;[57] EnumeratedType ::= NotationType | Enumeration |
| @@ -247,7 +247,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded." | |||
| 247 | xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)"))) | 247 | xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)"))) |
| 248 | ;;[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 248 | ;;[75] ExternalID ::= 'SYSTEM' S SystemLiteral |
| 249 | ;; | 'PUBLIC' S PubidLiteral S SystemLiteral | 249 | ;; | 'PUBLIC' S PubidLiteral S SystemLiteral |
| 250 | ;;[76] NDataDecl ::= S 'NDATA' S | 250 | ;;[76] NDataDecl ::= S 'NDATA' S |
| 251 | ;;[73] EntityDef ::= EntityValue| (ExternalID NDataDecl?) | 251 | ;;[73] EntityDef ::= EntityValue| (ExternalID NDataDecl?) |
| 252 | ;;[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' | 252 | ;;[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' |
| 253 | ;;[74] PEDef ::= EntityValue | ExternalID | 253 | ;;[74] PEDef ::= EntityValue | ExternalID |
| @@ -433,7 +433,7 @@ Returns one of: | |||
| 433 | (let* ((node-name (match-string-no-properties 1)) | 433 | (let* ((node-name (match-string-no-properties 1)) |
| 434 | ;; Parse the attribute list. | 434 | ;; Parse the attribute list. |
| 435 | (attrs (xml-parse-attlist xml-ns)) | 435 | (attrs (xml-parse-attlist xml-ns)) |
| 436 | children pos) | 436 | children) |
| 437 | 437 | ||
| 438 | ;; add the xmlns:* attrs to our cache | 438 | ;; add the xmlns:* attrs to our cache |
| 439 | (when (consp xml-ns) | 439 | (when (consp xml-ns) |
| @@ -536,8 +536,7 @@ Leave point at the first non-blank character after the tag." | |||
| 536 | 536 | ||
| 537 | ;; Multiple whitespace characters should be replaced with a single one | 537 | ;; Multiple whitespace characters should be replaced with a single one |
| 538 | ;; in the attributes | 538 | ;; in the attributes |
| 539 | (let ((string (match-string-no-properties 1)) | 539 | (let ((string (match-string-no-properties 1))) |
| 540 | (pos 0)) | ||
| 541 | (replace-regexp-in-string "\\s-\\{2,\\}" " " string) | 540 | (replace-regexp-in-string "\\s-\\{2,\\}" " " string) |
| 542 | (let ((expansion (xml-substitute-special string))) | 541 | (let ((expansion (xml-substitute-special string))) |
| 543 | (unless (stringp expansion) | 542 | (unless (stringp expansion) |
| @@ -634,7 +633,7 @@ This follows the rule [28] in the XML specifications." | |||
| 634 | ((string-match "^%[^;]+;[ \t\n\r]*$" type) ;; substitution | 633 | ((string-match "^%[^;]+;[ \t\n\r]*$" type) ;; substitution |
| 635 | nil) | 634 | nil) |
| 636 | (t | 635 | (t |
| 637 | (if xml-validating-parser | 636 | (if xml-validating-parser |
| 638 | (error "XML: (Validity) Invalid element type in the DTD")))) | 637 | (error "XML: (Validity) Invalid element type in the DTD")))) |
| 639 | 638 | ||
| 640 | ;; rule [45]: the element declaration must be unique | 639 | ;; rule [45]: the element declaration must be unique |
| @@ -666,7 +665,7 @@ This follows the rule [28] in the XML specifications." | |||
| 666 | (goto-char (match-end 0)) | 665 | (goto-char (match-end 0)) |
| 667 | (setq xml-entity-alist | 666 | (setq xml-entity-alist |
| 668 | (append xml-entity-alist | 667 | (append xml-entity-alist |
| 669 | (list (cons name | 668 | (list (cons name |
| 670 | (with-temp-buffer | 669 | (with-temp-buffer |
| 671 | (insert value) | 670 | (insert value) |
| 672 | (goto-char (point-min)) | 671 | (goto-char (point-min)) |
| @@ -769,7 +768,7 @@ This follows the rule [28] in the XML specifications." | |||
| 769 | (let* ((this-part (match-string-no-properties 1 string)) | 768 | (let* ((this-part (match-string-no-properties 1 string)) |
| 770 | (prev-part (substring string point (match-beginning 0))) | 769 | (prev-part (substring string point (match-beginning 0))) |
| 771 | (entity (assoc this-part xml-entity-alist)) | 770 | (entity (assoc this-part xml-entity-alist)) |
| 772 | (expansion | 771 | (expansion |
| 773 | (cond ((string-match "#\\([0-9]+\\)" this-part) | 772 | (cond ((string-match "#\\([0-9]+\\)" this-part) |
| 774 | (let ((c (decode-char | 773 | (let ((c (decode-char |
| 775 | 'ucs | 774 | '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 @@ | |||
| 50 | M-down-mouse-1 M-down-mouse-2 M-down-mouse-3)) | 50 | M-down-mouse-1 M-down-mouse-2 M-down-mouse-3)) |
| 51 | (put event-type 'event-kind 'mouse-click)) | 51 | (put event-type 'event-kind 'mouse-click)) |
| 52 | 52 | ||
| 53 | (defun xterm-mouse-translate (event) | 53 | (defun xterm-mouse-translate (_event) |
| 54 | "Read a click and release event from XTerm." | 54 | "Read a click and release event from XTerm." |
| 55 | (save-excursion | 55 | (save-excursion |
| 56 | (save-window-excursion | 56 | (save-window-excursion |
| @@ -228,7 +228,7 @@ down the SHIFT key while pressing the mouse button." | |||
| 228 | (dolist (terminal (terminal-list)) | 228 | (dolist (terminal (terminal-list)) |
| 229 | (turn-on-xterm-mouse-tracking-on-terminal terminal))) | 229 | (turn-on-xterm-mouse-tracking-on-terminal terminal))) |
| 230 | 230 | ||
| 231 | (defun turn-off-xterm-mouse-tracking (&optional force) | 231 | (defun turn-off-xterm-mouse-tracking (&optional _force) |
| 232 | "Disable Emacs mouse tracking in xterm." | 232 | "Disable Emacs mouse tracking in xterm." |
| 233 | (dolist (terminal (terminal-list)) | 233 | (dolist (terminal (terminal-list)) |
| 234 | (turn-off-xterm-mouse-tracking-on-terminal terminal))) | 234 | (turn-off-xterm-mouse-tracking-on-terminal terminal))) |
diff --git a/src/ChangeLog b/src/ChangeLog index 90855341440..7a97a066f12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -81,6 +81,14 @@ | |||
| 81 | alignof(EMACS_INT) < sizeof (EMACS_INT). | 81 | alignof(EMACS_INT) < sizeof (EMACS_INT). |
| 82 | (check_sblock, check_string_bytes, check_string_free_list): Protoize. | 82 | (check_sblock, check_string_bytes, check_string_free_list): Protoize. |
| 83 | 83 | ||
| 84 | 2011-04-19 Eli Zaretskii <eliz@gnu.org> | ||
| 85 | |||
| 86 | * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of | ||
| 87 | gl_state.e_property when gl_state.object is Qt. | ||
| 88 | |||
| 89 | * insdel.c (make_gap_larger): Remove limitation of buffer size | ||
| 90 | to <= INT_MAX. | ||
| 91 | |||
| 84 | 2011-04-18 Chong Yidong <cyd@stupidchicken.com> | 92 | 2011-04-18 Chong Yidong <cyd@stupidchicken.com> |
| 85 | 93 | ||
| 86 | * xdisp.c (lookup_glyphless_char_display) | 94 | * xdisp.c (lookup_glyphless_char_display) |
diff --git a/src/insdel.c b/src/insdel.c index 5ecb01c9538..2662858c2a1 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -404,11 +404,7 @@ make_gap_larger (EMACS_INT nbytes_added) | |||
| 404 | { EMACS_INT total_size = Z_BYTE - BEG_BYTE + GAP_SIZE + nbytes_added; | 404 | { EMACS_INT total_size = Z_BYTE - BEG_BYTE + GAP_SIZE + nbytes_added; |
| 405 | if (total_size < 0 | 405 | if (total_size < 0 |
| 406 | /* Don't allow a buffer size that won't fit in a Lisp integer. */ | 406 | /* Don't allow a buffer size that won't fit in a Lisp integer. */ |
| 407 | || total_size != XINT (make_number (total_size)) | 407 | || total_size != XINT (make_number (total_size))) |
| 408 | /* Don't allow a buffer size that won't fit in an int | ||
| 409 | even if it will fit in a Lisp integer. | ||
| 410 | That won't work because so many places still use `int'. */ | ||
| 411 | || total_size != (EMACS_INT) (int) total_size) | ||
| 412 | error ("Buffer exceeds maximum size"); | 408 | error ("Buffer exceeds maximum size"); |
| 413 | } | 409 | } |
| 414 | 410 | ||
diff --git a/src/syntax.h b/src/syntax.h index 9f328f568c7..42d689cb96c 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -203,7 +203,7 @@ extern char syntax_code_spec[16]; | |||
| 203 | do \ | 203 | do \ |
| 204 | { \ | 204 | { \ |
| 205 | gl_state.use_global = 0; \ | 205 | gl_state.use_global = 0; \ |
| 206 | gl_state.current_syntax_table = BVAR (current_buffer, syntax_table); \ | 206 | gl_state.current_syntax_table = BVAR (current_buffer, syntax_table);\ |
| 207 | } while (0) | 207 | } while (0) |
| 208 | 208 | ||
| 209 | /* This macro should be called with FROM at the start of forward | 209 | /* This macro should be called with FROM at the start of forward |
| @@ -230,7 +230,8 @@ do \ | |||
| 230 | while (0) | 230 | while (0) |
| 231 | 231 | ||
| 232 | /* Same as above, but in OBJECT. If OBJECT is nil, use current buffer. | 232 | /* Same as above, but in OBJECT. If OBJECT is nil, use current buffer. |
| 233 | If it is t, ignore properties altogether. | 233 | If it is t (which is only used in fast_c_string_match_ignore_case), |
| 234 | ignore properties altogether. | ||
| 234 | 235 | ||
| 235 | This is meant for regex.c to use. For buffers, regex.c passes arguments | 236 | This is meant for regex.c to use. For buffers, regex.c passes arguments |
| 236 | to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV. | 237 | to the UPDATE_SYNTAX_TABLE macros which are relative to BEGV. |
| @@ -257,7 +258,7 @@ do \ | |||
| 257 | else if (EQ (gl_state.object, Qt)) \ | 258 | else if (EQ (gl_state.object, Qt)) \ |
| 258 | { \ | 259 | { \ |
| 259 | gl_state.b_property = 0; \ | 260 | gl_state.b_property = 0; \ |
| 260 | gl_state.e_property = 1500000000; \ | 261 | gl_state.e_property = MOST_POSITIVE_FIXNUM; \ |
| 261 | gl_state.offset = 0; \ | 262 | gl_state.offset = 0; \ |
| 262 | } \ | 263 | } \ |
| 263 | else \ | 264 | else \ |