;;
;; To make sure a certain piece of advice gets executed even if some error or
;; non-local exit occurred in any preceding code, we can protect it by using
-;; the `protect' keyword. (if any of the around advices is protected then the
+;; the `protect' keyword (if any of the around advices is protected then the
;; whole around advice onion will be protected):
;;
;; (defadvice foo (after fg-cleanup prot act)
FUNCTION ::= Name of the function to be advised.
CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'.
NAME ::= Non-nil symbol that names this piece of advice.
-POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
+POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
see also `ad-add-advice'.
ARGLIST ::= An optional argument list to be used for the advised function
instead of the argument list of the original. The first one found in
;; This code helps GNU Emacs maintainers keep the loaddefs.el file up to
;; date. It interprets magic cookies of the form ";;;###autoload" in
-;; lisp source files in various useful ways. To learn more, read the
+;; Lisp source files in various useful ways. To learn more, read the
;; source; if you're going to use this, you'd better be able to.
;;; Code:
file)
(defun autoload-insert-section-header (outbuf autoloads load-name file time)
- "Insert the section-header line,
-which lists the file name and which functions are in it, etc."
+ "Insert the section-header line.
+This lists the file name and which functions are in it, etc."
;; (cl-assert ;Make sure we don't insert it in the middle of another section.
;; (save-excursion
;; (or (not (re-search-backward
\\{backtrace-mode-map}
A mode which inherits from Backtrace mode, or a command which
-creates a backtrace-mode buffer, should usually do the following:
+creates a `backtrace-mode' buffer, should usually do the following:
- Set `backtrace-revert-hook', if the buffer contents need
to be specially recomputed prior to `revert-buffer'.
(intern (substring (symbol-name arg) 5))
arg)
(if (integerp (setq c (car arg)))
- (error "non-symbolic byte-op %s" c))
+ (error "Non-symbolic byte-op %s" c))
(if (eq c 'TAG)
(setq c arg)
(setq a (cond ((memq c byte-goto-ops)
(setq tags (delq tmp tags))
(setq rest (cdr rest))))
(setq rest (cdr rest))))
- (if tags (error "optimizer error: missed tags %s" tags))
+ (if tags (error "Optimizer error: missed tags %s" tags))
;; Remove addrs, lap = ( [ (op . arg) | (TAG tagno) ]* )
(mapcar (lambda (elt)
(if (numberp elt)
(list 'quote (eval (cons 'progn body) lexical-binding)))
(defmacro eval-and-compile (&rest body)
- "Like `progn', but evaluates the body at compile time and at
-load time. In interpreted code, this is entirely equivalent to
-`progn', except that the value of the expression may be (but is
-not necessarily) computed at load time if eager macro expansion
-is enabled."
+ "Like `progn', but evaluates the body at compile time and at load time.
+In interpreted code, this is entirely equivalent to `progn',
+except that the value of the expression may be (but is not
+necessarily) computed at load time if eager macro expansion is
+enabled."
(declare (debug (&rest def-form)) (indent 0))
;; When the byte-compiler expands code, this macro is not used, so we're
;; either about to run `body' (plain interpretation) or we're doing eager
,bytes ,pc))
(defun byte-compile-lapcode (lap)
- "Turns lapcode into bytecode. The lapcode is destroyed."
+ "Turn lapcode into bytecode. The lapcode is destroyed."
;; Lapcode modifications: changes the ID of a tag to be the tag's PC.
(let ((pc 0) ; Program counter
op off ; Operation & offset
"Non-nil to prevent byte-compiling of Emacs Lisp code.
This is normally set in local file variables at the end of the elisp file:
-\;; Local Variables:\n;; no-byte-compile: t\n;; End: ") ;Backslash for compile-main.
+\;; Local Variables:\n;; no-byte-compile: t\n;; End:") ;Backslash for compile-main.
;;;###autoload(put 'no-byte-compile 'safe-local-variable 'booleanp)
(defun byte-recompile-file (filename &optional force arg load)
(not (thing-at-point-looking-at
help-xref-url-regexp)))
(if (checkdoc-autofix-ask-replace
- b e (format "Text %s should be capitalized. Fix? "
+ b e (format "Text %s should be capitalized. Fix?"
text)
(capitalize text) t)
nil
;;; Add support for describe-function
(defun cl--generic-search-method (met-name)
- "For `find-function-regexp-alist'. Searches for a cl-defmethod.
+ "For `find-function-regexp-alist'. Search for a `cl-defmethod'.
MET-NAME is as returned by `cl--generic-load-hist-format'."
(let ((base-re (concat "(\\(?:cl-\\)?defmethod[ \t]+"
(regexp-quote (format "%s" (car met-name)))
;;;###autoload
(defun comp-clean-up-stale-eln (file)
- "Given FILE remove all its *.eln files in `native-comp-eln-load-path'
+ "Given FILE remove all its *.eln files in `native-comp-eln-load-path'.
sharing the original source filename (including FILE)."
(when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos)
file)
(defvar debugger-jumping-flag nil
"Non-nil means that `debug-on-entry' is disabled.
This variable is used by `debugger-jump', `debugger-step-through',
-and `debugger-reenable' to temporarily disable debug-on-entry.")
+and `debugger-reenable' to temporarily disable `debug-on-entry'.")
(defvar inhibit-trace) ;Not yet implemented.
It is a list expected to take the form (CAUSE . REST)
where CAUSE can be:
- debug: called for entry to a flagged function.
-- t: called because of debug-on-next-call.
+- t: called because of `debug-on-next-call'.
- lambda: same thing but via `funcall'.
- exit: called because of exit of a flagged function.
- error: called because of `debug-on-error'.")
(defun debugger-setup-buffer (args)
"Initialize the `*Backtrace*' buffer for entry to the debugger.
-That buffer should be current already and in debugger-mode."
+That buffer should be current already and in `debugger-mode'."
(setq backtrace-frames (nthcdr
;; Remove debug--implement-debug-on-entry and the
;; advice's `apply' frame.
(exit-recursive-edit))
(defun debugger-jump ()
- "Continue to exit from this frame, with all debug-on-entry suspended."
+ "Continue to exit from this frame, with all `debug-on-entry' suspended."
(interactive)
(debugger-frame)
(setq debugger-jumping-flag t)
(exit-recursive-edit))
(defun debugger-reenable ()
- "Turn all debug-on-entry functions back on.
+ "Turn all `debug-on-entry' functions back on.
This function is put on `post-command-hook' by `debugger-jump' and
removes itself from that hook."
(setq debugger-jumping-flag nil)
;;;###autoload
(defun cancel-debug-on-entry (&optional function)
"Undo effect of \\[debug-on-entry] on FUNCTION.
-If FUNCTION is nil, cancel debug-on-entry for all functions.
+If FUNCTION is nil, cancel `debug-on-entry' for all functions.
When called interactively, prompt for FUNCTION in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer."
(interactive
;;;###autoload
(defun cancel-debug-on-variable-change (&optional variable)
"Undo effect of \\[debug-on-variable-change] on VARIABLE.
-If VARIABLE is nil, cancel debug-on-variable-change for all variables.
+If VARIABLE is nil, cancel `debug-on-variable-change' for all variables.
When called interactively, prompt for VARIABLE in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer."
(interactive
A nil value means to simply use the same abbrev-table
as the parent.
:after-hook FORM
- A single lisp form which is evaluated after the mode
+ A single Lisp form which is evaluated after the mode
hooks have been run. It should not be quoted.
:interactive BOOLEAN
Whether the derived mode should be `interactive' or not.
(defun edebug-set-initial-mode ()
"Set the initial execution mode of Edebug.
The mode is requested via the key that would be used to set the mode in
-edebug-mode."
+`edebug-mode'."
(interactive)
(let* ((old-mode edebug-initial-mode)
(key (read-key-sequence
'read-expression-history)))))))
(edebug-modify-breakpoint t condition arg))
-(easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus)
+(easy-menu-define edebug-menu edebug-mode-map "Edebug menus." edebug-mode-menus)
\f
;;; Finalize Loading
:documentation
"Saving this object should make backup files.
Setting to nil will mean no backups are made."))
- "This special class enables persistence through save files
+ "This special class enables persistence through save files.
Use the `object-write' method to write this object to disk. The save
format is Emacs Lisp code which calls the constructor for the saved
object. For this reason, only slots which do not have an `:initarg'
(sit-for 0)))
(defun elint-set-mode-line (&optional on)
- "Set the mode-line-process of the Elint log buffer."
+ "Set the `mode-line-process' of the Elint log buffer."
(with-current-buffer (elint-get-log-buffer)
(and (eq major-mode 'compilation-mode)
(setq mode-line-process
nil)
(defun ert--results-font-lock-function (enabledp)
- "Redraw the ERT results buffer after font-lock-mode was switched on or off.
+ "Redraw the ERT results buffer after `font-lock-mode' was switched on or off.
-ENABLEDP is true if font-lock-mode is switched on, false
+ENABLEDP is true if `font-lock-mode' is switched on, false
otherwise."
(ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats)
(ewoc-refresh ert--results-ewoc)
buffer pretty-printer header footer dll last-node hf-pp)
(defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms)
- "Execute FORMS with ewoc--buffer selected as current buffer,
+ "Execute FORMS with `ewoc--buffer' selected as current buffer,
`dll' bound to the dll, and VARLIST bound as in a let*.
`dll' will be bound when VARLIST is initialized, but
the current buffer will *not* have been changed.
(iter-close ,valsym)))))
(defmacro iter-defun (name arglist &rest body)
- "Creates a generator NAME.
+ "Create a generator NAME.
When called as a function, NAME returns an iterator value that
encapsulates the state of a computation that produces a sequence
of values. Callers can retrieve each value using `iter-next'."
;; encouraged to use 'lisp-data-mode' instead.
(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive
elisp)
- "Common initialization routine for lisp modes.
+ "Common initialization routine for Lisp modes.
The LISP-SYNTAX argument is used by code in inf-lisp.el and is
\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and
score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for
(t (eval spec))))
(defun advice--interactive-form (function)
- ;; Like `interactive-form' but tries to avoid autoloading functions.
+ "Like `interactive-form' but tries to avoid autoloading functions."
(when (commandp function)
(if (not (and (symbolp function) (autoloadp (indirect-function function))))
(interactive-form function)
;;;=========================================================================
(defun testcover-mark (def)
- "Marks one DEF (a function or macro symbol) to highlight its contained forms
+ "Mark one DEF (a function or macro symbol) to highlight its contained forms
that did not get completely tested during coverage tests.
A marking with the face `testcover-nohits' (default = red) indicates that the
form was never evaluated. A marking using the `testcover-1value' face