mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
lisp/progmodes/*.el: Lexical-binding cleanup.
This commit is contained in:
parent
7ede3b6577
commit
e02f48d76b
36 changed files with 456 additions and 307 deletions
158
lisp/ChangeLog
158
lisp/ChangeLog
|
|
@ -1,3 +1,161 @@
|
|||
2011-04-22 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
Lexical-binding cleanup.
|
||||
|
||||
* progmodes/ada-mode.el (ada-after-change-function, ada-loose-case-word)
|
||||
(ada-no-auto-case, ada-capitalize-word, ada-untab, ada-narrow-to-defun):
|
||||
* progmodes/ada-prj.el (ada-prj-initialize-values)
|
||||
(ada-prj-display-page, ada-prj-field-modified, ada-prj-display-help)
|
||||
(ada-prj-show-value):
|
||||
* progmodes/ada-xref.el (ada-find-any-references, ada-gdb-application):
|
||||
* progmodes/antlr-mode.el (antlr-with-displaying-help-buffer)
|
||||
(antlr-invalidate-context-cache, antlr-options-menu-filter)
|
||||
(antlr-language-option-extra, antlr-c++-mode-extra, antlr-run-tool):
|
||||
* progmodes/bug-reference.el (bug-reference-push-button):
|
||||
* progmodes/fortran.el (fortran-line-length):
|
||||
* progmodes/glasses.el (glasses-change):
|
||||
* progmodes/octave-mod.el (octave-fill-paragraph):
|
||||
* progmodes/python.el (python-mode, python-pdbtrack-track-stack-file)
|
||||
(python-pdbtrack-grub-for-buffer, python-sentinel):
|
||||
* progmodes/sql.el (sql-save-connection):
|
||||
* progmodes/tcl.el (tcl-indent-command, tcl-popup-menu):
|
||||
* progmodes/xscheme.el (xscheme-enter-debugger-mode):
|
||||
Mark unused parameters.
|
||||
|
||||
* progmodes/compile.el (compilation--flush-directory-cache)
|
||||
(compilation--flush-parse, compile-internal): Mark unused parameters.
|
||||
(compilation-buffer-name): Rename parameter MODE-NAME to NAME-OF-MODE.
|
||||
(compilation-next-error-function): Remove unused variable `timestamp'.
|
||||
|
||||
* progmodes/cpp.el (cpp-parse-close): Remove unused variable `begin'.
|
||||
(cpp-signal-read-only, cpp-grow-overlay): Mark unused parameters.
|
||||
|
||||
* progmodes/dcl-mode.el (dcl-end-of-command):
|
||||
Remove unused variable `start'.
|
||||
(dcl-calc-command-indent-multiple, dcl-calc-cont-indent-relative)
|
||||
(dcl-option-value-basic, dcl-option-value-offset)
|
||||
(dcl-option-value-margin-offset, dcl-option-value-comment-line):
|
||||
Mark unused parameters.
|
||||
(dcl-save-local-variable): Remove unused variable `val'.
|
||||
(mode): Declare.
|
||||
|
||||
* progmodes/delphi.el (delphi-save-state, delphi-after-change):
|
||||
Mark unused parameters.
|
||||
(delphi-ignore-changes): Move before first use.
|
||||
(delphi-charset-token-at): Remove unused variable `start'.
|
||||
(delphi-else-start): Remove unused variable `if-count'.
|
||||
(delphi-comment-block-start, delphi-comment-block-end):
|
||||
Remove unused variable `kind'.
|
||||
(delphi-indent-line): Remove unused variable `new-point'.
|
||||
|
||||
* progmodes/ebrowse.el (ebrowse-files-list)
|
||||
(ebrowse-list-of-matching-members, ebrowse-tags-list-members-in-file):
|
||||
Mark unused parameters. Don't quote `lambda'.
|
||||
(ebrowse-sort-tree-list, ebrowse-same-tree-member-buffer-list):
|
||||
Don't quote `lambda'.
|
||||
(ebrowse-revert-tree-buffer-from-file, ebrowse-tags-choose-class)
|
||||
(ebrowse-goto-visible-member/all-member-lists): Mark unused parameters.
|
||||
(ebrowse-create-tree-buffer): Rename parameter OBARRAY to CLASSES.
|
||||
(ebrowse-toggle-mark-at-point): Remove unused variable `pnt'.
|
||||
Use `ignore-errors'.
|
||||
(ebrowse-frozen-tree-buffer-name, ebrowse-find-source-file)
|
||||
(ebrowse-view/find-file-and-search-pattern)
|
||||
(ebrowse-view/find-member-declaration/definition):
|
||||
Rename parameter TAGS-FILE-NAME to TAGS-FILE.
|
||||
(ebrowse-find-class-declaration, ebrowse-view-class-declaration):
|
||||
Rename parameter PREFIX-ARG to PREFIX.
|
||||
(ebrowse-tags-read-name): Remove unused variables `start' and
|
||||
`member-info'.
|
||||
(ebrowse-display-member-buffer): Rename variable `tags-file-name'
|
||||
to `tags-file'.
|
||||
|
||||
* progmodes/etags.el (local-find-tag-hook): Declare.
|
||||
(tag-partial-file-name-match-p, tag-any-match-p, list-tags):
|
||||
Mark unused parameters.
|
||||
|
||||
* progmodes/executable.el (compilation-error-regexp-alist): Declare.
|
||||
(executable-interpret): Mark unused parameter.
|
||||
|
||||
* progmodes/flymake.el (flymake-process-sentinel)
|
||||
(flymake-after-change-function)
|
||||
(flymake-create-temp-with-folder-structure)
|
||||
(flymake-get-include-dirs-dot): Mark unused parameters.
|
||||
(flymake-safe-delete-directory): Remove unused variable `err'.
|
||||
|
||||
* progmodes/gdb-mi.el (speedbar-change-initial-expansion-list)
|
||||
(speedbar-timer-fn, speedbar-line-text)
|
||||
(speedbar-change-expand-button-char, speedbar-delete-subblock)
|
||||
(speedbar-center-buffer-smartly): Declare functions.
|
||||
(gdb-find-watch-expression): Remove unused variable `array'.
|
||||
(gdb-edit-value, gdb-gdb, gdb-ignored-notification, gdb-thread-created)
|
||||
(gdb-starting): Mark unused parameters.
|
||||
(gud-gdbmi-marker-filter): Remove unused variable `output-record'.
|
||||
(gdb-table-string): Remove unused variable `res'.
|
||||
(gdb-place-breakpoints): Remove unused variables `flag' and `bptno'.
|
||||
(gdb-disassembly-handler-custom): Remove unused variable `pos'.
|
||||
(gdb-display-buffer): Remove unused variable `cur-size'.
|
||||
|
||||
* progmodes/gud.el (gud-def): Use `defalias' instead of `defun' to
|
||||
allow lexical-binding compilation.
|
||||
(gud-expansion-speedbar-buttons, gud-gdb-goto-stackframe)
|
||||
(gud-dbx-massage-args, gud-xdb-massage-args, gud-perldb-massage-args)
|
||||
(gud-jdb-massage-args, gud-jdb-find-source, gud-find-class):
|
||||
Mark unused parameters.
|
||||
(gud-gdb-marker-filter): Remove unused variable `match'.
|
||||
(gud-find-class): Bind `syntax-symbol' and `syntax-point' to suitable
|
||||
lambda expressions and funcall them, instead of using `fset'.
|
||||
|
||||
* progmodes/hideif.el (hif-parse-if-exp): Rename parameter
|
||||
HIF-TOKEN-LIST to TOKEN-LIST and let-bind `hif-token-list'.
|
||||
|
||||
* progmodes/hideshow.el (hs-hide-block-at-point): Remove unused
|
||||
variable `header-beg'; use `let'.
|
||||
|
||||
* progmodes/icon.el (indent-icon-exp): Remove unused variables
|
||||
`restart', `last-sexp' and `at-do'.
|
||||
|
||||
* progmodes/js.el (js--debug): Mark unused parameter.
|
||||
(js--parse-state-at-point): Remove unused variable `bound'; use `let'.
|
||||
(js--splice-into-items): Remove unused variable `item'.
|
||||
(js--read-symbol, js--read-tab): Pass 1/-1 to `ido-mode', not t/nil.
|
||||
|
||||
* progmodes/make-mode.el (makefile-make-font-lock-keywords):
|
||||
Rename parameter FONT-LOCK-KEYWORDS to FL-KEYWORDS.
|
||||
(makefile-complete): Remove unused variable `try'.
|
||||
(makefile-fill-paragraph, makefile-match-function-end):
|
||||
Mark unused parameters.
|
||||
|
||||
* progmodes/octave-inf.el (inferior-octave-complete):
|
||||
Remove unused variable `proc'.
|
||||
(inferior-octave-output-digest): Mark unused parameter.
|
||||
|
||||
* progmodes/perl-mode.el (perl-calculate-indent):
|
||||
Remove unused variable `err'.
|
||||
|
||||
* progmodes/prolog.el (prolog-mode-keybindings-inferior)
|
||||
(prolog-indent-line): Mark unused parameters.
|
||||
(prolog-indent-line): Remove unused variable `beg'.
|
||||
|
||||
* progmodes/ps-mode.el (reporter-prompt-for-summary-p)
|
||||
(reporter-dont-compact-list): Declare.
|
||||
|
||||
* progmodes/sh-script.el (sh-font-lock-quoted-subshell):
|
||||
Remove unused variable `char'.
|
||||
(sh-debug): Mark unused parameter.
|
||||
(sh-get-indent-info): Remove unused variable `start'.
|
||||
(sh-calculate-indent): Remove unused variable `var'.
|
||||
|
||||
* progmodes/simula.el (simula-popup-menu): Mark unused parameter.
|
||||
(simula-electric-keyword): Remove unused variable `null'.
|
||||
(simula-search-backward, simula-search-forward): Remove unused
|
||||
variables `begin' and `end'.
|
||||
|
||||
* progmodes/vera-mode.el (vera-guess-basic-syntax):
|
||||
Remove unused variable `pos'.
|
||||
(vera-electric-tab, vera-comment-uncomment-region):
|
||||
Mark unused parameters.
|
||||
(vera-electric-tab): Rename parameter PREFIX-ARG to PREFIX.
|
||||
|
||||
2011-04-22 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* emacs-lisp/package.el (package--builtins, package-alist)
|
||||
|
|
|
|||
|
|
@ -966,7 +966,7 @@ are treated as numbers instead of gnatprep comments."
|
|||
(unless modified
|
||||
(restore-buffer-modified-p nil))))
|
||||
|
||||
(defun ada-after-change-function (beg end old-len)
|
||||
(defun ada-after-change-function (beg end _old-len)
|
||||
"Called when the region between BEG and END was changed in the buffer.
|
||||
OLD-LEN indicates what the length of the replaced text was."
|
||||
(save-excursion
|
||||
|
|
@ -1675,7 +1675,7 @@ ARG is the prefix the user entered with \\[universal-argument]."
|
|||
'( ?` ?_ ?# ?% ?& ?* ?( ?) ?- ?= ?+
|
||||
?| ?\; ?: ?' ?\" ?< ?, ?. ?> ?/ ?\n 32 ?\r )))
|
||||
|
||||
(defun ada-loose-case-word (&optional arg)
|
||||
(defun ada-loose-case-word (&optional _arg)
|
||||
"Upcase first letter and letters following `_' in the following word.
|
||||
No other letter is modified.
|
||||
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."
|
|||
(insert-char (upcase (following-char)) 1)
|
||||
(delete-char 1)))))
|
||||
|
||||
(defun ada-no-auto-case (&optional arg)
|
||||
(defun ada-no-auto-case (&optional _arg)
|
||||
"Do nothing. ARG is ignored.
|
||||
This function can be used for the auto-casing variables in Ada mode, to
|
||||
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.
|
|||
See also `ada-auto-case' to disable auto casing altogether."
|
||||
nil)
|
||||
|
||||
(defun ada-capitalize-word (&optional arg)
|
||||
(defun ada-capitalize-word (&optional _arg)
|
||||
"Upcase first letter and letters following '_', lower case other letters.
|
||||
ARG is ignored, and is there for compatibility with `capitalize-word' only."
|
||||
(interactive)
|
||||
|
|
@ -4219,7 +4219,7 @@ of the region. Otherwise, operate only on the current line."
|
|||
((eq ada-tab-policy 'always-tab) (error "Not implemented"))
|
||||
))
|
||||
|
||||
(defun ada-untab (arg)
|
||||
(defun ada-untab (_arg)
|
||||
"Delete leading indenting according to `ada-tab-policy'."
|
||||
;; FIXME: ARG is ignored
|
||||
(interactive "P")
|
||||
|
|
@ -5250,7 +5250,7 @@ Return nil if no body was found."
|
|||
;; Support for narrow-to-region
|
||||
;; ---------------------------------------------------------
|
||||
|
||||
(defun ada-narrow-to-defun (&optional arg)
|
||||
(defun ada-narrow-to-defun (&optional _arg)
|
||||
"Make text outside current subprogram invisible.
|
||||
The subprogram visible is the one that contains or follow point.
|
||||
Optional ARG is ignored.
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ If there is none, opens a new project file."
|
|||
(ada-customize)
|
||||
(ada-prj-new)))
|
||||
|
||||
(defun ada-prj-initialize-values (symbol ada-buffer filename)
|
||||
(defun ada-prj-initialize-values (symbol _ada-buffer filename)
|
||||
"Set SYMBOL to the property list of the project file FILENAME.
|
||||
If FILENAME is null, read the file associated with ADA-BUFFER.
|
||||
If no project file is found, return the default values."
|
||||
|
|
@ -257,19 +257,19 @@ The current buffer must be the project editing buffer."
|
|||
(widget-insert "\n Project configuration.\n
|
||||
___________ ____________ ____________ ____________ ____________\n / ")
|
||||
(widget-create 'push-button :notify
|
||||
(lambda (&rest dummy) (ada-prj-display-page 1)) "General")
|
||||
(lambda (&rest _dummy) (ada-prj-display-page 1)) "General")
|
||||
(widget-insert " \\ / ")
|
||||
(widget-create 'push-button :notify
|
||||
(lambda (&rest dummy) (ada-prj-display-page 2)) "Paths")
|
||||
(lambda (&rest _dummy) (ada-prj-display-page 2)) "Paths")
|
||||
(widget-insert " \\ / ")
|
||||
(widget-create 'push-button :notify
|
||||
(lambda (&rest dummy) (ada-prj-display-page 3)) "Switches")
|
||||
(lambda (&rest _dummy) (ada-prj-display-page 3)) "Switches")
|
||||
(widget-insert " \\ / ")
|
||||
(widget-create 'push-button :notify
|
||||
(lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu")
|
||||
(lambda (&rest _dummy) (ada-prj-display-page 4)) "Ada Menu")
|
||||
(widget-insert " \\ / ")
|
||||
(widget-create 'push-button :notify
|
||||
(lambda (&rest dummy) (ada-prj-display-page 5)) "Debugger")
|
||||
(lambda (&rest _dummy) (ada-prj-display-page 5)) "Debugger")
|
||||
(widget-insert " \\\n")
|
||||
|
||||
;; Display the currently selected page
|
||||
|
|
@ -458,15 +458,15 @@ connect to the target when working with cross-environments" t)
|
|||
|
||||
(widget-insert "______________________________________________________________________\n\n ")
|
||||
(widget-create 'push-button
|
||||
:notify (lambda (&rest ignore)
|
||||
:notify (lambda (&rest _ignore)
|
||||
(setq ada-prj-current-values (ada-default-prj-properties))
|
||||
(ada-prj-display-page 1))
|
||||
"Reset to Default Values")
|
||||
(widget-insert " ")
|
||||
(widget-create 'push-button :notify (lambda (&rest ignore) (kill-buffer nil))
|
||||
(widget-create 'push-button :notify (lambda (&rest _ignore) (kill-buffer nil))
|
||||
"Cancel")
|
||||
(widget-insert " ")
|
||||
(widget-create 'push-button :notify (lambda (&rest ignore) (ada-prj-save))
|
||||
(widget-create 'push-button :notify (lambda (&rest _ignore) (ada-prj-save))
|
||||
"Save")
|
||||
(widget-insert "\n\n")
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ converted to a directory name."
|
|||
ada-list "\n"))
|
||||
|
||||
|
||||
(defun ada-prj-field-modified (widget &rest dummy)
|
||||
(defun ada-prj-field-modified (widget &rest _dummy)
|
||||
"Callback for modification of WIDGET.
|
||||
Remaining args DUMMY are ignored.
|
||||
Save the change in `ada-prj-current-values' so that selecting
|
||||
|
|
@ -556,7 +556,7 @@ another page and coming back keeps the new value."
|
|||
(widget-get widget ':prj-field)
|
||||
(widget-value widget))))
|
||||
|
||||
(defun ada-prj-display-help (widget widget-modified event)
|
||||
(defun ada-prj-display-help (widget _widget-modified event)
|
||||
"Callback for help button in WIDGET.
|
||||
Parameters WIDGET-MODIFIED, EVENT match :notify for the widget."
|
||||
(let ((text (widget-get widget 'prj-help)))
|
||||
|
|
@ -572,7 +572,7 @@ Parameters WIDGET-MODIFIED, EVENT match :notify for the widget."
|
|||
(concat "*****Help*****\n" text "\n**************\n")
|
||||
(point-at-bol 2)))))
|
||||
|
||||
(defun ada-prj-show-value (widget widget-modified event)
|
||||
(defun ada-prj-show-value (widget _widget-modified event)
|
||||
"Show the current field value in WIDGET.
|
||||
Parameters WIDGET-MODIFIED, EVENT match :notify for the widget."
|
||||
(let* ((field (widget-get widget ':prj-field))
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ existing buffer `*gnatfind*', if there is one."
|
|||
(setq old-contents (buffer-string))))
|
||||
|
||||
(let ((compilation-error "reference"))
|
||||
(compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name)))
|
||||
(compilation-start command 'compilation-mode (lambda (_mode) ada-gnatfind-buffer-name)))
|
||||
|
||||
;; Hide the "Compilation" menu
|
||||
(with-current-buffer ada-gnatfind-buffer-name
|
||||
|
|
@ -1384,7 +1384,7 @@ project file."
|
|||
|
||||
;; Do not add -fullname, since we can have a 'rsh' command in front.
|
||||
;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef
|
||||
(fset 'gud-gdb-massage-args (lambda (file args) args))
|
||||
(fset 'gud-gdb-massage-args (lambda (_file args) args))
|
||||
|
||||
(set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
|
||||
(if (not (equal pre-cmd ""))
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
||||
(require 'easymenu)
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
(declare-function cond-emacs-xemacs-macfn "antlr-mode" (args &optional msg))
|
||||
|
||||
;; General Emacs/XEmacs-compatibility compile-time macros
|
||||
(eval-when-compile
|
||||
(eval-when-compile
|
||||
(defmacro cond-emacs-xemacs (&rest args)
|
||||
(cond-emacs-xemacs-macfn
|
||||
args "`cond-emacs-xemacs' must return exactly one element"))
|
||||
|
|
@ -1073,7 +1073,7 @@ Used for `antlr-slow-syntactic-context'.")
|
|||
(read-from-minibuffer prompt initial-input nil nil
|
||||
(or history 'shell-command-history)))
|
||||
|
||||
(defunx antlr-with-displaying-help-buffer (thunk &optional name)
|
||||
(defunx antlr-with-displaying-help-buffer (thunk &optional _name)
|
||||
:xemacs-and-try with-displaying-help-buffer
|
||||
"Make a help buffer and call `thunk' there."
|
||||
(with-output-to-temp-buffer "*Help*"
|
||||
|
|
@ -1092,7 +1092,7 @@ Used for `antlr-slow-syntactic-context'.")
|
|||
;;;(defvar antlr-statistics-cache 0)
|
||||
;;;(defvar antlr-statistics-inval 0)
|
||||
|
||||
(defunx antlr-invalidate-context-cache (&rest dummies)
|
||||
(defunx antlr-invalidate-context-cache (&rest _dummies)
|
||||
;; checkdoc-params: (dummies)
|
||||
"Invalidate context cache for syntactical context information."
|
||||
:XEMACS ; XEmacs bug workaround
|
||||
|
|
@ -1670,7 +1670,7 @@ Return \(LEVEL OPTION LOCATION)."
|
|||
table)))
|
||||
(list level input (cdr kind))))))
|
||||
|
||||
(defun antlr-options-menu-filter (level menu-items)
|
||||
(defun antlr-options-menu-filter (level _menu-items)
|
||||
"Return items for options submenu of level LEVEL."
|
||||
;; checkdoc-params: (menu-items)
|
||||
(let ((active (if buffer-read-only
|
||||
|
|
@ -2072,7 +2072,7 @@ Used inside `antlr-options-alists'."
|
|||
nil
|
||||
table '(("false") ("true"))))
|
||||
|
||||
(defun antlr-language-option-extra (phase &rest dummies)
|
||||
(defun antlr-language-option-extra (phase &rest _dummies)
|
||||
;; checkdoc-params: (dummies)
|
||||
"Change language according to the new value of the \"language\" option.
|
||||
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'."
|
|||
(antlr-mode)
|
||||
(and font-lock (null font-lock-mode) (font-lock-mode 1)))))))
|
||||
|
||||
(defun antlr-c++-mode-extra (phase option &rest dummies)
|
||||
(defun antlr-c++-mode-extra (phase option &rest _dummies)
|
||||
;; checkdoc-params: (option dummies)
|
||||
"Warn if C++ option is used with the wrong language.
|
||||
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
|
|||
(or saved (save-some-buffers (not antlr-ask-about-save)))
|
||||
(let ((default-directory (file-name-directory file)))
|
||||
(compilation-start (concat command " " (file-name-nondirectory file))
|
||||
nil #'(lambda (mode-name) "*Antlr-Run*"))))
|
||||
nil (lambda (_mode-name) "*Antlr-Run*"))))
|
||||
|
||||
(defun antlr-run-tool-interactive ()
|
||||
;; code in `interactive' is not compiled
|
||||
|
|
@ -2592,7 +2592,7 @@ the default language."
|
|||
;; FIXME: Since it uses cc-mode, it bumps into c-update-modeline's
|
||||
;; limitation to mode-name being a string.
|
||||
;; '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist))))
|
||||
"Antlr"
|
||||
"Antlr"
|
||||
"Major mode for editing ANTLR grammar files."
|
||||
:abbrev-table antlr-mode-abbrev-table
|
||||
(c-initialize-cc-mode) ; cc-mode is required
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
"Keymap for Asm mode.")
|
||||
|
||||
(defconst asm-font-lock-keywords
|
||||
(append
|
||||
(append
|
||||
'(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?"
|
||||
(1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
|
||||
;; label started from ".".
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ so that it is considered safe, see `enable-local-variables'.")
|
|||
(funcall bug-reference-url-format))))))))))
|
||||
|
||||
;; Taken from button.el.
|
||||
(defun bug-reference-push-button (&optional pos use-mouse-action)
|
||||
(defun bug-reference-push-button (&optional pos _use-mouse-action)
|
||||
"Open URL corresponding to the bug reference at POS."
|
||||
(interactive
|
||||
(list (if (integerp last-command-event) (point) last-command-event)))
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ returned RES, i.e. there is no change of `compilation-directory' between
|
|||
POS and RES.")
|
||||
(make-variable-buffer-local 'compilation--previous-directory-cache)
|
||||
|
||||
(defun compilation--flush-directory-cache (start end)
|
||||
(defun compilation--flush-directory-cache (start _end)
|
||||
(cond
|
||||
((or (not compilation--previous-directory-cache)
|
||||
(<= (car compilation--previous-directory-cache) start)))
|
||||
|
|
@ -1307,7 +1307,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
|
|||
(compilation--parse-region (point) compilation--parsed)))))
|
||||
nil)
|
||||
|
||||
(defun compilation--flush-parse (start end)
|
||||
(defun compilation--flush-parse (start _end)
|
||||
"Mark the region between START and END for re-parsing."
|
||||
(if (markerp compilation--parsed)
|
||||
(move-marker compilation--parsed (min start compilation--parsed))))
|
||||
|
|
@ -1399,31 +1399,31 @@ point on its location in the *compilation* buffer."
|
|||
:group 'compilation)
|
||||
|
||||
|
||||
(defun compilation-buffer-name (mode-name mode-command name-function)
|
||||
(defun compilation-buffer-name (name-of-mode mode-command name-function)
|
||||
"Return the name of a compilation buffer to use.
|
||||
If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME
|
||||
If NAME-FUNCTION is non-nil, call it with one argument NAME-OF-MODE
|
||||
to determine the buffer name.
|
||||
Likewise if `compilation-buffer-name-function' is non-nil.
|
||||
If current buffer has the major mode MODE-COMMAND,
|
||||
return the name of the current buffer, so that it gets reused.
|
||||
Otherwise, construct a buffer name from MODE-NAME."
|
||||
Otherwise, construct a buffer name from NAME-OF-MODE."
|
||||
(cond (name-function
|
||||
(funcall name-function mode-name))
|
||||
(funcall name-function name-of-mode))
|
||||
(compilation-buffer-name-function
|
||||
(funcall compilation-buffer-name-function mode-name))
|
||||
(funcall compilation-buffer-name-function name-of-mode))
|
||||
((eq mode-command major-mode)
|
||||
(buffer-name))
|
||||
(t
|
||||
(concat "*" (downcase mode-name) "*"))))
|
||||
(concat "*" (downcase name-of-mode) "*"))))
|
||||
|
||||
;; This is a rough emulation of the old hack, until the transition to new
|
||||
;; compile is complete.
|
||||
(defun compile-internal (command error-message
|
||||
&optional name-of-mode parser
|
||||
&optional _name-of-mode parser
|
||||
error-regexp-alist name-function
|
||||
enter-regexp-alist leave-regexp-alist
|
||||
file-regexp-alist nomessage-regexp-alist
|
||||
no-async highlight-regexp local-map)
|
||||
_enter-regexp-alist _leave-regexp-alist
|
||||
file-regexp-alist _nomessage-regexp-alist
|
||||
_no-async highlight-regexp _local-map)
|
||||
(if parser
|
||||
(error "Compile now works very differently, see `compilation-error-regexp-alist'"))
|
||||
(let ((compilation-error-regexp-alist
|
||||
|
|
@ -2229,7 +2229,7 @@ This is the value of `next-error-function' in Compilation buffers."
|
|||
(when reset
|
||||
(setq compilation-current-error nil))
|
||||
(let* ((columns compilation-error-screen-columns) ; buffer's local value
|
||||
(last 1) timestamp
|
||||
(last 1)
|
||||
(msg (compilation-next-error (or n 1) nil
|
||||
(or compilation-current-error
|
||||
compilation-messages-start
|
||||
|
|
|
|||
|
|
@ -308,7 +308,6 @@ A prefix arg suppresses display of that buffer."
|
|||
;; Pop top of cpp-state-stack and create overlay.
|
||||
(let ((entry (assoc (nth 1 (car cpp-state-stack)) cpp-edit-list))
|
||||
(branch (nth 0 (car cpp-state-stack)))
|
||||
(begin (nth 2 (car cpp-state-stack)))
|
||||
(end (nth 3 (car cpp-state-stack))))
|
||||
(setq cpp-state-stack (cdr cpp-state-stack))
|
||||
(if entry
|
||||
|
|
@ -398,7 +397,7 @@ A prefix arg suppresses display of that buffer."
|
|||
(overlay-put overlay 'insert-in-front-hooks '(cpp-grow-overlay))
|
||||
(overlay-put overlay 'insert-behind-hooks '(cpp-grow-overlay)))
|
||||
|
||||
(defun cpp-signal-read-only (overlay after start end &optional len)
|
||||
(defun cpp-signal-read-only (overlay after start end &optional _len)
|
||||
;; Only allow deleting the whole overlay.
|
||||
;; Trying to change a read-only overlay.
|
||||
(if (and (not after)
|
||||
|
|
@ -406,7 +405,7 @@ A prefix arg suppresses display of that buffer."
|
|||
(> (overlay-end overlay) end)))
|
||||
(error "This text is read only")))
|
||||
|
||||
(defun cpp-grow-overlay (overlay after start end &optional len)
|
||||
(defun cpp-grow-overlay (overlay after start end &optional _len)
|
||||
;; Make OVERLAY grow to contain range START to END.
|
||||
(if after
|
||||
(move-overlay overlay
|
||||
|
|
|
|||
|
|
@ -662,8 +662,7 @@ There is some minimal font-lock support (see vars
|
|||
(defun dcl-end-of-command ()
|
||||
"Move point to end of current command or next command if not on a command."
|
||||
(interactive)
|
||||
(let ((type (dcl-get-line-type))
|
||||
(start (point)))
|
||||
(let ((type (dcl-get-line-type)))
|
||||
(if (or (eq type '$)
|
||||
(eq type '-))
|
||||
(progn
|
||||
|
|
@ -941,7 +940,7 @@ Returns one of the following symbols:
|
|||
|
||||
;;;---------------------------------------------------------------------------
|
||||
(defun dcl-calc-command-indent-multiple
|
||||
(indent-type cur-indent extra-indent last-point this-point)
|
||||
(indent-type cur-indent extra-indent _last-point _this-point)
|
||||
"Indent lines to a multiple of dcl-basic-offset.
|
||||
|
||||
Set dcl-calc-command-indent-function to this function to customize
|
||||
|
|
@ -1185,7 +1184,7 @@ The indent-type classification could probably be expanded upon.
|
|||
|
||||
|
||||
;;;---------------------------------------------------------------------------
|
||||
(defun dcl-calc-cont-indent-relative (cur-indent extra-indent)
|
||||
(defun dcl-calc-cont-indent-relative (_cur-indent _extra-indent)
|
||||
"Indent continuation lines to align with words on previous line.
|
||||
|
||||
Indent continuation lines to a position relative to preceding
|
||||
|
|
@ -1540,7 +1539,7 @@ Also remove the continuation mark if easily detected."
|
|||
|
||||
|
||||
;;;-------------------------------------------------------------------------
|
||||
(defun dcl-option-value-basic (option-assoc)
|
||||
(defun dcl-option-value-basic (_option-assoc)
|
||||
"Guess a value for basic-offset."
|
||||
(save-excursion
|
||||
(dcl-beginning-of-command)
|
||||
|
|
@ -1575,7 +1574,7 @@ Also remove the continuation mark if easily detected."
|
|||
|
||||
|
||||
;;;-------------------------------------------------------------------------
|
||||
(defun dcl-option-value-offset (option-assoc)
|
||||
(defun dcl-option-value-offset (_option-assoc)
|
||||
"Guess a value for an offset.
|
||||
Find the column of the first non-blank character on the line.
|
||||
Returns the column offset."
|
||||
|
|
@ -1586,7 +1585,7 @@ Returns the column offset."
|
|||
|
||||
|
||||
;;;-------------------------------------------------------------------------
|
||||
(defun dcl-option-value-margin-offset (option-assoc)
|
||||
(defun dcl-option-value-margin-offset (_option-assoc)
|
||||
"Guess a value for margin offset.
|
||||
Find the column of the first non-blank character on the line, not
|
||||
counting labels.
|
||||
|
|
@ -1598,7 +1597,7 @@ Returns a number as a string."
|
|||
|
||||
|
||||
;;;-------------------------------------------------------------------------
|
||||
(defun dcl-option-value-comment-line (option-assoc)
|
||||
(defun dcl-option-value-comment-line (_option-assoc)
|
||||
"Guess a value for `dcl-comment-line-regexp'.
|
||||
Must return a string."
|
||||
;; 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
|
|||
(if (eolp) (error "Missing colon in local variables entry"))
|
||||
(skip-chars-backward " \t")
|
||||
(let* ((str (buffer-substring beg (point)))
|
||||
(found-var (read str))
|
||||
val)
|
||||
(found-var (read str)))
|
||||
;; Setting variable named "end" means end of list.
|
||||
(if (string-equal (downcase str) "end")
|
||||
(progn
|
||||
|
|
@ -1895,6 +1893,10 @@ section at the end of the current buffer."
|
|||
|
||||
|
||||
;;;-------------------------------------------------------------------------
|
||||
(with-no-warnings
|
||||
;; Dynamically bound in `dcl-save-mode'.
|
||||
(defvar mode))
|
||||
|
||||
(defun dcl-save-mode ()
|
||||
"Save the current mode for this buffer.
|
||||
Save the current mode in a `Local Variables:'
|
||||
|
|
@ -1902,7 +1904,7 @@ section at the end of the current buffer."
|
|||
(interactive)
|
||||
(let ((mode (prin1-to-string major-mode)))
|
||||
(if (string-match "-mode$" mode)
|
||||
(let ((mode (intern (substring mode 0 (match-beginning 0)))))
|
||||
(let ((mode (intern (substring mode 0 (match-beginning 0)))))
|
||||
(dcl-save-option 'mode))
|
||||
(message "Strange mode: %s" mode))))
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ routine.")
|
|||
(after-change-functions nil)
|
||||
(modified (buffer-modified-p)))
|
||||
;; Disable any queries about editing obsolete files.
|
||||
(fset 'ask-user-about-supersession-threat (lambda (fn)))
|
||||
(fset 'ask-user-about-supersession-threat (lambda (_fn)))
|
||||
(unwind-protect
|
||||
(progn ,@forms)
|
||||
(set-buffer-modified-p modified)
|
||||
|
|
@ -444,6 +444,12 @@ routine.")
|
|||
(goto-char curr-point)
|
||||
next))
|
||||
|
||||
(defvar delphi-ignore-changes t
|
||||
"Internal flag to control if the Delphi mode responds to buffer changes.
|
||||
Defaults to t in case the `delphi-after-change' function is called on a
|
||||
non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
|
||||
(let ((delphi-ignore-changes t)) ...)")
|
||||
|
||||
(defun delphi-set-text-properties (from to properties)
|
||||
;; Like `set-text-properties', except we do not consider this to be a buffer
|
||||
;; modification.
|
||||
|
|
@ -590,7 +596,6 @@ routine.")
|
|||
;; character set.
|
||||
(let ((currp (point))
|
||||
(end nil)
|
||||
(start nil)
|
||||
(token nil))
|
||||
(goto-char p)
|
||||
(when (> (skip-chars-forward charset) 0)
|
||||
|
|
@ -720,13 +725,7 @@ routine.")
|
|||
(delphi-step-progress p "Fontifying" delphi-fontifying-progress-step))
|
||||
(delphi-progress-done)))))
|
||||
|
||||
(defvar delphi-ignore-changes t
|
||||
"Internal flag to control if the Delphi mode responds to buffer changes.
|
||||
Defaults to t in case the `delphi-after-change' function is called on a
|
||||
non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
|
||||
(let ((delphi-ignore-changes t)) ...)")
|
||||
|
||||
(defun delphi-after-change (change-start change-end old-length)
|
||||
(defun delphi-after-change (change-start change-end _old-length)
|
||||
;; Called when the buffer has changed. Reparses the changed region.
|
||||
(unless delphi-ignore-changes
|
||||
(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:
|
|||
;; Returns the token of the if or case statement.
|
||||
(let ((token (delphi-previous-token from-else))
|
||||
(token-kind nil)
|
||||
(semicolon-count 0)
|
||||
(if-count 0))
|
||||
(semicolon-count 0))
|
||||
(catch 'done
|
||||
(while token
|
||||
(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:
|
|||
comment
|
||||
;; Scan until we run out of // comments.
|
||||
(let ((prev-comment comment)
|
||||
(start-comment comment)
|
||||
(kind nil))
|
||||
(start-comment comment))
|
||||
(while (let ((kind (delphi-token-kind prev-comment)))
|
||||
(cond ((eq kind 'space))
|
||||
((eq kind 'comment-single-line)
|
||||
|
|
@ -989,8 +986,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
|
|||
comment
|
||||
;; Scan until we run out of // comments.
|
||||
(let ((next-comment comment)
|
||||
(end-comment comment)
|
||||
(kind nil))
|
||||
(end-comment comment))
|
||||
(while (let ((kind (delphi-token-kind next-comment)))
|
||||
(cond ((eq kind 'space))
|
||||
((eq kind 'comment-single-line)
|
||||
|
|
@ -1527,7 +1523,6 @@ If before the indent, the point is moved to the indent."
|
|||
(interactive)
|
||||
(delphi-save-match-data
|
||||
(let ((marked-point (point-marker)) ; Maintain our position reliably.
|
||||
(new-point nil)
|
||||
(line-start nil)
|
||||
(old-indent 0)
|
||||
(new-indent 0))
|
||||
|
|
|
|||
|
|
@ -736,7 +736,7 @@ MARKED-ONLY non-nil means include marked classes only."
|
|||
"Return a list containing all files mentioned in a tree.
|
||||
MARKED-ONLY non-nil means include marked classes only."
|
||||
(let (list)
|
||||
(maphash #'(lambda (file dummy) (setq list (cons file list)))
|
||||
(maphash (lambda (file _dummy) (setq list (cons file list)))
|
||||
(ebrowse-files-table marked-only))
|
||||
list))
|
||||
|
||||
|
|
@ -784,9 +784,9 @@ The class tree is found in the buffer-local variable `ebrowse--tree-obarray'."
|
|||
(defun ebrowse-sort-tree-list (list)
|
||||
"Sort a LIST of `ebrowse-ts' structures by qualified class names."
|
||||
(sort list
|
||||
#'(lambda (a b)
|
||||
(string< (ebrowse-qualified-class-name (ebrowse-ts-class a))
|
||||
(ebrowse-qualified-class-name (ebrowse-ts-class b))))))
|
||||
(lambda (a b)
|
||||
(string< (ebrowse-qualified-class-name (ebrowse-ts-class a))
|
||||
(ebrowse-qualified-class-name (ebrowse-ts-class b))))))
|
||||
|
||||
|
||||
(defun ebrowse-class-in-tree (class tree)
|
||||
|
|
@ -923,7 +923,7 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree."
|
|||
(list header tree)))
|
||||
|
||||
|
||||
(defun ebrowse-revert-tree-buffer-from-file (ignore-auto-save noconfirm)
|
||||
(defun ebrowse-revert-tree-buffer-from-file (_ignore-auto-save noconfirm)
|
||||
"Function installed as `revert-buffer-function' in tree buffers.
|
||||
See that variable's documentation for the meaning of IGNORE-AUTO-SAVE and
|
||||
NOCONFIRM."
|
||||
|
|
@ -937,11 +937,11 @@ NOCONFIRM."
|
|||
(current-buffer)))
|
||||
|
||||
|
||||
(defun ebrowse-create-tree-buffer (tree tags-file header obarray pop)
|
||||
(defun ebrowse-create-tree-buffer (tree tags-file header classes pop)
|
||||
"Create a new tree buffer for tree TREE.
|
||||
The tree was loaded from file TAGS-FILE.
|
||||
HEADER is the header structure of the file.
|
||||
OBARRAY is an obarray with a symbol for each class in the tree.
|
||||
CLASSES is an obarray with a symbol for each class in the tree.
|
||||
POP non-nil means popup the buffer up at the end.
|
||||
Return the buffer created."
|
||||
(let ((name ebrowse-tree-buffer-name))
|
||||
|
|
@ -949,7 +949,7 @@ Return the buffer created."
|
|||
(ebrowse-tree-mode)
|
||||
(setq ebrowse--tree tree
|
||||
ebrowse--tags-file-name tags-file
|
||||
ebrowse--tree-obarray obarray
|
||||
ebrowse--tree-obarray classes
|
||||
ebrowse--header header
|
||||
ebrowse--frozen-flag nil)
|
||||
(ebrowse-redraw-tree)
|
||||
|
|
@ -1215,17 +1215,16 @@ Do not ask for confirmation if FORCED is non-nil."
|
|||
"Toggle mark for class cursor is on.
|
||||
If given a numeric N-TIMES argument, mark that many classes."
|
||||
(interactive "p")
|
||||
(let (to-change pnt)
|
||||
(let (to-change)
|
||||
;; Get the classes whose mark must be toggled. Note that
|
||||
;; ebrowse-tree-at-point might issue an error.
|
||||
(condition-case error
|
||||
(loop repeat (or n-times 1)
|
||||
as tree = (ebrowse-tree-at-point)
|
||||
do (progn
|
||||
(setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree)))
|
||||
(forward-line 1)
|
||||
(push tree to-change)))
|
||||
(error nil))
|
||||
(ignore-errors
|
||||
(loop repeat (or n-times 1)
|
||||
as tree = (ebrowse-tree-at-point)
|
||||
do (progn
|
||||
(setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree)))
|
||||
(forward-line 1)
|
||||
(push tree to-change))))
|
||||
(save-excursion
|
||||
;; For all these classes, reverse the mark char in the display
|
||||
;; by a regexp replace over the whole buffer. The reason for this
|
||||
|
|
@ -1376,9 +1375,9 @@ one buffer. Prefer tree buffers over member buffers."
|
|||
(defun ebrowse-same-tree-member-buffer-list ()
|
||||
"Return a list of members buffers with same tree as current buffer."
|
||||
(ebrowse-delete-if-not
|
||||
#'(lambda (buffer)
|
||||
(eq (ebrowse-value-in-buffer 'ebrowse--tree buffer)
|
||||
ebrowse--tree))
|
||||
(lambda (buffer)
|
||||
(eq (ebrowse-value-in-buffer 'ebrowse--tree buffer)
|
||||
ebrowse--tree))
|
||||
(ebrowse-member-buffer-list)))
|
||||
|
||||
|
||||
|
|
@ -1417,9 +1416,9 @@ If no member buffer exists, make one."
|
|||
when (eq class tree) do (kill-buffer buffer)))
|
||||
|
||||
|
||||
(defun ebrowse-frozen-tree-buffer-name (tags-file-name)
|
||||
"Return the buffer name of a tree which is associated TAGS-FILE-NAME."
|
||||
(concat ebrowse-tree-buffer-name " (" tags-file-name ")"))
|
||||
(defun ebrowse-frozen-tree-buffer-name (tags-file)
|
||||
"Return the buffer name of a tree which is associated TAGS-FILE."
|
||||
(concat ebrowse-tree-buffer-name " (" tags-file ")"))
|
||||
|
||||
|
||||
(defun ebrowse-pop-to-browser-buffer (arg)
|
||||
|
|
@ -1545,41 +1544,41 @@ VIEW non-nil means view it. WHERE is additional position info."
|
|||
where)))
|
||||
|
||||
|
||||
(defun ebrowse-find-class-declaration (prefix-arg)
|
||||
(defun ebrowse-find-class-declaration (prefix)
|
||||
"Find a class declaration and position cursor on it.
|
||||
PREFIX-ARG 4 means find it in another window.
|
||||
PREFIX-ARG 5 means find it in another frame."
|
||||
PREFIX 4 means find it in another window.
|
||||
PREFIX 5 means find it in another frame."
|
||||
(interactive "p")
|
||||
(ebrowse-view/find-class-declaration
|
||||
:view nil
|
||||
:where (cond ((= prefix-arg 4) 'other-window)
|
||||
((= prefix-arg 5) 'other-frame)
|
||||
(t 'this-window))))
|
||||
:where (cond ((= prefix 4) 'other-window)
|
||||
((= prefix 5) 'other-frame)
|
||||
(t 'this-window))))
|
||||
|
||||
|
||||
(defun ebrowse-view-class-declaration (prefix-arg)
|
||||
(defun ebrowse-view-class-declaration (prefix)
|
||||
"View class declaration and position cursor on it.
|
||||
PREFIX-ARG 4 means view it in another window.
|
||||
PREFIX-ARG 5 means view it in another frame."
|
||||
PREFIX 4 means view it in another window.
|
||||
PREFIX 5 means view it in another frame."
|
||||
(interactive "p")
|
||||
(ebrowse-view/find-class-declaration
|
||||
:view 'view
|
||||
:where (cond ((= prefix-arg 4) 'other-window)
|
||||
((= prefix-arg 5) 'other-frame)
|
||||
(t 'this-window))))
|
||||
:where (cond ((= prefix 4) 'other-window)
|
||||
((= prefix 5) 'other-frame)
|
||||
(t 'this-window))))
|
||||
|
||||
|
||||
|
||||
;;; The FIND engine
|
||||
|
||||
(defun ebrowse-find-source-file (file tags-file-name)
|
||||
(defun ebrowse-find-source-file (file tags-file)
|
||||
"Find source file FILE.
|
||||
Source files are searched for (a) relative to TAGS-FILE-NAME
|
||||
Source files are searched for (a) relative to TAGS-FILE
|
||||
which is the path of the BROWSE file from which the class tree was loaded,
|
||||
and (b) in the directories named in `ebrowse-search-path'."
|
||||
(let (file-name
|
||||
(try-file (expand-file-name file
|
||||
(file-name-directory tags-file-name))))
|
||||
(file-name-directory tags-file))))
|
||||
(if (file-readable-p try-file)
|
||||
(setq file-name try-file)
|
||||
(let ((search-in ebrowse-search-path))
|
||||
|
|
@ -1629,7 +1628,7 @@ The new frame is deleted when you quit viewing the file in that frame."
|
|||
'ebrowse-view-exit-fn)))
|
||||
|
||||
(defun ebrowse-view/find-file-and-search-pattern
|
||||
(struc info file tags-file-name &optional view where)
|
||||
(struc info file tags-file &optional view where)
|
||||
"Find or view a member or class.
|
||||
STRUC is an `ebrowse-bs' structure (or a structure including that)
|
||||
describing what to search.
|
||||
|
|
@ -1641,7 +1640,7 @@ if MEMBER-OR-CLASS is an `ebrowse-ms'.
|
|||
FILE is the file to search the member in.
|
||||
FILE is not taken out of STRUC here because the filename in STRUC
|
||||
may be nil in which case the filename of the class description is used.
|
||||
TAGS-FILE-NAME is the name of the BROWSE file from which the
|
||||
TAGS-FILE is the name of the BROWSE file from which the
|
||||
tree was loaded.
|
||||
If VIEW is non-nil, view file else find the file.
|
||||
WHERE is either `other-window', `other-frame' or `this-window' and
|
||||
|
|
@ -1650,7 +1649,7 @@ specifies where to find/view the result."
|
|||
(error "Sorry, no file information available for %s"
|
||||
(ebrowse-bs-name struc)))
|
||||
;; Get the source file to view or find.
|
||||
(setf file (ebrowse-find-source-file file tags-file-name))
|
||||
(setf file (ebrowse-find-source-file file tags-file))
|
||||
;; If current window is dedicated, use another frame.
|
||||
(when (window-dedicated-p (selected-window))
|
||||
(setf where 'other-window))
|
||||
|
|
@ -2538,7 +2537,7 @@ find file in another frame."
|
|||
|
||||
|
||||
(defun* ebrowse-view/find-member-declaration/definition
|
||||
(prefix view &optional definition info header tags-file-name)
|
||||
(prefix view &optional definition info header tags-file)
|
||||
"Find or view a member declaration or definition.
|
||||
With PREFIX 4. find file in another window, with prefix 5
|
||||
find file in another frame.
|
||||
|
|
@ -2546,11 +2545,11 @@ DEFINITION non-nil means find the definition, otherwise find the
|
|||
declaration.
|
||||
INFO is a list (TREE ACCESSOR MEMBER) describing the member to
|
||||
search.
|
||||
TAGS-FILE-NAME is the file name of the BROWSE file."
|
||||
TAGS-FILE is the file name of the BROWSE file."
|
||||
(unless header
|
||||
(setq header ebrowse--header))
|
||||
(unless tags-file-name
|
||||
(setq tags-file-name ebrowse--tags-file-name))
|
||||
(unless tags-file
|
||||
(setq tags-file ebrowse--tags-file-name))
|
||||
(let (tree member accessor file on-class
|
||||
(where (if (= prefix 4) 'other-window
|
||||
(if (= prefix 5) 'other-frame 'this-window))))
|
||||
|
|
@ -2570,7 +2569,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file."
|
|||
(ebrowse-ts-class tree)
|
||||
(list ebrowse--header (ebrowse-ts-class tree) nil)
|
||||
(ebrowse-cs-file (ebrowse-ts-class tree))
|
||||
tags-file-name view where)))
|
||||
tags-file view where)))
|
||||
;; For some member lists, it doesn't make sense to search for
|
||||
;; a definition. If this is requested, silently search for the
|
||||
;; declaration.
|
||||
|
|
@ -2607,7 +2606,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file."
|
|||
(message nil)
|
||||
;; Recurse with new info.
|
||||
(ebrowse-view/find-member-declaration/definition
|
||||
prefix view (not definition) info header tags-file-name))
|
||||
prefix view (not definition) info header tags-file))
|
||||
(error "Search canceled"))
|
||||
;; Find that thing.
|
||||
(ebrowse-view/find-file-and-search-pattern
|
||||
|
|
@ -2618,7 +2617,7 @@ TAGS-FILE-NAME is the file name of the BROWSE file."
|
|||
:point (ebrowse-ms-point member))
|
||||
(list header member accessor)
|
||||
file
|
||||
tags-file-name
|
||||
tags-file
|
||||
view
|
||||
where))))
|
||||
|
||||
|
|
@ -2677,7 +2676,7 @@ LIST is the member list to display. STAND-ALONE non-nil
|
|||
means the member buffer is standalone. CLASS is its class."
|
||||
(let* ((classes ebrowse--tree-obarray)
|
||||
(tree ebrowse--tree)
|
||||
(tags-file-name ebrowse--tags-file-name)
|
||||
(tags-file ebrowse--tags-file-name)
|
||||
(header ebrowse--header)
|
||||
temp-buffer-setup-hook
|
||||
(temp-buffer (get-buffer ebrowse-member-buffer-name)))
|
||||
|
|
@ -2697,7 +2696,7 @@ means the member buffer is standalone. CLASS is its class."
|
|||
ebrowse--accessor list
|
||||
ebrowse--tree-obarray classes
|
||||
ebrowse--frozen-flag stand-alone
|
||||
ebrowse--tags-file-name tags-file-name
|
||||
ebrowse--tags-file-name tags-file
|
||||
ebrowse--header header
|
||||
ebrowse--tree tree
|
||||
buffer-read-only t)
|
||||
|
|
@ -2849,7 +2848,7 @@ is nil."
|
|||
|
||||
;;; Switching member buffer to display a selected member
|
||||
|
||||
(defun ebrowse-goto-visible-member/all-member-lists (prefix)
|
||||
(defun ebrowse-goto-visible-member/all-member-lists (_prefix)
|
||||
"Position cursor on a member read from the minibuffer.
|
||||
With PREFIX, search all members in the tree. Otherwise consider
|
||||
only members visible in the buffer."
|
||||
|
|
@ -3279,7 +3278,7 @@ HEADER is the `ebrowse-hs' structure of the class tree.
|
|||
Prompt with PROMPT. Insert into the minibuffer a C++ identifier read
|
||||
from point as default. Value is a list (CLASS-NAME MEMBER-NAME)."
|
||||
(save-excursion
|
||||
(let* (start member-info (members (ebrowse-member-table header)))
|
||||
(let ((members (ebrowse-member-table header)))
|
||||
(multiple-value-bind (class-name member-name)
|
||||
(values-list (ebrowse-tags-read-member+class-name))
|
||||
(unless member-name
|
||||
|
|
@ -3290,7 +3289,7 @@ from point as default. Value is a list (CLASS-NAME MEMBER-NAME)."
|
|||
(completion-result (try-completion name members)))
|
||||
;; Cannot rely on `try-completion' returning t for exact
|
||||
;; matches! It returns the name as a string.
|
||||
(unless (setq member-info (gethash name members))
|
||||
(unless (gethash name members)
|
||||
(if (y-or-n-p "No exact match found. Try substrings? ")
|
||||
(setq name
|
||||
(or (first (ebrowse-list-of-matching-members
|
||||
|
|
@ -3316,7 +3315,7 @@ MEMBER-NAME is the name of the member found."
|
|||
(list class name))))
|
||||
|
||||
|
||||
(defun ebrowse-tags-choose-class (tree header name initial-class-name)
|
||||
(defun ebrowse-tags-choose-class (_tree header name initial-class-name)
|
||||
"Read a class name for a member from the minibuffer.
|
||||
TREE is the class tree we operate on.
|
||||
HEADER is its header structure.
|
||||
|
|
@ -3354,7 +3353,7 @@ definition."
|
|||
info)
|
||||
(unless name
|
||||
(multiple-value-setq (class-name name)
|
||||
(values-list
|
||||
(values-list
|
||||
(ebrowse-tags-read-name
|
||||
header
|
||||
(concat (if view "View" "Find") " member "
|
||||
|
|
@ -3481,7 +3480,7 @@ Otherwise read a member name from point."
|
|||
(let* ((marker (point-marker)) class-name (name fix-name) info)
|
||||
(unless name
|
||||
(multiple-value-setq (class-name name)
|
||||
(values-list
|
||||
(values-list
|
||||
(ebrowse-tags-read-name header
|
||||
(concat "Find member list of: ")))))
|
||||
(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
|
|||
are not performed."
|
||||
(let (list)
|
||||
(when (or name regexp)
|
||||
(maphash #'(lambda (member-name info)
|
||||
(when (or (and name (string= name member-name))
|
||||
(and regexp (string-match regexp member-name)))
|
||||
(setq list (cons member-name list))))
|
||||
(maphash (lambda (member-name _info)
|
||||
(when (or (and name (string= name member-name))
|
||||
(and regexp (string-match regexp member-name)))
|
||||
(setq list (cons member-name list))))
|
||||
members))
|
||||
list))
|
||||
|
||||
|
|
@ -3535,18 +3534,18 @@ The file name is read from the minibuffer."
|
|||
(with-output-to-temp-buffer (concat "*Members in file " file "*")
|
||||
(set-buffer standard-output)
|
||||
(maphash
|
||||
#'(lambda (member-name list)
|
||||
(loop for info in list
|
||||
as member = (third info)
|
||||
as class = (ebrowse-ts-class (first info))
|
||||
when (or (and (null (ebrowse-ms-file member))
|
||||
(string= (ebrowse-cs-file class) file))
|
||||
(string= file (ebrowse-ms-file member)))
|
||||
do (ebrowse-draw-file-member-info info "decl.")
|
||||
when (or (and (null (ebrowse-ms-definition-file member))
|
||||
(string= (ebrowse-cs-source-file class) file))
|
||||
(string= file (ebrowse-ms-definition-file member)))
|
||||
do (ebrowse-draw-file-member-info info "defn.")))
|
||||
(lambda (_member-name list)
|
||||
(loop for info in list
|
||||
as member = (third info)
|
||||
as class = (ebrowse-ts-class (first info))
|
||||
when (or (and (null (ebrowse-ms-file member))
|
||||
(string= (ebrowse-cs-file class) file))
|
||||
(string= file (ebrowse-ms-file member)))
|
||||
do (ebrowse-draw-file-member-info info "decl.")
|
||||
when (or (and (null (ebrowse-ms-definition-file member))
|
||||
(string= (ebrowse-cs-source-file class) file))
|
||||
(string= file (ebrowse-ms-definition-file member)))
|
||||
do (ebrowse-draw-file-member-info info "defn.")))
|
||||
members))))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ One argument, the tag info returned by `snarf-tag-function'.")
|
|||
(defun initialize-new-tags-table ()
|
||||
"Initialize the tags table in the current buffer.
|
||||
Return non-nil if it is a valid tags table, and
|
||||
in that case, also make the tags table state variables
|
||||
in that case, also make the tags table state variables
|
||||
buffer-local and set them to nil."
|
||||
(set (make-local-variable 'tags-table-files) nil)
|
||||
(set (make-local-variable 'tags-completion-table) nil)
|
||||
|
|
@ -853,6 +853,7 @@ The functions using this are `find-tag-noselect',
|
|||
;; Dynamic bondage:
|
||||
(defvar etags-case-fold-search)
|
||||
(defvar etags-syntax-table)
|
||||
(defvar local-find-tag-hook)
|
||||
|
||||
;;;###autoload
|
||||
(defun find-tag-noselect (tagname &optional next-p regexp-p)
|
||||
|
|
@ -1656,7 +1657,7 @@ Point should be just after a string that matches TAG."
|
|||
|
||||
;; partial file name match, i.e. searched tag must match a substring
|
||||
;; of the file name (potentially including a directory separator).
|
||||
(defun tag-partial-file-name-match-p (tag)
|
||||
(defun tag-partial-file-name-match-p (_tag)
|
||||
"Return non-nil if current tag matches file name.
|
||||
This is a substring match, and it can include directory separators.
|
||||
Point should be just after a string that matches TAG."
|
||||
|
|
@ -1666,7 +1667,7 @@ Point should be just after a string that matches TAG."
|
|||
(looking-at "\f\n"))))
|
||||
|
||||
;; t if point is in a tag line with a tag containing TAG as a substring.
|
||||
(defun tag-any-match-p (tag)
|
||||
(defun tag-any-match-p (_tag)
|
||||
"Return non-nil if current tag line contains TAG as a substring."
|
||||
(looking-at ".*\177"))
|
||||
|
||||
|
|
@ -1906,7 +1907,7 @@ See also the documentation of the variable `tags-file-name'."
|
|||
(try-completion string (tags-table-files) predicate))))
|
||||
|
||||
;;;###autoload
|
||||
(defun list-tags (file &optional next-match)
|
||||
(defun list-tags (file &optional _next-match)
|
||||
"Display list of tags in file FILE.
|
||||
This searches only the first table in the list, and no included tables.
|
||||
FILE should be as it appeared in the `etags' command, usually without a
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ non-executable files."
|
|||
(file-modes buffer-file-name)))))))
|
||||
|
||||
|
||||
(defvar compilation-error-regexp-alist) ; from compile.el
|
||||
|
||||
;;;###autoload
|
||||
(defun executable-interpret (command)
|
||||
"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
|
|||
(save-some-buffers (not compilation-ask-about-save))
|
||||
(set (make-local-variable 'executable-command) command)
|
||||
(let ((compilation-error-regexp-alist executable-error-regexp-alist))
|
||||
(compilation-start command t (lambda (x) "*interpretation*"))))
|
||||
(compilation-start command t (lambda (_x) "*interpretation*"))))
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ It's flymake process filter."
|
|||
(with-current-buffer source-buffer
|
||||
(flymake-parse-output-and-residual output)))))
|
||||
|
||||
(defun flymake-process-sentinel (process event)
|
||||
(defun flymake-process-sentinel (process _event)
|
||||
"Sentinel for syntax check buffers."
|
||||
(when (memq (process-status process) '(signal exit))
|
||||
(let* ((exit-status (process-exit-status process))
|
||||
|
|
@ -1110,7 +1110,7 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'."
|
|||
(flymake-log 1 "deleted file %s" file-name)))
|
||||
|
||||
(defun flymake-safe-delete-directory (dir-name)
|
||||
(condition-case err
|
||||
(condition-case nil
|
||||
(progn
|
||||
(delete-directory dir-name)
|
||||
(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."
|
|||
:group 'flymake
|
||||
:type 'boolean)
|
||||
|
||||
(defun flymake-after-change-function (start stop len)
|
||||
(defun flymake-after-change-function (start stop _len)
|
||||
"Start syntax check for current buffer if it isn't already running."
|
||||
;;+(flymake-log 0 "setting change time to %s" (flymake-float-time))
|
||||
(let((new-text (buffer-substring start stop)))
|
||||
|
|
@ -1496,7 +1496,7 @@ With arg, turn Flymake mode on if and only if arg is positive."
|
|||
(flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name)
|
||||
temp-name))
|
||||
|
||||
(defun flymake-create-temp-with-folder-structure (file-name prefix)
|
||||
(defun flymake-create-temp-with-folder-structure (file-name _prefix)
|
||||
(unless (stringp file-name)
|
||||
(error "Invalid file-name"))
|
||||
|
||||
|
|
@ -1763,7 +1763,7 @@ Use CREATE-TEMP-F for creating temp copy."
|
|||
(when temp-master-file-name
|
||||
(flymake-get-tex-args temp-master-file-name))))
|
||||
|
||||
(defun flymake-get-include-dirs-dot (base-dir)
|
||||
(defun flymake-get-include-dirs-dot (_base-dir)
|
||||
'("."))
|
||||
|
||||
;;;; xml-specific init-cleanup routines
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ buffer). This corresponds to the g77 compiler option
|
|||
:type 'integer
|
||||
:safe 'integerp
|
||||
:initialize 'custom-initialize-default
|
||||
:set (lambda (symbol value)
|
||||
:set (lambda (_symbol value)
|
||||
;; Do all fortran buffers, and the default.
|
||||
(fortran-line-length value t))
|
||||
:version "23.1"
|
||||
|
|
|
|||
|
|
@ -104,6 +104,13 @@
|
|||
(require 'bindat)
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(declare-function speedbar-change-initial-expansion-list "speedbar" (new-default))
|
||||
(declare-function speedbar-timer-fn "speedbar" ())
|
||||
(declare-function speedbar-line-text "speedbar" (&optional p))
|
||||
(declare-function speedbar-change-expand-button-char "speedbar" (char))
|
||||
(declare-function speedbar-delete-subblock "speedbar" (indent))
|
||||
(declare-function speedbar-center-buffer-smartly "speedbar" ())
|
||||
|
||||
(defvar tool-bar-map)
|
||||
(defvar speedbar-initial-expansion-list-name)
|
||||
(defvar speedbar-frame)
|
||||
|
|
@ -544,7 +551,7 @@ the list) is deleted every time a new one is added (at the front)."
|
|||
|
||||
(defun gdb-find-watch-expression ()
|
||||
(let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
|
||||
(varnum (car var)) expr array)
|
||||
(varnum (car var)) expr)
|
||||
(string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum)
|
||||
(let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet
|
||||
(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."
|
|||
(gdb-input
|
||||
(list (concat "-var-delete -c " varnum) 'ignore)))
|
||||
|
||||
(defun gdb-edit-value (text token indent)
|
||||
(defun gdb-edit-value (_text _token _indent)
|
||||
"Assign a value to a variable displayed in the speedbar."
|
||||
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
|
||||
(varnum (car var)) (value))
|
||||
|
|
@ -1820,7 +1827,7 @@ is running."
|
|||
|
||||
;; Start accumulating output for the GUD buffer
|
||||
(setq gdb-filter-output "")
|
||||
(let ((output-record) (output-record-list))
|
||||
(let (output-record-list)
|
||||
|
||||
;; Process all the complete markers in this chunk.
|
||||
(dolist (gdbmi-record gdbmi-record-list)
|
||||
|
|
@ -1860,17 +1867,17 @@ is running."
|
|||
|
||||
gdb-filter-output))
|
||||
|
||||
(defun gdb-gdb (output-field))
|
||||
(defun gdb-gdb (_output-field))
|
||||
|
||||
(defun gdb-shell (output-field)
|
||||
(let ((gdb-output-sink gdb-output-sink))
|
||||
(setq gdb-filter-output
|
||||
(concat output-field gdb-filter-output))))
|
||||
|
||||
(defun gdb-ignored-notification (output-field))
|
||||
(defun gdb-ignored-notification (_output-field))
|
||||
|
||||
;; gdb-invalidate-threads is defined to accept 'update-threads signal
|
||||
(defun gdb-thread-created (output-field))
|
||||
(defun gdb-thread-created (_output-field))
|
||||
(defun gdb-thread-exited (output-field)
|
||||
"Handle =thread-exited async record: unset `gdb-thread-number'
|
||||
if current thread exited and update threads list."
|
||||
|
|
@ -1918,7 +1925,7 @@ Sets `gdb-thread-number' to new id."
|
|||
(setq gdb-active-process t)
|
||||
(gdb-emit-signal gdb-buf-publisher 'update-threads))
|
||||
|
||||
(defun gdb-starting (output-field)
|
||||
(defun gdb-starting (_output-field)
|
||||
;; CLI commands don't emit ^running at the moment so use gdb-running too.
|
||||
(setq gdb-inferior-status "running")
|
||||
(gdb-force-mode-line-update
|
||||
|
|
@ -2219,8 +2226,7 @@ calling `gdb-table-string'."
|
|||
|
||||
(defun gdb-table-string (table &optional sep)
|
||||
"Return TABLE as a string with columns separated with SEP."
|
||||
(let ((column-sizes (gdb-table-column-sizes table))
|
||||
(res ""))
|
||||
(let ((column-sizes (gdb-table-column-sizes table)))
|
||||
(mapconcat
|
||||
'identity
|
||||
(gdb-mapcar*
|
||||
|
|
@ -2375,38 +2381,37 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
|
|||
|
||||
;; Put breakpoint icons in relevant margins (even those set in the GUD buffer).
|
||||
(defun gdb-place-breakpoints ()
|
||||
(let ((flag) (bptno))
|
||||
;; Remove all breakpoint-icons in source buffers but not assembler buffer.
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(if (and (eq gud-minor-mode 'gdbmi)
|
||||
(not (string-match "\\` ?\\*.+\\*\\'" (buffer-name))))
|
||||
(gdb-remove-breakpoint-icons (point-min) (point-max)))))
|
||||
(dolist (breakpoint gdb-breakpoints-list)
|
||||
(let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is
|
||||
; an associative list
|
||||
(line (bindat-get-field breakpoint 'line)))
|
||||
(when line
|
||||
(let ((file (bindat-get-field breakpoint 'fullname))
|
||||
(flag (bindat-get-field breakpoint 'enabled))
|
||||
(bptno (bindat-get-field breakpoint 'number)))
|
||||
(unless (file-exists-p file)
|
||||
(setq file (cdr (assoc bptno gdb-location-alist))))
|
||||
(if (and file
|
||||
(not (string-equal file "File not found")))
|
||||
(with-current-buffer
|
||||
(find-file-noselect file 'nowarn)
|
||||
(gdb-init-buffer)
|
||||
;; Only want one breakpoint icon at each location.
|
||||
(gdb-put-breakpoint-icon (string-equal flag "y") bptno
|
||||
(string-to-number line)))
|
||||
(gdb-input
|
||||
(list (concat "list " file ":1")
|
||||
'ignore))
|
||||
(gdb-input
|
||||
(list "-file-list-exec-source-file"
|
||||
`(lambda () (gdb-get-location
|
||||
,bptno ,line ,flag)))))))))))
|
||||
;; Remove all breakpoint-icons in source buffers but not assembler buffer.
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(if (and (eq gud-minor-mode 'gdbmi)
|
||||
(not (string-match "\\` ?\\*.+\\*\\'" (buffer-name))))
|
||||
(gdb-remove-breakpoint-icons (point-min) (point-max)))))
|
||||
(dolist (breakpoint gdb-breakpoints-list)
|
||||
(let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is
|
||||
; an associative list
|
||||
(line (bindat-get-field breakpoint 'line)))
|
||||
(when line
|
||||
(let ((file (bindat-get-field breakpoint 'fullname))
|
||||
(flag (bindat-get-field breakpoint 'enabled))
|
||||
(bptno (bindat-get-field breakpoint 'number)))
|
||||
(unless (file-exists-p file)
|
||||
(setq file (cdr (assoc bptno gdb-location-alist))))
|
||||
(if (and file
|
||||
(not (string-equal file "File not found")))
|
||||
(with-current-buffer
|
||||
(find-file-noselect file 'nowarn)
|
||||
(gdb-init-buffer)
|
||||
;; Only want one breakpoint icon at each location.
|
||||
(gdb-put-breakpoint-icon (string-equal flag "y") bptno
|
||||
(string-to-number line)))
|
||||
(gdb-input
|
||||
(list (concat "list " file ":1")
|
||||
'ignore))
|
||||
(gdb-input
|
||||
(list "-file-list-exec-source-file"
|
||||
`(lambda () (gdb-get-location
|
||||
,bptno ,line ,flag))))))))))
|
||||
|
||||
(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
|
||||
|
||||
|
|
@ -3276,7 +3281,6 @@ DOC is an optional documentation string."
|
|||
(defun gdb-disassembly-handler-custom ()
|
||||
(let* ((instructions (bindat-get-field (gdb-json-partial-output) 'asm_insns))
|
||||
(address (bindat-get-field (gdb-current-buffer-frame) 'addr))
|
||||
(pos 1)
|
||||
(table (make-gdb-table))
|
||||
(marked-line nil))
|
||||
(dolist (instr instructions)
|
||||
|
|
@ -3806,8 +3810,7 @@ already, in which case that window is splitted first."
|
|||
(let ((window (get-lru-window)))
|
||||
(if (eq (buffer-local-value 'gud-minor-mode (window-buffer window))
|
||||
'gdbmi)
|
||||
(let* ((largest (get-largest-window))
|
||||
(cur-size (window-height largest)))
|
||||
(let ((largest (get-largest-window)))
|
||||
(setq answer (split-window largest))
|
||||
(set-window-buffer answer buf)
|
||||
(set-window-dedicated-p answer dedicated)
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ recognized according to the current value of the variable `glasses-separator'."
|
|||
nil)
|
||||
|
||||
|
||||
(defun glasses-change (beg end &optional old-len)
|
||||
(defun glasses-change (beg end &optional _old-len)
|
||||
"After-change function updating glass overlays."
|
||||
(let ((beg-line (save-excursion (goto-char beg) (line-beginning-position)))
|
||||
(end-line (save-excursion (goto-char end) (line-end-position))))
|
||||
|
|
|
|||
|
|
@ -379,13 +379,13 @@ step (if we're in the GUD buffer).
|
|||
source file) or the source line number at the last break or step (if
|
||||
we're in the GUD buffer)."
|
||||
`(progn
|
||||
(defun ,func (arg)
|
||||
(defalias ',func (lambda (arg)
|
||||
,@(if doc (list doc))
|
||||
(interactive "p")
|
||||
(if (not gud-running)
|
||||
,(if (stringp cmd)
|
||||
`(gud-call ,cmd arg)
|
||||
cmd)))
|
||||
cmd))))
|
||||
,(if key `(local-set-key ,(concat "\C-c" key) ',func))
|
||||
,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func))))
|
||||
|
||||
|
|
@ -491,7 +491,7 @@ The value t means that there is no stack, and we are in display-file mode.")
|
|||
(gud-install-speedbar-variables)
|
||||
(add-hook 'speedbar-load-hook 'gud-install-speedbar-variables))
|
||||
|
||||
(defun gud-expansion-speedbar-buttons (directory zero)
|
||||
(defun gud-expansion-speedbar-buttons (_directory _zero)
|
||||
"Wrapper for call to `speedbar-add-expansion-list'.
|
||||
DIRECTORY and ZERO are not used, but are required by the caller."
|
||||
(gud-speedbar-buttons gud-comint-buffer))
|
||||
|
|
@ -657,17 +657,15 @@ The option \"--fullname\" must be included in this value."
|
|||
gud-marker-acc (substring gud-marker-acc (match-end 0))))
|
||||
|
||||
(while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc)
|
||||
(let ((match (match-string 1 gud-marker-acc)))
|
||||
(setq
|
||||
;; Append any text before the marker to the output we're going
|
||||
;; to return - we don't include the marker in this text.
|
||||
output (concat output
|
||||
(substring gud-marker-acc 0 (match-beginning 0)))
|
||||
|
||||
(setq
|
||||
;; Append any text before the marker to the output we're going
|
||||
;; to return - we don't include the marker in this text.
|
||||
output (concat output
|
||||
(substring gud-marker-acc 0 (match-beginning 0)))
|
||||
;; Set the accumulator to the remaining text.
|
||||
|
||||
;; Set the accumulator to the remaining text.
|
||||
|
||||
gud-marker-acc (substring gud-marker-acc (match-end 0)))))
|
||||
gud-marker-acc (substring gud-marker-acc (match-end 0))))
|
||||
|
||||
;; Does the remaining text look like it might end with the
|
||||
;; 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."
|
|||
|
||||
;; gdb speedbar functions
|
||||
|
||||
(defun gud-gdb-goto-stackframe (text token indent)
|
||||
(defun gud-gdb-goto-stackframe (_text token _indent)
|
||||
"Goto the stackframe described by TEXT, TOKEN, and INDENT."
|
||||
(speedbar-with-attached-buffer
|
||||
(gud-basic-call (concat "server frame " (nth 1 token)))
|
||||
|
|
@ -1074,7 +1072,7 @@ containing the executable being debugged."
|
|||
directory))
|
||||
:group 'gud)
|
||||
|
||||
(defun gud-dbx-massage-args (file args)
|
||||
(defun gud-dbx-massage-args (_file args)
|
||||
(nconc (let ((directories gud-dbx-directories)
|
||||
(result nil))
|
||||
(while directories
|
||||
|
|
@ -1386,7 +1384,7 @@ containing the executable being debugged."
|
|||
directory))
|
||||
:group 'gud)
|
||||
|
||||
(defun gud-xdb-massage-args (file args)
|
||||
(defun gud-xdb-massage-args (_file args)
|
||||
(nconc (let ((directories gud-xdb-directories)
|
||||
(result nil))
|
||||
(while directories
|
||||
|
|
@ -1450,7 +1448,7 @@ directories if your program contains sources from more than one directory."
|
|||
;; History of argument lists passed to perldb.
|
||||
(defvar gud-perldb-history nil)
|
||||
|
||||
(defun gud-perldb-massage-args (file args)
|
||||
(defun gud-perldb-massage-args (_file args)
|
||||
"Convert a command line as would be typed normally to run perldb
|
||||
into one that invokes an Emacs-enabled debugging session.
|
||||
\"-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
|
|||
|
||||
;; Change what was given in the minibuffer to something that can be used to
|
||||
;; invoke the debugger.
|
||||
(defun gud-jdb-massage-args (file args)
|
||||
(defun gud-jdb-massage-args (_file args)
|
||||
;; The jdb executable must have whitespace between "-classpath" and
|
||||
;; its value while gud-common-init expects all switch values to
|
||||
;; follow the switch keyword without intervening whitespace. We
|
||||
|
|
@ -2151,7 +2149,7 @@ relative to a classpath directory."
|
|||
(setq cplist (cdr cplist)))
|
||||
(if found-file (concat (car cplist) "/" filename)))))
|
||||
|
||||
(defun gud-jdb-find-source (string)
|
||||
(defun gud-jdb-find-source (_string)
|
||||
"Alias for function used to locate source files.
|
||||
Set to `gud-jdb-find-source-using-classpath' or `gud-jdb-find-source-file'
|
||||
during jdb initialization depending on the value of
|
||||
|
|
@ -3047,7 +3045,7 @@ Link exprs of the form:
|
|||
(declare-function syntax-symbol "gud" (x))
|
||||
(declare-function syntax-point "gud" (x))
|
||||
|
||||
(defun gud-find-class (f line)
|
||||
(defun gud-find-class (f _line)
|
||||
"Find fully qualified class in file F at line LINE.
|
||||
This function uses the `gud-jdb-classpath' (and optional
|
||||
`gud-jdb-sourcepath') list(s) to derive a file
|
||||
|
|
@ -3063,13 +3061,13 @@ class of the file (using s to separate nested class ids)."
|
|||
(save-match-data
|
||||
(let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath))
|
||||
(fbuffer (get-file-buffer f))
|
||||
syntax-symbol syntax-point class-found)
|
||||
class-found
|
||||
;; Syntax-symbol returns the symbol of the *first* element
|
||||
;; in the syntactical analysis result list, syntax-point
|
||||
;; returns the buffer position of same
|
||||
(syntax-symbol (lambda (x) (c-langelem-sym (car x))))
|
||||
(syntax-point (lambda (x) (c-langelem-pos (car x)))))
|
||||
(setq f (file-name-sans-extension (file-truename f)))
|
||||
;; Syntax-symbol returns the symbol of the *first* element
|
||||
;; in the syntactical analysis result list, syntax-point
|
||||
;; returns the buffer position of same
|
||||
(fset 'syntax-symbol (lambda (x) (c-langelem-sym (car x))))
|
||||
(fset 'syntax-point (lambda (x) (c-langelem-pos (car x))))
|
||||
;; Search through classpath list for an entry that is
|
||||
;; contained in f
|
||||
(while (and cplist (not class-found))
|
||||
|
|
@ -3092,17 +3090,17 @@ class of the file (using s to separate nested class ids)."
|
|||
;; with the 'topmost-intro symbol, there may be
|
||||
;; nested classes...
|
||||
(while (not (eq 'topmost-intro
|
||||
(syntax-symbol (c-guess-basic-syntax))))
|
||||
(funcall syntax-symbol (c-guess-basic-syntax))))
|
||||
;; Check if the current position c-syntactic
|
||||
;; analysis has 'inclass
|
||||
(setq syntax (c-guess-basic-syntax))
|
||||
(while
|
||||
(and (not (eq 'inclass (syntax-symbol syntax)))
|
||||
(and (not (eq 'inclass (funcall syntax-symbol syntax)))
|
||||
(cdr syntax))
|
||||
(setq syntax (cdr syntax)))
|
||||
(if (eq 'inclass (syntax-symbol syntax))
|
||||
(if (eq 'inclass (funcall syntax-symbol syntax))
|
||||
(progn
|
||||
(goto-char (syntax-point syntax))
|
||||
(goto-char (funcall syntax-point syntax))
|
||||
;; Now we're at the beginning of a class
|
||||
;; definition. Find class name
|
||||
(looking-at
|
||||
|
|
@ -3111,9 +3109,9 @@ class of the file (using s to separate nested class ids)."
|
|||
(append (list (match-string-no-properties 1))
|
||||
nclass)))
|
||||
(setq syntax (c-guess-basic-syntax))
|
||||
(while (and (not (syntax-point syntax)) (cdr syntax))
|
||||
(while (and (not (funcall syntax-point syntax)) (cdr syntax))
|
||||
(setq syntax (cdr syntax)))
|
||||
(goto-char (syntax-point syntax))
|
||||
(goto-char (funcall syntax-point syntax))
|
||||
))
|
||||
(string-match (concat (car nclass) "$") class-found)
|
||||
(setq class-found
|
||||
|
|
|
|||
|
|
@ -412,13 +412,14 @@ that form should be displayed.")
|
|||
"Pop the next token from token-list into the let variable \"hif-token\"."
|
||||
(setq hif-token (pop hif-token-list)))
|
||||
|
||||
(defun hif-parse-if-exp (hif-token-list)
|
||||
(defun hif-parse-if-exp (token-list)
|
||||
"Parse the TOKEN-LIST. Return translated list in prefix form."
|
||||
(hif-nexttoken)
|
||||
(prog1
|
||||
(hif-expr)
|
||||
(if hif-token ; is there still a token?
|
||||
(error "Error: unexpected token: %s" hif-token))))
|
||||
(let ((hif-token-list token-list))
|
||||
(hif-nexttoken)
|
||||
(prog1
|
||||
(hif-expr)
|
||||
(if hif-token ; is there still a token?
|
||||
(error "Error: unexpected token: %s" hif-token)))))
|
||||
|
||||
(defun hif-expr ()
|
||||
"Parse an expression as found in #if.
|
||||
|
|
@ -507,7 +508,7 @@ that form should be displayed.")
|
|||
;; Unary plus/minus.
|
||||
((memq hif-token '(hif-minus hif-plus))
|
||||
(list (prog1 hif-token (hif-nexttoken)) 0 (hif-factor)))
|
||||
|
||||
|
||||
(t ; identifier
|
||||
(let ((ident hif-token))
|
||||
(if (memq ident '(or and))
|
||||
|
|
|
|||
|
|
@ -565,10 +565,9 @@ and then further adjusted to be at the end of the line."
|
|||
(if comment-reg
|
||||
(hs-hide-comment-region (car comment-reg) (cadr comment-reg) end)
|
||||
(when (looking-at hs-block-start-regexp)
|
||||
(let* ((mdata (match-data t))
|
||||
(header-beg (match-beginning 0))
|
||||
(header-end (match-end 0))
|
||||
p q ov)
|
||||
(let ((mdata (match-data t))
|
||||
(header-end (match-end 0))
|
||||
p q ov)
|
||||
;; `p' is the point at the end of the block beginning, which
|
||||
;; may need to be adjusted
|
||||
(save-excursion
|
||||
|
|
|
|||
|
|
@ -484,9 +484,9 @@ Returns nil if line starts inside a string, t if in a comment."
|
|||
(let ((indent-stack (list nil))
|
||||
(contain-stack (list (point)))
|
||||
(case-fold-search nil)
|
||||
restart outer-loop-done inner-loop-done state ostate
|
||||
this-indent last-sexp last-depth
|
||||
at-else at-brace at-do
|
||||
outer-loop-done inner-loop-done state ostate
|
||||
this-indent last-depth
|
||||
at-else at-brace
|
||||
(opoint (point))
|
||||
(next-depth 0))
|
||||
(save-excursion
|
||||
|
|
@ -506,9 +506,6 @@ Returns nil if line starts inside a string, t if in a comment."
|
|||
(setq state (parse-partial-sexp (point) (progn (end-of-line) (point))
|
||||
nil nil state))
|
||||
(setq next-depth (car state))
|
||||
(if (and (car (cdr (cdr state)))
|
||||
(>= (car (cdr (cdr state))) 0))
|
||||
(setq last-sexp (car (cdr (cdr state)))))
|
||||
(if (or (nth 4 ostate))
|
||||
(icon-indent-line))
|
||||
(if (or (nth 3 state))
|
||||
|
|
@ -518,8 +515,6 @@ Returns nil if line starts inside a string, t if in a comment."
|
|||
(setq outer-loop-done t))
|
||||
(if outer-loop-done
|
||||
nil
|
||||
(if (/= last-depth next-depth)
|
||||
(setq last-sexp nil))
|
||||
(while (> last-depth next-depth)
|
||||
(setq indent-stack (cdr indent-stack)
|
||||
contain-stack (cdr contain-stack)
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ BEG defaults to `point-min', meaning to flush the entire cache."
|
|||
(setq beg (or beg (save-restriction (widen) (point-min))))
|
||||
(setq js--cache-end (min js--cache-end beg)))
|
||||
|
||||
(defmacro js--debug (&rest arguments)
|
||||
(defmacro js--debug (&rest _arguments)
|
||||
;; `(message ,@arguments)
|
||||
)
|
||||
|
||||
|
|
@ -1591,10 +1591,9 @@ will be returned."
|
|||
(save-restriction
|
||||
(widen)
|
||||
(js--ensure-cache)
|
||||
(let* ((bound (if (eobp) (point) (1+ (point))))
|
||||
(pstate (or (save-excursion
|
||||
(js--backward-pstate))
|
||||
(list js--initial-pitem))))
|
||||
(let ((pstate (or (save-excursion
|
||||
(js--backward-pstate))
|
||||
(list js--initial-pitem))))
|
||||
|
||||
;; Loop until we either hit a pitem at BOB or pitem ends after
|
||||
;; point (or at point if we're at eob)
|
||||
|
|
@ -1921,7 +1920,7 @@ the broken-down class name of the item to insert."
|
|||
|
||||
(let ((top-name (car name-parts))
|
||||
(item-ptr items)
|
||||
new-items last-new-item new-cons item)
|
||||
new-items last-new-item new-cons)
|
||||
|
||||
(js--debug "js--splice-into-items: name-parts: %S items:%S"
|
||||
name-parts
|
||||
|
|
@ -2147,8 +2146,8 @@ initial input INITIAL-INPUT. Return a cons of (SYMBOL-NAME
|
|||
. LOCATION), where SYMBOL-NAME is a string and LOCATION is a
|
||||
marker."
|
||||
(unless ido-mode
|
||||
(ido-mode t)
|
||||
(ido-mode nil))
|
||||
(ido-mode 1)
|
||||
(ido-mode -1))
|
||||
|
||||
(let ((choice (ido-completing-read
|
||||
prompt
|
||||
|
|
@ -2955,8 +2954,8 @@ browser, respectively."
|
|||
|
||||
;; Prime IDO
|
||||
(unless ido-mode
|
||||
(ido-mode t)
|
||||
(ido-mode nil))
|
||||
(ido-mode 1)
|
||||
(ido-mode -1))
|
||||
|
||||
(with-js
|
||||
(lexical-let ((tabs (js--get-tabs)) selected-tab-cname
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ not be enclosed in { } or ( )."
|
|||
|
||||
(defun makefile-make-font-lock-keywords (var keywords space
|
||||
&optional negation
|
||||
&rest font-lock-keywords)
|
||||
&rest fl-keywords)
|
||||
`(;; Do macro assignments. These get the "variable-name" face.
|
||||
(,makefile-macroassign-regex
|
||||
(1 font-lock-variable-name-face)
|
||||
|
|
@ -393,7 +393,7 @@ not be enclosed in { } or ( )."
|
|||
;; They can make a tab fail to be effective.
|
||||
("^\\( +\\)\t" 1 makefile-space)))
|
||||
|
||||
,@font-lock-keywords
|
||||
,@fl-keywords
|
||||
|
||||
;; Do dependencies.
|
||||
(makefile-match-dependency
|
||||
|
|
@ -491,7 +491,7 @@ not be enclosed in { } or ( )."
|
|||
'("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face)))
|
||||
|
||||
(defconst makefile-imake-font-lock-keywords
|
||||
(append
|
||||
(append
|
||||
(makefile-make-font-lock-keywords
|
||||
makefile-var-use-regex
|
||||
makefile-statements
|
||||
|
|
@ -1155,7 +1155,6 @@ The context determines which are considered."
|
|||
(let* ((beg (save-excursion
|
||||
(skip-chars-backward "^$(){}:#= \t\n")
|
||||
(point)))
|
||||
(try (buffer-substring beg (point)))
|
||||
(paren nil)
|
||||
(do-macros
|
||||
(save-excursion
|
||||
|
|
@ -1262,7 +1261,7 @@ definition and conveniently use this command."
|
|||
|
||||
;; Filling
|
||||
|
||||
(defun makefile-fill-paragraph (arg)
|
||||
(defun makefile-fill-paragraph (_arg)
|
||||
;; Fill comments, backslashed lines, and variable definitions
|
||||
;; specially.
|
||||
(save-excursion
|
||||
|
|
@ -1680,7 +1679,7 @@ Then prompts for all required parameters."
|
|||
;;; Utility functions
|
||||
;;; ------------------------------------------------------------
|
||||
|
||||
(defun makefile-match-function-end (end)
|
||||
(defun makefile-match-function-end (_end)
|
||||
"To be called as an anchored matcher by font-lock.
|
||||
The anchor must have matched the opening parens in the first group."
|
||||
(let ((s (match-string-no-properties 1)))
|
||||
|
|
|
|||
|
|
@ -268,8 +268,7 @@ is NOT available with versions of Octave prior to 2.0."
|
|||
(command
|
||||
(save-excursion
|
||||
(skip-syntax-backward "w_" (comint-line-beginning-position))
|
||||
(buffer-substring-no-properties (point) end)))
|
||||
(proc (get-buffer-process inferior-octave-buffer)))
|
||||
(buffer-substring-no-properties (point) end))))
|
||||
(cond (inferior-octave-complete-impossible
|
||||
(error (concat
|
||||
"Your Octave does not have `completion_matches'. "
|
||||
|
|
@ -336,7 +335,7 @@ Ring Emacs bell if process output starts with an ASCII bell, and pass
|
|||
the rest to `comint-output-filter'."
|
||||
(comint-output-filter proc (inferior-octave-strip-ctrl-g string)))
|
||||
|
||||
(defun inferior-octave-output-digest (proc string)
|
||||
(defun inferior-octave-output-digest (_proc string)
|
||||
"Special output filter for the inferior Octave process.
|
||||
Save all output between newlines into `inferior-octave-output-list', and
|
||||
the rest to `inferior-octave-output-string'."
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ otherwise."
|
|||
(setq give-up t))))
|
||||
(not give-up))))
|
||||
|
||||
(defun octave-fill-paragraph (&optional arg)
|
||||
(defun octave-fill-paragraph (&optional _arg)
|
||||
"Fill paragraph of Octave code, handling Octave comments."
|
||||
;; FIXME: difference with generic fill-paragraph:
|
||||
;; - code lines are only split, never joined.
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
|
|||
;; );
|
||||
(progn
|
||||
(skip-syntax-backward "(")
|
||||
(condition-case err
|
||||
(condition-case nil
|
||||
(while (save-excursion
|
||||
(skip-syntax-backward " ") (not (bolp)))
|
||||
(forward-sexp -1))
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,7 @@ VERSION is of the format (Major . Minor)"
|
|||
(define-key map "\C-c\C-l" 'prolog-consult-file)
|
||||
(define-key map "\C-c\C-z" 'switch-to-prolog))
|
||||
|
||||
(defun prolog-mode-keybindings-inferior (map)
|
||||
(defun prolog-mode-keybindings-inferior (_map)
|
||||
"Define keybindings for inferior Prolog mode in MAP."
|
||||
;; No inferior mode specific keybindings now.
|
||||
)
|
||||
|
|
@ -2012,15 +2012,14 @@ Argument BOUND is a buffer position limiting searching."
|
|||
|
||||
;; NB: This function *MUST* have this optional argument since XEmacs
|
||||
;; assumes it. This does not mean we have to use it...
|
||||
(defun prolog-indent-line (&optional whole-exp)
|
||||
(defun prolog-indent-line (&optional _whole-exp)
|
||||
"Indent current line as Prolog code.
|
||||
With argument, indent any additional lines of the same clause
|
||||
rigidly along with this one (not yet)."
|
||||
(interactive "p")
|
||||
(let ((indent (prolog-indent-level))
|
||||
(pos (- (point-max) (point))) beg)
|
||||
(pos (- (point-max) (point))))
|
||||
(beginning-of-line)
|
||||
(setq beg (point))
|
||||
(skip-chars-forward " \t")
|
||||
(indent-line-to indent)
|
||||
(if (> (- (point-max) pos) (point))
|
||||
|
|
|
|||
|
|
@ -541,6 +541,10 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
|
|||
(interactive)
|
||||
(message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version))
|
||||
|
||||
;; From reporter.el
|
||||
(defvar reporter-prompt-for-summary-p)
|
||||
(defvar reporter-dont-compact-list)
|
||||
|
||||
(defun ps-mode-submit-bug-report ()
|
||||
"Submit via mail a bug report on PostScript mode."
|
||||
(interactive)
|
||||
|
|
|
|||
|
|
@ -2495,7 +2495,7 @@ with skeleton expansions for compound statement templates.
|
|||
;; doesn't seem to work properly.
|
||||
(add-to-list 'hs-special-modes-alist
|
||||
`(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
|
||||
,(lambda (arg)
|
||||
,(lambda (_arg)
|
||||
(python-end-of-defun)
|
||||
(skip-chars-backward " \t\n"))
|
||||
nil))
|
||||
|
|
@ -2554,7 +2554,7 @@ Runs `jython-mode-hook' after `python-mode-hook'."
|
|||
(setq overlay-arrow-position nil
|
||||
python-pdbtrack-is-tracking-p nil)))
|
||||
|
||||
(defun python-pdbtrack-track-stack-file (text)
|
||||
(defun python-pdbtrack-track-stack-file (_text)
|
||||
"Show the file indicated by the pdb stack entry line, in a separate window.
|
||||
|
||||
Activity is disabled if the buffer-local variable
|
||||
|
|
@ -2666,8 +2666,8 @@ problem."
|
|||
)
|
||||
)
|
||||
|
||||
(defun python-pdbtrack-grub-for-buffer (funcname lineno)
|
||||
"Find recent python-mode buffer named, or having function named funcname."
|
||||
(defun python-pdbtrack-grub-for-buffer (funcname _lineno)
|
||||
"Find recent Python mode buffer named, or having function named FUNCNAME."
|
||||
(let ((buffers (buffer-list))
|
||||
buf
|
||||
got)
|
||||
|
|
@ -2725,7 +2725,7 @@ comint believe the user typed this string so that
|
|||
(interactive)
|
||||
(python-pdbtrack-toggle-stack-tracking 0))
|
||||
|
||||
(defun python-sentinel (proc msg)
|
||||
(defun python-sentinel (_proc _msg)
|
||||
(setq overlay-arrow-position nil))
|
||||
|
||||
(provide 'python)
|
||||
|
|
|
|||
|
|
@ -987,8 +987,7 @@ subshells can nest."
|
|||
;; rather flakey.
|
||||
(when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote.
|
||||
;; bingo we have a $( or a ` inside a ""
|
||||
(let ((char (char-after (point)))
|
||||
;; `state' can be: double-quote, backquote, code.
|
||||
(let (;; `state' can be: double-quote, backquote, code.
|
||||
(state (if (eq (char-before) ?`) 'backquote 'code))
|
||||
;; Stacked states in the context.
|
||||
(states '(double-quote)))
|
||||
|
|
@ -1212,7 +1211,7 @@ a number means align to that column, e.g. 0 means first column."
|
|||
;; "For debugging: display message ARGS if variable SH-DEBUG is non-nil."
|
||||
;; (if sh-debug
|
||||
;; (apply 'message args)))
|
||||
(defmacro sh-debug (&rest args))
|
||||
(defmacro sh-debug (&rest _args))
|
||||
|
||||
(defconst sh-symbol-list
|
||||
'((const :tag "+ " :value +
|
||||
|
|
@ -2138,7 +2137,6 @@ STRING This is ignored for the purposes of calculating
|
|||
(save-excursion
|
||||
(let ((have-result nil)
|
||||
this-kw
|
||||
start
|
||||
val
|
||||
(result nil)
|
||||
(align-point nil)
|
||||
|
|
@ -2209,7 +2207,6 @@ STRING This is ignored for the purposes of calculating
|
|||
;; We start off at beginning of this line.
|
||||
;; Scan previous statements while this is <=
|
||||
;; start of previous line.
|
||||
(setq start (point)) ;; for debug only
|
||||
(goto-char prev-line-end)
|
||||
(setq x t)
|
||||
(while (and x (setq x (sh-prev-thing)))
|
||||
|
|
@ -2614,7 +2611,7 @@ can be represented by a symbol then do so."
|
|||
If INFO is supplied it is used, else it is calculated from current line."
|
||||
(let ((ofs 0)
|
||||
(base-value 0)
|
||||
elt a b var val)
|
||||
elt a b val)
|
||||
(or info
|
||||
(setq info (sh-get-indent-info)))
|
||||
(when info
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ for SIMULA mode to function correctly."
|
|||
"Keymap used in `simula-mode'.")
|
||||
|
||||
;; menus for Lucid
|
||||
(defun simula-popup-menu (e)
|
||||
(defun simula-popup-menu (_e)
|
||||
"Pops up the SIMULA menu."
|
||||
(interactive "@e")
|
||||
(popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu)))
|
||||
|
|
@ -1202,9 +1202,8 @@ If COUNT is negative, move backward instead."
|
|||
((eq simula-abbrev-keyword 'downcase) (downcase-word -1))
|
||||
((eq simula-abbrev-keyword 'capitalize) (capitalize-word -1)))
|
||||
(let ((pos (- (point-max) (point)))
|
||||
(case-fold-search t)
|
||||
null)
|
||||
(condition-case null
|
||||
(case-fold-search t))
|
||||
(condition-case nil
|
||||
(progn
|
||||
;; check if the expanded word is on the beginning of the line.
|
||||
(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.
|
|||
The match found must not extend after that position. Optional third argument
|
||||
NOERROR, if t, means if fail just return nil (no error).
|
||||
If not nil and not t, move to limit of search and return nil."
|
||||
(let (begin end context (comb-regexp (concat regexp "\\|\\<end\\>"))
|
||||
match (start-point (point)))
|
||||
(let ((comb-regexp (concat regexp "\\|\\<end\\>"))
|
||||
(start-point (point))
|
||||
context match)
|
||||
(catch 'simula-backward
|
||||
(while (re-search-backward comb-regexp bound 1)
|
||||
;; 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.
|
|||
The match found must not extend after that position. Optional third argument
|
||||
NOERROR, if t, means if fail just return nil (no error).
|
||||
If not nil and not t, move to limit of search and return nil."
|
||||
(let (begin end context (comb-regexp (concat regexp "\\|\\<begin\\>"))
|
||||
match (start-point (point)))
|
||||
(let ((comb-regexp (concat regexp "\\|\\<begin\\>"))
|
||||
(start-point (point))
|
||||
context match)
|
||||
(catch 'simula-forward
|
||||
(while (re-search-forward comb-regexp bound 1)
|
||||
;; We have a match, check SIMULA context at match-beginning
|
||||
|
|
|
|||
|
|
@ -3540,7 +3540,7 @@ optionally is saved to the user's init file."
|
|||
(append (list name)
|
||||
(sql-for-each-login
|
||||
`(product ,@login)
|
||||
(lambda (token plist)
|
||||
(lambda (token _plist)
|
||||
(cond
|
||||
((eq token 'product) `(sql-product ',sql-product))
|
||||
((eq token 'user) `(sql-user ,sql-user))
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ already exist."
|
|||
|
||||
|
||||
|
||||
(defun tcl-indent-command (&optional arg)
|
||||
(defun tcl-indent-command (&optional _arg)
|
||||
"Indent current line as Tcl code, or in some cases insert a tab character.
|
||||
If `tcl-tab-always-indent' is t (the default), always indent current line.
|
||||
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 ...\"."
|
|||
;; loading the XEmacs menu emulation code.
|
||||
;;
|
||||
|
||||
(defun tcl-popup-menu (e)
|
||||
(defun tcl-popup-menu (_e)
|
||||
(interactive "@e")
|
||||
(popup-menu tcl-mode-menu))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
;;; vera-mode.el --- major mode for editing Vera files.
|
||||
;;; vera-mode.el --- major mode for editing Vera files
|
||||
|
||||
;; Copyright (C) 1997-2011 Free Software Foundation, Inc.
|
||||
|
||||
|
|
@ -1077,7 +1077,7 @@ try to increase performance by using this macro."
|
|||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(let ((indent-point (point))
|
||||
syntax state placeholder pos)
|
||||
syntax state placeholder)
|
||||
;; determine syntax state
|
||||
(setq state (parse-partial-sexp (point-min) (point)))
|
||||
(cond
|
||||
|
|
@ -1240,7 +1240,7 @@ Calls `indent-region' for whole buffer."
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; electrifications
|
||||
|
||||
(defun vera-electric-tab (&optional prefix-arg)
|
||||
(defun vera-electric-tab (&optional prefix)
|
||||
"Do what I mean (indent, expand, tab, change indent, etc..).
|
||||
If preceding character is part of a word or a paren then `hippie-expand',
|
||||
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."
|
|||
(or (and (boundp 'hippie-expand-only-buffers)
|
||||
hippie-expand-only-buffers)
|
||||
'(vera-mode))))
|
||||
(vera-expand-abbrev prefix-arg)))
|
||||
(vera-expand-abbrev prefix)))
|
||||
((> (current-column) (current-indentation))
|
||||
(tab-to-tab-stop))
|
||||
((and (or (eq last-command 'vera-electric-tab)
|
||||
|
|
@ -1402,7 +1402,7 @@ If `vera-intelligent-tab' is nil, always indent line."
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Comments
|
||||
|
||||
(defun vera-comment-uncomment-region (beg end &optional arg)
|
||||
(defun vera-comment-uncomment-region (beg end &optional _arg)
|
||||
"Comment region if not commented, uncomment region if already commented."
|
||||
(interactive "r\nP")
|
||||
(goto-char beg)
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ Commands:
|
|||
(interactive)
|
||||
(xscheme-send-char last-command-event))
|
||||
|
||||
(defun xscheme-enter-debugger-mode (prompt-string)
|
||||
(defun xscheme-enter-debugger-mode (_prompt-string)
|
||||
(with-current-buffer (xscheme-process-buffer)
|
||||
(if (not (derived-mode-p 'scheme-debugger-mode))
|
||||
(progn
|
||||
|
|
@ -1024,8 +1024,7 @@ the remaining input.")
|
|||
(xscheme-goto-output-point)
|
||||
(let ((old-point (point)))
|
||||
(while (string-match "\\(\007\\|\f\\)" string)
|
||||
(let ((start (match-beginning 0))
|
||||
(end (match-end 0)))
|
||||
(let ((start (match-beginning 0)))
|
||||
(insert-before-markers (substring string 0 start))
|
||||
(if (= ?\f (aref string start))
|
||||
(progn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue