diff options
| author | Juanma Barranquero | 2011-04-22 20:44:26 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2011-04-22 20:44:26 +0200 |
| commit | e02f48d76bfd57f014ffbe3ba56b62f2d5ccc794 (patch) | |
| tree | d27a2d9fd6838d6e619c824deb12a568ceac54f6 | |
| parent | 7ede3b6577ae99a3e7ac45baa7cace439bf5070c (diff) | |
| download | emacs-e02f48d76bfd57f014ffbe3ba56b62f2d5ccc794.tar.gz emacs-e02f48d76bfd57f014ffbe3ba56b62f2d5ccc794.zip | |
lisp/progmodes/*.el: Lexical-binding cleanup.
36 files changed, 456 insertions, 307 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 118e34b96d3..ed06af250f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,161 @@ | |||
| 1 | 2011-04-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | Lexical-binding cleanup. | ||
| 4 | |||
| 5 | * progmodes/ada-mode.el (ada-after-change-function, ada-loose-case-word) | ||
| 6 | (ada-no-auto-case, ada-capitalize-word, ada-untab, ada-narrow-to-defun): | ||
| 7 | * progmodes/ada-prj.el (ada-prj-initialize-values) | ||
| 8 | (ada-prj-display-page, ada-prj-field-modified, ada-prj-display-help) | ||
| 9 | (ada-prj-show-value): | ||
| 10 | * progmodes/ada-xref.el (ada-find-any-references, ada-gdb-application): | ||
| 11 | * progmodes/antlr-mode.el (antlr-with-displaying-help-buffer) | ||
| 12 | (antlr-invalidate-context-cache, antlr-options-menu-filter) | ||
| 13 | (antlr-language-option-extra, antlr-c++-mode-extra, antlr-run-tool): | ||
| 14 | * progmodes/bug-reference.el (bug-reference-push-button): | ||
| 15 | * progmodes/fortran.el (fortran-line-length): | ||
| 16 | * progmodes/glasses.el (glasses-change): | ||
| 17 | * progmodes/octave-mod.el (octave-fill-paragraph): | ||
| 18 | * progmodes/python.el (python-mode, python-pdbtrack-track-stack-file) | ||
| 19 | (python-pdbtrack-grub-for-buffer, python-sentinel): | ||
| 20 | * progmodes/sql.el (sql-save-connection): | ||
| 21 | * progmodes/tcl.el (tcl-indent-command, tcl-popup-menu): | ||
| 22 | * progmodes/xscheme.el (xscheme-enter-debugger-mode): | ||
| 23 | Mark unused parameters. | ||
| 24 | |||
| 25 | * progmodes/compile.el (compilation--flush-directory-cache) | ||
| 26 | (compilation--flush-parse, compile-internal): Mark unused parameters. | ||
| 27 | (compilation-buffer-name): Rename parameter MODE-NAME to NAME-OF-MODE. | ||
| 28 | (compilation-next-error-function): Remove unused variable `timestamp'. | ||
| 29 | |||
| 30 | * progmodes/cpp.el (cpp-parse-close): Remove unused variable `begin'. | ||
| 31 | (cpp-signal-read-only, cpp-grow-overlay): Mark unused parameters. | ||
| 32 | |||
| 33 | * progmodes/dcl-mode.el (dcl-end-of-command): | ||
| 34 | Remove unused variable `start'. | ||
| 35 | (dcl-calc-command-indent-multiple, dcl-calc-cont-indent-relative) | ||
| 36 | (dcl-option-value-basic, dcl-option-value-offset) | ||
| 37 | (dcl-option-value-margin-offset, dcl-option-value-comment-line): | ||
| 38 | Mark unused parameters. | ||
| 39 | (dcl-save-local-variable): Remove unused variable `val'. | ||
| 40 | (mode): Declare. | ||
| 41 | |||
| 42 | * progmodes/delphi.el (delphi-save-state, delphi-after-change): | ||
| 43 | Mark unused parameters. | ||
| 44 | (delphi-ignore-changes): Move before first use. | ||
| 45 | (delphi-charset-token-at): Remove unused variable `start'. | ||
| 46 | (delphi-else-start): Remove unused variable `if-count'. | ||
| 47 | (delphi-comment-block-start, delphi-comment-block-end): | ||
| 48 | Remove unused variable `kind'. | ||
| 49 | (delphi-indent-line): Remove unused variable `new-point'. | ||
| 50 | |||
| 51 | * progmodes/ebrowse.el (ebrowse-files-list) | ||
| 52 | (ebrowse-list-of-matching-members, ebrowse-tags-list-members-in-file): | ||
| 53 | Mark unused parameters. Don't quote `lambda'. | ||
| 54 | (ebrowse-sort-tree-list, ebrowse-same-tree-member-buffer-list): | ||
| 55 | Don't quote `lambda'. | ||
| 56 | (ebrowse-revert-tree-buffer-from-file, ebrowse-tags-choose-class) | ||
| 57 | (ebrowse-goto-visible-member/all-member-lists): Mark unused parameters. | ||
| 58 | (ebrowse-create-tree-buffer): Rename parameter OBARRAY to CLASSES. | ||
| 59 | (ebrowse-toggle-mark-at-point): Remove unused variable `pnt'. | ||
| 60 | Use `ignore-errors'. | ||
| 61 | (ebrowse-frozen-tree-buffer-name, ebrowse-find-source-file) | ||
| 62 | (ebrowse-view/find-file-and-search-pattern) | ||
| 63 | (ebrowse-view/find-member-declaration/definition): | ||
| 64 | Rename parameter TAGS-FILE-NAME to TAGS-FILE. | ||
| 65 | (ebrowse-find-class-declaration, ebrowse-view-class-declaration): | ||
| 66 | Rename parameter PREFIX-ARG to PREFIX. | ||
| 67 | (ebrowse-tags-read-name): Remove unused variables `start' and | ||
| 68 | `member-info'. | ||
| 69 | (ebrowse-display-member-buffer): Rename variable `tags-file-name' | ||
| 70 | to `tags-file'. | ||
| 71 | |||
| 72 | * progmodes/etags.el (local-find-tag-hook): Declare. | ||
| 73 | (tag-partial-file-name-match-p, tag-any-match-p, list-tags): | ||
| 74 | Mark unused parameters. | ||
| 75 | |||
| 76 | * progmodes/executable.el (compilation-error-regexp-alist): Declare. | ||
| 77 | (executable-interpret): Mark unused parameter. | ||
| 78 | |||
| 79 | * progmodes/flymake.el (flymake-process-sentinel) | ||
| 80 | (flymake-after-change-function) | ||
| 81 | (flymake-create-temp-with-folder-structure) | ||
| 82 | (flymake-get-include-dirs-dot): Mark unused parameters. | ||
| 83 | (flymake-safe-delete-directory): Remove unused variable `err'. | ||
| 84 | |||
| 85 | * progmodes/gdb-mi.el (speedbar-change-initial-expansion-list) | ||
| 86 | (speedbar-timer-fn, speedbar-line-text) | ||
| 87 | (speedbar-change-expand-button-char, speedbar-delete-subblock) | ||
| 88 | (speedbar-center-buffer-smartly): Declare functions. | ||
| 89 | (gdb-find-watch-expression): Remove unused variable `array'. | ||
| 90 | (gdb-edit-value, gdb-gdb, gdb-ignored-notification, gdb-thread-created) | ||
| 91 | (gdb-starting): Mark unused parameters. | ||
| 92 | (gud-gdbmi-marker-filter): Remove unused variable `output-record'. | ||
| 93 | (gdb-table-string): Remove unused variable `res'. | ||
| 94 | (gdb-place-breakpoints): Remove unused variables `flag' and `bptno'. | ||
| 95 | (gdb-disassembly-handler-custom): Remove unused variable `pos'. | ||
| 96 | (gdb-display-buffer): Remove unused variable `cur-size'. | ||
| 97 | |||
| 98 | * progmodes/gud.el (gud-def): Use `defalias' instead of `defun' to | ||
| 99 | allow lexical-binding compilation. | ||
| 100 | (gud-expansion-speedbar-buttons, gud-gdb-goto-stackframe) | ||
| 101 | (gud-dbx-massage-args, gud-xdb-massage-args, gud-perldb-massage-args) | ||
| 102 | (gud-jdb-massage-args, gud-jdb-find-source, gud-find-class): | ||
| 103 | Mark unused parameters. | ||
| 104 | (gud-gdb-marker-filter): Remove unused variable `match'. | ||
| 105 | (gud-find-class): Bind `syntax-symbol' and `syntax-point' to suitable | ||
| 106 | lambda expressions and funcall them, instead of using `fset'. | ||
| 107 | |||
| 108 | * progmodes/hideif.el (hif-parse-if-exp): Rename parameter | ||
| 109 | HIF-TOKEN-LIST to TOKEN-LIST and let-bind `hif-token-list'. | ||
| 110 | |||
| 111 | * progmodes/hideshow.el (hs-hide-block-at-point): Remove unused | ||
| 112 | variable `header-beg'; use `let'. | ||
| 113 | |||
| 114 | * progmodes/icon.el (indent-icon-exp): Remove unused variables | ||
| 115 | `restart', `last-sexp' and `at-do'. | ||
| 116 | |||
| 117 | * progmodes/js.el (js--debug): Mark unused parameter. | ||
| 118 | (js--parse-state-at-point): Remove unused variable `bound'; use `let'. | ||
| 119 | (js--splice-into-items): Remove unused variable `item'. | ||
| 120 | (js--read-symbol, js--read-tab): Pass 1/-1 to `ido-mode', not t/nil. | ||
| 121 | |||
| 122 | * progmodes/make-mode.el (makefile-make-font-lock-keywords): | ||
| 123 | Rename parameter FONT-LOCK-KEYWORDS to FL-KEYWORDS. | ||
| 124 | (makefile-complete): Remove unused variable `try'. | ||
| 125 | (makefile-fill-paragraph, makefile-match-function-end): | ||
| 126 | Mark unused parameters. | ||
| 127 | |||
| 128 | * progmodes/octave-inf.el (inferior-octave-complete): | ||
| 129 | Remove unused variable `proc'. | ||
| 130 | (inferior-octave-output-digest): Mark unused parameter. | ||
| 131 | |||
| 132 | * progmodes/perl-mode.el (perl-calculate-indent): | ||
| 133 | Remove unused variable `err'. | ||
| 134 | |||
| 135 | * progmodes/prolog.el (prolog-mode-keybindings-inferior) | ||
| 136 | (prolog-indent-line): Mark unused parameters. | ||
| 137 | (prolog-indent-line): Remove unused variable `beg'. | ||
| 138 | |||
| 139 | * progmodes/ps-mode.el (reporter-prompt-for-summary-p) | ||
| 140 | (reporter-dont-compact-list): Declare. | ||
| 141 | |||
| 142 | * progmodes/sh-script.el (sh-font-lock-quoted-subshell): | ||
| 143 | Remove unused variable `char'. | ||
| 144 | (sh-debug): Mark unused parameter. | ||
| 145 | (sh-get-indent-info): Remove unused variable `start'. | ||
| 146 | (sh-calculate-indent): Remove unused variable `var'. | ||
| 147 | |||
| 148 | * progmodes/simula.el (simula-popup-menu): Mark unused parameter. | ||
| 149 | (simula-electric-keyword): Remove unused variable `null'. | ||
| 150 | (simula-search-backward, simula-search-forward): Remove unused | ||
| 151 | variables `begin' and `end'. | ||
| 152 | |||
| 153 | * progmodes/vera-mode.el (vera-guess-basic-syntax): | ||
| 154 | Remove unused variable `pos'. | ||
| 155 | (vera-electric-tab, vera-comment-uncomment-region): | ||
| 156 | Mark unused parameters. | ||
| 157 | (vera-electric-tab): Rename parameter PREFIX-ARG to PREFIX. | ||
| 158 | |||
| 1 | 2011-04-22 Chong Yidong <cyd@stupidchicken.com> | 159 | 2011-04-22 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 160 | ||
| 3 | * emacs-lisp/package.el (package--builtins, package-alist) | 161 | * emacs-lisp/package.el (package--builtins, package-alist) |
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index beb737ba613..89a37307506 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el | |||
| @@ -966,7 +966,7 @@ are treated as numbers instead of gnatprep comments." | |||
| 966 | (unless modified | 966 | (unless modified |
| 967 | (restore-buffer-modified-p nil)))) | 967 | (restore-buffer-modified-p nil)))) |
| 968 | 968 | ||
| 969 | (defun ada-after-change-function (beg end old-len) | 969 | (defun ada-after-change-function (beg end _old-len) |
| 970 | "Called when the region between BEG and END was changed in the buffer. | 970 | "Called when the region between BEG and END was changed in the buffer. |
| 971 | OLD-LEN indicates what the length of the replaced text was." | 971 | OLD-LEN indicates what the length of the replaced text was." |
| 972 | (save-excursion | 972 | (save-excursion |
| @@ -1675,7 +1675,7 @@ ARG is the prefix the user entered with \\[universal-argument]." | |||
| 1675 | '( ?` ?_ ?# ?% ?& ?* ?( ?) ?- ?= ?+ | 1675 | '( ?` ?_ ?# ?% ?& ?* ?( ?) ?- ?= ?+ |
| 1676 | ?| ?\; ?: ?' ?\" ?< ?, ?. ?> ?/ ?\n 32 ?\r ))) | 1676 | ?| ?\; ?: ?' ?\" ?< ?, ?. ?> ?/ ?\n 32 ?\r ))) |
| 1677 | 1677 | ||
| 1678 | (defun ada-loose-case-word (&optional arg) | 1678 | (defun ada-loose-case-word (&optional _arg) |
| 1679 | "Upcase first letter and letters following `_' in the following word. | 1679 | "Upcase first letter and letters following `_' in the following word. |
| 1680 | No other letter is modified. | 1680 | No other letter is modified. |
| 1681 | ARG is ignored, and is there for compatibility with `capitalize-word' only." | 1681 | ARG is ignored, and is there for compatibility with `capitalize-word' only." |
| @@ -1691,7 +1691,7 @@ ARG is ignored, and is there for compatibility with `capitalize-word' only." | |||
| 1691 | (insert-char (upcase (following-char)) 1) | 1691 | (insert-char (upcase (following-char)) 1) |
| 1692 | (delete-char 1))))) | 1692 | (delete-char 1))))) |
| 1693 | 1693 | ||
| 1694 | (defun ada-no-auto-case (&optional arg) | 1694 | (defun ada-no-auto-case (&optional _arg) |
| 1695 | "Do nothing. ARG is ignored. | 1695 | "Do nothing. ARG is ignored. |
| 1696 | This function can be used for the auto-casing variables in Ada mode, to | 1696 | This function can be used for the auto-casing variables in Ada mode, to |
| 1697 | adapt to unusal auto-casing schemes. Since it does nothing, you can for | 1697 | adapt to unusal auto-casing schemes. Since it does nothing, you can for |
| @@ -1700,7 +1700,7 @@ auto-casing for identifiers, whereas keywords have to be lower-cased. | |||
| 1700 | See also `ada-auto-case' to disable auto casing altogether." | 1700 | See also `ada-auto-case' to disable auto casing altogether." |
| 1701 | nil) | 1701 | nil) |
| 1702 | 1702 | ||
| 1703 | (defun ada-capitalize-word (&optional arg) | 1703 | (defun ada-capitalize-word (&optional _arg) |
| 1704 | "Upcase first letter and letters following '_', lower case other letters. | 1704 | "Upcase first letter and letters following '_', lower case other letters. |
| 1705 | ARG is ignored, and is there for compatibility with `capitalize-word' only." | 1705 | ARG is ignored, and is there for compatibility with `capitalize-word' only." |
| 1706 | (interactive) | 1706 | (interactive) |
| @@ -4219,7 +4219,7 @@ of the region. Otherwise, operate only on the current line." | |||
| 4219 | ((eq ada-tab-policy 'always-tab) (error "Not implemented")) | 4219 | ((eq ada-tab-policy 'always-tab) (error "Not implemented")) |
| 4220 | )) | 4220 | )) |
| 4221 | 4221 | ||
| 4222 | (defun ada-untab (arg) | 4222 | (defun ada-untab (_arg) |
| 4223 | "Delete leading indenting according to `ada-tab-policy'." | 4223 | "Delete leading indenting according to `ada-tab-policy'." |
| 4224 | ;; FIXME: ARG is ignored | 4224 | ;; FIXME: ARG is ignored |
| 4225 | (interactive "P") | 4225 | (interactive "P") |
| @@ -5250,7 +5250,7 @@ Return nil if no body was found." | |||
| 5250 | ;; Support for narrow-to-region | 5250 | ;; Support for narrow-to-region |
| 5251 | ;; --------------------------------------------------------- | 5251 | ;; --------------------------------------------------------- |
| 5252 | 5252 | ||
| 5253 | (defun ada-narrow-to-defun (&optional arg) | 5253 | (defun ada-narrow-to-defun (&optional _arg) |
| 5254 | "Make text outside current subprogram invisible. | 5254 | "Make text outside current subprogram invisible. |
| 5255 | The subprogram visible is the one that contains or follow point. | 5255 | The subprogram visible is the one that contains or follow point. |
| 5256 | Optional ARG is ignored. | 5256 | Optional ARG is ignored. |
diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index dd05ab8f310..a32e22828fc 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el | |||
| @@ -92,7 +92,7 @@ If there is none, opens a new project file." | |||
| 92 | (ada-customize) | 92 | (ada-customize) |
| 93 | (ada-prj-new))) | 93 | (ada-prj-new))) |
| 94 | 94 | ||
| 95 | (defun ada-prj-initialize-values (symbol ada-buffer filename) | 95 | (defun ada-prj-initialize-values (symbol _ada-buffer filename) |
| 96 | "Set SYMBOL to the property list of the project file FILENAME. | 96 | "Set SYMBOL to the property list of the project file FILENAME. |
| 97 | If FILENAME is null, read the file associated with ADA-BUFFER. | 97 | If FILENAME is null, read the file associated with ADA-BUFFER. |
| 98 | If no project file is found, return the default values." | 98 | If no project file is found, return the default values." |
| @@ -257,19 +257,19 @@ The current buffer must be the project editing buffer." | |||
| 257 | (widget-insert "\n Project configuration.\n | 257 | (widget-insert "\n Project configuration.\n |
| 258 | ___________ ____________ ____________ ____________ ____________\n / ") | 258 | ___________ ____________ ____________ ____________ ____________\n / ") |
| 259 | (widget-create 'push-button :notify | 259 | (widget-create 'push-button :notify |
| 260 | (lambda (&rest dummy) (ada-prj-display-page 1)) "General") | 260 | (lambda (&rest _dummy) (ada-prj-display-page 1)) "General") |
| 261 | (widget-insert " \\ / ") | 261 | (widget-insert " \\ / ") |
| 262 | (widget-create 'push-button :notify | 262 | (widget-create 'push-button :notify |
| 263 | (lambda (&rest dummy) (ada-prj-display-page 2)) "Paths") | 263 | (lambda (&rest _dummy) (ada-prj-display-page 2)) "Paths") |
| 264 | (widget-insert " \\ / ") | 264 | (widget-insert " \\ / ") |
| 265 | (widget-create 'push-button :notify | 265 | (widget-create 'push-button :notify |
| 266 | (lambda (&rest dummy) (ada-prj-display-page 3)) "Switches") | 266 | (lambda (&rest _dummy) (ada-prj-display-page 3)) "Switches") |
| 267 | (widget-insert " \\ / ") | 267 | (widget-insert " \\ / ") |
| 268 | (widget-create 'push-button :notify | 268 | (widget-create 'push-button :notify |
| 269 | (lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu") | 269 | (lambda (&rest _dummy) (ada-prj-display-page 4)) "Ada Menu") |
| 270 | (widget-insert " \\ / ") | 270 | (widget-insert " \\ / ") |
| 271 | (widget-create 'push-button :notify | 271 | (widget-create 'push-button :notify |
| 272 | (lambda (&rest dummy) (ada-prj-display-page 5)) "Debugger") | 272 | (lambda (&rest _dummy) (ada-prj-display-page 5)) "Debugger") |
| 273 | (widget-insert " \\\n") | 273 | (widget-insert " \\\n") |
| 274 | 274 | ||
| 275 | ;; Display the currently selected page | 275 | ;; Display the currently selected page |
| @@ -458,15 +458,15 @@ connect to the target when working with cross-environments" t) | |||
| 458 | 458 | ||
| 459 | (widget-insert "______________________________________________________________________\n\n ") | 459 | (widget-insert "______________________________________________________________________\n\n ") |
| 460 | (widget-create 'push-button | 460 | (widget-create 'push-button |
| 461 | :notify (lambda (&rest ignore) | 461 | :notify (lambda (&rest _ignore) |
| 462 | (setq ada-prj-current-values (ada-default-prj-properties)) | 462 | (setq ada-prj-current-values (ada-default-prj-properties)) |
| 463 | (ada-prj-display-page 1)) | 463 | (ada-prj-display-page 1)) |
| 464 | "Reset to Default Values") | 464 | "Reset to Default Values") |
| 465 | (widget-insert " ") | 465 | (widget-insert " ") |
| 466 | (widget-create 'push-button :notify (lambda (&rest ignore) (kill-buffer nil)) | 466 | (widget-create 'push-button :notify (lambda (&rest _ignore) (kill-buffer nil)) |
| 467 | "Cancel") | 467 | "Cancel") |
| 468 | (widget-insert " ") | 468 | (widget-insert " ") |
| 469 | (widget-create 'push-button :notify (lambda (&rest ignore) (ada-prj-save)) | 469 | (widget-create 'push-button :notify (lambda (&rest _ignore) (ada-prj-save)) |
| 470 | "Save") | 470 | "Save") |
| 471 | (widget-insert "\n\n") | 471 | (widget-insert "\n\n") |
| 472 | 472 | ||
| @@ -546,7 +546,7 @@ converted to a directory name." | |||
| 546 | ada-list "\n")) | 546 | ada-list "\n")) |
| 547 | 547 | ||
| 548 | 548 | ||
| 549 | (defun ada-prj-field-modified (widget &rest dummy) | 549 | (defun ada-prj-field-modified (widget &rest _dummy) |
| 550 | "Callback for modification of WIDGET. | 550 | "Callback for modification of WIDGET. |
| 551 | Remaining args DUMMY are ignored. | 551 | Remaining args DUMMY are ignored. |
| 552 | Save the change in `ada-prj-current-values' so that selecting | 552 | Save the change in `ada-prj-current-values' so that selecting |
| @@ -556,7 +556,7 @@ another page and coming back keeps the new value." | |||
| 556 | (widget-get widget ':prj-field) | 556 | (widget-get widget ':prj-field) |
| 557 | (widget-value widget)))) | 557 | (widget-value widget)))) |
| 558 | 558 | ||
| 559 | (defun ada-prj-display-help (widget widget-modified event) | 559 | (defun ada-prj-display-help (widget _widget-modified event) |
| 560 | "Callback for help button in WIDGET. | 560 | "Callback for help button in WIDGET. |
| 561 | Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." | 561 | Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." |
| 562 | (let ((text (widget-get widget 'prj-help))) | 562 | (let ((text (widget-get widget 'prj-help))) |
| @@ -572,7 +572,7 @@ Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." | |||
| 572 | (concat "*****Help*****\n" text "\n**************\n") | 572 | (concat "*****Help*****\n" text "\n**************\n") |
| 573 | (point-at-bol 2))))) | 573 | (point-at-bol 2))))) |
| 574 | 574 | ||
| 575 | (defun ada-prj-show-value (widget widget-modified event) | 575 | (defun ada-prj-show-value (widget _widget-modified event) |
| 576 | "Show the current field value in WIDGET. | 576 | "Show the current field value in WIDGET. |
| 577 | Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." | 577 | Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." |
| 578 | (let* ((field (widget-get widget ':prj-field)) | 578 | (let* ((field (widget-get widget ':prj-field)) |
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 85659cafd95..7751f3e98fc 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el | |||
| @@ -1043,7 +1043,7 @@ existing buffer `*gnatfind*', if there is one." | |||
| 1043 | (setq old-contents (buffer-string)))) | 1043 | (setq old-contents (buffer-string)))) |
| 1044 | 1044 | ||
| 1045 | (let ((compilation-error "reference")) | 1045 | (let ((compilation-error "reference")) |
| 1046 | (compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name))) | 1046 | (compilation-start command 'compilation-mode (lambda (_mode) ada-gnatfind-buffer-name))) |
| 1047 | 1047 | ||
| 1048 | ;; Hide the "Compilation" menu | 1048 | ;; Hide the "Compilation" menu |
| 1049 | (with-current-buffer ada-gnatfind-buffer-name | 1049 | (with-current-buffer ada-gnatfind-buffer-name |
| @@ -1384,7 +1384,7 @@ project file." | |||
| 1384 | 1384 | ||
| 1385 | ;; Do not add -fullname, since we can have a 'rsh' command in front. | 1385 | ;; Do not add -fullname, since we can have a 'rsh' command in front. |
| 1386 | ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef | 1386 | ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef |
| 1387 | (fset 'gud-gdb-massage-args (lambda (file args) args)) | 1387 | (fset 'gud-gdb-massage-args (lambda (_file args) args)) |
| 1388 | 1388 | ||
| 1389 | (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) | 1389 | (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) |
| 1390 | (if (not (equal pre-cmd "")) | 1390 | (if (not (equal pre-cmd "")) |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index c5207139014..d1ff1aead10 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -82,7 +82,7 @@ | |||
| 82 | 82 | ||
| 83 | ;;; Code: | 83 | ;;; Code: |
| 84 | 84 | ||
| 85 | (eval-when-compile | 85 | (eval-when-compile |
| 86 | (require 'cl)) | 86 | (require 'cl)) |
| 87 | 87 | ||
| 88 | (require 'easymenu) | 88 | (require 'easymenu) |
| @@ -93,7 +93,7 @@ | |||
| 93 | (declare-function cond-emacs-xemacs-macfn "antlr-mode" (args &optional msg)) | 93 | (declare-function cond-emacs-xemacs-macfn "antlr-mode" (args &optional msg)) |
| 94 | 94 | ||
| 95 | ;; General Emacs/XEmacs-compatibility compile-time macros | 95 | ;; General Emacs/XEmacs-compatibility compile-time macros |
| 96 | (eval-when-compile | 96 | (eval-when-compile |
| 97 | (defmacro cond-emacs-xemacs (&rest args) | 97 | (defmacro cond-emacs-xemacs (&rest args) |
| 98 | (cond-emacs-xemacs-macfn | 98 | (cond-emacs-xemacs-macfn |
| 99 | args "`cond-emacs-xemacs' must return exactly one element")) | 99 | args "`cond-emacs-xemacs' must return exactly one element")) |
| @@ -1073,7 +1073,7 @@ Used for `antlr-slow-syntactic-context'.") | |||
| 1073 | (read-from-minibuffer prompt initial-input nil nil | 1073 | (read-from-minibuffer prompt initial-input nil nil |
| 1074 | (or history 'shell-command-history))) | 1074 | (or history 'shell-command-history))) |
| 1075 | 1075 | ||
| 1076 | (defunx antlr-with-displaying-help-buffer (thunk &optional name) | 1076 | (defunx antlr-with-displaying-help-buffer (thunk &optional _name) |
| 1077 | :xemacs-and-try with-displaying-help-buffer | 1077 | :xemacs-and-try with-displaying-help-buffer |
| 1078 | "Make a help buffer and call `thunk' there." | 1078 | "Make a help buffer and call `thunk' there." |
| 1079 | (with-output-to-temp-buffer "*Help*" | 1079 | (with-output-to-temp-buffer "*Help*" |
| @@ -1092,7 +1092,7 @@ Used for `antlr-slow-syntactic-context'.") | |||
| 1092 | ;;;(defvar antlr-statistics-cache 0) | 1092 | ;;;(defvar antlr-statistics-cache 0) |
| 1093 | ;;;(defvar antlr-statistics-inval 0) | 1093 | ;;;(defvar antlr-statistics-inval 0) |
| 1094 | 1094 | ||
| 1095 | (defunx antlr-invalidate-context-cache (&rest dummies) | 1095 | (defunx antlr-invalidate-context-cache (&rest _dummies) |
| 1096 | ;; checkdoc-params: (dummies) | 1096 | ;; checkdoc-params: (dummies) |
| 1097 | "Invalidate context cache for syntactical context information." | 1097 | "Invalidate context cache for syntactical context information." |
| 1098 | :XEMACS ; XEmacs bug workaround | 1098 | :XEMACS ; XEmacs bug workaround |
| @@ -1670,7 +1670,7 @@ Return \(LEVEL OPTION LOCATION)." | |||
| 1670 | table))) | 1670 | table))) |
| 1671 | (list level input (cdr kind)))))) | 1671 | (list level input (cdr kind)))))) |
| 1672 | 1672 | ||
| 1673 | (defun antlr-options-menu-filter (level menu-items) | 1673 | (defun antlr-options-menu-filter (level _menu-items) |
| 1674 | "Return items for options submenu of level LEVEL." | 1674 | "Return items for options submenu of level LEVEL." |
| 1675 | ;; checkdoc-params: (menu-items) | 1675 | ;; checkdoc-params: (menu-items) |
| 1676 | (let ((active (if buffer-read-only | 1676 | (let ((active (if buffer-read-only |
| @@ -2072,7 +2072,7 @@ Used inside `antlr-options-alists'." | |||
| 2072 | nil | 2072 | nil |
| 2073 | table '(("false") ("true")))) | 2073 | table '(("false") ("true")))) |
| 2074 | 2074 | ||
| 2075 | (defun antlr-language-option-extra (phase &rest dummies) | 2075 | (defun antlr-language-option-extra (phase &rest _dummies) |
| 2076 | ;; checkdoc-params: (dummies) | 2076 | ;; checkdoc-params: (dummies) |
| 2077 | "Change language according to the new value of the \"language\" option. | 2077 | "Change language according to the new value of the \"language\" option. |
| 2078 | Call `antlr-mode' if the new language would be different from the value | 2078 | Call `antlr-mode' if the new language would be different from the value |
| @@ -2088,7 +2088,7 @@ Called in PHASE `after-insertion', see `antlr-options-alists'." | |||
| 2088 | (antlr-mode) | 2088 | (antlr-mode) |
| 2089 | (and font-lock (null font-lock-mode) (font-lock-mode 1))))))) | 2089 | (and font-lock (null font-lock-mode) (font-lock-mode 1))))))) |
| 2090 | 2090 | ||
| 2091 | (defun antlr-c++-mode-extra (phase option &rest dummies) | 2091 | (defun antlr-c++-mode-extra (phase option &rest _dummies) |
| 2092 | ;; checkdoc-params: (option dummies) | 2092 | ;; checkdoc-params: (option dummies) |
| 2093 | "Warn if C++ option is used with the wrong language. | 2093 | "Warn if C++ option is used with the wrong language. |
| 2094 | Ask user \(\"y or n\"), if a C++ only option is going to be inserted but | 2094 | Ask user \(\"y or n\"), if a C++ only option is going to be inserted but |
| @@ -2260,7 +2260,7 @@ called interactively, the buffers are always saved, see also variable | |||
| 2260 | (or saved (save-some-buffers (not antlr-ask-about-save))) | 2260 | (or saved (save-some-buffers (not antlr-ask-about-save))) |
| 2261 | (let ((default-directory (file-name-directory file))) | 2261 | (let ((default-directory (file-name-directory file))) |
| 2262 | (compilation-start (concat command " " (file-name-nondirectory file)) | 2262 | (compilation-start (concat command " " (file-name-nondirectory file)) |
| 2263 | nil #'(lambda (mode-name) "*Antlr-Run*")))) | 2263 | nil (lambda (_mode-name) "*Antlr-Run*")))) |
| 2264 | 2264 | ||
| 2265 | (defun antlr-run-tool-interactive () | 2265 | (defun antlr-run-tool-interactive () |
| 2266 | ;; code in `interactive' is not compiled | 2266 | ;; code in `interactive' is not compiled |
| @@ -2592,7 +2592,7 @@ the default language." | |||
| 2592 | ;; FIXME: Since it uses cc-mode, it bumps into c-update-modeline's | 2592 | ;; FIXME: Since it uses cc-mode, it bumps into c-update-modeline's |
| 2593 | ;; limitation to mode-name being a string. | 2593 | ;; limitation to mode-name being a string. |
| 2594 | ;; '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist)))) | 2594 | ;; '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist)))) |
| 2595 | "Antlr" | 2595 | "Antlr" |
| 2596 | "Major mode for editing ANTLR grammar files." | 2596 | "Major mode for editing ANTLR grammar files." |
| 2597 | :abbrev-table antlr-mode-abbrev-table | 2597 | :abbrev-table antlr-mode-abbrev-table |
| 2598 | (c-initialize-cc-mode) ; cc-mode is required | 2598 | (c-initialize-cc-mode) ; cc-mode is required |
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 9d79d22d42e..3ac8b119fe1 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el | |||
| @@ -90,7 +90,7 @@ | |||
| 90 | "Keymap for Asm mode.") | 90 | "Keymap for Asm mode.") |
| 91 | 91 | ||
| 92 | (defconst asm-font-lock-keywords | 92 | (defconst asm-font-lock-keywords |
| 93 | (append | 93 | (append |
| 94 | '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?" | 94 | '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?" |
| 95 | (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t)) | 95 | (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t)) |
| 96 | ;; label started from ".". | 96 | ;; label started from ".". |
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 4d78047268f..8ec379afab2 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -109,7 +109,7 @@ so that it is considered safe, see `enable-local-variables'.") | |||
| 109 | (funcall bug-reference-url-format)))))))))) | 109 | (funcall bug-reference-url-format)))))))))) |
| 110 | 110 | ||
| 111 | ;; Taken from button.el. | 111 | ;; Taken from button.el. |
| 112 | (defun bug-reference-push-button (&optional pos use-mouse-action) | 112 | (defun bug-reference-push-button (&optional pos _use-mouse-action) |
| 113 | "Open URL corresponding to the bug reference at POS." | 113 | "Open URL corresponding to the bug reference at POS." |
| 114 | (interactive | 114 | (interactive |
| 115 | (list (if (integerp last-command-event) (point) last-command-event))) | 115 | (list (if (integerp last-command-event) (point) last-command-event))) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 40383c6bc31..ec0830b3b1b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -833,7 +833,7 @@ returned RES, i.e. there is no change of `compilation-directory' between | |||
| 833 | POS and RES.") | 833 | POS and RES.") |
| 834 | (make-variable-buffer-local 'compilation--previous-directory-cache) | 834 | (make-variable-buffer-local 'compilation--previous-directory-cache) |
| 835 | 835 | ||
| 836 | (defun compilation--flush-directory-cache (start end) | 836 | (defun compilation--flush-directory-cache (start _end) |
| 837 | (cond | 837 | (cond |
| 838 | ((or (not compilation--previous-directory-cache) | 838 | ((or (not compilation--previous-directory-cache) |
| 839 | (<= (car compilation--previous-directory-cache) start))) | 839 | (<= (car compilation--previous-directory-cache) start))) |
| @@ -1307,7 +1307,7 @@ to `compilation-error-regexp-alist' if RULES is nil." | |||
| 1307 | (compilation--parse-region (point) compilation--parsed))))) | 1307 | (compilation--parse-region (point) compilation--parsed))))) |
| 1308 | nil) | 1308 | nil) |
| 1309 | 1309 | ||
| 1310 | (defun compilation--flush-parse (start end) | 1310 | (defun compilation--flush-parse (start _end) |
| 1311 | "Mark the region between START and END for re-parsing." | 1311 | "Mark the region between START and END for re-parsing." |
| 1312 | (if (markerp compilation--parsed) | 1312 | (if (markerp compilation--parsed) |
| 1313 | (move-marker compilation--parsed (min start compilation--parsed)))) | 1313 | (move-marker compilation--parsed (min start compilation--parsed)))) |
| @@ -1399,31 +1399,31 @@ point on its location in the *compilation* buffer." | |||
| 1399 | :group 'compilation) | 1399 | :group 'compilation) |
| 1400 | 1400 | ||
| 1401 | 1401 | ||
| 1402 | (defun compilation-buffer-name (mode-name mode-command name-function) | 1402 | (defun compilation-buffer-name (name-of-mode mode-command name-function) |
| 1403 | "Return the name of a compilation buffer to use. | 1403 | "Return the name of a compilation buffer to use. |
| 1404 | If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME | 1404 | If NAME-FUNCTION is non-nil, call it with one argument NAME-OF-MODE |
| 1405 | to determine the buffer name. | 1405 | to determine the buffer name. |
| 1406 | Likewise if `compilation-buffer-name-function' is non-nil. | 1406 | Likewise if `compilation-buffer-name-function' is non-nil. |
| 1407 | If current buffer has the major mode MODE-COMMAND, | 1407 | If current buffer has the major mode MODE-COMMAND, |
| 1408 | return the name of the current buffer, so that it gets reused. | 1408 | return the name of the current buffer, so that it gets reused. |
| 1409 | Otherwise, construct a buffer name from MODE-NAME." | 1409 | Otherwise, construct a buffer name from NAME-OF-MODE." |
| 1410 | (cond (name-function | 1410 | (cond (name-function |
| 1411 | (funcall name-function mode-name)) | 1411 | (funcall name-function name-of-mode)) |
| 1412 | (compilation-buffer-name-function | 1412 | (compilation-buffer-name-function |
| 1413 | (funcall compilation-buffer-name-function mode-name)) | 1413 | (funcall compilation-buffer-name-function name-of-mode)) |
| 1414 | ((eq mode-command major-mode) | 1414 | ((eq mode-command major-mode) |
| 1415 | (buffer-name)) | 1415 | (buffer-name)) |
| 1416 | (t | 1416 | (t |
| 1417 | (concat "*" (downcase mode-name) "*")))) | 1417 | (concat "*" (downcase name-of-mode) "*")))) |
| 1418 | 1418 | ||
| 1419 | ;; This is a rough emulation of the old hack, until the transition to new | 1419 | ;; This is a rough emulation of the old hack, until the transition to new |
| 1420 | ;; compile is complete. | 1420 | ;; compile is complete. |
| 1421 | (defun compile-internal (command error-message | 1421 | (defun compile-internal (command error-message |
| 1422 | &optional name-of-mode parser | 1422 | &optional _name-of-mode parser |
| 1423 | error-regexp-alist name-function | 1423 | error-regexp-alist name-function |
| 1424 | enter-regexp-alist leave-regexp-alist | 1424 | _enter-regexp-alist _leave-regexp-alist |
| 1425 | file-regexp-alist nomessage-regexp-alist | 1425 | file-regexp-alist _nomessage-regexp-alist |
| 1426 | no-async highlight-regexp local-map) | 1426 | _no-async highlight-regexp _local-map) |
| 1427 | (if parser | 1427 | (if parser |
| 1428 | (error "Compile now works very differently, see `compilation-error-regexp-alist'")) | 1428 | (error "Compile now works very differently, see `compilation-error-regexp-alist'")) |
| 1429 | (let ((compilation-error-regexp-alist | 1429 | (let ((compilation-error-regexp-alist |
| @@ -2229,7 +2229,7 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2229 | (when reset | 2229 | (when reset |
| 2230 | (setq compilation-current-error nil)) | 2230 | (setq compilation-current-error nil)) |
| 2231 | (let* ((columns compilation-error-screen-columns) ; buffer's local value | 2231 | (let* ((columns compilation-error-screen-columns) ; buffer's local value |
| 2232 | (last 1) timestamp | 2232 | (last 1) |
| 2233 | (msg (compilation-next-error (or n 1) nil | 2233 | (msg (compilation-next-error (or n 1) nil |
| 2234 | (or compilation-current-error | 2234 | (or compilation-current-error |
| 2235 | compilation-messages-start | 2235 | compilation-messages-start |
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index d7b8b0e8748..a8f01705e2d 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -308,7 +308,6 @@ A prefix arg suppresses display of that buffer." | |||
| 308 | ;; Pop top of cpp-state-stack and create overlay. | 308 | ;; Pop top of cpp-state-stack and create overlay. |
| 309 | (let ((entry (assoc (nth 1 (car cpp-state-stack)) cpp-edit-list)) | 309 | (let ((entry (assoc (nth 1 (car cpp-state-stack)) cpp-edit-list)) |
| 310 | (branch (nth 0 (car cpp-state-stack))) | 310 | (branch (nth 0 (car cpp-state-stack))) |
| 311 | (begin (nth 2 (car cpp-state-stack))) | ||
| 312 | (end (nth 3 (car cpp-state-stack)))) | 311 | (end (nth 3 (car cpp-state-stack)))) |
| 313 | (setq cpp-state-stack (cdr cpp-state-stack)) | 312 | (setq cpp-state-stack (cdr cpp-state-stack)) |
| 314 | (if entry | 313 | (if entry |
| @@ -398,7 +397,7 @@ A prefix arg suppresses display of that buffer." | |||
| 398 | (overlay-put overlay 'insert-in-front-hooks '(cpp-grow-overlay)) | 397 | (overlay-put overlay 'insert-in-front-hooks '(cpp-grow-overlay)) |
| 399 | (overlay-put overlay 'insert-behind-hooks '(cpp-grow-overlay))) | 398 | (overlay-put overlay 'insert-behind-hooks '(cpp-grow-overlay))) |
| 400 | 399 | ||
| 401 | (defun cpp-signal-read-only (overlay after start end &optional len) | 400 | (defun cpp-signal-read-only (overlay after start end &optional _len) |
| 402 | ;; Only allow deleting the whole overlay. | 401 | ;; Only allow deleting the whole overlay. |
| 403 | ;; Trying to change a read-only overlay. | 402 | ;; Trying to change a read-only overlay. |
| 404 | (if (and (not after) | 403 | (if (and (not after) |
| @@ -406,7 +405,7 @@ A prefix arg suppresses display of that buffer." | |||
| 406 | (> (overlay-end overlay) end))) | 405 | (> (overlay-end overlay) end))) |
| 407 | (error "This text is read only"))) | 406 | (error "This text is read only"))) |
| 408 | 407 | ||
| 409 | (defun cpp-grow-overlay (overlay after start end &optional len) | 408 | (defun cpp-grow-overlay (overlay after start end &optional _len) |
| 410 | ;; Make OVERLAY grow to contain range START to END. | 409 | ;; Make OVERLAY grow to contain range START to END. |
| 411 | (if after | 410 | (if after |
| 412 | (move-overlay overlay | 411 | (move-overlay overlay |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 902848ef007..b4094914d61 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -662,8 +662,7 @@ There is some minimal font-lock support (see vars | |||
| 662 | (defun dcl-end-of-command () | 662 | (defun dcl-end-of-command () |
| 663 | "Move point to end of current command or next command if not on a command." | 663 | "Move point to end of current command or next command if not on a command." |
| 664 | (interactive) | 664 | (interactive) |
| 665 | (let ((type (dcl-get-line-type)) | 665 | (let ((type (dcl-get-line-type))) |
| 666 | (start (point))) | ||
| 667 | (if (or (eq type '$) | 666 | (if (or (eq type '$) |
| 668 | (eq type '-)) | 667 | (eq type '-)) |
| 669 | (progn | 668 | (progn |
| @@ -941,7 +940,7 @@ Returns one of the following symbols: | |||
| 941 | 940 | ||
| 942 | ;;;--------------------------------------------------------------------------- | 941 | ;;;--------------------------------------------------------------------------- |
| 943 | (defun dcl-calc-command-indent-multiple | 942 | (defun dcl-calc-command-indent-multiple |
| 944 | (indent-type cur-indent extra-indent last-point this-point) | 943 | (indent-type cur-indent extra-indent _last-point _this-point) |
| 945 | "Indent lines to a multiple of dcl-basic-offset. | 944 | "Indent lines to a multiple of dcl-basic-offset. |
| 946 | 945 | ||
| 947 | Set dcl-calc-command-indent-function to this function to customize | 946 | Set dcl-calc-command-indent-function to this function to customize |
| @@ -1185,7 +1184,7 @@ The indent-type classification could probably be expanded upon. | |||
| 1185 | 1184 | ||
| 1186 | 1185 | ||
| 1187 | ;;;--------------------------------------------------------------------------- | 1186 | ;;;--------------------------------------------------------------------------- |
| 1188 | (defun dcl-calc-cont-indent-relative (cur-indent extra-indent) | 1187 | (defun dcl-calc-cont-indent-relative (_cur-indent _extra-indent) |
| 1189 | "Indent continuation lines to align with words on previous line. | 1188 | "Indent continuation lines to align with words on previous line. |
| 1190 | 1189 | ||
| 1191 | Indent continuation lines to a position relative to preceding | 1190 | Indent continuation lines to a position relative to preceding |
| @@ -1540,7 +1539,7 @@ Also remove the continuation mark if easily detected." | |||
| 1540 | 1539 | ||
| 1541 | 1540 | ||
| 1542 | ;;;------------------------------------------------------------------------- | 1541 | ;;;------------------------------------------------------------------------- |
| 1543 | (defun dcl-option-value-basic (option-assoc) | 1542 | (defun dcl-option-value-basic (_option-assoc) |
| 1544 | "Guess a value for basic-offset." | 1543 | "Guess a value for basic-offset." |
| 1545 | (save-excursion | 1544 | (save-excursion |
| 1546 | (dcl-beginning-of-command) | 1545 | (dcl-beginning-of-command) |
| @@ -1575,7 +1574,7 @@ Also remove the continuation mark if easily detected." | |||
| 1575 | 1574 | ||
| 1576 | 1575 | ||
| 1577 | ;;;------------------------------------------------------------------------- | 1576 | ;;;------------------------------------------------------------------------- |
| 1578 | (defun dcl-option-value-offset (option-assoc) | 1577 | (defun dcl-option-value-offset (_option-assoc) |
| 1579 | "Guess a value for an offset. | 1578 | "Guess a value for an offset. |
| 1580 | Find the column of the first non-blank character on the line. | 1579 | Find the column of the first non-blank character on the line. |
| 1581 | Returns the column offset." | 1580 | Returns the column offset." |
| @@ -1586,7 +1585,7 @@ Returns the column offset." | |||
| 1586 | 1585 | ||
| 1587 | 1586 | ||
| 1588 | ;;;------------------------------------------------------------------------- | 1587 | ;;;------------------------------------------------------------------------- |
| 1589 | (defun dcl-option-value-margin-offset (option-assoc) | 1588 | (defun dcl-option-value-margin-offset (_option-assoc) |
| 1590 | "Guess a value for margin offset. | 1589 | "Guess a value for margin offset. |
| 1591 | Find the column of the first non-blank character on the line, not | 1590 | Find the column of the first non-blank character on the line, not |
| 1592 | counting labels. | 1591 | counting labels. |
| @@ -1598,7 +1597,7 @@ Returns a number as a string." | |||
| 1598 | 1597 | ||
| 1599 | 1598 | ||
| 1600 | ;;;------------------------------------------------------------------------- | 1599 | ;;;------------------------------------------------------------------------- |
| 1601 | (defun dcl-option-value-comment-line (option-assoc) | 1600 | (defun dcl-option-value-comment-line (_option-assoc) |
| 1602 | "Guess a value for `dcl-comment-line-regexp'. | 1601 | "Guess a value for `dcl-comment-line-regexp'. |
| 1603 | Must return a string." | 1602 | Must return a string." |
| 1604 | ;; Should we set comment-start and comment-start-skip as well? | 1603 | ;; Should we set comment-start and comment-start-skip as well? |
| @@ -1789,8 +1788,7 @@ Set or update the value of VAR in the current buffers | |||
| 1789 | (if (eolp) (error "Missing colon in local variables entry")) | 1788 | (if (eolp) (error "Missing colon in local variables entry")) |
| 1790 | (skip-chars-backward " \t") | 1789 | (skip-chars-backward " \t") |
| 1791 | (let* ((str (buffer-substring beg (point))) | 1790 | (let* ((str (buffer-substring beg (point))) |
| 1792 | (found-var (read str)) | 1791 | (found-var (read str))) |
| 1793 | val) | ||
| 1794 | ;; Setting variable named "end" means end of list. | 1792 | ;; Setting variable named "end" means end of list. |
| 1795 | (if (string-equal (downcase str) "end") | 1793 | (if (string-equal (downcase str) "end") |
| 1796 | (progn | 1794 | (progn |
| @@ -1895,6 +1893,10 @@ section at the end of the current buffer." | |||
| 1895 | 1893 | ||
| 1896 | 1894 | ||
| 1897 | ;;;------------------------------------------------------------------------- | 1895 | ;;;------------------------------------------------------------------------- |
| 1896 | (with-no-warnings | ||
| 1897 | ;; Dynamically bound in `dcl-save-mode'. | ||
| 1898 | (defvar mode)) | ||
| 1899 | |||
| 1898 | (defun dcl-save-mode () | 1900 | (defun dcl-save-mode () |
| 1899 | "Save the current mode for this buffer. | 1901 | "Save the current mode for this buffer. |
| 1900 | Save the current mode in a `Local Variables:' | 1902 | Save the current mode in a `Local Variables:' |
| @@ -1902,7 +1904,7 @@ section at the end of the current buffer." | |||
| 1902 | (interactive) | 1904 | (interactive) |
| 1903 | (let ((mode (prin1-to-string major-mode))) | 1905 | (let ((mode (prin1-to-string major-mode))) |
| 1904 | (if (string-match "-mode$" mode) | 1906 | (if (string-match "-mode$" mode) |
| 1905 | (let ((mode (intern (substring mode 0 (match-beginning 0))))) | 1907 | (let ((mode (intern (substring mode 0 (match-beginning 0))))) |
| 1906 | (dcl-save-option 'mode)) | 1908 | (dcl-save-option 'mode)) |
| 1907 | (message "Strange mode: %s" mode)))) | 1909 | (message "Strange mode: %s" mode)))) |
| 1908 | 1910 | ||
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 0f823c806e0..c809079381f 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el | |||
| @@ -328,7 +328,7 @@ routine.") | |||
| 328 | (after-change-functions nil) | 328 | (after-change-functions nil) |
| 329 | (modified (buffer-modified-p))) | 329 | (modified (buffer-modified-p))) |
| 330 | ;; Disable any queries about editing obsolete files. | 330 | ;; Disable any queries about editing obsolete files. |
| 331 | (fset 'ask-user-about-supersession-threat (lambda (fn))) | 331 | (fset 'ask-user-about-supersession-threat (lambda (_fn))) |
| 332 | (unwind-protect | 332 | (unwind-protect |
| 333 | (progn ,@forms) | 333 | (progn ,@forms) |
| 334 | (set-buffer-modified-p modified) | 334 | (set-buffer-modified-p modified) |
| @@ -444,6 +444,12 @@ routine.") | |||
| 444 | (goto-char curr-point) | 444 | (goto-char curr-point) |
| 445 | next)) | 445 | next)) |
| 446 | 446 | ||
| 447 | (defvar delphi-ignore-changes t | ||
| 448 | "Internal flag to control if the Delphi mode responds to buffer changes. | ||
| 449 | Defaults to t in case the `delphi-after-change' function is called on a | ||
| 450 | non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: | ||
| 451 | (let ((delphi-ignore-changes t)) ...)") | ||
| 452 | |||
| 447 | (defun delphi-set-text-properties (from to properties) | 453 | (defun delphi-set-text-properties (from to properties) |
| 448 | ;; Like `set-text-properties', except we do not consider this to be a buffer | 454 | ;; Like `set-text-properties', except we do not consider this to be a buffer |
| 449 | ;; modification. | 455 | ;; modification. |
| @@ -590,7 +596,6 @@ routine.") | |||
| 590 | ;; character set. | 596 | ;; character set. |
| 591 | (let ((currp (point)) | 597 | (let ((currp (point)) |
| 592 | (end nil) | 598 | (end nil) |
| 593 | (start nil) | ||
| 594 | (token nil)) | 599 | (token nil)) |
| 595 | (goto-char p) | 600 | (goto-char p) |
| 596 | (when (> (skip-chars-forward charset) 0) | 601 | (when (> (skip-chars-forward charset) 0) |
| @@ -720,13 +725,7 @@ routine.") | |||
| 720 | (delphi-step-progress p "Fontifying" delphi-fontifying-progress-step)) | 725 | (delphi-step-progress p "Fontifying" delphi-fontifying-progress-step)) |
| 721 | (delphi-progress-done))))) | 726 | (delphi-progress-done))))) |
| 722 | 727 | ||
| 723 | (defvar delphi-ignore-changes t | 728 | (defun delphi-after-change (change-start change-end _old-length) |
| 724 | "Internal flag to control if the Delphi mode responds to buffer changes. | ||
| 725 | Defaults to t in case the `delphi-after-change' function is called on a | ||
| 726 | non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: | ||
| 727 | (let ((delphi-ignore-changes t)) ...)") | ||
| 728 | |||
| 729 | (defun delphi-after-change (change-start change-end old-length) | ||
| 730 | ;; Called when the buffer has changed. Reparses the changed region. | 729 | ;; Called when the buffer has changed. Reparses the changed region. |
| 731 | (unless delphi-ignore-changes | 730 | (unless delphi-ignore-changes |
| 732 | (let ((delphi-ignore-changes t)) ; Prevent recursive calls. | 731 | (let ((delphi-ignore-changes t)) ; Prevent recursive calls. |
| @@ -922,8 +921,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: | |||
| 922 | ;; Returns the token of the if or case statement. | 921 | ;; Returns the token of the if or case statement. |
| 923 | (let ((token (delphi-previous-token from-else)) | 922 | (let ((token (delphi-previous-token from-else)) |
| 924 | (token-kind nil) | 923 | (token-kind nil) |
| 925 | (semicolon-count 0) | 924 | (semicolon-count 0)) |
| 926 | (if-count 0)) | ||
| 927 | (catch 'done | 925 | (catch 'done |
| 928 | (while token | 926 | (while token |
| 929 | (setq token-kind (delphi-token-kind token)) | 927 | (setq token-kind (delphi-token-kind token)) |
| @@ -971,8 +969,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: | |||
| 971 | comment | 969 | comment |
| 972 | ;; Scan until we run out of // comments. | 970 | ;; Scan until we run out of // comments. |
| 973 | (let ((prev-comment comment) | 971 | (let ((prev-comment comment) |
| 974 | (start-comment comment) | 972 | (start-comment comment)) |
| 975 | (kind nil)) | ||
| 976 | (while (let ((kind (delphi-token-kind prev-comment))) | 973 | (while (let ((kind (delphi-token-kind prev-comment))) |
| 977 | (cond ((eq kind 'space)) | 974 | (cond ((eq kind 'space)) |
| 978 | ((eq kind 'comment-single-line) | 975 | ((eq kind 'comment-single-line) |
| @@ -989,8 +986,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: | |||
| 989 | comment | 986 | comment |
| 990 | ;; Scan until we run out of // comments. | 987 | ;; Scan until we run out of // comments. |
| 991 | (let ((next-comment comment) | 988 | (let ((next-comment comment) |
| 992 | (end-comment comment) | 989 | (end-comment comment)) |
| 993 | (kind nil)) | ||
| 994 | (while (let ((kind (delphi-token-kind next-comment))) | 990 | (while (let ((kind (delphi-token-kind next-comment))) |
| 995 | (cond ((eq kind 'space)) | 991 | (cond ((eq kind 'space)) |
| 996 | ((eq kind 'comment-single-line) | 992 | ((eq kind 'comment-single-line) |
| @@ -1527,7 +1523,6 @@ If before the indent, the point is moved to the indent." | |||
| 1527 | (interactive) | 1523 | (interactive) |
| 1528 | (delphi-save-match-data | 1524 | (delphi-save-match-data |
| 1529 | (let ((marked-point (point-marker)) ; Maintain our position reliably. | 1525 | (let ((marked-point (point-marker)) ; Maintain our position reliably. |
| 1530 | (new-point nil) | ||
| 1531 | (line-start nil) | 1526 | (line-start nil) |
| 1532 | (old-indent 0) | 1527 | (old-indent 0) |
| 1533 | (new-indent 0)) | 1528 | (new-indent 0)) |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 87e5875c943..d31a46cc308 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -736,7 +736,7 @@ MARKED-ONLY non-nil means include marked classes only." | |||
| 736 | "Return a list containing all files mentioned in a tree. | 736 | "Return a list containing all files mentioned in a tree. |
| 737 | MARKED-ONLY non-nil means include marked classes only." | 737 | MARKED-ONLY non-nil means include marked classes only." |
| 738 | (let (list) | 738 | (let (list) |
| 739 | (maphash #'(lambda (file dummy) (setq list (cons file list))) | 739 | (maphash (lambda (file _dummy) (setq list (cons file list))) |
| 740 | (ebrowse-files-table marked-only)) | 740 | (ebrowse-files-table marked-only)) |
| 741 | list)) | 741 | list)) |
| 742 | 742 | ||
| @@ -784,9 +784,9 @@ The class tree is found in the buffer-local variable `ebrowse--tree-obarray'." | |||
| 784 | (defun ebrowse-sort-tree-list (list) | 784 | (defun ebrowse-sort-tree-list (list) |
| 785 | "Sort a LIST of `ebrowse-ts' structures by qualified class names." | 785 | "Sort a LIST of `ebrowse-ts' structures by qualified class names." |
| 786 | (sort list | 786 | (sort list |
| 787 | #'(lambda (a b) | 787 | (lambda (a b) |
| 788 | (string< (ebrowse-qualified-class-name (ebrowse-ts-class a)) | 788 | (string< (ebrowse-qualified-class-name (ebrowse-ts-class a)) |
| 789 | (ebrowse-qualified-class-name (ebrowse-ts-class b)))))) | 789 | (ebrowse-qualified-class-name (ebrowse-ts-class b)))))) |
| 790 | 790 | ||
| 791 | 791 | ||
| 792 | (defun ebrowse-class-in-tree (class tree) | 792 | (defun ebrowse-class-in-tree (class tree) |
| @@ -923,7 +923,7 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree." | |||
| 923 | (list header tree))) | 923 | (list header tree))) |
| 924 | 924 | ||
| 925 | 925 | ||
| 926 | (defun ebrowse-revert-tree-buffer-from-file (ignore-auto-save noconfirm) | 926 | (defun ebrowse-revert-tree-buffer-from-file (_ignore-auto-save noconfirm) |
| 927 | "Function installed as `revert-buffer-function' in tree buffers. | 927 | "Function installed as `revert-buffer-function' in tree buffers. |
| 928 | See that variable's documentation for the meaning of IGNORE-AUTO-SAVE and | 928 | See that variable's documentation for the meaning of IGNORE-AUTO-SAVE and |
| 929 | NOCONFIRM." | 929 | NOCONFIRM." |
| @@ -937,11 +937,11 @@ NOCONFIRM." | |||
| 937 | (current-buffer))) | 937 | (current-buffer))) |
| 938 | 938 | ||
| 939 | 939 | ||
| 940 | (defun ebrowse-create-tree-buffer (tree tags-file header obarray pop) | 940 | (defun ebrowse-create-tree-buffer (tree tags-file header classes pop) |
| 941 | "Create a new tree buffer for tree TREE. | 941 | "Create a new tree buffer for tree TREE. |
| 942 | The tree was loaded from file TAGS-FILE. | 942 | The tree was loaded from file TAGS-FILE. |
| 943 | HEADER is the header structure of the file. | 943 | HEADER is the header structure of the file. |
| 944 | OBARRAY is an obarray with a symbol for each class in the tree. | 944 | CLASSES is an obarray with a symbol for each class in the tree. |
| 945 | POP non-nil means popup the buffer up at the end. | 945 | POP non-nil means popup the buffer up at the end. |
| 946 | Return the buffer created." | 946 | Return the buffer created." |
| 947 | (let ((name ebrowse-tree-buffer-name)) | 947 | (let ((name ebrowse-tree-buffer-name)) |
| @@ -949,7 +949,7 @@ Return the buffer created." | |||
| 949 | (ebrowse-tree-mode) | 949 | (ebrowse-tree-mode) |
| 950 | (setq ebrowse--tree tree | 950 | (setq ebrowse--tree tree |
| 951 | ebrowse--tags-file-name tags-file | 951 | ebrowse--tags-file-name tags-file |
| 952 | ebrowse--tree-obarray obarray | 952 | ebrowse--tree-obarray classes |
| 953 | ebrowse--header header | 953 | ebrowse--header header |
| 954 | ebrowse--frozen-flag nil) | 954 | ebrowse--frozen-flag nil) |
| 955 | (ebrowse-redraw-tree) | 955 | (ebrowse-redraw-tree) |
| @@ -1215,17 +1215,16 @@ Do not ask for confirmation if FORCED is non-nil." | |||
| 1215 | "Toggle mark for class cursor is on. | 1215 | "Toggle mark for class cursor is on. |
| 1216 | If given a numeric N-TIMES argument, mark that many classes." | 1216 | If given a numeric N-TIMES argument, mark that many classes." |
| 1217 | (interactive "p") | 1217 | (interactive "p") |
| 1218 | (let (to-change pnt) | 1218 | (let (to-change) |
| 1219 | ;; Get the classes whose mark must be toggled. Note that | 1219 | ;; Get the classes whose mark must be toggled. Note that |
| 1220 | ;; ebrowse-tree-at-point might issue an error. | 1220 | ;; ebrowse-tree-at-point might issue an error. |
| 1221 | (condition-case error | 1221 | (ignore-errors |
| 1222 | (loop repeat (or n-times 1) | 1222 | (loop repeat (or n-times 1) |
| 1223 | as tree = (ebrowse-tree-at-point) | 1223 | as tree = (ebrowse-tree-at-point) |
| 1224 | do (progn | 1224 | do (progn |
| 1225 | (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree))) | 1225 | (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree))) |
| 1226 | (forward-line 1) | 1226 | (forward-line 1) |
| 1227 | (push tree to-change))) | 1227 | (push tree to-change)))) |
| 1228 | (error nil)) | ||
| 1229 | (save-excursion | 1228 | (save-excursion |
| 1230 | ;; For all these classes, reverse the mark char in the display | 1229 | ;; For all these classes, reverse the mark char in the display |
| 1231 | ;; by a regexp replace over the whole buffer. The reason for this | 1230 | ;; by a regexp replace over the whole buffer. The reason for this |
| @@ -1376,9 +1375,9 @@ one buffer. Prefer tree buffers over member buffers." | |||
| 1376 | (defun ebrowse-same-tree-member-buffer-list () | 1375 | (defun ebrowse-same-tree-member-buffer-list () |
| 1377 | "Return a list of members buffers with same tree as current buffer." | 1376 | "Return a list of members buffers with same tree as current buffer." |
| 1378 | (ebrowse-delete-if-not | 1377 | (ebrowse-delete-if-not |
| 1379 | #'(lambda (buffer) | 1378 | (lambda (buffer) |
| 1380 | (eq (ebrowse-value-in-buffer 'ebrowse--tree buffer) | 1379 | (eq (ebrowse-value-in-buffer 'ebrowse--tree buffer) |
| 1381 | ebrowse--tree)) | 1380 | ebrowse--tree)) |
| 1382 | (ebrowse-member-buffer-list))) | 1381 | (ebrowse-member-buffer-list))) |
| 1383 | 1382 | ||
| 1384 | 1383 | ||
| @@ -1417,9 +1416,9 @@ If no member buffer exists, make one." | |||
| 1417 | when (eq class tree) do (kill-buffer buffer))) | 1416 | when (eq class tree) do (kill-buffer buffer))) |
| 1418 | 1417 | ||
| 1419 | 1418 | ||
| 1420 | (defun ebrowse-frozen-tree-buffer-name (tags-file-name) | 1419 | (defun ebrowse-frozen-tree-buffer-name (tags-file) |
| 1421 | "Return the buffer name of a tree which is associated TAGS-FILE-NAME." | 1420 | "Return the buffer name of a tree which is associated TAGS-FILE." |
| 1422 | (concat ebrowse-tree-buffer-name " (" tags-file-name ")")) | 1421 | (concat ebrowse-tree-buffer-name " (" tags-file ")")) |
| 1423 | 1422 | ||
| 1424 | 1423 | ||
| 1425 | (defun ebrowse-pop-to-browser-buffer (arg) | 1424 | (defun ebrowse-pop-to-browser-buffer (arg) |
| @@ -1545,41 +1544,41 @@ VIEW non-nil means view it. WHERE is additional position info." | |||
| 1545 | where))) | 1544 | where))) |
| 1546 | 1545 | ||
| 1547 | 1546 | ||
| 1548 | (defun ebrowse-find-class-declaration (prefix-arg) | 1547 | (defun ebrowse-find-class-declaration (prefix) |
| 1549 | "Find a class declaration and position cursor on it. | 1548 | "Find a class declaration and position cursor on it. |
| 1550 | PREFIX-ARG 4 means find it in another window. | 1549 | PREFIX 4 means find it in another window. |
| 1551 | PREFIX-ARG 5 means find it in another frame." | 1550 | PREFIX 5 means find it in another frame." |
| 1552 | (interactive "p") | 1551 | (interactive "p") |
| 1553 | (ebrowse-view/find-class-declaration | 1552 | (ebrowse-view/find-class-declaration |
| 1554 | :view nil | 1553 | :view nil |
| 1555 | :where (cond ((= prefix-arg 4) 'other-window) | 1554 | :where (cond ((= prefix 4) 'other-window) |
| 1556 | ((= prefix-arg 5) 'other-frame) | 1555 | ((= prefix 5) 'other-frame) |
| 1557 | (t 'this-window)))) | 1556 | (t 'this-window)))) |
| 1558 | 1557 | ||
| 1559 | 1558 | ||
| 1560 | (defun ebrowse-view-class-declaration (prefix-arg) | 1559 | (defun ebrowse-view-class-declaration (prefix) |
| 1561 | "View class declaration and position cursor on it. | 1560 | "View class declaration and position cursor on it. |
| 1562 | PREFIX-ARG 4 means view it in another window. | 1561 | PREFIX 4 means view it in another window. |
| 1563 | PREFIX-ARG 5 means view it in another frame." | 1562 | PREFIX 5 means view it in another frame." |
| 1564 | (interactive "p") | 1563 | (interactive "p") |
| 1565 | (ebrowse-view/find-class-declaration | 1564 | (ebrowse-view/find-class-declaration |
| 1566 | :view 'view | 1565 | :view 'view |
| 1567 | :where (cond ((= prefix-arg 4) 'other-window) | 1566 | :where (cond ((= prefix 4) 'other-window) |
| 1568 | ((= prefix-arg 5) 'other-frame) | 1567 | ((= prefix 5) 'other-frame) |
| 1569 | (t 'this-window)))) | 1568 | (t 'this-window)))) |
| 1570 | 1569 | ||
| 1571 | 1570 | ||
| 1572 | 1571 | ||
| 1573 | ;;; The FIND engine | 1572 | ;;; The FIND engine |
| 1574 | 1573 | ||
| 1575 | (defun ebrowse-find-source-file (file tags-file-name) | 1574 | (defun ebrowse-find-source-file (file tags-file) |
| 1576 | "Find source file FILE. | 1575 | "Find source file FILE. |
| 1577 | Source files are searched for (a) relative to TAGS-FILE-NAME | 1576 | Source files are searched for (a) relative to TAGS-FILE |
| 1578 | which is the path of the BROWSE file from which the class tree was loaded, | 1577 | which is the path of the BROWSE file from which the class tree was loaded, |
| 1579 | and (b) in the directories named in `ebrowse-search-path'." | 1578 | and (b) in the directories named in `ebrowse-search-path'." |
| 1580 | (let (file-name | 1579 | (let (file-name |
| 1581 | (try-file (expand-file-name file | 1580 | (try-file (expand-file-name file |
| 1582 | (file-name-directory tags-file-name)))) | 1581 | (file-name-directory tags-file)))) |
| 1583 | (if (file-readable-p try-file) | 1582 | (if (file-readable-p try-file) |
| 1584 | (setq file-name try-file) | 1583 | (setq file-name try-file) |
| 1585 | (let ((search-in ebrowse-search-path)) | 1584 | (let ((search-in ebrowse-search-path)) |
| @@ -1629,7 +1628,7 @@ The new frame is deleted when you quit viewing the file in that frame." | |||
| 1629 | 'ebrowse-view-exit-fn))) | 1628 | 'ebrowse-view-exit-fn))) |
| 1630 | 1629 | ||
| 1631 | (defun ebrowse-view/find-file-and-search-pattern | 1630 | (defun ebrowse-view/find-file-and-search-pattern |
| 1632 | (struc info file tags-file-name &optional view where) | 1631 | (struc info file tags-file &optional view where) |
| 1633 | "Find or view a member or class. | 1632 | "Find or view a member or class. |
| 1634 | STRUC is an `ebrowse-bs' structure (or a structure including that) | 1633 | STRUC is an `ebrowse-bs' structure (or a structure including that) |
| 1635 | describing what to search. | 1634 | describing what to search. |
| @@ -1641,7 +1640,7 @@ if MEMBER-OR-CLASS is an `ebrowse-ms'. | |||
| 1641 | FILE is the file to search the member in. | 1640 | FILE is the file to search the member in. |
| 1642 | FILE is not taken out of STRUC here because the filename in STRUC | 1641 | FILE is not taken out of STRUC here because the filename in STRUC |
| 1643 | may be nil in which case the filename of the class description is used. | 1642 | may be nil in which case the filename of the class description is used. |
| 1644 | TAGS-FILE-NAME is the name of the BROWSE file from which the | 1643 | TAGS-FILE is the name of the BROWSE file from which the |
| 1645 | tree was loaded. | 1644 | tree was loaded. |
| 1646 | If VIEW is non-nil, view file else find the file. | 1645 | If VIEW is non-nil, view file else find the file. |
| 1647 | WHERE is either `other-window', `other-frame' or `this-window' and | 1646 | WHERE is either `other-window', `other-frame' or `this-window' and |
| @@ -1650,7 +1649,7 @@ specifies where to find/view the result." | |||
| 1650 | (error "Sorry, no file information available for %s" | 1649 | (error "Sorry, no file information available for %s" |
| 1651 | (ebrowse-bs-name struc))) | 1650 | (ebrowse-bs-name struc))) |
| 1652 | ;; Get the source file to view or find. | 1651 | ;; Get the source file to view or find. |
| 1653 | (setf file (ebrowse-find-source-file file tags-file-name)) | 1652 | (setf file (ebrowse-find-source-file file tags-file)) |
| 1654 | ;; If current window is dedicated, use another frame. | 1653 | ;; If current window is dedicated, use another frame. |
| 1655 | (when (window-dedicated-p (selected-window)) | 1654 | (when (window-dedicated-p (selected-window)) |
| 1656 | (setf where 'other-window)) | 1655 | (setf where 'other-window)) |
| @@ -2538,7 +2537,7 @@ find file in another frame." | |||
| 2538 | 2537 | ||
| 2539 | 2538 | ||
| 2540 | (defun* ebrowse-view/find-member-declaration/definition | 2539 | (defun* ebrowse-view/find-member-declaration/definition |
| 2541 | (prefix view &optional definition info header tags-file-name) | 2540 | (prefix view &optional definition info header tags-file) |
| 2542 | "Find or view a member declaration or definition. | 2541 | "Find or view a member declaration or definition. |
| 2543 | With PREFIX 4. find file in another window, with prefix 5 | 2542 | With PREFIX 4. find file in another window, with prefix 5 |
| 2544 | find file in another frame. | 2543 | find file in another frame. |
| @@ -2546,11 +2545,11 @@ DEFINITION non-nil means find the definition, otherwise find the | |||
| 2546 | declaration. | 2545 | declaration. |
| 2547 | INFO is a list (TREE ACCESSOR MEMBER) describing the member to | 2546 | INFO is a list (TREE ACCESSOR MEMBER) describing the member to |
| 2548 | search. | 2547 | search. |
| 2549 | TAGS-FILE-NAME is the file name of the BROWSE file." | 2548 | TAGS-FILE is the file name of the BROWSE file." |
| 2550 | (unless header | 2549 | (unless header |
| 2551 | (setq header ebrowse--header)) | 2550 | (setq header ebrowse--header)) |
| 2552 | (unless tags-file-name | 2551 | (unless tags-file |
| 2553 | (setq tags-file-name ebrowse--tags-file-name)) | 2552 | (setq tags-file ebrowse--tags-file-name)) |
| 2554 | (let (tree member accessor file on-class | 2553 | (let (tree member accessor file on-class |
| 2555 | (where (if (= prefix 4) 'other-window | 2554 | (where (if (= prefix 4) 'other-window |
| 2556 | (if (= prefix 5) 'other-frame 'this-window)))) | 2555 | (if (= prefix 5) 'other-frame 'this-window)))) |
| @@ -2570,7 +2569,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file." | |||
| 2570 | (ebrowse-ts-class tree) | 2569 | (ebrowse-ts-class tree) |
| 2571 | (list ebrowse--header (ebrowse-ts-class tree) nil) | 2570 | (list ebrowse--header (ebrowse-ts-class tree) nil) |
| 2572 | (ebrowse-cs-file (ebrowse-ts-class tree)) | 2571 | (ebrowse-cs-file (ebrowse-ts-class tree)) |
| 2573 | tags-file-name view where))) | 2572 | tags-file view where))) |
| 2574 | ;; For some member lists, it doesn't make sense to search for | 2573 | ;; For some member lists, it doesn't make sense to search for |
| 2575 | ;; a definition. If this is requested, silently search for the | 2574 | ;; a definition. If this is requested, silently search for the |
| 2576 | ;; declaration. | 2575 | ;; declaration. |
| @@ -2607,7 +2606,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file." | |||
| 2607 | (message nil) | 2606 | (message nil) |
| 2608 | ;; Recurse with new info. | 2607 | ;; Recurse with new info. |
| 2609 | (ebrowse-view/find-member-declaration/definition | 2608 | (ebrowse-view/find-member-declaration/definition |
| 2610 | prefix view (not definition) info header tags-file-name)) | 2609 | prefix view (not definition) info header tags-file)) |
| 2611 | (error "Search canceled")) | 2610 | (error "Search canceled")) |
| 2612 | ;; Find that thing. | 2611 | ;; Find that thing. |
| 2613 | (ebrowse-view/find-file-and-search-pattern | 2612 | (ebrowse-view/find-file-and-search-pattern |
| @@ -2618,7 +2617,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file." | |||
| 2618 | :point (ebrowse-ms-point member)) | 2617 | :point (ebrowse-ms-point member)) |
| 2619 | (list header member accessor) | 2618 | (list header member accessor) |
| 2620 | file | 2619 | file |
| 2621 | tags-file-name | 2620 | tags-file |
| 2622 | view | 2621 | view |
| 2623 | where)))) | 2622 | where)))) |
| 2624 | 2623 | ||
| @@ -2677,7 +2676,7 @@ LIST is the member list to display. STAND-ALONE non-nil | |||
| 2677 | means the member buffer is standalone. CLASS is its class." | 2676 | means the member buffer is standalone. CLASS is its class." |
| 2678 | (let* ((classes ebrowse--tree-obarray) | 2677 | (let* ((classes ebrowse--tree-obarray) |
| 2679 | (tree ebrowse--tree) | 2678 | (tree ebrowse--tree) |
| 2680 | (tags-file-name ebrowse--tags-file-name) | 2679 | (tags-file ebrowse--tags-file-name) |
| 2681 | (header ebrowse--header) | 2680 | (header ebrowse--header) |
| 2682 | temp-buffer-setup-hook | 2681 | temp-buffer-setup-hook |
| 2683 | (temp-buffer (get-buffer ebrowse-member-buffer-name))) | 2682 | (temp-buffer (get-buffer ebrowse-member-buffer-name))) |
| @@ -2697,7 +2696,7 @@ means the member buffer is standalone. CLASS is its class." | |||
| 2697 | ebrowse--accessor list | 2696 | ebrowse--accessor list |
| 2698 | ebrowse--tree-obarray classes | 2697 | ebrowse--tree-obarray classes |
| 2699 | ebrowse--frozen-flag stand-alone | 2698 | ebrowse--frozen-flag stand-alone |
| 2700 | ebrowse--tags-file-name tags-file-name | 2699 | ebrowse--tags-file-name tags-file |
| 2701 | ebrowse--header header | 2700 | ebrowse--header header |
| 2702 | ebrowse--tree tree | 2701 | ebrowse--tree tree |
| 2703 | buffer-read-only t) | 2702 | buffer-read-only t) |
| @@ -2849,7 +2848,7 @@ is nil." | |||
| 2849 | 2848 | ||
| 2850 | ;;; Switching member buffer to display a selected member | 2849 | ;;; Switching member buffer to display a selected member |
| 2851 | 2850 | ||
| 2852 | (defun ebrowse-goto-visible-member/all-member-lists (prefix) | 2851 | (defun ebrowse-goto-visible-member/all-member-lists (_prefix) |
| 2853 | "Position cursor on a member read from the minibuffer. | 2852 | "Position cursor on a member read from the minibuffer. |
| 2854 | With PREFIX, search all members in the tree. Otherwise consider | 2853 | With PREFIX, search all members in the tree. Otherwise consider |
| 2855 | only members visible in the buffer." | 2854 | only members visible in the buffer." |
| @@ -3279,7 +3278,7 @@ HEADER is the `ebrowse-hs' structure of the class tree. | |||
| 3279 | Prompt with PROMPT. Insert into the minibuffer a C++ identifier read | 3278 | Prompt with PROMPT. Insert into the minibuffer a C++ identifier read |
| 3280 | from point as default. Value is a list (CLASS-NAME MEMBER-NAME)." | 3279 | from point as default. Value is a list (CLASS-NAME MEMBER-NAME)." |
| 3281 | (save-excursion | 3280 | (save-excursion |
| 3282 | (let* (start member-info (members (ebrowse-member-table header))) | 3281 | (let ((members (ebrowse-member-table header))) |
| 3283 | (multiple-value-bind (class-name member-name) | 3282 | (multiple-value-bind (class-name member-name) |
| 3284 | (values-list (ebrowse-tags-read-member+class-name)) | 3283 | (values-list (ebrowse-tags-read-member+class-name)) |
| 3285 | (unless member-name | 3284 | (unless member-name |
| @@ -3290,7 +3289,7 @@ from point as default. Value is a list (CLASS-NAME MEMBER-NAME)." | |||
| 3290 | (completion-result (try-completion name members))) | 3289 | (completion-result (try-completion name members))) |
| 3291 | ;; Cannot rely on `try-completion' returning t for exact | 3290 | ;; Cannot rely on `try-completion' returning t for exact |
| 3292 | ;; matches! It returns the name as a string. | 3291 | ;; matches! It returns the name as a string. |
| 3293 | (unless (setq member-info (gethash name members)) | 3292 | (unless (gethash name members) |
| 3294 | (if (y-or-n-p "No exact match found. Try substrings? ") | 3293 | (if (y-or-n-p "No exact match found. Try substrings? ") |
| 3295 | (setq name | 3294 | (setq name |
| 3296 | (or (first (ebrowse-list-of-matching-members | 3295 | (or (first (ebrowse-list-of-matching-members |
| @@ -3316,7 +3315,7 @@ MEMBER-NAME is the name of the member found." | |||
| 3316 | (list class name)))) | 3315 | (list class name)))) |
| 3317 | 3316 | ||
| 3318 | 3317 | ||
| 3319 | (defun ebrowse-tags-choose-class (tree header name initial-class-name) | 3318 | (defun ebrowse-tags-choose-class (_tree header name initial-class-name) |
| 3320 | "Read a class name for a member from the minibuffer. | 3319 | "Read a class name for a member from the minibuffer. |
| 3321 | TREE is the class tree we operate on. | 3320 | TREE is the class tree we operate on. |
| 3322 | HEADER is its header structure. | 3321 | HEADER is its header structure. |
| @@ -3354,7 +3353,7 @@ definition." | |||
| 3354 | info) | 3353 | info) |
| 3355 | (unless name | 3354 | (unless name |
| 3356 | (multiple-value-setq (class-name name) | 3355 | (multiple-value-setq (class-name name) |
| 3357 | (values-list | 3356 | (values-list |
| 3358 | (ebrowse-tags-read-name | 3357 | (ebrowse-tags-read-name |
| 3359 | header | 3358 | header |
| 3360 | (concat (if view "View" "Find") " member " | 3359 | (concat (if view "View" "Find") " member " |
| @@ -3481,7 +3480,7 @@ Otherwise read a member name from point." | |||
| 3481 | (let* ((marker (point-marker)) class-name (name fix-name) info) | 3480 | (let* ((marker (point-marker)) class-name (name fix-name) info) |
| 3482 | (unless name | 3481 | (unless name |
| 3483 | (multiple-value-setq (class-name name) | 3482 | (multiple-value-setq (class-name name) |
| 3484 | (values-list | 3483 | (values-list |
| 3485 | (ebrowse-tags-read-name header | 3484 | (ebrowse-tags-read-name header |
| 3486 | (concat "Find member list of: "))))) | 3485 | (concat "Find member list of: "))))) |
| 3487 | (setq info (ebrowse-tags-choose-class tree header name class-name)) | 3486 | (setq info (ebrowse-tags-choose-class tree header name class-name)) |
| @@ -3495,10 +3494,10 @@ Both NAME and REGEXP may be nil in which case exact or regexp matches | |||
| 3495 | are not performed." | 3494 | are not performed." |
| 3496 | (let (list) | 3495 | (let (list) |
| 3497 | (when (or name regexp) | 3496 | (when (or name regexp) |
| 3498 | (maphash #'(lambda (member-name info) | 3497 | (maphash (lambda (member-name _info) |
| 3499 | (when (or (and name (string= name member-name)) | 3498 | (when (or (and name (string= name member-name)) |
| 3500 | (and regexp (string-match regexp member-name))) | 3499 | (and regexp (string-match regexp member-name))) |
| 3501 | (setq list (cons member-name list)))) | 3500 | (setq list (cons member-name list)))) |
| 3502 | members)) | 3501 | members)) |
| 3503 | list)) | 3502 | list)) |
| 3504 | 3503 | ||
| @@ -3535,18 +3534,18 @@ The file name is read from the minibuffer." | |||
| 3535 | (with-output-to-temp-buffer (concat "*Members in file " file "*") | 3534 | (with-output-to-temp-buffer (concat "*Members in file " file "*") |
| 3536 | (set-buffer standard-output) | 3535 | (set-buffer standard-output) |
| 3537 | (maphash | 3536 | (maphash |
| 3538 | #'(lambda (member-name list) | 3537 | (lambda (_member-name list) |
| 3539 | (loop for info in list | 3538 | (loop for info in list |
| 3540 | as member = (third info) | 3539 | as member = (third info) |
| 3541 | as class = (ebrowse-ts-class (first info)) | 3540 | as class = (ebrowse-ts-class (first info)) |
| 3542 | when (or (and (null (ebrowse-ms-file member)) | 3541 | when (or (and (null (ebrowse-ms-file member)) |
| 3543 | (string= (ebrowse-cs-file class) file)) | 3542 | (string= (ebrowse-cs-file class) file)) |
| 3544 | (string= file (ebrowse-ms-file member))) | 3543 | (string= file (ebrowse-ms-file member))) |
| 3545 | do (ebrowse-draw-file-member-info info "decl.") | 3544 | do (ebrowse-draw-file-member-info info "decl.") |
| 3546 | when (or (and (null (ebrowse-ms-definition-file member)) | 3545 | when (or (and (null (ebrowse-ms-definition-file member)) |
| 3547 | (string= (ebrowse-cs-source-file class) file)) | 3546 | (string= (ebrowse-cs-source-file class) file)) |
| 3548 | (string= file (ebrowse-ms-definition-file member))) | 3547 | (string= file (ebrowse-ms-definition-file member))) |
| 3549 | do (ebrowse-draw-file-member-info info "defn."))) | 3548 | do (ebrowse-draw-file-member-info info "defn."))) |
| 3550 | members)))) | 3549 | members)))) |
| 3551 | 3550 | ||
| 3552 | 3551 | ||
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index d22d03fbe96..49a2971a92a 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -263,7 +263,7 @@ One argument, the tag info returned by `snarf-tag-function'.") | |||
| 263 | (defun initialize-new-tags-table () | 263 | (defun initialize-new-tags-table () |
| 264 | "Initialize the tags table in the current buffer. | 264 | "Initialize the tags table in the current buffer. |
| 265 | Return non-nil if it is a valid tags table, and | 265 | Return non-nil if it is a valid tags table, and |
| 266 | in that case, also make the tags table state variables | 266 | in that case, also make the tags table state variables |
| 267 | buffer-local and set them to nil." | 267 | buffer-local and set them to nil." |
| 268 | (set (make-local-variable 'tags-table-files) nil) | 268 | (set (make-local-variable 'tags-table-files) nil) |
| 269 | (set (make-local-variable 'tags-completion-table) nil) | 269 | (set (make-local-variable 'tags-completion-table) nil) |
| @@ -853,6 +853,7 @@ The functions using this are `find-tag-noselect', | |||
| 853 | ;; Dynamic bondage: | 853 | ;; Dynamic bondage: |
| 854 | (defvar etags-case-fold-search) | 854 | (defvar etags-case-fold-search) |
| 855 | (defvar etags-syntax-table) | 855 | (defvar etags-syntax-table) |
| 856 | (defvar local-find-tag-hook) | ||
| 856 | 857 | ||
| 857 | ;;;###autoload | 858 | ;;;###autoload |
| 858 | (defun find-tag-noselect (tagname &optional next-p regexp-p) | 859 | (defun find-tag-noselect (tagname &optional next-p regexp-p) |
| @@ -1656,7 +1657,7 @@ Point should be just after a string that matches TAG." | |||
| 1656 | 1657 | ||
| 1657 | ;; partial file name match, i.e. searched tag must match a substring | 1658 | ;; partial file name match, i.e. searched tag must match a substring |
| 1658 | ;; of the file name (potentially including a directory separator). | 1659 | ;; of the file name (potentially including a directory separator). |
| 1659 | (defun tag-partial-file-name-match-p (tag) | 1660 | (defun tag-partial-file-name-match-p (_tag) |
| 1660 | "Return non-nil if current tag matches file name. | 1661 | "Return non-nil if current tag matches file name. |
| 1661 | This is a substring match, and it can include directory separators. | 1662 | This is a substring match, and it can include directory separators. |
| 1662 | Point should be just after a string that matches TAG." | 1663 | Point should be just after a string that matches TAG." |
| @@ -1666,7 +1667,7 @@ Point should be just after a string that matches TAG." | |||
| 1666 | (looking-at "\f\n")))) | 1667 | (looking-at "\f\n")))) |
| 1667 | 1668 | ||
| 1668 | ;; t if point is in a tag line with a tag containing TAG as a substring. | 1669 | ;; t if point is in a tag line with a tag containing TAG as a substring. |
| 1669 | (defun tag-any-match-p (tag) | 1670 | (defun tag-any-match-p (_tag) |
| 1670 | "Return non-nil if current tag line contains TAG as a substring." | 1671 | "Return non-nil if current tag line contains TAG as a substring." |
| 1671 | (looking-at ".*\177")) | 1672 | (looking-at ".*\177")) |
| 1672 | 1673 | ||
| @@ -1906,7 +1907,7 @@ See also the documentation of the variable `tags-file-name'." | |||
| 1906 | (try-completion string (tags-table-files) predicate)))) | 1907 | (try-completion string (tags-table-files) predicate)))) |
| 1907 | 1908 | ||
| 1908 | ;;;###autoload | 1909 | ;;;###autoload |
| 1909 | (defun list-tags (file &optional next-match) | 1910 | (defun list-tags (file &optional _next-match) |
| 1910 | "Display list of tags in file FILE. | 1911 | "Display list of tags in file FILE. |
| 1911 | This searches only the first table in the list, and no included tables. | 1912 | This searches only the first table in the list, and no included tables. |
| 1912 | FILE should be as it appeared in the `etags' command, usually without a | 1913 | FILE should be as it appeared in the `etags' command, usually without a |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index 9313df9f587..d8133cb6b90 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -173,6 +173,8 @@ non-executable files." | |||
| 173 | (file-modes buffer-file-name))))))) | 173 | (file-modes buffer-file-name))))))) |
| 174 | 174 | ||
| 175 | 175 | ||
| 176 | (defvar compilation-error-regexp-alist) ; from compile.el | ||
| 177 | |||
| 176 | ;;;###autoload | 178 | ;;;###autoload |
| 177 | (defun executable-interpret (command) | 179 | (defun executable-interpret (command) |
| 178 | "Run script with user-specified args, and collect output in a buffer. | 180 | "Run script with user-specified args, and collect output in a buffer. |
| @@ -186,7 +188,7 @@ command to find the next error. The buffer is also in `comint-mode' and | |||
| 186 | (save-some-buffers (not compilation-ask-about-save)) | 188 | (save-some-buffers (not compilation-ask-about-save)) |
| 187 | (set (make-local-variable 'executable-command) command) | 189 | (set (make-local-variable 'executable-command) command) |
| 188 | (let ((compilation-error-regexp-alist executable-error-regexp-alist)) | 190 | (let ((compilation-error-regexp-alist executable-error-regexp-alist)) |
| 189 | (compilation-start command t (lambda (x) "*interpretation*")))) | 191 | (compilation-start command t (lambda (_x) "*interpretation*")))) |
| 190 | 192 | ||
| 191 | 193 | ||
| 192 | 194 | ||
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 16c099d0127..6200591fbbb 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -596,7 +596,7 @@ It's flymake process filter." | |||
| 596 | (with-current-buffer source-buffer | 596 | (with-current-buffer source-buffer |
| 597 | (flymake-parse-output-and-residual output))))) | 597 | (flymake-parse-output-and-residual output))))) |
| 598 | 598 | ||
| 599 | (defun flymake-process-sentinel (process event) | 599 | (defun flymake-process-sentinel (process _event) |
| 600 | "Sentinel for syntax check buffers." | 600 | "Sentinel for syntax check buffers." |
| 601 | (when (memq (process-status process) '(signal exit)) | 601 | (when (memq (process-status process) '(signal exit)) |
| 602 | (let* ((exit-status (process-exit-status process)) | 602 | (let* ((exit-status (process-exit-status process)) |
| @@ -1110,7 +1110,7 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1110 | (flymake-log 1 "deleted file %s" file-name))) | 1110 | (flymake-log 1 "deleted file %s" file-name))) |
| 1111 | 1111 | ||
| 1112 | (defun flymake-safe-delete-directory (dir-name) | 1112 | (defun flymake-safe-delete-directory (dir-name) |
| 1113 | (condition-case err | 1113 | (condition-case nil |
| 1114 | (progn | 1114 | (progn |
| 1115 | (delete-directory dir-name) | 1115 | (delete-directory dir-name) |
| 1116 | (flymake-log 1 "deleted dir %s" dir-name)) | 1116 | (flymake-log 1 "deleted dir %s" dir-name)) |
| @@ -1386,7 +1386,7 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1386 | :group 'flymake | 1386 | :group 'flymake |
| 1387 | :type 'boolean) | 1387 | :type 'boolean) |
| 1388 | 1388 | ||
| 1389 | (defun flymake-after-change-function (start stop len) | 1389 | (defun flymake-after-change-function (start stop _len) |
| 1390 | "Start syntax check for current buffer if it isn't already running." | 1390 | "Start syntax check for current buffer if it isn't already running." |
| 1391 | ;;+(flymake-log 0 "setting change time to %s" (flymake-float-time)) | 1391 | ;;+(flymake-log 0 "setting change time to %s" (flymake-float-time)) |
| 1392 | (let((new-text (buffer-substring start stop))) | 1392 | (let((new-text (buffer-substring start stop))) |
| @@ -1496,7 +1496,7 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1496 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) | 1496 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) |
| 1497 | temp-name)) | 1497 | temp-name)) |
| 1498 | 1498 | ||
| 1499 | (defun flymake-create-temp-with-folder-structure (file-name prefix) | 1499 | (defun flymake-create-temp-with-folder-structure (file-name _prefix) |
| 1500 | (unless (stringp file-name) | 1500 | (unless (stringp file-name) |
| 1501 | (error "Invalid file-name")) | 1501 | (error "Invalid file-name")) |
| 1502 | 1502 | ||
| @@ -1763,7 +1763,7 @@ Use CREATE-TEMP-F for creating temp copy." | |||
| 1763 | (when temp-master-file-name | 1763 | (when temp-master-file-name |
| 1764 | (flymake-get-tex-args temp-master-file-name)))) | 1764 | (flymake-get-tex-args temp-master-file-name)))) |
| 1765 | 1765 | ||
| 1766 | (defun flymake-get-include-dirs-dot (base-dir) | 1766 | (defun flymake-get-include-dirs-dot (_base-dir) |
| 1767 | '(".")) | 1767 | '(".")) |
| 1768 | 1768 | ||
| 1769 | ;;;; xml-specific init-cleanup routines | 1769 | ;;;; xml-specific init-cleanup routines |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 67a214977b1..7c305ec3f6e 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -291,7 +291,7 @@ buffer). This corresponds to the g77 compiler option | |||
| 291 | :type 'integer | 291 | :type 'integer |
| 292 | :safe 'integerp | 292 | :safe 'integerp |
| 293 | :initialize 'custom-initialize-default | 293 | :initialize 'custom-initialize-default |
| 294 | :set (lambda (symbol value) | 294 | :set (lambda (_symbol value) |
| 295 | ;; Do all fortran buffers, and the default. | 295 | ;; Do all fortran buffers, and the default. |
| 296 | (fortran-line-length value t)) | 296 | (fortran-line-length value t)) |
| 297 | :version "23.1" | 297 | :version "23.1" |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 6aece579d5d..c2ee1a93389 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -104,6 +104,13 @@ | |||
| 104 | (require 'bindat) | 104 | (require 'bindat) |
| 105 | (eval-when-compile (require 'cl)) | 105 | (eval-when-compile (require 'cl)) |
| 106 | 106 | ||
| 107 | (declare-function speedbar-change-initial-expansion-list "speedbar" (new-default)) | ||
| 108 | (declare-function speedbar-timer-fn "speedbar" ()) | ||
| 109 | (declare-function speedbar-line-text "speedbar" (&optional p)) | ||
| 110 | (declare-function speedbar-change-expand-button-char "speedbar" (char)) | ||
| 111 | (declare-function speedbar-delete-subblock "speedbar" (indent)) | ||
| 112 | (declare-function speedbar-center-buffer-smartly "speedbar" ()) | ||
| 113 | |||
| 107 | (defvar tool-bar-map) | 114 | (defvar tool-bar-map) |
| 108 | (defvar speedbar-initial-expansion-list-name) | 115 | (defvar speedbar-initial-expansion-list-name) |
| 109 | (defvar speedbar-frame) | 116 | (defvar speedbar-frame) |
| @@ -544,7 +551,7 @@ the list) is deleted every time a new one is added (at the front)." | |||
| 544 | 551 | ||
| 545 | (defun gdb-find-watch-expression () | 552 | (defun gdb-find-watch-expression () |
| 546 | (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) | 553 | (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) |
| 547 | (varnum (car var)) expr array) | 554 | (varnum (car var)) expr) |
| 548 | (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum) | 555 | (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum) |
| 549 | (let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet | 556 | (let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet |
| 550 | (component-list (split-string (match-string 2 varnum) "\\." t))) | 557 | (component-list (split-string (match-string 2 varnum) "\\." t))) |
| @@ -1151,7 +1158,7 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 1151 | (gdb-input | 1158 | (gdb-input |
| 1152 | (list (concat "-var-delete -c " varnum) 'ignore))) | 1159 | (list (concat "-var-delete -c " varnum) 'ignore))) |
| 1153 | 1160 | ||
| 1154 | (defun gdb-edit-value (text token indent) | 1161 | (defun gdb-edit-value (_text _token _indent) |
| 1155 | "Assign a value to a variable displayed in the speedbar." | 1162 | "Assign a value to a variable displayed in the speedbar." |
| 1156 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) | 1163 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) |
| 1157 | (varnum (car var)) (value)) | 1164 | (varnum (car var)) (value)) |
| @@ -1820,7 +1827,7 @@ is running." | |||
| 1820 | 1827 | ||
| 1821 | ;; Start accumulating output for the GUD buffer | 1828 | ;; Start accumulating output for the GUD buffer |
| 1822 | (setq gdb-filter-output "") | 1829 | (setq gdb-filter-output "") |
| 1823 | (let ((output-record) (output-record-list)) | 1830 | (let (output-record-list) |
| 1824 | 1831 | ||
| 1825 | ;; Process all the complete markers in this chunk. | 1832 | ;; Process all the complete markers in this chunk. |
| 1826 | (dolist (gdbmi-record gdbmi-record-list) | 1833 | (dolist (gdbmi-record gdbmi-record-list) |
| @@ -1860,17 +1867,17 @@ is running." | |||
| 1860 | 1867 | ||
| 1861 | gdb-filter-output)) | 1868 | gdb-filter-output)) |
| 1862 | 1869 | ||
| 1863 | (defun gdb-gdb (output-field)) | 1870 | (defun gdb-gdb (_output-field)) |
| 1864 | 1871 | ||
| 1865 | (defun gdb-shell (output-field) | 1872 | (defun gdb-shell (output-field) |
| 1866 | (let ((gdb-output-sink gdb-output-sink)) | 1873 | (let ((gdb-output-sink gdb-output-sink)) |
| 1867 | (setq gdb-filter-output | 1874 | (setq gdb-filter-output |
| 1868 | (concat output-field gdb-filter-output)))) | 1875 | (concat output-field gdb-filter-output)))) |
| 1869 | 1876 | ||
| 1870 | (defun gdb-ignored-notification (output-field)) | 1877 | (defun gdb-ignored-notification (_output-field)) |
| 1871 | 1878 | ||
| 1872 | ;; gdb-invalidate-threads is defined to accept 'update-threads signal | 1879 | ;; gdb-invalidate-threads is defined to accept 'update-threads signal |
| 1873 | (defun gdb-thread-created (output-field)) | 1880 | (defun gdb-thread-created (_output-field)) |
| 1874 | (defun gdb-thread-exited (output-field) | 1881 | (defun gdb-thread-exited (output-field) |
| 1875 | "Handle =thread-exited async record: unset `gdb-thread-number' | 1882 | "Handle =thread-exited async record: unset `gdb-thread-number' |
| 1876 | if current thread exited and update threads list." | 1883 | if current thread exited and update threads list." |
| @@ -1918,7 +1925,7 @@ Sets `gdb-thread-number' to new id." | |||
| 1918 | (setq gdb-active-process t) | 1925 | (setq gdb-active-process t) |
| 1919 | (gdb-emit-signal gdb-buf-publisher 'update-threads)) | 1926 | (gdb-emit-signal gdb-buf-publisher 'update-threads)) |
| 1920 | 1927 | ||
| 1921 | (defun gdb-starting (output-field) | 1928 | (defun gdb-starting (_output-field) |
| 1922 | ;; CLI commands don't emit ^running at the moment so use gdb-running too. | 1929 | ;; CLI commands don't emit ^running at the moment so use gdb-running too. |
| 1923 | (setq gdb-inferior-status "running") | 1930 | (setq gdb-inferior-status "running") |
| 1924 | (gdb-force-mode-line-update | 1931 | (gdb-force-mode-line-update |
| @@ -2219,8 +2226,7 @@ calling `gdb-table-string'." | |||
| 2219 | 2226 | ||
| 2220 | (defun gdb-table-string (table &optional sep) | 2227 | (defun gdb-table-string (table &optional sep) |
| 2221 | "Return TABLE as a string with columns separated with SEP." | 2228 | "Return TABLE as a string with columns separated with SEP." |
| 2222 | (let ((column-sizes (gdb-table-column-sizes table)) | 2229 | (let ((column-sizes (gdb-table-column-sizes table))) |
| 2223 | (res "")) | ||
| 2224 | (mapconcat | 2230 | (mapconcat |
| 2225 | 'identity | 2231 | 'identity |
| 2226 | (gdb-mapcar* | 2232 | (gdb-mapcar* |
| @@ -2375,38 +2381,37 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See | |||
| 2375 | 2381 | ||
| 2376 | ;; Put breakpoint icons in relevant margins (even those set in the GUD buffer). | 2382 | ;; Put breakpoint icons in relevant margins (even those set in the GUD buffer). |
| 2377 | (defun gdb-place-breakpoints () | 2383 | (defun gdb-place-breakpoints () |
| 2378 | (let ((flag) (bptno)) | 2384 | ;; Remove all breakpoint-icons in source buffers but not assembler buffer. |
| 2379 | ;; Remove all breakpoint-icons in source buffers but not assembler buffer. | 2385 | (dolist (buffer (buffer-list)) |
| 2380 | (dolist (buffer (buffer-list)) | 2386 | (with-current-buffer buffer |
| 2381 | (with-current-buffer buffer | 2387 | (if (and (eq gud-minor-mode 'gdbmi) |
| 2382 | (if (and (eq gud-minor-mode 'gdbmi) | 2388 | (not (string-match "\\` ?\\*.+\\*\\'" (buffer-name)))) |
| 2383 | (not (string-match "\\` ?\\*.+\\*\\'" (buffer-name)))) | 2389 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) |
| 2384 | (gdb-remove-breakpoint-icons (point-min) (point-max))))) | 2390 | (dolist (breakpoint gdb-breakpoints-list) |
| 2385 | (dolist (breakpoint gdb-breakpoints-list) | 2391 | (let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is |
| 2386 | (let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is | 2392 | ; an associative list |
| 2387 | ; an associative list | 2393 | (line (bindat-get-field breakpoint 'line))) |
| 2388 | (line (bindat-get-field breakpoint 'line))) | 2394 | (when line |
| 2389 | (when line | 2395 | (let ((file (bindat-get-field breakpoint 'fullname)) |
| 2390 | (let ((file (bindat-get-field breakpoint 'fullname)) | 2396 | (flag (bindat-get-field breakpoint 'enabled)) |
| 2391 | (flag (bindat-get-field breakpoint 'enabled)) | 2397 | (bptno (bindat-get-field breakpoint 'number))) |
| 2392 | (bptno (bindat-get-field breakpoint 'number))) | 2398 | (unless (file-exists-p file) |
| 2393 | (unless (file-exists-p file) | 2399 | (setq file (cdr (assoc bptno gdb-location-alist)))) |
| 2394 | (setq file (cdr (assoc bptno gdb-location-alist)))) | 2400 | (if (and file |
| 2395 | (if (and file | 2401 | (not (string-equal file "File not found"))) |
| 2396 | (not (string-equal file "File not found"))) | 2402 | (with-current-buffer |
| 2397 | (with-current-buffer | 2403 | (find-file-noselect file 'nowarn) |
| 2398 | (find-file-noselect file 'nowarn) | 2404 | (gdb-init-buffer) |
| 2399 | (gdb-init-buffer) | 2405 | ;; Only want one breakpoint icon at each location. |
| 2400 | ;; Only want one breakpoint icon at each location. | 2406 | (gdb-put-breakpoint-icon (string-equal flag "y") bptno |
| 2401 | (gdb-put-breakpoint-icon (string-equal flag "y") bptno | 2407 | (string-to-number line))) |
| 2402 | (string-to-number line))) | 2408 | (gdb-input |
| 2403 | (gdb-input | 2409 | (list (concat "list " file ":1") |
| 2404 | (list (concat "list " file ":1") | 2410 | 'ignore)) |
| 2405 | 'ignore)) | 2411 | (gdb-input |
| 2406 | (gdb-input | 2412 | (list "-file-list-exec-source-file" |
| 2407 | (list "-file-list-exec-source-file" | 2413 | `(lambda () (gdb-get-location |
| 2408 | `(lambda () (gdb-get-location | 2414 | ,bptno ,line ,flag)))))))))) |
| 2409 | ,bptno ,line ,flag))))))))))) | ||
| 2410 | 2415 | ||
| 2411 | (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") | 2416 | (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") |
| 2412 | 2417 | ||
| @@ -3276,7 +3281,6 @@ DOC is an optional documentation string." | |||
| 3276 | (defun gdb-disassembly-handler-custom () | 3281 | (defun gdb-disassembly-handler-custom () |
| 3277 | (let* ((instructions (bindat-get-field (gdb-json-partial-output) 'asm_insns)) | 3282 | (let* ((instructions (bindat-get-field (gdb-json-partial-output) 'asm_insns)) |
| 3278 | (address (bindat-get-field (gdb-current-buffer-frame) 'addr)) | 3283 | (address (bindat-get-field (gdb-current-buffer-frame) 'addr)) |
| 3279 | (pos 1) | ||
| 3280 | (table (make-gdb-table)) | 3284 | (table (make-gdb-table)) |
| 3281 | (marked-line nil)) | 3285 | (marked-line nil)) |
| 3282 | (dolist (instr instructions) | 3286 | (dolist (instr instructions) |
| @@ -3806,8 +3810,7 @@ already, in which case that window is splitted first." | |||
| 3806 | (let ((window (get-lru-window))) | 3810 | (let ((window (get-lru-window))) |
| 3807 | (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) | 3811 | (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) |
| 3808 | 'gdbmi) | 3812 | 'gdbmi) |
| 3809 | (let* ((largest (get-largest-window)) | 3813 | (let ((largest (get-largest-window))) |
| 3810 | (cur-size (window-height largest))) | ||
| 3811 | (setq answer (split-window largest)) | 3814 | (setq answer (split-window largest)) |
| 3812 | (set-window-buffer answer buf) | 3815 | (set-window-buffer answer buf) |
| 3813 | (set-window-dedicated-p answer dedicated) | 3816 | (set-window-dedicated-p answer dedicated) |
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index a1dc19da1ed..0d9359caa77 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el | |||
| @@ -290,7 +290,7 @@ recognized according to the current value of the variable `glasses-separator'." | |||
| 290 | nil) | 290 | nil) |
| 291 | 291 | ||
| 292 | 292 | ||
| 293 | (defun glasses-change (beg end &optional old-len) | 293 | (defun glasses-change (beg end &optional _old-len) |
| 294 | "After-change function updating glass overlays." | 294 | "After-change function updating glass overlays." |
| 295 | (let ((beg-line (save-excursion (goto-char beg) (line-beginning-position))) | 295 | (let ((beg-line (save-excursion (goto-char beg) (line-beginning-position))) |
| 296 | (end-line (save-excursion (goto-char end) (line-end-position)))) | 296 | (end-line (save-excursion (goto-char end) (line-end-position)))) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index e81f4ca949b..74bdc980e8b 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -379,13 +379,13 @@ step (if we're in the GUD buffer). | |||
| 379 | source file) or the source line number at the last break or step (if | 379 | source file) or the source line number at the last break or step (if |
| 380 | we're in the GUD buffer)." | 380 | we're in the GUD buffer)." |
| 381 | `(progn | 381 | `(progn |
| 382 | (defun ,func (arg) | 382 | (defalias ',func (lambda (arg) |
| 383 | ,@(if doc (list doc)) | 383 | ,@(if doc (list doc)) |
| 384 | (interactive "p") | 384 | (interactive "p") |
| 385 | (if (not gud-running) | 385 | (if (not gud-running) |
| 386 | ,(if (stringp cmd) | 386 | ,(if (stringp cmd) |
| 387 | `(gud-call ,cmd arg) | 387 | `(gud-call ,cmd arg) |
| 388 | cmd))) | 388 | cmd)))) |
| 389 | ,(if key `(local-set-key ,(concat "\C-c" key) ',func)) | 389 | ,(if key `(local-set-key ,(concat "\C-c" key) ',func)) |
| 390 | ,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func)))) | 390 | ,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func)))) |
| 391 | 391 | ||
| @@ -491,7 +491,7 @@ The value t means that there is no stack, and we are in display-file mode.") | |||
| 491 | (gud-install-speedbar-variables) | 491 | (gud-install-speedbar-variables) |
| 492 | (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) | 492 | (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) |
| 493 | 493 | ||
| 494 | (defun gud-expansion-speedbar-buttons (directory zero) | 494 | (defun gud-expansion-speedbar-buttons (_directory _zero) |
| 495 | "Wrapper for call to `speedbar-add-expansion-list'. | 495 | "Wrapper for call to `speedbar-add-expansion-list'. |
| 496 | DIRECTORY and ZERO are not used, but are required by the caller." | 496 | DIRECTORY and ZERO are not used, but are required by the caller." |
| 497 | (gud-speedbar-buttons gud-comint-buffer)) | 497 | (gud-speedbar-buttons gud-comint-buffer)) |
| @@ -657,17 +657,15 @@ The option \"--fullname\" must be included in this value." | |||
| 657 | gud-marker-acc (substring gud-marker-acc (match-end 0)))) | 657 | gud-marker-acc (substring gud-marker-acc (match-end 0)))) |
| 658 | 658 | ||
| 659 | (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) | 659 | (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) |
| 660 | (let ((match (match-string 1 gud-marker-acc))) | 660 | (setq |
| 661 | 661 | ;; Append any text before the marker to the output we're going | |
| 662 | (setq | 662 | ;; to return - we don't include the marker in this text. |
| 663 | ;; Append any text before the marker to the output we're going | 663 | output (concat output |
| 664 | ;; to return - we don't include the marker in this text. | 664 | (substring gud-marker-acc 0 (match-beginning 0))) |
| 665 | output (concat output | ||
| 666 | (substring gud-marker-acc 0 (match-beginning 0))) | ||
| 667 | 665 | ||
| 668 | ;; Set the accumulator to the remaining text. | 666 | ;; Set the accumulator to the remaining text. |
| 669 | 667 | ||
| 670 | gud-marker-acc (substring gud-marker-acc (match-end 0))))) | 668 | gud-marker-acc (substring gud-marker-acc (match-end 0)))) |
| 671 | 669 | ||
| 672 | ;; Does the remaining text look like it might end with the | 670 | ;; Does the remaining text look like it might end with the |
| 673 | ;; beginning of another marker? If it does, then keep it in | 671 | ;; beginning of another marker? If it does, then keep it in |
| @@ -884,7 +882,7 @@ It is passed through FILTER before we look at it." | |||
| 884 | 882 | ||
| 885 | ;; gdb speedbar functions | 883 | ;; gdb speedbar functions |
| 886 | 884 | ||
| 887 | (defun gud-gdb-goto-stackframe (text token indent) | 885 | (defun gud-gdb-goto-stackframe (_text token _indent) |
| 888 | "Goto the stackframe described by TEXT, TOKEN, and INDENT." | 886 | "Goto the stackframe described by TEXT, TOKEN, and INDENT." |
| 889 | (speedbar-with-attached-buffer | 887 | (speedbar-with-attached-buffer |
| 890 | (gud-basic-call (concat "server frame " (nth 1 token))) | 888 | (gud-basic-call (concat "server frame " (nth 1 token))) |
| @@ -1074,7 +1072,7 @@ containing the executable being debugged." | |||
| 1074 | directory)) | 1072 | directory)) |
| 1075 | :group 'gud) | 1073 | :group 'gud) |
| 1076 | 1074 | ||
| 1077 | (defun gud-dbx-massage-args (file args) | 1075 | (defun gud-dbx-massage-args (_file args) |
| 1078 | (nconc (let ((directories gud-dbx-directories) | 1076 | (nconc (let ((directories gud-dbx-directories) |
| 1079 | (result nil)) | 1077 | (result nil)) |
| 1080 | (while directories | 1078 | (while directories |
| @@ -1386,7 +1384,7 @@ containing the executable being debugged." | |||
| 1386 | directory)) | 1384 | directory)) |
| 1387 | :group 'gud) | 1385 | :group 'gud) |
| 1388 | 1386 | ||
| 1389 | (defun gud-xdb-massage-args (file args) | 1387 | (defun gud-xdb-massage-args (_file args) |
| 1390 | (nconc (let ((directories gud-xdb-directories) | 1388 | (nconc (let ((directories gud-xdb-directories) |
| 1391 | (result nil)) | 1389 | (result nil)) |
| 1392 | (while directories | 1390 | (while directories |
| @@ -1450,7 +1448,7 @@ directories if your program contains sources from more than one directory." | |||
| 1450 | ;; History of argument lists passed to perldb. | 1448 | ;; History of argument lists passed to perldb. |
| 1451 | (defvar gud-perldb-history nil) | 1449 | (defvar gud-perldb-history nil) |
| 1452 | 1450 | ||
| 1453 | (defun gud-perldb-massage-args (file args) | 1451 | (defun gud-perldb-massage-args (_file args) |
| 1454 | "Convert a command line as would be typed normally to run perldb | 1452 | "Convert a command line as would be typed normally to run perldb |
| 1455 | into one that invokes an Emacs-enabled debugging session. | 1453 | into one that invokes an Emacs-enabled debugging session. |
| 1456 | \"-emacs\" is inserted where it will be $ARGV[0] (see perl5db.pl)." | 1454 | \"-emacs\" is inserted where it will be $ARGV[0] (see perl5db.pl)." |
| @@ -2072,7 +2070,7 @@ extension EXTN. Normally EXTN is given as the regular expression | |||
| 2072 | 2070 | ||
| 2073 | ;; Change what was given in the minibuffer to something that can be used to | 2071 | ;; Change what was given in the minibuffer to something that can be used to |
| 2074 | ;; invoke the debugger. | 2072 | ;; invoke the debugger. |
| 2075 | (defun gud-jdb-massage-args (file args) | 2073 | (defun gud-jdb-massage-args (_file args) |
| 2076 | ;; The jdb executable must have whitespace between "-classpath" and | 2074 | ;; The jdb executable must have whitespace between "-classpath" and |
| 2077 | ;; its value while gud-common-init expects all switch values to | 2075 | ;; its value while gud-common-init expects all switch values to |
| 2078 | ;; follow the switch keyword without intervening whitespace. We | 2076 | ;; follow the switch keyword without intervening whitespace. We |
| @@ -2151,7 +2149,7 @@ relative to a classpath directory." | |||
| 2151 | (setq cplist (cdr cplist))) | 2149 | (setq cplist (cdr cplist))) |
| 2152 | (if found-file (concat (car cplist) "/" filename))))) | 2150 | (if found-file (concat (car cplist) "/" filename))))) |
| 2153 | 2151 | ||
| 2154 | (defun gud-jdb-find-source (string) | 2152 | (defun gud-jdb-find-source (_string) |
| 2155 | "Alias for function used to locate source files. | 2153 | "Alias for function used to locate source files. |
| 2156 | Set to `gud-jdb-find-source-using-classpath' or `gud-jdb-find-source-file' | 2154 | Set to `gud-jdb-find-source-using-classpath' or `gud-jdb-find-source-file' |
| 2157 | during jdb initialization depending on the value of | 2155 | during jdb initialization depending on the value of |
| @@ -3047,7 +3045,7 @@ Link exprs of the form: | |||
| 3047 | (declare-function syntax-symbol "gud" (x)) | 3045 | (declare-function syntax-symbol "gud" (x)) |
| 3048 | (declare-function syntax-point "gud" (x)) | 3046 | (declare-function syntax-point "gud" (x)) |
| 3049 | 3047 | ||
| 3050 | (defun gud-find-class (f line) | 3048 | (defun gud-find-class (f _line) |
| 3051 | "Find fully qualified class in file F at line LINE. | 3049 | "Find fully qualified class in file F at line LINE. |
| 3052 | This function uses the `gud-jdb-classpath' (and optional | 3050 | This function uses the `gud-jdb-classpath' (and optional |
| 3053 | `gud-jdb-sourcepath') list(s) to derive a file | 3051 | `gud-jdb-sourcepath') list(s) to derive a file |
| @@ -3063,13 +3061,13 @@ class of the file (using s to separate nested class ids)." | |||
| 3063 | (save-match-data | 3061 | (save-match-data |
| 3064 | (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath)) | 3062 | (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath)) |
| 3065 | (fbuffer (get-file-buffer f)) | 3063 | (fbuffer (get-file-buffer f)) |
| 3066 | syntax-symbol syntax-point class-found) | 3064 | class-found |
| 3065 | ;; Syntax-symbol returns the symbol of the *first* element | ||
| 3066 | ;; in the syntactical analysis result list, syntax-point | ||
| 3067 | ;; returns the buffer position of same | ||
| 3068 | (syntax-symbol (lambda (x) (c-langelem-sym (car x)))) | ||
| 3069 | (syntax-point (lambda (x) (c-langelem-pos (car x))))) | ||
| 3067 | (setq f (file-name-sans-extension (file-truename f))) | 3070 | (setq f (file-name-sans-extension (file-truename f))) |
| 3068 | ;; Syntax-symbol returns the symbol of the *first* element | ||
| 3069 | ;; in the syntactical analysis result list, syntax-point | ||
| 3070 | ;; returns the buffer position of same | ||
| 3071 | (fset 'syntax-symbol (lambda (x) (c-langelem-sym (car x)))) | ||
| 3072 | (fset 'syntax-point (lambda (x) (c-langelem-pos (car x)))) | ||
| 3073 | ;; Search through classpath list for an entry that is | 3071 | ;; Search through classpath list for an entry that is |
| 3074 | ;; contained in f | 3072 | ;; contained in f |
| 3075 | (while (and cplist (not class-found)) | 3073 | (while (and cplist (not class-found)) |
| @@ -3092,17 +3090,17 @@ class of the file (using s to separate nested class ids)." | |||
| 3092 | ;; with the 'topmost-intro symbol, there may be | 3090 | ;; with the 'topmost-intro symbol, there may be |
| 3093 | ;; nested classes... | 3091 | ;; nested classes... |
| 3094 | (while (not (eq 'topmost-intro | 3092 | (while (not (eq 'topmost-intro |
| 3095 | (syntax-symbol (c-guess-basic-syntax)))) | 3093 | (funcall syntax-symbol (c-guess-basic-syntax)))) |
| 3096 | ;; Check if the current position c-syntactic | 3094 | ;; Check if the current position c-syntactic |
| 3097 | ;; analysis has 'inclass | 3095 | ;; analysis has 'inclass |
| 3098 | (setq syntax (c-guess-basic-syntax)) | 3096 | (setq syntax (c-guess-basic-syntax)) |
| 3099 | (while | 3097 | (while |
| 3100 | (and (not (eq 'inclass (syntax-symbol syntax))) | 3098 | (and (not (eq 'inclass (funcall syntax-symbol syntax))) |
| 3101 | (cdr syntax)) | 3099 | (cdr syntax)) |
| 3102 | (setq syntax (cdr syntax))) | 3100 | (setq syntax (cdr syntax))) |
| 3103 | (if (eq 'inclass (syntax-symbol syntax)) | 3101 | (if (eq 'inclass (funcall syntax-symbol syntax)) |
| 3104 | (progn | 3102 | (progn |
| 3105 | (goto-char (syntax-point syntax)) | 3103 | (goto-char (funcall syntax-point syntax)) |
| 3106 | ;; Now we're at the beginning of a class | 3104 | ;; Now we're at the beginning of a class |
| 3107 | ;; definition. Find class name | 3105 | ;; definition. Find class name |
| 3108 | (looking-at | 3106 | (looking-at |
| @@ -3111,9 +3109,9 @@ class of the file (using s to separate nested class ids)." | |||
| 3111 | (append (list (match-string-no-properties 1)) | 3109 | (append (list (match-string-no-properties 1)) |
| 3112 | nclass))) | 3110 | nclass))) |
| 3113 | (setq syntax (c-guess-basic-syntax)) | 3111 | (setq syntax (c-guess-basic-syntax)) |
| 3114 | (while (and (not (syntax-point syntax)) (cdr syntax)) | 3112 | (while (and (not (funcall syntax-point syntax)) (cdr syntax)) |
| 3115 | (setq syntax (cdr syntax))) | 3113 | (setq syntax (cdr syntax))) |
| 3116 | (goto-char (syntax-point syntax)) | 3114 | (goto-char (funcall syntax-point syntax)) |
| 3117 | )) | 3115 | )) |
| 3118 | (string-match (concat (car nclass) "$") class-found) | 3116 | (string-match (concat (car nclass) "$") class-found) |
| 3119 | (setq class-found | 3117 | (setq class-found |
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 76a91c4b000..48d1ac4b85e 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -412,13 +412,14 @@ that form should be displayed.") | |||
| 412 | "Pop the next token from token-list into the let variable \"hif-token\"." | 412 | "Pop the next token from token-list into the let variable \"hif-token\"." |
| 413 | (setq hif-token (pop hif-token-list))) | 413 | (setq hif-token (pop hif-token-list))) |
| 414 | 414 | ||
| 415 | (defun hif-parse-if-exp (hif-token-list) | 415 | (defun hif-parse-if-exp (token-list) |
| 416 | "Parse the TOKEN-LIST. Return translated list in prefix form." | 416 | "Parse the TOKEN-LIST. Return translated list in prefix form." |
| 417 | (hif-nexttoken) | 417 | (let ((hif-token-list token-list)) |
| 418 | (prog1 | 418 | (hif-nexttoken) |
| 419 | (hif-expr) | 419 | (prog1 |
| 420 | (if hif-token ; is there still a token? | 420 | (hif-expr) |
| 421 | (error "Error: unexpected token: %s" hif-token)))) | 421 | (if hif-token ; is there still a token? |
| 422 | (error "Error: unexpected token: %s" hif-token))))) | ||
| 422 | 423 | ||
| 423 | (defun hif-expr () | 424 | (defun hif-expr () |
| 424 | "Parse an expression as found in #if. | 425 | "Parse an expression as found in #if. |
| @@ -507,7 +508,7 @@ that form should be displayed.") | |||
| 507 | ;; Unary plus/minus. | 508 | ;; Unary plus/minus. |
| 508 | ((memq hif-token '(hif-minus hif-plus)) | 509 | ((memq hif-token '(hif-minus hif-plus)) |
| 509 | (list (prog1 hif-token (hif-nexttoken)) 0 (hif-factor))) | 510 | (list (prog1 hif-token (hif-nexttoken)) 0 (hif-factor))) |
| 510 | 511 | ||
| 511 | (t ; identifier | 512 | (t ; identifier |
| 512 | (let ((ident hif-token)) | 513 | (let ((ident hif-token)) |
| 513 | (if (memq ident '(or and)) | 514 | (if (memq ident '(or and)) |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 9468d7b463e..d07edd5de2f 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -565,10 +565,9 @@ and then further adjusted to be at the end of the line." | |||
| 565 | (if comment-reg | 565 | (if comment-reg |
| 566 | (hs-hide-comment-region (car comment-reg) (cadr comment-reg) end) | 566 | (hs-hide-comment-region (car comment-reg) (cadr comment-reg) end) |
| 567 | (when (looking-at hs-block-start-regexp) | 567 | (when (looking-at hs-block-start-regexp) |
| 568 | (let* ((mdata (match-data t)) | 568 | (let ((mdata (match-data t)) |
| 569 | (header-beg (match-beginning 0)) | 569 | (header-end (match-end 0)) |
| 570 | (header-end (match-end 0)) | 570 | p q ov) |
| 571 | p q ov) | ||
| 572 | ;; `p' is the point at the end of the block beginning, which | 571 | ;; `p' is the point at the end of the block beginning, which |
| 573 | ;; may need to be adjusted | 572 | ;; may need to be adjusted |
| 574 | (save-excursion | 573 | (save-excursion |
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index 9a8b8064be7..5382ce1386d 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -484,9 +484,9 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 484 | (let ((indent-stack (list nil)) | 484 | (let ((indent-stack (list nil)) |
| 485 | (contain-stack (list (point))) | 485 | (contain-stack (list (point))) |
| 486 | (case-fold-search nil) | 486 | (case-fold-search nil) |
| 487 | restart outer-loop-done inner-loop-done state ostate | 487 | outer-loop-done inner-loop-done state ostate |
| 488 | this-indent last-sexp last-depth | 488 | this-indent last-depth |
| 489 | at-else at-brace at-do | 489 | at-else at-brace |
| 490 | (opoint (point)) | 490 | (opoint (point)) |
| 491 | (next-depth 0)) | 491 | (next-depth 0)) |
| 492 | (save-excursion | 492 | (save-excursion |
| @@ -506,9 +506,6 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 506 | (setq state (parse-partial-sexp (point) (progn (end-of-line) (point)) | 506 | (setq state (parse-partial-sexp (point) (progn (end-of-line) (point)) |
| 507 | nil nil state)) | 507 | nil nil state)) |
| 508 | (setq next-depth (car state)) | 508 | (setq next-depth (car state)) |
| 509 | (if (and (car (cdr (cdr state))) | ||
| 510 | (>= (car (cdr (cdr state))) 0)) | ||
| 511 | (setq last-sexp (car (cdr (cdr state))))) | ||
| 512 | (if (or (nth 4 ostate)) | 509 | (if (or (nth 4 ostate)) |
| 513 | (icon-indent-line)) | 510 | (icon-indent-line)) |
| 514 | (if (or (nth 3 state)) | 511 | (if (or (nth 3 state)) |
| @@ -518,8 +515,6 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 518 | (setq outer-loop-done t)) | 515 | (setq outer-loop-done t)) |
| 519 | (if outer-loop-done | 516 | (if outer-loop-done |
| 520 | nil | 517 | nil |
| 521 | (if (/= last-depth next-depth) | ||
| 522 | (setq last-sexp nil)) | ||
| 523 | (while (> last-depth next-depth) | 518 | (while (> last-depth next-depth) |
| 524 | (setq indent-stack (cdr indent-stack) | 519 | (setq indent-stack (cdr indent-stack) |
| 525 | contain-stack (cdr contain-stack) | 520 | contain-stack (cdr contain-stack) |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f495e35dc89..cd382d4e78d 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -934,7 +934,7 @@ BEG defaults to `point-min', meaning to flush the entire cache." | |||
| 934 | (setq beg (or beg (save-restriction (widen) (point-min)))) | 934 | (setq beg (or beg (save-restriction (widen) (point-min)))) |
| 935 | (setq js--cache-end (min js--cache-end beg))) | 935 | (setq js--cache-end (min js--cache-end beg))) |
| 936 | 936 | ||
| 937 | (defmacro js--debug (&rest arguments) | 937 | (defmacro js--debug (&rest _arguments) |
| 938 | ;; `(message ,@arguments) | 938 | ;; `(message ,@arguments) |
| 939 | ) | 939 | ) |
| 940 | 940 | ||
| @@ -1591,10 +1591,9 @@ will be returned." | |||
| 1591 | (save-restriction | 1591 | (save-restriction |
| 1592 | (widen) | 1592 | (widen) |
| 1593 | (js--ensure-cache) | 1593 | (js--ensure-cache) |
| 1594 | (let* ((bound (if (eobp) (point) (1+ (point)))) | 1594 | (let ((pstate (or (save-excursion |
| 1595 | (pstate (or (save-excursion | 1595 | (js--backward-pstate)) |
| 1596 | (js--backward-pstate)) | 1596 | (list js--initial-pitem)))) |
| 1597 | (list js--initial-pitem)))) | ||
| 1598 | 1597 | ||
| 1599 | ;; Loop until we either hit a pitem at BOB or pitem ends after | 1598 | ;; Loop until we either hit a pitem at BOB or pitem ends after |
| 1600 | ;; point (or at point if we're at eob) | 1599 | ;; point (or at point if we're at eob) |
| @@ -1921,7 +1920,7 @@ the broken-down class name of the item to insert." | |||
| 1921 | 1920 | ||
| 1922 | (let ((top-name (car name-parts)) | 1921 | (let ((top-name (car name-parts)) |
| 1923 | (item-ptr items) | 1922 | (item-ptr items) |
| 1924 | new-items last-new-item new-cons item) | 1923 | new-items last-new-item new-cons) |
| 1925 | 1924 | ||
| 1926 | (js--debug "js--splice-into-items: name-parts: %S items:%S" | 1925 | (js--debug "js--splice-into-items: name-parts: %S items:%S" |
| 1927 | name-parts | 1926 | name-parts |
| @@ -2147,8 +2146,8 @@ initial input INITIAL-INPUT. Return a cons of (SYMBOL-NAME | |||
| 2147 | . LOCATION), where SYMBOL-NAME is a string and LOCATION is a | 2146 | . LOCATION), where SYMBOL-NAME is a string and LOCATION is a |
| 2148 | marker." | 2147 | marker." |
| 2149 | (unless ido-mode | 2148 | (unless ido-mode |
| 2150 | (ido-mode t) | 2149 | (ido-mode 1) |
| 2151 | (ido-mode nil)) | 2150 | (ido-mode -1)) |
| 2152 | 2151 | ||
| 2153 | (let ((choice (ido-completing-read | 2152 | (let ((choice (ido-completing-read |
| 2154 | prompt | 2153 | prompt |
| @@ -2955,8 +2954,8 @@ browser, respectively." | |||
| 2955 | 2954 | ||
| 2956 | ;; Prime IDO | 2955 | ;; Prime IDO |
| 2957 | (unless ido-mode | 2956 | (unless ido-mode |
| 2958 | (ido-mode t) | 2957 | (ido-mode 1) |
| 2959 | (ido-mode nil)) | 2958 | (ido-mode -1)) |
| 2960 | 2959 | ||
| 2961 | (with-js | 2960 | (with-js |
| 2962 | (lexical-let ((tabs (js--get-tabs)) selected-tab-cname | 2961 | (lexical-let ((tabs (js--get-tabs)) selected-tab-cname |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index fd9a576002a..22e5d2f7c5c 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -343,7 +343,7 @@ not be enclosed in { } or ( )." | |||
| 343 | 343 | ||
| 344 | (defun makefile-make-font-lock-keywords (var keywords space | 344 | (defun makefile-make-font-lock-keywords (var keywords space |
| 345 | &optional negation | 345 | &optional negation |
| 346 | &rest font-lock-keywords) | 346 | &rest fl-keywords) |
| 347 | `(;; Do macro assignments. These get the "variable-name" face. | 347 | `(;; Do macro assignments. These get the "variable-name" face. |
| 348 | (,makefile-macroassign-regex | 348 | (,makefile-macroassign-regex |
| 349 | (1 font-lock-variable-name-face) | 349 | (1 font-lock-variable-name-face) |
| @@ -393,7 +393,7 @@ not be enclosed in { } or ( )." | |||
| 393 | ;; They can make a tab fail to be effective. | 393 | ;; They can make a tab fail to be effective. |
| 394 | ("^\\( +\\)\t" 1 makefile-space))) | 394 | ("^\\( +\\)\t" 1 makefile-space))) |
| 395 | 395 | ||
| 396 | ,@font-lock-keywords | 396 | ,@fl-keywords |
| 397 | 397 | ||
| 398 | ;; Do dependencies. | 398 | ;; Do dependencies. |
| 399 | (makefile-match-dependency | 399 | (makefile-match-dependency |
| @@ -491,7 +491,7 @@ not be enclosed in { } or ( )." | |||
| 491 | '("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face))) | 491 | '("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face))) |
| 492 | 492 | ||
| 493 | (defconst makefile-imake-font-lock-keywords | 493 | (defconst makefile-imake-font-lock-keywords |
| 494 | (append | 494 | (append |
| 495 | (makefile-make-font-lock-keywords | 495 | (makefile-make-font-lock-keywords |
| 496 | makefile-var-use-regex | 496 | makefile-var-use-regex |
| 497 | makefile-statements | 497 | makefile-statements |
| @@ -1155,7 +1155,6 @@ The context determines which are considered." | |||
| 1155 | (let* ((beg (save-excursion | 1155 | (let* ((beg (save-excursion |
| 1156 | (skip-chars-backward "^$(){}:#= \t\n") | 1156 | (skip-chars-backward "^$(){}:#= \t\n") |
| 1157 | (point))) | 1157 | (point))) |
| 1158 | (try (buffer-substring beg (point))) | ||
| 1159 | (paren nil) | 1158 | (paren nil) |
| 1160 | (do-macros | 1159 | (do-macros |
| 1161 | (save-excursion | 1160 | (save-excursion |
| @@ -1262,7 +1261,7 @@ definition and conveniently use this command." | |||
| 1262 | 1261 | ||
| 1263 | ;; Filling | 1262 | ;; Filling |
| 1264 | 1263 | ||
| 1265 | (defun makefile-fill-paragraph (arg) | 1264 | (defun makefile-fill-paragraph (_arg) |
| 1266 | ;; Fill comments, backslashed lines, and variable definitions | 1265 | ;; Fill comments, backslashed lines, and variable definitions |
| 1267 | ;; specially. | 1266 | ;; specially. |
| 1268 | (save-excursion | 1267 | (save-excursion |
| @@ -1680,7 +1679,7 @@ Then prompts for all required parameters." | |||
| 1680 | ;;; Utility functions | 1679 | ;;; Utility functions |
| 1681 | ;;; ------------------------------------------------------------ | 1680 | ;;; ------------------------------------------------------------ |
| 1682 | 1681 | ||
| 1683 | (defun makefile-match-function-end (end) | 1682 | (defun makefile-match-function-end (_end) |
| 1684 | "To be called as an anchored matcher by font-lock. | 1683 | "To be called as an anchored matcher by font-lock. |
| 1685 | The anchor must have matched the opening parens in the first group." | 1684 | The anchor must have matched the opening parens in the first group." |
| 1686 | (let ((s (match-string-no-properties 1))) | 1685 | (let ((s (match-string-no-properties 1))) |
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index e1d41c2ebd6..239da3d8cd6 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el | |||
| @@ -268,8 +268,7 @@ is NOT available with versions of Octave prior to 2.0." | |||
| 268 | (command | 268 | (command |
| 269 | (save-excursion | 269 | (save-excursion |
| 270 | (skip-syntax-backward "w_" (comint-line-beginning-position)) | 270 | (skip-syntax-backward "w_" (comint-line-beginning-position)) |
| 271 | (buffer-substring-no-properties (point) end))) | 271 | (buffer-substring-no-properties (point) end)))) |
| 272 | (proc (get-buffer-process inferior-octave-buffer))) | ||
| 273 | (cond (inferior-octave-complete-impossible | 272 | (cond (inferior-octave-complete-impossible |
| 274 | (error (concat | 273 | (error (concat |
| 275 | "Your Octave does not have `completion_matches'. " | 274 | "Your Octave does not have `completion_matches'. " |
| @@ -336,7 +335,7 @@ Ring Emacs bell if process output starts with an ASCII bell, and pass | |||
| 336 | the rest to `comint-output-filter'." | 335 | the rest to `comint-output-filter'." |
| 337 | (comint-output-filter proc (inferior-octave-strip-ctrl-g string))) | 336 | (comint-output-filter proc (inferior-octave-strip-ctrl-g string))) |
| 338 | 337 | ||
| 339 | (defun inferior-octave-output-digest (proc string) | 338 | (defun inferior-octave-output-digest (_proc string) |
| 340 | "Special output filter for the inferior Octave process. | 339 | "Special output filter for the inferior Octave process. |
| 341 | Save all output between newlines into `inferior-octave-output-list', and | 340 | Save all output between newlines into `inferior-octave-output-list', and |
| 342 | the rest to `inferior-octave-output-string'." | 341 | the rest to `inferior-octave-output-string'." |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 8bf9ff299d0..241928c8a1c 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -893,7 +893,7 @@ otherwise." | |||
| 893 | (setq give-up t)))) | 893 | (setq give-up t)))) |
| 894 | (not give-up)))) | 894 | (not give-up)))) |
| 895 | 895 | ||
| 896 | (defun octave-fill-paragraph (&optional arg) | 896 | (defun octave-fill-paragraph (&optional _arg) |
| 897 | "Fill paragraph of Octave code, handling Octave comments." | 897 | "Fill paragraph of Octave code, handling Octave comments." |
| 898 | ;; FIXME: difference with generic fill-paragraph: | 898 | ;; FIXME: difference with generic fill-paragraph: |
| 899 | ;; - code lines are only split, never joined. | 899 | ;; - code lines are only split, never joined. |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 9b446e49b5c..ed628730fc1 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -862,7 +862,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." | |||
| 862 | ;; ); | 862 | ;; ); |
| 863 | (progn | 863 | (progn |
| 864 | (skip-syntax-backward "(") | 864 | (skip-syntax-backward "(") |
| 865 | (condition-case err | 865 | (condition-case nil |
| 866 | (while (save-excursion | 866 | (while (save-excursion |
| 867 | (skip-syntax-backward " ") (not (bolp))) | 867 | (skip-syntax-backward " ") (not (bolp))) |
| 868 | (forward-sexp -1)) | 868 | (forward-sexp -1)) |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 62472edfbe4..283919c131e 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -1010,7 +1010,7 @@ VERSION is of the format (Major . Minor)" | |||
| 1010 | (define-key map "\C-c\C-l" 'prolog-consult-file) | 1010 | (define-key map "\C-c\C-l" 'prolog-consult-file) |
| 1011 | (define-key map "\C-c\C-z" 'switch-to-prolog)) | 1011 | (define-key map "\C-c\C-z" 'switch-to-prolog)) |
| 1012 | 1012 | ||
| 1013 | (defun prolog-mode-keybindings-inferior (map) | 1013 | (defun prolog-mode-keybindings-inferior (_map) |
| 1014 | "Define keybindings for inferior Prolog mode in MAP." | 1014 | "Define keybindings for inferior Prolog mode in MAP." |
| 1015 | ;; No inferior mode specific keybindings now. | 1015 | ;; No inferior mode specific keybindings now. |
| 1016 | ) | 1016 | ) |
| @@ -2012,15 +2012,14 @@ Argument BOUND is a buffer position limiting searching." | |||
| 2012 | 2012 | ||
| 2013 | ;; NB: This function *MUST* have this optional argument since XEmacs | 2013 | ;; NB: This function *MUST* have this optional argument since XEmacs |
| 2014 | ;; assumes it. This does not mean we have to use it... | 2014 | ;; assumes it. This does not mean we have to use it... |
| 2015 | (defun prolog-indent-line (&optional whole-exp) | 2015 | (defun prolog-indent-line (&optional _whole-exp) |
| 2016 | "Indent current line as Prolog code. | 2016 | "Indent current line as Prolog code. |
| 2017 | With argument, indent any additional lines of the same clause | 2017 | With argument, indent any additional lines of the same clause |
| 2018 | rigidly along with this one (not yet)." | 2018 | rigidly along with this one (not yet)." |
| 2019 | (interactive "p") | 2019 | (interactive "p") |
| 2020 | (let ((indent (prolog-indent-level)) | 2020 | (let ((indent (prolog-indent-level)) |
| 2021 | (pos (- (point-max) (point))) beg) | 2021 | (pos (- (point-max) (point)))) |
| 2022 | (beginning-of-line) | 2022 | (beginning-of-line) |
| 2023 | (setq beg (point)) | ||
| 2024 | (skip-chars-forward " \t") | 2023 | (skip-chars-forward " \t") |
| 2025 | (indent-line-to indent) | 2024 | (indent-line-to indent) |
| 2026 | (if (> (- (point-max) pos) (point)) | 2025 | (if (> (- (point-max) pos) (point)) |
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index f3418a60729..cade56a194c 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el | |||
| @@ -541,6 +541,10 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number | |||
| 541 | (interactive) | 541 | (interactive) |
| 542 | (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) | 542 | (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) |
| 543 | 543 | ||
| 544 | ;; From reporter.el | ||
| 545 | (defvar reporter-prompt-for-summary-p) | ||
| 546 | (defvar reporter-dont-compact-list) | ||
| 547 | |||
| 544 | (defun ps-mode-submit-bug-report () | 548 | (defun ps-mode-submit-bug-report () |
| 545 | "Submit via mail a bug report on PostScript mode." | 549 | "Submit via mail a bug report on PostScript mode." |
| 546 | (interactive) | 550 | (interactive) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0cbb8c186cc..a7851c54356 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2495,7 +2495,7 @@ with skeleton expansions for compound statement templates. | |||
| 2495 | ;; doesn't seem to work properly. | 2495 | ;; doesn't seem to work properly. |
| 2496 | (add-to-list 'hs-special-modes-alist | 2496 | (add-to-list 'hs-special-modes-alist |
| 2497 | `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" | 2497 | `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" |
| 2498 | ,(lambda (arg) | 2498 | ,(lambda (_arg) |
| 2499 | (python-end-of-defun) | 2499 | (python-end-of-defun) |
| 2500 | (skip-chars-backward " \t\n")) | 2500 | (skip-chars-backward " \t\n")) |
| 2501 | nil)) | 2501 | nil)) |
| @@ -2554,7 +2554,7 @@ Runs `jython-mode-hook' after `python-mode-hook'." | |||
| 2554 | (setq overlay-arrow-position nil | 2554 | (setq overlay-arrow-position nil |
| 2555 | python-pdbtrack-is-tracking-p nil))) | 2555 | python-pdbtrack-is-tracking-p nil))) |
| 2556 | 2556 | ||
| 2557 | (defun python-pdbtrack-track-stack-file (text) | 2557 | (defun python-pdbtrack-track-stack-file (_text) |
| 2558 | "Show the file indicated by the pdb stack entry line, in a separate window. | 2558 | "Show the file indicated by the pdb stack entry line, in a separate window. |
| 2559 | 2559 | ||
| 2560 | Activity is disabled if the buffer-local variable | 2560 | Activity is disabled if the buffer-local variable |
| @@ -2666,8 +2666,8 @@ problem." | |||
| 2666 | ) | 2666 | ) |
| 2667 | ) | 2667 | ) |
| 2668 | 2668 | ||
| 2669 | (defun python-pdbtrack-grub-for-buffer (funcname lineno) | 2669 | (defun python-pdbtrack-grub-for-buffer (funcname _lineno) |
| 2670 | "Find recent python-mode buffer named, or having function named funcname." | 2670 | "Find recent Python mode buffer named, or having function named FUNCNAME." |
| 2671 | (let ((buffers (buffer-list)) | 2671 | (let ((buffers (buffer-list)) |
| 2672 | buf | 2672 | buf |
| 2673 | got) | 2673 | got) |
| @@ -2725,7 +2725,7 @@ comint believe the user typed this string so that | |||
| 2725 | (interactive) | 2725 | (interactive) |
| 2726 | (python-pdbtrack-toggle-stack-tracking 0)) | 2726 | (python-pdbtrack-toggle-stack-tracking 0)) |
| 2727 | 2727 | ||
| 2728 | (defun python-sentinel (proc msg) | 2728 | (defun python-sentinel (_proc _msg) |
| 2729 | (setq overlay-arrow-position nil)) | 2729 | (setq overlay-arrow-position nil)) |
| 2730 | 2730 | ||
| 2731 | (provide 'python) | 2731 | (provide 'python) |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 7b84cc89d08..258f9be9237 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -987,8 +987,7 @@ subshells can nest." | |||
| 987 | ;; rather flakey. | 987 | ;; rather flakey. |
| 988 | (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote. | 988 | (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote. |
| 989 | ;; bingo we have a $( or a ` inside a "" | 989 | ;; bingo we have a $( or a ` inside a "" |
| 990 | (let ((char (char-after (point))) | 990 | (let (;; `state' can be: double-quote, backquote, code. |
| 991 | ;; `state' can be: double-quote, backquote, code. | ||
| 992 | (state (if (eq (char-before) ?`) 'backquote 'code)) | 991 | (state (if (eq (char-before) ?`) 'backquote 'code)) |
| 993 | ;; Stacked states in the context. | 992 | ;; Stacked states in the context. |
| 994 | (states '(double-quote))) | 993 | (states '(double-quote))) |
| @@ -1212,7 +1211,7 @@ a number means align to that column, e.g. 0 means first column." | |||
| 1212 | ;; "For debugging: display message ARGS if variable SH-DEBUG is non-nil." | 1211 | ;; "For debugging: display message ARGS if variable SH-DEBUG is non-nil." |
| 1213 | ;; (if sh-debug | 1212 | ;; (if sh-debug |
| 1214 | ;; (apply 'message args))) | 1213 | ;; (apply 'message args))) |
| 1215 | (defmacro sh-debug (&rest args)) | 1214 | (defmacro sh-debug (&rest _args)) |
| 1216 | 1215 | ||
| 1217 | (defconst sh-symbol-list | 1216 | (defconst sh-symbol-list |
| 1218 | '((const :tag "+ " :value + | 1217 | '((const :tag "+ " :value + |
| @@ -2138,7 +2137,6 @@ STRING This is ignored for the purposes of calculating | |||
| 2138 | (save-excursion | 2137 | (save-excursion |
| 2139 | (let ((have-result nil) | 2138 | (let ((have-result nil) |
| 2140 | this-kw | 2139 | this-kw |
| 2141 | start | ||
| 2142 | val | 2140 | val |
| 2143 | (result nil) | 2141 | (result nil) |
| 2144 | (align-point nil) | 2142 | (align-point nil) |
| @@ -2209,7 +2207,6 @@ STRING This is ignored for the purposes of calculating | |||
| 2209 | ;; We start off at beginning of this line. | 2207 | ;; We start off at beginning of this line. |
| 2210 | ;; Scan previous statements while this is <= | 2208 | ;; Scan previous statements while this is <= |
| 2211 | ;; start of previous line. | 2209 | ;; start of previous line. |
| 2212 | (setq start (point)) ;; for debug only | ||
| 2213 | (goto-char prev-line-end) | 2210 | (goto-char prev-line-end) |
| 2214 | (setq x t) | 2211 | (setq x t) |
| 2215 | (while (and x (setq x (sh-prev-thing))) | 2212 | (while (and x (setq x (sh-prev-thing))) |
| @@ -2614,7 +2611,7 @@ can be represented by a symbol then do so." | |||
| 2614 | If INFO is supplied it is used, else it is calculated from current line." | 2611 | If INFO is supplied it is used, else it is calculated from current line." |
| 2615 | (let ((ofs 0) | 2612 | (let ((ofs 0) |
| 2616 | (base-value 0) | 2613 | (base-value 0) |
| 2617 | elt a b var val) | 2614 | elt a b val) |
| 2618 | (or info | 2615 | (or info |
| 2619 | (setq info (sh-get-indent-info))) | 2616 | (setq info (sh-get-indent-info))) |
| 2620 | (when info | 2617 | (when info |
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index 976ec202483..dc2773a9efe 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el | |||
| @@ -324,7 +324,7 @@ for SIMULA mode to function correctly." | |||
| 324 | "Keymap used in `simula-mode'.") | 324 | "Keymap used in `simula-mode'.") |
| 325 | 325 | ||
| 326 | ;; menus for Lucid | 326 | ;; menus for Lucid |
| 327 | (defun simula-popup-menu (e) | 327 | (defun simula-popup-menu (_e) |
| 328 | "Pops up the SIMULA menu." | 328 | "Pops up the SIMULA menu." |
| 329 | (interactive "@e") | 329 | (interactive "@e") |
| 330 | (popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu))) | 330 | (popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu))) |
| @@ -1202,9 +1202,8 @@ If COUNT is negative, move backward instead." | |||
| 1202 | ((eq simula-abbrev-keyword 'downcase) (downcase-word -1)) | 1202 | ((eq simula-abbrev-keyword 'downcase) (downcase-word -1)) |
| 1203 | ((eq simula-abbrev-keyword 'capitalize) (capitalize-word -1))) | 1203 | ((eq simula-abbrev-keyword 'capitalize) (capitalize-word -1))) |
| 1204 | (let ((pos (- (point-max) (point))) | 1204 | (let ((pos (- (point-max) (point))) |
| 1205 | (case-fold-search t) | 1205 | (case-fold-search t)) |
| 1206 | null) | 1206 | (condition-case nil |
| 1207 | (condition-case null | ||
| 1208 | (progn | 1207 | (progn |
| 1209 | ;; check if the expanded word is on the beginning of the line. | 1208 | ;; check if the expanded word is on the beginning of the line. |
| 1210 | (if (and (eq (char-syntax (preceding-char)) ?w) | 1209 | (if (and (eq (char-syntax (preceding-char)) ?w) |
| @@ -1244,8 +1243,9 @@ An optional second argument BOUND bounds the search, it is a buffer position. | |||
| 1244 | The match found must not extend after that position. Optional third argument | 1243 | The match found must not extend after that position. Optional third argument |
| 1245 | NOERROR, if t, means if fail just return nil (no error). | 1244 | NOERROR, if t, means if fail just return nil (no error). |
| 1246 | If not nil and not t, move to limit of search and return nil." | 1245 | If not nil and not t, move to limit of search and return nil." |
| 1247 | (let (begin end context (comb-regexp (concat regexp "\\|\\<end\\>")) | 1246 | (let ((comb-regexp (concat regexp "\\|\\<end\\>")) |
| 1248 | match (start-point (point))) | 1247 | (start-point (point)) |
| 1248 | context match) | ||
| 1249 | (catch 'simula-backward | 1249 | (catch 'simula-backward |
| 1250 | (while (re-search-backward comb-regexp bound 1) | 1250 | (while (re-search-backward comb-regexp bound 1) |
| 1251 | ;; We have a match, check SIMULA context at match-beginning | 1251 | ;; We have a match, check SIMULA context at match-beginning |
| @@ -1306,8 +1306,9 @@ An optional second argument BOUND bounds the search, it is a buffer position. | |||
| 1306 | The match found must not extend after that position. Optional third argument | 1306 | The match found must not extend after that position. Optional third argument |
| 1307 | NOERROR, if t, means if fail just return nil (no error). | 1307 | NOERROR, if t, means if fail just return nil (no error). |
| 1308 | If not nil and not t, move to limit of search and return nil." | 1308 | If not nil and not t, move to limit of search and return nil." |
| 1309 | (let (begin end context (comb-regexp (concat regexp "\\|\\<begin\\>")) | 1309 | (let ((comb-regexp (concat regexp "\\|\\<begin\\>")) |
| 1310 | match (start-point (point))) | 1310 | (start-point (point)) |
| 1311 | context match) | ||
| 1311 | (catch 'simula-forward | 1312 | (catch 'simula-forward |
| 1312 | (while (re-search-forward comb-regexp bound 1) | 1313 | (while (re-search-forward comb-regexp bound 1) |
| 1313 | ;; We have a match, check SIMULA context at match-beginning | 1314 | ;; We have a match, check SIMULA context at match-beginning |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 1c1ffc41624..facbba60057 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -3540,7 +3540,7 @@ optionally is saved to the user's init file." | |||
| 3540 | (append (list name) | 3540 | (append (list name) |
| 3541 | (sql-for-each-login | 3541 | (sql-for-each-login |
| 3542 | `(product ,@login) | 3542 | `(product ,@login) |
| 3543 | (lambda (token plist) | 3543 | (lambda (token _plist) |
| 3544 | (cond | 3544 | (cond |
| 3545 | ((eq token 'product) `(sql-product ',sql-product)) | 3545 | ((eq token 'product) `(sql-product ',sql-product)) |
| 3546 | ((eq token 'user) `(sql-user ,sql-user)) | 3546 | ((eq token 'user) `(sql-user ,sql-user)) |
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index eb254676469..f18ec5abe81 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -660,7 +660,7 @@ already exist." | |||
| 660 | 660 | ||
| 661 | 661 | ||
| 662 | 662 | ||
| 663 | (defun tcl-indent-command (&optional arg) | 663 | (defun tcl-indent-command (&optional _arg) |
| 664 | "Indent current line as Tcl code, or in some cases insert a tab character. | 664 | "Indent current line as Tcl code, or in some cases insert a tab character. |
| 665 | If `tcl-tab-always-indent' is t (the default), always indent current line. | 665 | If `tcl-tab-always-indent' is t (the default), always indent current line. |
| 666 | If `tcl-tab-always-indent' is nil and point is not in the indentation | 666 | If `tcl-tab-always-indent' is nil and point is not in the indentation |
| @@ -1506,7 +1506,7 @@ The first line is assumed to look like \"#!.../program ...\"." | |||
| 1506 | ;; loading the XEmacs menu emulation code. | 1506 | ;; loading the XEmacs menu emulation code. |
| 1507 | ;; | 1507 | ;; |
| 1508 | 1508 | ||
| 1509 | (defun tcl-popup-menu (e) | 1509 | (defun tcl-popup-menu (_e) |
| 1510 | (interactive "@e") | 1510 | (interactive "@e") |
| 1511 | (popup-menu tcl-mode-menu)) | 1511 | (popup-menu tcl-mode-menu)) |
| 1512 | 1512 | ||
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index f2842721f21..1f33f5f3aaf 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; vera-mode.el --- major mode for editing Vera files. | 1 | ;;; vera-mode.el --- major mode for editing Vera files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1077,7 +1077,7 @@ try to increase performance by using this macro." | |||
| 1077 | (save-excursion | 1077 | (save-excursion |
| 1078 | (beginning-of-line) | 1078 | (beginning-of-line) |
| 1079 | (let ((indent-point (point)) | 1079 | (let ((indent-point (point)) |
| 1080 | syntax state placeholder pos) | 1080 | syntax state placeholder) |
| 1081 | ;; determine syntax state | 1081 | ;; determine syntax state |
| 1082 | (setq state (parse-partial-sexp (point-min) (point))) | 1082 | (setq state (parse-partial-sexp (point-min) (point))) |
| 1083 | (cond | 1083 | (cond |
| @@ -1240,7 +1240,7 @@ Calls `indent-region' for whole buffer." | |||
| 1240 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1240 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1241 | ;; electrifications | 1241 | ;; electrifications |
| 1242 | 1242 | ||
| 1243 | (defun vera-electric-tab (&optional prefix-arg) | 1243 | (defun vera-electric-tab (&optional prefix) |
| 1244 | "Do what I mean (indent, expand, tab, change indent, etc..). | 1244 | "Do what I mean (indent, expand, tab, change indent, etc..). |
| 1245 | If preceding character is part of a word or a paren then `hippie-expand', | 1245 | If preceding character is part of a word or a paren then `hippie-expand', |
| 1246 | else if right of non whitespace on line then `tab-to-tab-stop', | 1246 | else if right of non whitespace on line then `tab-to-tab-stop', |
| @@ -1260,7 +1260,7 @@ If `vera-intelligent-tab' is nil, always indent line." | |||
| 1260 | (or (and (boundp 'hippie-expand-only-buffers) | 1260 | (or (and (boundp 'hippie-expand-only-buffers) |
| 1261 | hippie-expand-only-buffers) | 1261 | hippie-expand-only-buffers) |
| 1262 | '(vera-mode)))) | 1262 | '(vera-mode)))) |
| 1263 | (vera-expand-abbrev prefix-arg))) | 1263 | (vera-expand-abbrev prefix))) |
| 1264 | ((> (current-column) (current-indentation)) | 1264 | ((> (current-column) (current-indentation)) |
| 1265 | (tab-to-tab-stop)) | 1265 | (tab-to-tab-stop)) |
| 1266 | ((and (or (eq last-command 'vera-electric-tab) | 1266 | ((and (or (eq last-command 'vera-electric-tab) |
| @@ -1402,7 +1402,7 @@ If `vera-intelligent-tab' is nil, always indent line." | |||
| 1402 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1402 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1403 | ;; Comments | 1403 | ;; Comments |
| 1404 | 1404 | ||
| 1405 | (defun vera-comment-uncomment-region (beg end &optional arg) | 1405 | (defun vera-comment-uncomment-region (beg end &optional _arg) |
| 1406 | "Comment region if not commented, uncomment region if already commented." | 1406 | "Comment region if not commented, uncomment region if already commented." |
| 1407 | (interactive "r\nP") | 1407 | (interactive "r\nP") |
| 1408 | (goto-char beg) | 1408 | (goto-char beg) |
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index cd50174f8cd..dfa91b3fe30 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -511,7 +511,7 @@ Commands: | |||
| 511 | (interactive) | 511 | (interactive) |
| 512 | (xscheme-send-char last-command-event)) | 512 | (xscheme-send-char last-command-event)) |
| 513 | 513 | ||
| 514 | (defun xscheme-enter-debugger-mode (prompt-string) | 514 | (defun xscheme-enter-debugger-mode (_prompt-string) |
| 515 | (with-current-buffer (xscheme-process-buffer) | 515 | (with-current-buffer (xscheme-process-buffer) |
| 516 | (if (not (derived-mode-p 'scheme-debugger-mode)) | 516 | (if (not (derived-mode-p 'scheme-debugger-mode)) |
| 517 | (progn | 517 | (progn |
| @@ -1024,8 +1024,7 @@ the remaining input.") | |||
| 1024 | (xscheme-goto-output-point) | 1024 | (xscheme-goto-output-point) |
| 1025 | (let ((old-point (point))) | 1025 | (let ((old-point (point))) |
| 1026 | (while (string-match "\\(\007\\|\f\\)" string) | 1026 | (while (string-match "\\(\007\\|\f\\)" string) |
| 1027 | (let ((start (match-beginning 0)) | 1027 | (let ((start (match-beginning 0))) |
| 1028 | (end (match-end 0))) | ||
| 1029 | (insert-before-markers (substring string 0 start)) | 1028 | (insert-before-markers (substring string 0 start)) |
| 1030 | (if (= ?\f (aref string start)) | 1029 | (if (= ?\f (aref string start)) |
| 1031 | (progn | 1030 | (progn |