Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e02f48d7
Commit
e02f48d7
authored
Apr 22, 2011
by
Juanma Barranquero
Browse files
lisp/progmodes/*.el: Lexical-binding cleanup.
parent
7ede3b65
Changes
36
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
398 additions
and
240 deletions
+398
-240
lisp/ChangeLog
lisp/ChangeLog
+158
-0
lisp/progmodes/ada-mode.el
lisp/progmodes/ada-mode.el
+6
-6
lisp/progmodes/ada-prj.el
lisp/progmodes/ada-prj.el
+12
-12
lisp/progmodes/ada-xref.el
lisp/progmodes/ada-xref.el
+2
-2
lisp/progmodes/antlr-mode.el
lisp/progmodes/antlr-mode.el
+9
-9
lisp/progmodes/asm-mode.el
lisp/progmodes/asm-mode.el
+1
-1
lisp/progmodes/bug-reference.el
lisp/progmodes/bug-reference.el
+1
-1
lisp/progmodes/compile.el
lisp/progmodes/compile.el
+13
-13
lisp/progmodes/cpp.el
lisp/progmodes/cpp.el
+2
-3
lisp/progmodes/dcl-mode.el
lisp/progmodes/dcl-mode.el
+13
-11
lisp/progmodes/delphi.el
lisp/progmodes/delphi.el
+11
-16
lisp/progmodes/ebrowse.el
lisp/progmodes/ebrowse.el
+71
-72
lisp/progmodes/etags.el
lisp/progmodes/etags.el
+5
-4
lisp/progmodes/executable.el
lisp/progmodes/executable.el
+3
-1
lisp/progmodes/flymake.el
lisp/progmodes/flymake.el
+5
-5
lisp/progmodes/fortran.el
lisp/progmodes/fortran.el
+1
-1
lisp/progmodes/gdb-mi.el
lisp/progmodes/gdb-mi.el
+47
-44
lisp/progmodes/glasses.el
lisp/progmodes/glasses.el
+1
-1
lisp/progmodes/gud.el
lisp/progmodes/gud.el
+29
-31
lisp/progmodes/hideif.el
lisp/progmodes/hideif.el
+8
-7
No files found.
lisp/ChangeLog
View file @
e02f48d7
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)
...
...
lisp/progmodes/ada-mode.el
View file @
e02f48d7
...
...
@@ -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.
...
...
lisp/progmodes/ada-prj.el
View file @
e02f48d7
...
...
@@ -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
))
...
...
lisp/progmodes/ada-xref.el
View file @
e02f48d7
...
...
@@ -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
""
))
...
...
lisp/progmodes/antlr-mode.el
View file @
e02f48d7
...
...
@@ -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
...
...
lisp/progmodes/asm-mode.el
View file @
e02f48d7
lisp/progmodes/bug-reference.el
View file @
e02f48d7
...
...
@@ -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
)))
...
...
lisp/progmodes/compile.el
View file @
e02f48d7
...
...
@@ -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-nam
e mode-command name-function)
(defun compilation-buffer-name (
name-of-mod
e 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-NAM
E
If
NAME-FUNCTION
is
non-nil,
call
it
with
one
argument
NAME-OF-MOD
E
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-NAM
E.
"
Otherwise,
construct
a
buffer
name
from
NAME-OF-MOD
E.
"
(cond (name-function
(funcall name-function
mode-nam
e))
(funcall name-function
name-of-mod
e))
(compilation-buffer-name-function
(funcall compilation-buffer-name-function
mode-nam
e))
(funcall compilation-buffer-name-function
name-of-mod
e))
((eq mode-command major-mode)
(buffer-name))
(t
(concat "
*
" (downcase
mode-nam
e) "
*
"))))
(concat "
*
" (downcase
name-of-mod
e) "
*
"))))
;; 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
...
...
lisp/progmodes/cpp.el
View file @
e02f48d7
...
...
@@ -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
...
...
lisp/progmodes/dcl-mode.el
View file @
e02f48d7
...
...
@@ -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:'
...
...
lisp/progmodes/delphi.el
View file @
e02f48d7
...
...
@@ -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
)