;;; Commentary:
;; I spend a lot of time working in front of a screen (many hours in a
-;; dimly lit room) and eye fatigue is an issue. This is a dark color
-;; theme for emacs, which is easier on the eyes than light themes.
+;; dimly lit room) and eye fatigue is an issue. This is a dark color
+;; theme for Emacs, which is easier on the eyes than light themes.
;; It does not help that I am blue-green color blind, so subtle
-;; variations are often lost on me. I do want to use color contrast to
+;; variations are often lost on me. I do want to use color contrast to
;; increase productivity, but I also want to avoid the jarring angry
;; fruit salad look, and so I am in the process of crafting a logical
;; color scheme that is high contrast enough for me, without being too
;; In circumstances where there a lot of related faces that can be
;; viewed, for example, the Gnus group buffer, consistent and logical
-;; color choices are the only sane option. Gnus groups can be newa
+;; color choices are the only sane option. Gnus groups can be newa
;; (blueish) or mail (greenish), have states (large number of under
;; messages, normal, and empty). The large number unread groups have
;; highest luminance (appear brighter), and the empty one have lower
;; constant separation -- so all the related groups have the same
;; brightness ({mail,news}/{unread,normal,empty}), and a graded
;; selection of foreground colors. It sounds more complicated that it
-;; looks. The eye is drawn naturally to the unread groups, and first
-;; to the mail, then USENET groups (which is my preference).
+;; looks. The eye is drawn naturally to the unread groups, and first
+;; to the mail, then Usenet groups (which is my preference).
;; Similar color variations occur for individual messages in a group;
;; high scoring messages bubble to the top, and have a higher
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary
+;;; Commentary:
;; The colors in this theme come from the Tango palette, which is in
;; the public domain: http://tango.freedesktop.org/
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary
+;;; Commentary:
;; The colors in this theme come from the Tango palette, which is in
;; the public domain: http://tango.freedesktop.org/
"The current overlays highlighting the text matched by a rule.")
(defvar align-regexp-history nil
- "Input history for the full user-entered regex in `align-regexp'")
+ "Input history for the full user-entered regex in `align-regexp'.")
;; Sample extension rule set for vhdl-mode. This is now obsolete.
(defcustom align-vhdl-rules-list
;; invoke allout-widgets-mode in a particular allout buffer. When
;; auto-enabled, you can inhibit widget operation in particular allout
;; buffers by setting the variable `allout-widgets-mode-inhibit' non-nil in
-;; that file's buffer. Use emacs *file local variables* to generally
+;; that file's buffer. Use Emacs *file local variables* to generally
;; inhibit for a file.
;;
;; See the `allout-widgets-mode' docstring for more details.
;; bindings for easy outline navigation and exposure control, extending
;; outline hot-spot navigation (see `allout-mode' docstring for details).
;;
-;; Developers note: Our use of emacs widgets is unconventional. We
+;; Developers note: Our use of Emacs widgets is unconventional. We
;; decorate existing text rather than substituting for it, to
;; piggy-back on existing allout operation. This employs the C-coded
;; efficiencies of widget-apply, widget-get, and widget-put, along
"Allout extension that highlights outline structure graphically.
Customize `allout-widgets-auto-activation' to activate allout-widgets
-with allout-mode."
+with `allout-mode'."
:group 'allout)
;;;_ > defgroup allout-widgets-developer
(defgroup allout-widgets-developer nil
;;;_ ; some functions a bit early, for allout-auto-activation dependency:
;;;_ > allout-widgets-mode-enable
(defun allout-widgets-mode-enable ()
- "Enable allout-widgets-mode in allout-mode buffers.
+ "Enable `allout-widgets-mode' in `allout-mode' buffers.
See `allout-widgets-mode-inhibit' for per-file/per-buffer
-inhibition of allout-widgets-mode."
+inhibition of `allout-widgets-mode'."
(add-hook 'allout-mode-off-hook #'allout-widgets-mode-off)
(add-hook 'allout-mode-on-hook #'allout-widgets-mode-on)
t)
;;;_ > allout-widgets-mode-disable
(defun allout-widgets-mode-disable ()
- "Disable allout-widgets-mode in allout-mode buffers.
+ "Disable `allout-widgets-mode' in `allout-mode' buffers.
See `allout-widgets-mode-inhibit' for per-file/per-buffer
-inhibition of allout-widgets-mode."
+inhibition of `allout-widgets-mode'."
(remove-hook 'allout-mode-off-hook #'allout-widgets-mode-off)
(remove-hook 'allout-mode-on-hook #'allout-widgets-mode-on)
t)
)
;;;_ = allout-doing-exposure-undo-processor nil
(defvar allout-undo-exposure-in-progress nil
- "Maintained true during `allout-widgets-exposure-undo-processor'")
+ "Maintained true during `allout-widgets-exposure-undo-processor'.")
;;;_ , Widget-specific outline text format
;;;_ = allout-escaped-prefix-regexp
(defvar-local allout-escaped-prefix-regexp ""
)
;;;_ > allout-new-item-widget ()
(defsubst allout-new-item-widget ()
- "create a new item widget, not yet situated anywhere."
+ "Create a new item widget, not yet situated anywhere."
(if allout-widgets-maintain-tally
;; all the extra overhead is incurred only when doing the
;; maintenance, except the condition, which can't be avoided.
;;; Commentary:
;; Allout outline minor mode provides extensive outline formatting and
-;; and manipulation beyond standard emacs outline mode. Some features:
+;; and manipulation beyond standard Emacs outline mode. Some features:
;;
;; - Classic outline-mode topic-oriented navigation and exposure adjustment
;; - Topic-oriented editing including coherent topic and subtopic
;; - Customizable bullet format -- enables programming-language specific
;; outlining, for code-folding editing. (Allout code itself is to try it;
;; formatted as an outline -- do ESC-x eval-buffer in allout.el; but
-;; emacs local file variables need to be enabled when the
+;; Emacs local file variables need to be enabled when the
;; file was visited -- see `enable-local-variables'.)
;; - Configurable per-file initial exposure settings
;; - Symmetric-key and key-pair topic encryption. Encryption is via the
)
"Allout-mode functions bound to keys without any added prefix.
-This is in contrast to the majority of allout-mode bindings on
+This is in contrast to the majority of `allout-mode' bindings on
`allout-prefixed-keybindings', whose bindings are created with a
preceding command key.
activated when files are visited with non-nil buffer-specific
file variable `allout-layout'.
-When allout-auto-activation is \"On\" (t), allout mode is
+When `allout-auto-activation' is \"On\" (t), allout mode is
activated in buffers with non-nil `allout-layout', and the
specified layout is applied.
buffers. (You could use a function on `allout-mode-hook' to inhibit
auto-fill according, eg, to the major mode.)
-If you don't set this and auto-fill-mode is enabled, allout will use the
+If you don't set this and `auto-fill-mode' is enabled, allout will use the
value that `normal-auto-fill-function', if any, when allout mode starts, or
else allout's special hanging-indent maintaining auto-fill function,
`allout-auto-fill'."
- if the cursor is on the first column of the headline:
then it goes to the start of the headline within the item body.
-In this fashion, you can use the beginning-of-line command to do
+In this fashion, you can use the `beginning-of-line' command to do
its normal job and then, when repeated, advance through the
entry, cycling back to start.
automatically activated. The layout dictated by the value will be used to
set the initial exposure when `allout-mode' is activated.
-*You should not setq-default this variable non-nil unless you want every
+*You should not `setq-default' this variable non-nil unless you want every
visited file to be treated as an allout file.*
The value would typically be set by a file local variable. For
(if qualifier
(cond ((eq qualifier 'extend)
(if (not (listp prior-value))
- (error "extension of non-list prior value attempted")
+ (error "Extension of non-list prior value attempted")
(set name (cons value prior-value))))
((eq qualifier 'append)
(if (not (listp prior-value))
- (error "appending of non-list prior value attempted")
+ (error "Appending of non-list prior value attempted")
(set name (append prior-value (list value)))))
- (t (error "unrecognized setting qualifier `%s' encountered"
+ (t (error "Unrecognized setting qualifier `%s' encountered"
qualifier)))
(set name value)))))
;;;_ > allout-do-resumptions ()
(defun allout-do-resumptions ()
"Resume all name/value settings registered by `allout-add-resumptions'.
-This is used when concluding allout-mode, to resume selected variables to
-their settings before allout-mode was started."
+This is used when concluding `allout-mode', to resume selected variables to
+their settings before `allout-mode' was started."
(while allout-mode-prior-settings
(let* ((pair (pop allout-mode-prior-settings))
allout-recent-depth)
;;;_ > allout-recent-prefix ()
(defsubst allout-recent-prefix ()
- "Like `allout-recent-depth', but returns text of last encountered prefix.
+ "Like `allout-recent-depth', but return text of last encountered prefix.
All outline functions which directly do string matches to assess
headings set the variables `allout-recent-prefix-beginning' and
allout-recent-prefix-end))
;;;_ > allout-recent-bullet ()
(defmacro allout-recent-bullet ()
- "Like `allout-recent-prefix', but returns bullet of last encountered prefix.
+ "Like `allout-recent-prefix', but return bullet of last encountered prefix.
All outline functions which directly do string matches to assess
headings set the variables `allout-recent-prefix-beginning' and
(start-arg arg)
(backward (> 0 arg)))
(if (= 0 start-depth)
- (error "No siblings, not in a topic..."))
+ (error "No siblings, not in a topic"))
(if backward (setq arg (* -1 arg)))
(allout-back-to-current-heading)
(while (and (not (zerop arg))
`allout-mode-map-value'.")
;;;_ = allout-command-counter
(defvar-local allout-command-counter 0
- "Counter that monotonically increases in allout-mode buffers.
+ "Counter that monotonically increases in `allout-mode' buffers.
Set by `allout-pre-command-business', to support allout addons in
coordinating with allout activity.")
;;;_ - Topic Format Assessment
;;;_ > allout-solicit-alternate-bullet (depth &optional current-bullet)
(defun allout-solicit-alternate-bullet (depth &optional current-bullet)
-
"Prompt for and return a bullet char as an alternative to the current one.
Offer one suitable for current depth DEPTH as default."
(after-bullet-pos (point))
(was-encrypted
(progn (if (= (point-max) after-bullet-pos)
- (error "no body to encrypt"))
+ (error "No body to encrypt"))
(allout-encrypted-topic-p)))
(was-collapsed (if (not (search-forward "\n" nil t))
nil
;; validate result -- non-empty
(if (not result-text)
- (error "%scryption failed." (if decrypt "De" "En")))
+ (error "%scryption failed" (if decrypt "De" "En")))
(when (eq keypair-mode 'prompt-save)
;; The "Graphic Rendition Combination Mode (GRCM)" implemented is
;; "cumulative mode" as defined in section 7.2.8. Cumulative mode
;; means that whenever possible, SGR control sequences are combined
-;; (ie. blue and bold).
+;; (i.e. blue and bold).
;; The basic functions are:
;;
commands also has an optional argument to request a more extensive search.
Additionally, this option makes the function `apropos-library'
-include key-binding information in its output."
+include keybinding information in its output."
:type 'boolean)
(defface apropos-symbol
neh ;beginning of next extension header (level 1 and 2)
mode uid gid dir prname
gname uname modtime moddate)
- (if (= hdrlvl 3) (error "can't handle lzh level 3 header type"))
+ (if (= hdrlvl 3) (error "Can't handle lzh level 3 header type"))
(when (or (= hdrlvl 0) (= hdrlvl 1))
(setq fnlen (get-byte (+ p 21))) ;filename length
(setq efnname (let ((str (buffer-substring (+ p 22) (+ p 22 fnlen)))) ;filename from offset 22
;;;###autoload
(defcustom auth-source-cache-expiry 7200
- "How many seconds passwords are cached, or nil to disable
-expiring. Overrides `password-cache-expiry' through a
-let-binding."
+ "How many seconds passwords are cached, or nil to disable expiring.
+Overrides `password-cache-expiry' through a let-binding."
:version "24.1"
:type '(choice (const :tag "Never" nil)
(const :tag "All Day" 86400)
soon as a function returns non-nil.")
(defun auth-source-backend-parse (entry)
- "Create an auth-source-backend from an ENTRY in `auth-sources'."
+ "Create an `auth-source-backend' from an ENTRY in `auth-sources'."
(let ((backend
(run-hook-with-args-until-success 'auth-source-backend-parser-functions
(password-cache-remove (auth-source-format-cache-entry spec)))
(defun auth-source-forget+ (&rest spec)
- "Forget any cached data matching SPEC. Returns forgotten count.
+ "Forget any cached data matching SPEC. Return forgotten count.
This is not a full `auth-source-search' spec but works similarly.
For instance, \(:host \"myhost\" \"yourhost\") would find all the
(mapcar #'1- string)))
(defun auth-source--pad (string length)
- "Pad string S to a modulo of LENGTH."
+ "Pad STRING to a modulo of LENGTH."
(let ((pad (- length (mod (length string) length))))
(concat string (make-string pad pad))))
authentication tokens:
(let ((auth-sources \\='(\"secrets:Login\")))
- (auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))
-"
+ (auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))"
;; TODO
;; (secrets-delete-item coll elt)
entries for git.gnus.org:
(let ((auth-sources \\='(macos-keychain-internet\")))
- (auth-source-search :max 1 :host \"git.gnus.org\"))
-"
+ (auth-source-search :max 1 :host \"git.gnus.org\"))"
;; TODO
(cl-assert (not create) nil
"The macOS Keychain auth-source backend doesn't support creation yet")
(defun auth-source--decode-octal-string (string)
- "Convert octal string to utf-8 string. E.g: 'a\134b' to 'a\b'"
+ "Convert octal STRING to utf-8 string. E.g: 'a\134b' to 'a\b'."
(let ((list (string-to-list string))
(size (length string)))
(decode-coding-string
;; buffer contains no unsaved changes.
;;
;; Auto-Revert Mode can be activated for individual buffers. Global
-;; Auto-Revert Mode applies to all file buffers. (If the user option
+;; Auto-Revert Mode applies to all file buffers. (If the user option
;; `global-auto-revert-non-file-buffers' is non-nil, it also applies
;; to some non-file buffers. This option is disabled by default.)
;;
;; at the end of the buffer in that window, even if the window is not
;; selected. This way, you can use Auto-Revert Mode to `tail' a file.
;; Just put point at the end of the buffer and it will stay there.
-;; These rules apply to file buffers. For non-file buffers, the
+;; These rules apply to file buffers. For non-file buffers, the
;; behavior may be mode dependent.
;;
;; While you can use Auto-Revert Mode to tail a file, this package
"Return a prioritized list of buffers to maybe auto-revert.
The differences between this return value and the reference
variable `auto-revert-buffer-list' include: 1) this has more
-entries when in global-auto-revert-mode; 2) this prioritizes
-buffers not reverted last time due to user interruption. "
+entries when in `global-auto-revert-mode'; 2) this prioritizes
+buffers not reverted last time due to user interruption."
(let ((bufs (delq nil
;; Buffers with remote contents shall be reverted only
;; if the connection is established already.
(nreverse (nconc new remaining))))
(defun auto-revert-buffer (buf)
- "Revert a single buffer.
+ "Revert a single buffer BUF.
This is performed as specified by Auto-Revert and Global
Auto-Revert Modes."
(list `(quote ,standard-mode-line-format))))
\f
-(defun mode-line-unbury-buffer (event) "\
-Call `unbury-buffer' in this window."
+(defun mode-line-unbury-buffer (event)
+ "Call `unbury-buffer' in this window."
(interactive "e")
(with-selected-window (posn-window (event-start event))
(unbury-buffer)))
-(defun mode-line-bury-buffer (event) "\
-Like `bury-buffer', but temporarily select EVENT's window."
+(defun mode-line-bury-buffer (event)
+ "Like `bury-buffer', but temporarily select EVENT's window."
(interactive "e")
(with-selected-window (posn-window (event-start event))
(bury-buffer)))
-(defun mode-line-other-buffer () "\
-Switch to the most recently selected buffer other than the current one."
+(defun mode-line-other-buffer ()
+ "Switch to the most recently selected buffer other than the current one."
(interactive)
(switch-to-buffer (other-buffer) nil t))
ANNOTATION is a string that describes the bookmark.
See options `bookmark-use-annotations' and
`bookmark-automatically-show-annotations'.
-HANDLER is a function that provides the bookmark-jump behavior for a
+HANDLER is a function that provides the `bookmark-jump' behavior for a
specific kind of bookmark instead of the default `bookmark-default-handler'.
This is the case for Info bookmarks, for instance. HANDLER must accept
a bookmark as its single argument.
(declare-function math-to-percentsigns "calccomp" (x))
(defvar calc-quick-calc-history nil
- "The history list for quick-calc.")
+ "The history list for `quick-calc'.")
;;;###autoload
(defun calc-do-quick-calc (&optional insert)
(defun math-power-of-2 (n) ; [I I] [Public]
(if (natnump n)
(ash 1 n)
- (error "argument must be a natural number")))
+ (error "Argument must be a natural number")))
(defun math-integer-log2 (n) ; [I I] [Public]
(and (natnump n)
;;; Users can redefine this in their init files.
(defvar calc-keypad-user-menu nil
- "If non-nil, this describes an additional menu for calc-keypad.
+ "If non-nil, this describes an additional menu for `calc-keypad'.
It should contain a list of three rows.
Each row should be a list of six keys.
Each key should be a list of a label string, plus a Calc command name spec.
(defvar calc-verify-arglist t)
(defun calc-map-stack ()
- "This is meant to be called by calc-keypad mode."
+ "This is meant to be called by `calc-keypad' mode."
(interactive)
(let ((calc-verify-arglist nil))
(calc-unread-command ?\$)
;;; Commentary:
+;;; Code:
+
(defvar calc-arithmetic-menu
(list "Arithmetic"
(list "Basic"
0 (zero) calc-reset. Reset Calc stack and modes to default state.
Press `*' twice (`C-x * *') to turn Calc on or off using the same
-Calc user interface as before (either C-x * C or C-x * K; initially C-x * C).
-"
+Calc user interface as before (either C-x * C or C-x * K; initially C-x * C)."
(interactive "P")
(calc-check-defines)
(if calc-dispatch-help
(calc-slow-wrapper
(let* ((expr (calc-top-n 1)))
(unless (math-units-in-expr-p expr t)
- (error "No units in expression."))
+ (error "No units in expression"))
(let* ((old-units (math-extract-units expr))
(defunits (math-get-default-units expr))
units
(defcustom calc-embedded-announce-formula
"%Embed\n\\(% .*\n\\)*"
- "A regular expression which is sure to be followed by a calc-embedded formula."
+ "A regular expression which is sure to be followed by a `calc-embedded' formula."
:type '(regexp))
(defcustom calc-embedded-announce-formula-alist
(defcustom calc-embedded-close-formula
"\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n"
- "Regexp for the closing delimiter of a formula used by calc-embedded."
+ "Regexp for the closing delimiter of a formula used by `calc-embedded'."
:type '(regexp))
(defcustom calc-embedded-open-close-formula-alist
nil
- "Alist of major modes with pairs of formula delimiters used by calc-embedded."
+ "Alist of major modes with pairs of formula delimiters used by `calc-embedded'."
:type '(alist :key-type (symbol :tag "Major mode")
:value-type (list (regexp :tag "Opening formula delimiter")
(regexp :tag "Closing formula delimiter"))))
(defcustom calc-embedded-open-mode
"% "
- "A string which should precede calc-embedded mode annotations.
+ "A string which should precede `calc-embedded' mode annotations.
This is not required to be present for user-written mode annotations."
:type '(string))
(defcustom calc-embedded-close-mode
"\n"
- "A string which should follow calc-embedded mode annotations.
+ "A string which should follow `calc-embedded' mode annotations.
This is not required to be present for user-written mode annotations."
:type '(string))
:type '(string)
:version "26.2")
-(defcustom calc-gnuplot-plot-command
- nil
+(defcustom calc-gnuplot-plot-command nil
"Name of command for displaying GNUPLOT output; %s = file name to print."
:type '(choice (string) (sexp)))
-(defcustom calc-gnuplot-print-command
- "lp %s"
+(defcustom calc-gnuplot-print-command "lp %s"
"Name of command for printing GNUPLOT output; %s = file name to print."
:type '(choice (string) (sexp)))
-(defcustom calc-multiplication-has-precedence
- t
- "If non-nil, multiplication has precedence over division
-in normal mode."
+(defcustom calc-multiplication-has-precedence t
+ "If non-nil, multiplication has precedence over division in normal mode."
:type 'boolean)
-(defcustom calc-ensure-consistent-units
- nil
+(defcustom calc-ensure-consistent-units nil
"If non-nil, make sure new units are consistent with current units
when converting units."
:version "24.3"
:type 'boolean)
-(defcustom calc-context-sensitive-enter
- nil
+(defcustom calc-context-sensitive-enter nil
"If non-nil, the stack element under the cursor will be copied by `calc-enter'
and deleted by `calc-pop'."
:version "24.4"
:type 'boolean)
-(defcustom calc-undo-length
- 100
+(defcustom calc-undo-length 100
"The number of undo steps that will be preserved when Calc is quit."
:type 'integer)
-(defcustom calc-highlight-selections-with-faces
- nil
+(defcustom calc-highlight-selections-with-faces nil
"If non-nil, use a separate face to indicate selected sub-formulas.
If option `calc-show-selections' is non-nil, then selected sub-formulas are
shown by displaying the rest of the formula in `calc-nonselected-face'.
:version "24.1"
:type 'boolean)
-(defcustom calc-lu-field-reference
- "20 uPa"
+(defcustom calc-lu-field-reference "20 uPa"
"The default reference level for logarithmic units (field)."
:version "24.1"
:type '(string))
-(defcustom calc-lu-power-reference
- "mW"
+(defcustom calc-lu-power-reference "mW"
"The default reference level for logarithmic units (power)."
:version "24.1"
:type '(string))
"List of strings for Y prefix help.")
(defvar calc-loaded-settings-file nil
- "t if `calc-settings-file' has been loaded yet.")
+ "Return t if `calc-settings-file' has been loaded yet.")
(defvar calc-mode-var-list '()
(defvar calc-lang-allow-percentsigns nil
"A list of languages which allow percent signs in variable names.")
(defvar calc-lang-c-type-hex nil
- "Languages in which octal and hex numbers are written with leading 0 and 0x,")
+ "Languages in which octal and hex numbers are written with leading 0 and 0x.")
(defvar calc-lang-brackets-are-subscripts nil
"Languages in which subscripts are indicated by brackets.")
(defvar calc-lang-parens-are-subscripts nil
<1 jan 91> Date form (enter using \\=' key)
-\\{calc-mode-map}
-"
+\\{calc-mode-map}"
(interactive)
(mapc (lambda (v)
;; FIXME: Why (set-default v (symbol-value v)) ?!?!?
map))
(defun calc--header-line (long short width &optional fudge)
- "Return a Calc header line appropriate for the buffer width.
+ "Return a Calc header line appropriate for the buffer WIDTH.
LONG is a desired text for a wide window, SHORT is a desired
abbreviated text, and width is the buffer width, which will be
some fraction of the 'parent' window width (At the time of
-writing, 2/3 for calc, 1/3 for trail). The optional FUDGE is a
+writing, 2/3 for calc, 1/3 for trail). The optional FUDGE is a
trial-and-error adjustment number for the edge-cases at the
border of the two cases."
;; TODO: This could be called as part of a 'window-resize' hook.
This mode is used by the *Calc Trail* buffer, which records all results
obtained by the GNU Emacs Calculator.
-Calculator commands beginning with the `t' key are used to manipulate
+Calculator commands beginning with the t key are used to manipulate
the Trail.
This buffer uses the same key map as the *Calculator* buffer; calculator
(calc nil t interactive))
(defun calc-same-interface (arg)
- "Invoke the Calculator using the most recent interface (calc or calc-keypad)."
+ "Invoke the Calculator using the most recent interface (`calc' or `calc-keypad')."
(interactive "P")
(if (and (equal (buffer-name) "*Gnuplot Trail*")
(> (recursion-depth) 0))
"Invoke the Calculator in \"visual keypad\" mode.
This is most useful in the X window system.
In this mode, click on the Calc \"buttons\" using the left mouse button.
-Or, position the cursor manually and do M-x calc-keypad-press."
+Or, position the cursor manually and do \\[calc-keypad-press]."
(interactive "p")
(require 'calc-ext)
(calc-do-keypad calc-full-mode interactive))
(calculator-put-value (calculator-string-to-number str)))))
(defun calculator-register-read-with-preview (prompt)
- "Similar to `register-read-with-preview' but for calculator
-registers."
+ "Similar to `register-read-with-preview' but for calculator registers."
(let ((register-alist calculator-registers)
(register-preview-delay 1)
(register-preview-function
document class with inclusion of default values \"12pt\" for
size, and \"a4paper\" for paper unless size or paper are already
specified in ARGS. When ARGS is omitted, by default the option
-\"12pt,a4paper\" is passed. When ARGS has any other value, then
+\"12pt,a4paper\" is passed. When ARGS has any other value, then
no option is passed to the class.
Insert the \"\\usepackage{geometry}\" directive when ARGS
(defun icalendar--convert-float-to-ical (nonmarker entry-main)
"Convert float diary entry to iCalendar format -- partially unsupported!
- FIXME! DAY from diary-float yet unimplemented.
+ FIXME! DAY from `diary-float' yet unimplemented.
NONMARKER is a regular expression matching the start of non-marking
entries. ENTRY-MAIN is the first line of the diary entry."
map)
"Todo Filtered Items mode keymap.")
-(easy-menu-define
- todo-menu todo-mode-map "Todo Menu"
+(easy-menu-define todo-menu todo-mode-map
+ "Todo Menu."
'("Todo"
("Navigation"
["Next Item" todo-next-item t]
(let* ((fc (oref dirmatch fromconfig))
(found (cond ((stringp fc) fc)
((functionp fc) (funcall fc))
- (t (error "Unknown dirmatch object match style.")))))
+ (t (error "Unknown dirmatch object match style")))))
(expand-file-name found)
))
;; Error if none others known
(t
- (error "Unknown dirmatch object match style.")))
+ (error "Unknown dirmatch object match style")))
))
(declare-function ede-directory-safe-p "ede")
;;
;; If the cpp-root project style is right for you, but you want a
;; dynamic loader, instead of hard-coding values in your .emacs, you
-;; can do that too, but you will need to write some lisp code.
+;; can do that too, but you will need to write some Lisp code.
;;
;; To do that, you need to add an entry to the
;; `ede-project-class-files' list, and also provide two functions to
;; Formatting of a makefile
;;
;; 1) Creating an automakefile, stick in a top level comment about
-;; being created by emacs
+;; being created by Emacs.
;; 2) Leave order of variable contents alone, except for SOURCE
;; SOURCE always keep in the order of .c, .h, the other stuff.
Each package name will be loaded with `require'.
Each package's directory should also appear in :aux-packages via a package name.")
)
- "This target consists of a group of lisp files.
-A lisp target may be one general program with many separate lisp files in it.")
+ "This target consists of a group of Lisp files.
+A Lisp target may be one general program with many separate Lisp files in it.")
(cl-defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp))
"Insert rules needed by THIS target.
;; Provide a good error msg.
(unless comp
(error "Could not find compiler match for source code extension \"%s\".
-You may need to add support for this type of file."
+You may need to add support for this type of file"
(if sources
(file-name-extension (car sources))
"")))
(defclass project-am-program (project-am-objectcode)
((ldadd :initarg :ldadd :documentation "Additional LD args."
:initform nil))
- "A top level program to build")
+ "A top level program to build.")
(defclass project-am-header (project-am-target)
()
(defclass project-am-lib (project-am-objectcode)
nil
- "A top level library to build")
+ "A top level library to build.")
(defclass project-am-lisp (project-am-target)
()
(oset this source (makefile-macro-file-list (project-am-macro this))))
(cl-defmethod project-rescan ((this project-am-lisp))
- "Rescan the lisp sources."
+ "Rescan the Lisp sources."
(oset this source (makefile-macro-file-list (project-am-macro this))))
(cl-defmethod project-rescan ((this project-am-header))
(ede-want-file-auxiliary-p this filename)))
(cl-defmethod ede-want-file-source-p ((this ede-sourcecode) filename)
- "Return non-nil if THIS will take FILENAME as an auxiliary ."
+ "Return non-nil if THIS will take FILENAME as an auxiliary."
(let ((case-fold-search nil))
(string-match (oref this sourcepattern) filename)))
(cl-defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename)
- "Return non-nil if THIS will take FILENAME as an auxiliary ."
+ "Return non-nil if THIS will take FILENAME as an auxiliary."
(let ((case-fold-search nil))
(and (slot-boundp this 'auxsourcepattern)
(oref this auxsourcepattern)
(defconst xref-mode-local-find-overloadable-regexp
"(define-overload\\(able-function\\)? +%s"
"Regexp used by `xref-find-definitions' when searching for a
- mode-local overloadable function definition.")
+mode-local overloadable function definition.")
(defun xref-mode-local-find-override (meta-name)
"Function used by `xref-find-definitions' when searching for an
- override of a mode-local overloadable function.
+override of a mode-local overloadable function.
META-NAME is a cons (OVERLOADABLE-SYMBOL . MAJOR-MODE)."
(let* ((override (car meta-name))
(mode (cdr meta-name))
(defsubst semantic-error-if-unparsed ()
"Raise an error if current buffer was not parsed by Semantic."
(unless semantic-new-buffer-fcn-was-run
- (error "Buffer was not parsed by Semantic.")))
+ (error "Buffer was not parsed by Semantic")))
(defsubst semantic--umatched-syntax-needs-refresh-p ()
"Return non-nil if the unmatched syntax cache needs a refresh.
;; Buffer was not parsed by Semantic.
;; Raise error if called interactively.
(when (called-interactively-p 'any)
- (error "Buffer was not parsed by Semantic."))))
+ (error "Buffer was not parsed by Semantic"))))
(defvar semantic--prefixtypes)
(define-mode-local-override semanticdb-find-table-for-include c-mode
(includetag &optional table)
- "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
+ "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object.
INCLUDETAG is a semantic TAG of class `include'.
TABLE is a semanticdb table that identifies where INCLUDETAG came from.
TABLE is optional if INCLUDETAG has an overlay of :filename attribute.
(if blankok t (semantic--tag-similar-names-p-default tag1 tag2 nil)))
(define-mode-local-override semantic--tag-similar-types-p c-mode (tag1 tag2)
- "For c-mode, deal with TAG1 and TAG2 being used in different namespaces.
+ "For `c-mode', deal with TAG1 and TAG2 being used in different namespaces.
In this case, one type will be shorter than the other. Instead
of fully resolving all namespaces currently in scope for both
types, we simply compare as many elements as the shorter type
(define-mode-local-override semantic--tag-attribute-similar-p c-mode
(attr value1 value2 ignorable-attributes)
- "For c-mode, allow function :arguments to ignore the :name attributes."
+ "For `c-mode', allow function :arguments to ignore the :name attributes."
(cond ((eq attr :arguments)
(semantic--tag-attribute-similar-p-default attr value1 value2
(cons :name ignorable-attributes)))
:documentation
"An error condition caught in an action.")
)
- "Debugger frame representation of a lisp error thrown during parsing.")
+ "Debugger frame representation of a Lisp error thrown during parsing.")
(defun semantic-create-bovine-debug-error-frame (condition)
"Create an error frame for bovine debugger.
(cl-defmethod semantic-collector-calculate-completions-raw
((obj semantic-collector-analyze-completions) prefix _completionlist)
- "calculate the completions for prefix from COMPLETIONLIST."
+ "Calculate the completions for prefix from COMPLETIONLIST."
;; if there are no completions yet, calculate them.
(if (not (slot-boundp obj 'first-pass-completions))
(oset obj first-pass-completions
;;
(cl-defmethod semanticdb-find-tags-external-children-of-type-method
((_table semanticdb-table-emacs-lisp) type &optional tags)
- "Find all nonterminals which are child elements of TYPE
+ "Find all nonterminals which are child elements of TYPE.
Optional argument TAGS is a list of tags to search.
Return a list of tags."
(if tags (cl-call-next-method)
;;;###autoload
(define-overloadable-function semanticdb-find-table-for-include (includetag &optional table)
- "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
+ "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object.
INCLUDETAG is a semantic TAG of class `include'.
TABLE is a semanticdb table that identifies where INCLUDETAG came from.
TABLE is optional if INCLUDETAG has an overlay of :filename attribute."
(cl-defmethod semanticdb-typecache-for-database ((db semanticdb-project-database)
&optional mode)
"Return the typecache for the project database DB.
-If there isn't one, create it.
-"
+If there isn't one, create it."
(let ((lmode (or mode major-mode))
(cache (semanticdb-get-typecache db))
(stream nil)
:documentation
"Any active overlays being used to show the debug position.")
)
- "Controls action when in `semantic-debug-mode'")
+ "Controls action when in `semantic-debug-mode'.")
;; Methods
(cl-defmethod semantic-debug-set-frame ((iface semantic-debug-interface) frame)
(cl-defmethod semantic-debug-parser-frames ((_parser semantic-debug-parser))
"Return a list of frames for the current parser.
A frame is of the form:
- ( .. .what ? .. )
-"
- (error "Parser has not implemented frame values")
- )
+ ( .. .what ? .. )"
+ (error "Parser has not implemented frame values"))
(provide 'semantic/debug)
(easy-menu-define
semantic-decoration-on-include-menu
semantic-decoration-on-include-map
- "Include Menu"
+ "Include Menu."
(list
"Include"
["What Is This?" semantic-decoration-include-describe
(easy-menu-define
semantic-decoration-on-unknown-include-menu
semantic-decoration-on-unknown-include-map
- "Unknown Include Menu"
+ "Unknown Include Menu."
(list
"Unknown Include"
["What Is This?" semantic-decoration-unknown-include-describe
(easy-menu-define
semantic-decoration-on-fileless-include-menu
semantic-decoration-on-fileless-include-map
- "Fileless Include Menu"
+ "Fileless Include Menu."
(list
"Fileless Include"
["What Is This?" semantic-decoration-fileless-include-describe
(easy-menu-define
semantic-decoration-on-unparsed-include-menu
semantic-decoration-on-unparsed-include-map
- "Unparsed Include Menu"
+ "Unparsed Include Menu."
(list
"Unparsed Include"
["What Is This?" semantic-decoration-unparsed-include-describe
(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar))
"Insert dist dependencies, or intermediate targets.
-This makes sure that all grammar lisp files are created before the dist
+This makes sure that all grammar Lisp files are created before the dist
runs, so they are always up to date.
Argument THIS is the target that should insert stuff."
(cl-call-next-method)
(defvar semantic-current-input-throw-symbol nil
"The current throw symbol for `semantic-exit-on-input'.")
(defvar semantic--on-input-start-marker nil
- "The marker when starting a semantic-exit-on-input form.")
+ "The marker when starting a `semantic-exit-on-input' form.")
(defmacro semantic-exit-on-input (symbol &rest forms)
"Using SYMBOL as an argument to `throw', execute FORMS.
Lisp code."
(interactive "P")
(unless (semantic-active-p)
- (error "You have to activate semantic-mode to create a package."))
+ (error "You have to activate semantic-mode to create a package"))
(setq force (or force current-prefix-arg))
(semantic-fetch-tags)
(let* (
(easy-menu-define
semantic-idle-breadcrumbs-popup-menu
semantic-idle-breadcrumbs-popup-map
- "Semantic Breadcrumbs Mode Menu"
+ "Semantic Breadcrumbs Mode Menu."
(list
"Breadcrumb Tag"
(vector
)
"A symref tool implementation using grep.
This tool uses EDE to find the root of the project, then executes
-find-grep in the project. The output is parsed for hits and
+`find-grep' in the project. The output is parsed for hits and
those hits returned.")
(defvar semantic-symref-filepattern-alist
(easy-menu-define semantic-symref-list-menu
semantic-symref-results-mode-map
- "Symref Mode Menu"
+ "Symref Mode Menu."
semantic-symref-list-menu-entries)
(defcustom semantic-symref-auto-expand-results nil
Statement that declares this file's package name.
@item code
Code that has not name or binding to any other symbol, such as in a script.
-@end table
-"
+@end table"
(nth 1 tag))
(defsubst semantic-tag-attributes (tag)
It is safe to modify ATTR, and return a permutation of that list.
-FILTER takes TAG as an argument, and should returns a semantic-tag.
+FILTER takes TAG as an argument, and should return a semantic-tag.
It is safe for FILTER to modify the input tag and return it."
(when (car attrs)
(when (not (symbolp (car attrs))) (error "Bad Attribute List in tag"))
It is safe to modify VALUE, and return a permutation of that list.
-FILTER takes TAG as an argument, and should returns a semantic-tag.
+FILTER takes TAG as an argument, and should return a semantic-tag.
It is safe for FILTER to modify the input tag and return it."
(cond
;; Another tag.
It is safe to modify the TAGS list, and return a permutation of that list.
-FILTER takes TAG as an argument, and should returns a semantic-tag.
+FILTER takes TAG as an argument, and should return a semantic-tag.
It is safe for FILTER to modify the input tag and return it."
(when (car tags)
(if (semantic-tag-p (car tags))
;;; Support log modes here
(define-mode-local-override semantic-insert-foreign-tag
log-edit-mode (foreign-tag)
- "Insert foreign tags into log-edit mode."
+ "Insert foreign tags into `log-edit' mode."
(insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
(define-mode-local-override semantic-insert-foreign-tag
change-log-mode (foreign-tag)
- "Insert foreign tags into log-edit mode."
+ "Insert foreign tags into `log-edit' mode."
(insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
\f
(easy-menu-define
semantic-stickyfunc-popup-menu
semantic-stickyfunc-mode-map
- "Stickyfunc Menu"
+ "Stickyfunc Menu."
'("Stickyfunc Mode" :visible (progn nil)
[ "Copy Headerline Tag" senator-copy-tag
:active (semantic-current-tag)
(easy-menu-define
semantic-highlight-func-popup-menu
semantic-highlight-func-mode-map
- "Highlight-Func Menu"
+ "Highlight-Func Menu."
'("Highlight-Func Mode" :visible (progn nil)
[ "Copy Tag" senator-copy-tag
:active (semantic-current-tag)
\"pure\" - and those virtual items are pure virtual
\"type\" - In or near type declarations.
\"comment\" - In a comment in a block of code
- -- these items show up at the end of the context list. --
+ -- these items show up at the end of the context list. --
\"public\", \"protected\", \"private\" -
In or near a section of public/protected/private entries.
\"code\" - In a block of code.
"Return information about DICT's value for NAME.
DICT is a dictionary, and NAME is a string that is treated as the
name of an entry in the dictionary. If such an entry exists, its
-value is returned. Otherwise, nil is returned. Normally, the
+value is returned. Otherwise, nil is returned. Normally, the
lookup is recursive in the sense that the parent of DICT is
searched for NAME if it is not found in DICT. This recursive
lookup can be disabled by the optional argument NON-RECURSIVE.
(let ((tag (or srecode-semantic-selected-tag
(srecode-semantic-tag-from-kill-ring))))
(when (not tag)
- (error "No tag for current template. Use the semantic kill-ring."))
+ (error "No tag for current template. Use the semantic kill-ring"))
(srecode-semantic-apply-tag-to-dict
(srecode-semantic-tag (semantic-tag-name tag)
:prime tag)
;; merge them into the master source.
;;
;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user
-;; interface that communicates process state back to the superior emacs by
+;; interface that communicates process state back to the superior Emacs by
;; outputting special control sequences. The Emacs package, xscheme.el, has
;; lots and lots of special purpose code to read these control sequences, and
;; so is very tightly integrated with the cscheme process. The cscheme
;; interrupt handler and debugger read single character commands in cbreak
;; mode; when this happens, xscheme.el switches to special keymaps that bind
-;; the single letter command keys to emacs functions that directly send the
+;; the single letter command keys to Emacs functions that directly send the
;; character to the scheme process. Cmuscheme mode does *not* provide this
-;; functionality. If you are a cscheme user, you may prefer to use the
+;; functionality. If you are a cscheme user, you may prefer to use the
;; xscheme.el/cscheme -emacs interaction.
;;
;; Here's a summary of the pros and cons, as I see them.
The following commands are available:
\\{inferior-scheme-mode-map}
-A Scheme process can be fired up with M-x run-scheme.
+A Scheme process can be fired up with \\[run-scheme].
Customization: Entry to this mode runs the hooks on `comint-mode-hook' and
`inferior-scheme-mode-hook' (in that order).
(define-key comint-mode-map [remap kill-whole-line]
\\='comint-kill-whole-line)))
-If you sometimes use comint-mode on text-only terminals or with `emacs -nw',
+If you sometimes use `comint-mode' on text-only terminals or with `emacs -nw',
you might wish to use another binding for `comint-kill-whole-line'."
:type 'boolean
:group 'comint
;; Inserts a completion at point
;;
;; completion-initialize
-;; Loads the completions file and sets up so that exiting emacs will
+;; Loads the completions file and sets up so that exiting Emacs will
;; save them.
;;
;; save-completions-to-file &optional filename
;; Add package prefix smarts (for Common Lisp)
;; Add autoprompting of possible completions after every keystroke (fast
;; terminals only !)
-;; Add doc. to texinfo
+;; Add documentation to texinfo
;;
;;
;;-----------------------------------------------
"Toggle Auto Composition mode in all buffers.
For more information on Auto Composition mode, see
-`auto-composition-mode' ."
+`auto-composition-mode'."
:global t
:variable (default-value 'auto-composition-mode))
`delimit-columns-before', `delimit-columns-after',
`delimit-columns-separator', `delimit-columns-format' and
`delimit-columns-extra' variables for customization of the
-look. "
+look."
(interactive "*r")
(if rectangle-mark-mode
;; Delegate to delimit-columns-rectangle when called with a
;;; Describe-Text Commands.
(defun describe-text-category (category)
- "Describe a text property category."
+ "Describe a text property CATEGORY."
(interactive "SCategory: ")
(help-setup-xref (list #'describe-text-category category)
(called-interactively-p 'interactive))
;;;###autoload
(defun dired-create-empty-file (file)
"Create an empty file called FILE.
- Add a new entry for the new file in the Dired buffer.
- Parent directories of FILE are created as needed.
- If FILE already exists, signal an error."
+Add a new entry for the new file in the Dired buffer.
+Parent directories of FILE are created as needed.
+If FILE already exists, signal an error."
(interactive (list (read-file-name "Create empty file: ")))
(let* ((expanded (expand-file-name file))
new)
(defcustom dired-always-read-filesystem nil
"Non-nil means revert buffers visiting files before searching them.
- By default, commands like `dired-mark-files-containing-regexp' will
- search any buffers visiting the marked files without reverting them,
- even if they were changed on disk. When this option is non-nil, such
- buffers are always reverted in a temporary buffer before searching
- them: the search is performed on the temporary buffer, the original
- buffer visiting the file is not modified."
+By default, commands like `dired-mark-files-containing-regexp' will
+search any buffers visiting the marked files without reverting them,
+even if they were changed on disk. When this option is non-nil, such
+buffers are always reverted in a temporary buffer before searching
+them: the search is performed on the temporary buffer, the original
+buffer visiting the file is not modified."
:type 'boolean
:version "26.1"
:group 'dired)
;;;###autoload (define-key ctl-x-4-map "d" 'dired-other-window)
;;;###autoload
(defun dired-other-window (dirname &optional switches)
- "\"Edit\" directory DIRNAME. Like `dired' but selects in another window."
+ "\"Edit\" directory DIRNAME. Like `dired' but select in another window."
(interactive (dired-read-dir-and-switches "in other window "))
(switch-to-buffer-other-window (dired-noselect dirname switches)))
;;;###autoload (define-key ctl-x-5-map "d" 'dired-other-frame)
;;;###autoload
(defun dired-other-frame (dirname &optional switches)
- "\"Edit\" directory DIRNAME. Like `dired' but makes a new frame."
+ "\"Edit\" directory DIRNAME. Like `dired' but make a new frame."
(interactive (dired-read-dir-and-switches "in other frame "))
(switch-to-buffer-other-frame (dired-noselect dirname switches)))
;;;###autoload (define-key tab-prefix-map "d" 'dired-other-tab)
;;;###autoload
(defun dired-other-tab (dirname &optional switches)
- "\"Edit\" directory DIRNAME. Like `dired' but makes a new tab."
+ "\"Edit\" directory DIRNAME. Like `dired' but make a new tab."
(interactive (dired-read-dir-and-switches "in other tab "))
(switch-to-buffer-other-tab (dired-noselect dirname switches)))
;;;###autoload
(defun dired-noselect (dir-or-list &optional switches)
- "Like `dired' but returns the Dired buffer as value, does not select it."
+ "Like `dired' but return the Dired buffer as value, do not select it."
(or dir-or-list (setq dir-or-list default-directory))
;; This loses the distinction between "/foo/*/" and "/foo/*" that
;; some shells make:
(dired-insert-set-properties content-point (point)))))
(defun dired-insert-set-properties (beg end)
- "Add various text properties to the lines in the region."
+ "Add various text properties to the lines in the region, from BEG to END."
(save-excursion
(goto-char beg)
(while (< (point) end)
directories below DIR.
The list is in reverse order of buffer creation, most recent last.
As a side effect, killed dired buffers for DIR are removed from
-dired-buffers."
+`dired-buffers'."
(setq dir (file-name-as-directory dir))
(let (result buf)
(dolist (elt dired-buffers)
(defcustom dired-switches-in-mode-line nil
"How to indicate `dired-actual-switches' in mode-line.
Possible values:
- * `nil': Indicate name-or-date sort order, if possible.
+ * nil: Indicate name-or-date sort order, if possible.
Else show full switches.
* `as-is': Show full switches.
* Integer: Show only the first N chars of full switches.
;;
;; C-x C-f ~/path/to/document RET
;;
-;; and the document will be converted and displayed, if your emacs supports PNG
+;; and the document will be converted and displayed, if your Emacs supports PNG
;; images. With `C-c C-c' you can toggle between the rendered images
;; representation and the source text representation of the document.
;;
(doc-view-reconvert-doc)))))
(defun doc-view-shrink (factor)
- "Shrink the document."
+ "Shrink the document by FACTOR."
(interactive (list doc-view-shrink-factor))
(doc-view-enlarge (/ 1.0 factor)))
FACTOR defaults to `doc-view-shrink-factor'.
The actual adjustment made depends on the final component of the
-key-binding used to invoke the command, with all modifiers removed:
+keybinding used to invoke the command, with all modifiers removed:
+, = Increase the image scale by FACTOR
- Decrease the image scale by FACTOR
(defun doc-view-current-cache-doc-pdf ()
"Return the name of the doc.pdf in the current cache dir.
- This file exists only if the current document isn't a PDF or PS file already."
+This file exists only if the current document isn't a PDF or PS file already."
(expand-file-name "doc.pdf" (doc-view--current-cache-dir)))
(defun doc-view-doc->txt (txt callback)
;; set screen size.
(defun dos-mode25 ()
- "Changes the number of screen rows to 25."
+ "Change the number of screen rows to 25."
(interactive)
(set-frame-size (selected-frame) 80 25))
(define-obsolete-function-alias 'mode25 'dos-mode25 "24.1")
(defun dos-mode4350 ()
- "Changes the number of rows to 43 or 50.
+ "Change the number of rows to 43 or 50.
Emacs always tries to set the screen height to 50 rows first.
If this fails, it will try to set it to 43 rows, on the assumption
that your video hardware might not support 50-line mode."
(funcall finish-hook)))))
(defun edmacro-insert-key (key)
- "Insert the written name of a key in the buffer."
+ "Insert the written name of a KEY in the buffer."
(interactive "kKey to insert: ")
(if (bolp)
(insert (edmacro-format-keys key t) "\n")
(self-insert-command 1)))
(cl-defmacro electric-pair--with-uncached-syntax ((table &optional start) &rest body)
- "Like `with-syntax-table', but flush the syntax-ppss cache afterwards.
+ "Like `with-syntax-table', but flush the `syntax-ppss' cache afterwards.
Use this instead of (with-syntax-table TABLE BODY) when BODY
-contains code which may update the syntax-ppss cache. This
+contains code which may update the `syntax-ppss' cache. This
includes calling `parse-partial-sexp' and any sexp-based movement
functions when `parse-sexp-lookup-properties' is non-nil. The
cache is flushed from position START, defaulting to point."
&optional docstring)
"Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
-\(define-obsolete-function-alias \\='old-fun \\='new-fun \"22.1\" \"old-fun's doc.\")
+\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\")
is equivalent to the following two lines of code:
\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")
-\(make-obsolete \\='old-fun \\='new-fun \"22.1\")
+\(make-obsolete \\='old-fun \\='new-fun \"28.1\")
WHEN should be a string indicating when the function was first
made obsolete, for example a date or a release number.
This macro evaluates all its parameters, and both OBSOLETE-NAME
and CURRENT-NAME should be symbols, so a typical usage would look like:
- (define-obsolete-variable-alias 'foo-thing 'bar-thing \"27.1\")
+ (define-obsolete-variable-alias 'foo-thing 'bar-thing \"28.1\")
This macro uses `defvaralias' and `make-obsolete-variable' (which see).
See the Info node `(elisp)Variable Aliases' for more details.
;; In addition to using the shifted movement keys, you can also use
;; [C-space] to start the region and use unshifted movement keys to extend
-;; it. To cancel the region, use [C-space] or [C-g].
+;; it. To cancel the region, use [C-space] or [C-g].
;; If you prefer to use the standard Emacs cut, copy, paste, and undo
;; bindings, customize cua-enable-cua-keys to nil.
;; "register commands".
;;
;; CUA's register support is activated by providing a numeric
-;; prefix argument to the C-x, C-c, and C-v commands. For example,
+;; prefix argument to the C-x, C-c, and C-v commands. For example,
;; to copy the selected region to register 2, enter [M-2 C-c].
;; Or if you have activated the keypad prefix mode, enter [kp-2 C-c].
;;
;; If you type a normal (self-inserting) character when the rectangle is
;; active, the character is inserted on the "current side" of every line
;; of the rectangle. The "current side" is the side on which the cursor
-;; is currently located. If the rectangle is only 1 column wide,
+;; is currently located. If the rectangle is only 1 column wide,
;; insertion will be performed to the left when the cursor is at the
;; bottom of the rectangle. So, for example, to comment out an entire
;; paragraph like this one, just place the cursor on the first character
:type 'boolean)
(defcustom cua-paste-pop-rotate-temporarily nil
- "If non-nil, \\[cua-paste-pop] only rotates the kill-ring temporarily.
+ "If non-nil, \\[cua-paste-pop] only rotates the kill ring temporarily.
This means that both \\[yank] and the first \\[yank-pop] in a sequence always
insert the most recently killed text. Each immediately following \\[cua-paste-pop]
replaces the previous text with the next older element on the `kill-ring'.
def nil))
(defvar cua-global-keymap (make-sparse-keymap)
- "Global keymap for cua-mode; users may add to this keymap.")
+ "Global keymap for `cua-mode'; users may add to this keymap.")
(defvar cua--cua-keys-keymap (make-sparse-keymap))
(defvar cua--prefix-override-keymap (make-sparse-keymap))
;; Usage:
-;; Simply load this file into emacs and run the function edt-mapper,
+;; Simply load this file into Emacs and run the function edt-mapper,
;; using the following command.
;; emacs -q -l edt-mapper -f edt-mapper
;; Sometimes, edt-mapper will ignore a key you press, and just
;; continue to prompt for the same key. This can happen when your
-;; window manager sucks up the key and doesn't pass it on to emacs,
-;; or it could be an emacs bug. Either way, there's nothing that
+;; window manager sucks up the key and doesn't pass it on to Emacs,
+;; or it could be an Emacs bug. Either way, there's nothing that
;; edt-mapper can do about it. You must press RETURN, to skip the
;; current key and continue. Later, you and/or your local Emacs guru
;; can try to figure out why the key is being ignored.
;;
;; With the following setup, the keypad can be used for numeric data
;; entry when NumLock is off, and to give numeric prefix arguments to
-;; emacs commands, when NumLock is on.
+;; Emacs commands, when NumLock is on.
;;
;; keypad-setup => Plain Numeric Keypad
;; keypad-numlock-setup => Prefix numeric args
`S-cursor' Bind shifted keypad keys to the shifted cursor movement keys.
`cursor' Bind keypad keys to the cursor movement keys.
`numeric' Plain numeric keypad, i.e. 0 .. 9 and . (or DECIMAL arg)
- `none' Removes all bindings for keypad keys in function-key-map;
+ `none' Removes all bindings for keypad keys in `function-key-map';
this enables any user-defined bindings for the keypad keys
in the global and local keymaps.
space return
delete backspace
)
- "Movement commands")
+ "Movement commands.")
;; define viper-movement-command-p
(viper-test-com-defun viper-movement-command)
(viper-change-state-to-vi))
(defun viper-set-mode-vars-for (state)
- "Sets Viper minor mode variables to put Viper's state STATE in effect."
+ "Set Viper minor mode variables to put Viper's state STATE in effect."
;; Emacs state
(setq viper-vi-minibuffer-minor-mode nil
)
(defsubst viper-yank-last-insertion ()
- "Inserts the text saved by the previous viper-save-last-insertion command."
+ "Insert the text saved by the previous viper-save-last-insertion command."
(condition-case nil
(insert viper-last-insertion)
(error nil)))
executing this command.
This command is supposed to be bound to a two-character Vi macro where
the second character is a digit 0 to 9. The digit indicates which
-history command to execute. `<char>0' is equivalent to `.', `<char>1'
+history command to execute. `<char>0' is equivalent to `.', `<char>1'
invokes the command before that, etc."
(interactive)
(let* ((viper-intermediate-command 'repeating-display-destructive-command)
;; yank and pop
(defsubst viper-yank (text)
- "Yank TEXT silently. This works correctly with Emacs's yank-pop command."
+ "Yank TEXT silently. This works correctly with Emacs's `yank-pop' command."
(insert text)
(setq this-command 'yank))
(defun viper-set-expert-level (&optional dont-change-unless)
- "Sets the expert level for a Viper user.
+ "Set the expert level for a Viper user.
Can be called interactively to change (temporarily or permanently) the
current expert level.
(goto-char beg)))))
(defun ex-compile ()
- "Reads args from the command line, then runs make with the args.
+ "Read args from the command line, then run make with the args.
If no args are given, then it runs the last compile command.
Type `mak ' (including the space) to run make with no args."
(let (args)
"Keymap for user-defined local bindings.
Useful for changing bindings such as ZZ in certain major modes.
For instance, in letter-mode, one may want to bind ZZ to
-mh-send-letter. In a newsreader such as gnus, tin, or rn, ZZ could be bound
-to save-buffers-kill-emacs then post article, etc.")
+`mh-send-letter'. In a newsreader such as gnus, tin, or rn, ZZ could be bound
+to `save-buffers-kill-emacs' then post article, etc.")
(put 'viper-vi-local-user-map 'permanent-local t)
(defvar viper-vi-global-user-map (make-sparse-keymap)
Normally, this would be called from a hook to a major mode or
on a per buffer basis.
Usage:
- (viper-add-local-keys state \\='((key-str . func) (key-str . func)...)) "
+ (viper-add-local-keys state \\='((key-str . func) (key-str . func)...))"
(let (map)
(cond ((eq state 'vi-state)
(defun viper-zap-local-keys ()
"Unconditionally reset Viper viper-*-local-user-map's.
Rarely useful, but if you made a mistake by switching to a mode that adds
-undesirable local keys, e.g., comint-mode, then this function can restore
+undesirable local keys, e.g., `comint-mode', then this function can restore
sanity."
(interactive)
(setq viper-vi-local-user-map (make-sparse-keymap)
(buffer-name (viper-mouse-click-window-buffer click)))
(defsubst viper-mouse-click-posn (click)
- "Returns position of a click."
+ "Return position of a click."
(declare (obsolete nil "27.1"))
(posn-point (event-start click)))
;; of the bug report be sent to the maintainer's email address.
(defconst viper-version "3.14.2 of July 4, 2013"
- "The current version of Viper")
+ "The current version of Viper.")
;; This file is part of GNU Emacs.
;;;###autoload
(defun viper-mode ()
- "Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'."
+ "Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'."
(interactive)
(if (not noninteractive)
(progn
;;; Code:
(defgroup epa-file nil
- "The EasyPG Assistant hooks for transparent file encryption"
+ "The EasyPG Assistant hooks for transparent file encryption."
:version "23.1"
:group 'epa)
;;; Options
(defgroup epa nil
- "The EasyPG Assistant"
+ "The EasyPG Assistant."
:version "23.1"
:link '(custom-manual "(epa) Top")
:group 'epg)
(defcustom erc-autoaway-idle-seconds 1800
"Number of seconds after which ERC will set you automatically away.
-If you are changing this variable using lisp instead of customizing it,
+If you are changing this variable using Lisp instead of customizing it,
you have to run `erc-autoaway-reestablish-idletimer' afterwards."
:set (lambda (sym val)
(set-default sym val)
;;; Commentary:
-;; Heavily borrowed from gnus-art.el. Thanks to the original authors.
+;; Heavily borrowed from gnus-art.el. Thanks to the original authors.
;; This buttonizes nicks and other stuff to make it all clickable.
;; To enable, add to your init file:
;; (require 'erc-button)
BUTTON is the number of the regexp grouping actually matching the
button. This is ignored if REGEXP is \\='nicknames.
-FORM is a lisp expression which must eval to true for the button to
+FORM is a Lisp expression which must eval to true for the button to
be added.
CALLBACK is the function to call when the user push this button.
:group 'erc)
(defcustom erc-ibuffer-keyword-char ?k
- "Char used to indicate a channel which had keyword traffic lately (hidden)."
+ "Char indicating a channel which had keyword traffic lately (hidden)."
:type 'character)
(defcustom erc-ibuffer-pal-char ?p
- "Char used to indicate a channel which had pal traffic lately (hidden)."
+ "Char indicating a channel which had pal traffic lately (hidden)."
:type 'character)
(defcustom erc-ibuffer-fool-char ?f
- "Char used to indicate a channel which had fool traffic lately (hidden)."
+ "Char indicating a channel which had fool traffic lately (hidden)."
:type 'character)
(defcustom erc-ibuffer-dangerous-host-char ?d
- "Char used to indicate a channel which had dangerous-host traffic lately
-\(hidden)."
+ "Char indicating a channel which had dangerous-host traffic lately (hidden)."
:type 'character)
(define-ibuffer-filter erc-server
;;; Commentary:
-;; This file includes stuff to work with pattern matching in ERC. If
+;; This file includes stuff to work with pattern matching in ERC. If
;; you were used to customizing erc-fools, erc-keywords, erc-pals,
;; erc-dangerous-hosts and the like, this file contains these
;; customizable variables.
(remove-hook 'erc-timer-hook #'erc-netsplit-timer)))
(defcustom erc-netsplit-show-server-mode-changes-flag nil
- "Set to t to enable display of server mode changes."
+ "Non-nil means to enable display of server mode changes."
:type 'boolean)
(defcustom erc-netsplit-debug nil
(defcustom erc-netsplit-regexp
"^[^ @!\"\n]+\\.[^ @!\n]+ [^ @!\n]+\\.[^ @!\"\n]+$"
- "This regular expression should match quit reasons produced
-by netsplits."
+ "This regular expression should match quit reasons produced by netsplits."
:type 'regexp)
(defcustom erc-netsplit-hook nil
;; Variables
(defgroup erc-networks nil
- "IRC Networks"
+ "IRC Networks."
:group 'erc)
(defcustom erc-server-alist
MATCHER is used to find a corresponding network to a server while
connected to it. If it is regexp, it's used to match against
`erc-server-announced-name'. It can also be a function (predicate).
- Then it is executed with the server buffer as current-buffer."
+ Then it is executed with the server buffer as current buffer."
:type '(repeat
(list :tag "Network"
(symbol :tag "Network name")
(require 'time-date)
(defgroup erc-pcomplete nil
- "Programmable completion for ERC"
+ "Programmable completion for ERC."
:group 'erc)
(defcustom erc-pcomplete-nick-postfix ":"
(require 'erc)
(defgroup erc-replace nil
- "Replace text from incoming messages"
+ "Replace text from incoming messages."
:group 'erc)
(defcustom erc-replace-alist nil
(setq erc-input-ring-index nil))
(defun erc-clear-input-ring ()
- "Remove all entries from the input ring, then call garbage-collect.
+ "Remove all entries from the input ring, then call `garbage-collect'.
You might use this for security purposes if you have typed a command
containing a password."
(interactive)
(erc-log (format "Playing sound file %S" filepath))))
(defun erc-toggle-sound (&optional arg)
- "Toggles playing sounds on and off. With positive argument,
- turns them on. With any other argument turns sounds off."
+ "Toggles playing sounds on and off.
+With positive argument, turns them on. With any other argument
+turns sounds off."
(interactive "P")
(cond ((and (numberp arg) (> arg 0))
(setq erc-play-sound t))
;;; Commentary:
-;; This is an ERC module to enable flyspell mode in ERC buffers. This
+;; This is an ERC module to enable flyspell mode in ERC buffers. This
;; ensures correct behavior of flyspell, and even sets up a
;; channel-local dictionary if so required.
(apply #'window-preserve-size (selected-window) t t nil))))
(define-derived-mode erc-status-sidebar-mode special-mode "ERC Sidebar"
- "Major mode for ERC status sidebar"
+ "Major mode for ERC status sidebar."
;; Don't scroll the buffer horizontally, if a channel name is
;; obscured then the window can be resized.
(setq-local auto-hscroll-mode nil)
(erc-track-minor-mode -1)))))
(defcustom erc-track-when-inactive nil
- "Enable channel tracking even for visible buffers, if you are
-inactive."
+ "Enable channel tracking even for visible buffers, if you are inactive."
:type 'boolean
:set (lambda (sym val)
(if erc-track-mode
(erc-modified-channels-update)))
(defvar erc-modified-channels-update-inside nil
- "Variable to prevent running `erc-modified-channels-update' multiple
-times. Without it, you cannot debug `erc-modified-channels-display',
-because the debugger also causes changes to the window-configuration.")
+ "Variable to prevent running `erc-modified-channels-update' multiple times.
+Without it, you cannot debug `erc-modified-channels-display',
+because the debugger also causes changes to the
+window-configuration.")
(defun erc-modified-channels-update (&rest _args)
"This function updates the information in `erc-modified-channels-alist'
"The face to use when mouse is over channel names in the mode line.")
(defun erc-make-mode-line-buffer-name (string buffer &optional faces count)
- "Returns a button that switches to BUFFER when clicked.
+ "Return a button that switches to BUFFER when clicked.
STRING is the string in the button. It is possibly suffixed with
the number of unread messages, according to variables
`erc-track-showcount' and `erc-track-showcount-string'.
;;; Commentary:
;; This implements buffer truncation (and optional log file writing
-;; support for the Emacs IRC client. Use `erc-truncate-mode' to switch
-;; on. Use `erc-enable-logging' to enable logging of the stuff which
+;; support for the Emacs IRC client. Use `erc-truncate-mode' to switch
+;; on. Use `erc-enable-logging' to enable logging of the stuff which
;; is getting truncated.
;;; Code:
(require 'erc)
(defgroup erc-truncate nil
- "Truncate buffers when they reach a certain size"
+ "Truncate buffers when they reach a certain size."
:group 'erc)
(defcustom erc-max-buffer-size 30000
;;;###autoload
(defun erc-xdcc-add-file (file)
- "Add a file to `erc-xdcc-files'."
+ "Add FILE to `erc-xdcc-files'."
(interactive "fFilename to add to XDCC: ")
(if (file-exists-p file)
(add-to-list 'erc-xdcc-files file)))
:group 'applications)
(defgroup erc-buffers nil
- "Creating new ERC buffers"
+ "Creating new ERC buffers."
:group 'erc)
(defgroup erc-display nil
- "Settings for how various things are displayed"
+ "Settings for how various things are displayed."
:group 'erc)
(defgroup erc-mode-line-and-header nil
- "Displaying information in the mode-line and header"
+ "Displaying information in the mode-line and header."
:group 'erc-display)
(defgroup erc-ignore nil
- "Ignoring certain messages"
+ "Ignoring certain messages."
:group 'erc)
(defgroup erc-lurker nil
- "Hide specified message types sent by lurkers"
+ "Hide specified message types sent by lurkers."
:version "24.3"
:group 'erc-ignore)
(defgroup erc-query nil
- "Using separate buffers for private discussions"
+ "Using separate buffers for private discussions."
:group 'erc)
(defgroup erc-quit-and-part nil
- "Quitting and parting channels"
+ "Quitting and parting channels."
:group 'erc)
(defgroup erc-paranoia nil
:group 'erc)
(defgroup erc-scripts nil
- "Running scripts at startup and with /LOAD"
+ "Running scripts at startup and with /LOAD."
:group 'erc)
(require 'erc-backend)
:type 'hook)
(defcustom erc-join-hook nil
- "Hook run when we join a channel. Hook functions are called
-without arguments, with the current buffer set to the buffer of
-the new channel.
+ "Hook run when we join a channel.
+Hook functions are called without arguments, with the current
+buffer set to the buffer of the new channel.
See also `erc-server-JOIN-functions', `erc-part-hook'."
:group 'erc-hooks
(erc-channel-user-voice (cdr cdata))))))))
(defun erc-get-channel-user-list ()
- "Return a list of users in the current channel. Each element
-of the list is of the form (USER . CHANNEL-DATA), where USER is
-an erc-server-user struct, and CHANNEL-DATA is either nil or an
-erc-channel-user struct.
+ "Return a list of users in the current channel.
+Each element of the list is of the form (USER . CHANNEL-DATA),
+where USER is an erc-server-user struct, and CHANNEL-DATA is
+either nil or an erc-channel-user struct.
See also: `erc-sort-channel-users-by-activity'."
(let (users)
(defcustom erc-system-name nil
"Use this as the name of your system.
-If nil, ERC will call `system-name' to get this information."
+If nil, ERC will call function `system-name' to get this information."
:group 'erc
:type '(choice (const :tag "Default system name" nil)
string))
"IRC port to use if it cannot be detected otherwise.")
(defconst erc-default-port-tls 6697
- "IRC port to use for encrypted connections if it cannot be
- detected otherwise.")
+ "IRC port to use for encrypted connections if it cannot be \
+detected otherwise.")
(defcustom erc-join-buffer 'buffer
"Determines how to display a newly created IRC buffer.
(condition-case nil
(erc :server server :nick (erc-current-nick))
(error
- (erc-error "Cannot find host %s." server)))
+ (erc-error "Cannot find host: `%s'" server)))
t)
(put 'erc-cmd-SERVER 'process-not-needed t)
(propertize prefix 'font-lock-face 'erc-default-face))))
(defun erc-echo-notice-in-default-buffer (s parsed buffer _sender)
- "Echos a private notice in the default buffer, namely the
+ "Echo a private notice in the default buffer, namely the
target buffer specified by BUFFER, or there is no target buffer,
the server buffer. This function is designed to be added to
either `erc-echo-notice-hook' or `erc-echo-notice-always-hook',
t)
(defun erc-echo-notice-in-target-buffer (s parsed buffer _sender)
- "Echos a private notice in BUFFER, if BUFFER is non-nil. This
-function is designed to be added to either `erc-echo-notice-hook'
-or `erc-echo-notice-always-hook', and returns non-nil if BUFFER
-is non-nil."
+ "Echo a private notice in BUFFER, if BUFFER is non-nil.
+This function is designed to be added to either
+`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
+returns non-nil if BUFFER is non-nil."
(if buffer
(progn (erc-display-message parsed nil buffer s) t)
nil))
(defun erc-echo-notice-in-minibuffer (s _parsed _buffer _sender)
- "Echos a private notice in the minibuffer. This function is
-designed to be added to either `erc-echo-notice-hook' or
-`erc-echo-notice-always-hook', and always returns t."
+ "Echo a private notice in the minibuffer.
+This function is designed to be added to either
+`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
+always returns t."
(message "%s" (concat "NOTICE: " s))
t)
(defun erc-echo-notice-in-server-buffer (s parsed _buffer _sender)
- "Echos a private notice in the server buffer. This function is
-designed to be added to either `erc-echo-notice-hook' or
-`erc-echo-notice-always-hook', and always returns t."
+ "Echo a private notice in the server buffer.
+This function is designed to be added to either
+`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
+always returns t."
(erc-display-message parsed nil nil s)
t)
(defun erc-echo-notice-in-active-non-server-buffer (s parsed _buffer _sender)
- "Echos a private notice in the active buffer if the active
+ "Echo a private notice in the active buffer if the active
buffer is not the server buffer. This function is designed to be
added to either `erc-echo-notice-hook' or
`erc-echo-notice-always-hook', and returns non-nil if the active
nil))
(defun erc-echo-notice-in-active-buffer (s parsed _buffer _sender)
- "Echos a private notice in the active buffer. This function is
-designed to be added to either `erc-echo-notice-hook' or
-`erc-echo-notice-always-hook', and always returns t."
+ "Echo a private notice in the active buffer.
+This function is designed to be added to either
+`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
+always returns t."
(erc-display-message parsed nil 'active s)
t)
(defun erc-echo-notice-in-user-buffers (s parsed _buffer sender)
- "Echos a private notice in all of the buffers for which SENDER
+ "Echo a private notice in all of the buffers for which SENDER
is a member. This function is designed to be added to either
`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
returns non-nil if there is at least one buffer for which the
nil)))
(defun erc-echo-notice-in-user-and-target-buffers (s parsed buffer sender)
- "Echos a private notice in BUFFER and in all of the buffers for
+ "Echo a private notice in BUFFER and in all of the buffers for
which SENDER is a member. This function is designed to be added
to either `erc-echo-notice-hook' or
`erc-echo-notice-always-hook', and returns non-nil if there is
nil)))
(defun erc-echo-notice-in-first-user-buffer (s parsed _buffer sender)
- "Echos a private notice in one of the buffers for which SENDER
+ "Echo a private notice in one of the buffers for which SENDER
is a member. This function is designed to be added to either
`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
returns non-nil if there is at least one buffer for which the
(defun erc-update-user (user &optional new-nick
host login full-name info)
- "Update user info for USER. USER must be an erc-server-user
-struct. Any of NEW-NICK, HOST, LOGIN, FULL-NAME, INFO which are
-non-nil and not equal to the existing values for USER are used to
-replace the stored values in USER.
+ "Update user info for USER.
+USER must be an erc-server-user struct. Any of NEW-NICK, HOST,
+LOGIN, FULL-NAME, INFO which are non-nil and not equal to the
+existing values for USER are used to replace the stored values in
+USER.
If, and only if, a change is made,
`erc-channel-members-changed-hook' is run for each channel for
string insertp sendp)
(defun erc-send-input (input)
- "Treat INPUT as typed in by the user. It is assumed that the input
-and the prompt is already deleted.
-This returns non-nil only if we actually send anything."
+ "Treat INPUT as typed in by the user.
+It is assumed that the input and the prompt is already deleted.
+Return non-nil only if we actually send anything."
;; Handle different kinds of inputs
(cond
;; Ignore empty input
Currently this is standard input, output and error. But even all of
these Emacs does not currently support with asynchronous processes
\(which is what eshell uses so that you can continue doing work in
-other buffers) ."
+other buffers)."
:type 'integer
:group 'eshell-io)
;;; Samples:
-(define-skeleton expand-c-for-skeleton "For loop skeleton"
+(define-skeleton expand-c-for-skeleton "For loop skeleton."
"Loop var: "
"for(" str _ @ "=0; " str @ "; " str @ ") {" \n
@ _ \n
;;; Commentary:
-;;
;; This file defines some simple operations that can be used for
;; maintaining the `face-remapping-alist' in a cooperative way. This is
;; especially important for the `default' face.
;; mode setting face remappings, e.g., of the default face.
;;
;; All modifications cause face-remapping-alist to be made buffer-local.
-;;
-
;;; Code:
:version "23.1")
(defvar-local text-scale-mode-remapping nil
- "Current remapping cookie for text-scale-mode.")
+ "Current remapping cookie for `text-scale-mode'.")
(defvar-local text-scale-mode-lighter "+0"
- "Lighter displayed for text-scale-mode in mode-line minor-mode list.")
+ "Lighter displayed for `text-scale-mode' in mode-line minor-mode list.")
(defvar-local text-scale-mode-amount 0
- "Number of steps that text-scale-mode will increase/decrease text height.")
+ "Number of steps that `text-scale-mode' will increase/decrease text height.")
(defvar-local text-scale-remap-header-line nil
"If non-nil, text scaling may change font size of header lines too.")
INC may be passed as a numeric prefix argument.
The actual adjustment made depends on the final component of the
-key-binding used to invoke the command, with all modifiers removed:
+keybinding used to invoke the command, with all modifiers removed:
+, = Increase the height of the default face by one step
- Decrease the height of the default face by one step
(defun ffap-search-backward-file-end (&optional dir-separator end)
"Search backward position point where file would probably end.
-Optional DIR-SEPARATOR defaults to \"/\". The search maximum is
+Optional DIR-SEPARATOR defaults to \"/\". The search maximum is
`line-end-position' or optional END point.
Suppose the cursor is somewhere that might be near end of file,
(defun ffap-dir-separator-near-point ()
"Search backward and forward for closest slash or backlash in line.
-Return string slash or backslash. Point is moved to closest position."
+Return string slash or backslash. Point is moved to closest position."
(let ((point (point))
str pos)
(when (looking-at ".*?/")
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary
+;;; Commentary:
;; This package is an abstraction layer from the different low-level
;; file notification packages `inotify', `kqueue', `gfilenotify' and
(t -2))))
(defun dir-locals--sort-variables (variables)
- "Sorts VARIABLES so that applying them in order has the right effect.
-The variables are compared by dir-locals--get-sort-score.
+ "Sort VARIABLES so that applying them in order has the right effect.
+The variables are compared by `dir-locals--get-sort-score'.
Directory entries are then recursively sorted using the same
criteria."
(setq variables (sort variables
(:ignore-on-read-text t)
;; (:constraintp ,pic-cmd)
))))
- "Association list of file patterns and external viewers for use with
+ "Alist of file patterns and external viewers for use with
`filesets-find-or-display-file'.
Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a
;;
;; Many people maintain their include file in a directory separate to their
;; src directory, and very often you may be editing a file and have a need to
-;; visit the "other file". This package searches through a set of directories
+;; visit the "other file". This package searches through a set of directories
;; to find that file.
;;
;; THE "OTHER FILE", or "corresponding file", generally has the same basename,
;;
;; If the current file has a .cc extension, ff-find-other-file will attempt
;; to look for a .hh file, and then a .h file in some directory as described
-;; below. The mechanism here is to replace the matched part of the original
+;; below. The mechanism here is to replace the matched part of the original
;; filename with each of the corresponding extensions in turn.
;;
;; Alternatively, there are situations where the filename of the other file
-;; cannot be determined easily with regexps. For example, a .c file may
+;; cannot be determined easily with regexps. For example, a .c file may
;; have two corresponding .h files, for its public and private parts, or
;; the filename for the .c file contains part of the pathname of the .h
-;; file, as between src/fooZap.cc and include/FOO/zap.hh. In that case, the
+;; file, as between src/fooZap.cc and include/FOO/zap.hh. In that case, the
;; format above can be changed to include a function to be called when the
;; current file matches the regexp:
;;
;; ("\\.hh\\'" hh-function))
;;
;; These functions must return a list consisting of the possible names of the
-;; corresponding file, with or without path. There is no real need for more
+;; corresponding file, with or without path. There is no real need for more
;; than one function, and one could imagine the following value for cc-other-
;; file-alist:
;;
;;
;; This means that the corresponding file will be searched for first in
;; the current directory, then in ../../src, then in one of the directories
-;; under ../include, and so on. The star is _not_ a general wildcard
+;; under ../include, and so on. The star is _not_ a general wildcard
;; character: it just indicates that the subdirectories of this directory
-;; must each be searched in turn. Environment variables will be expanded in
+;; must each be searched in turn. Environment variables will be expanded in
;; the ff-search-directories variable.
;;
;; If the point is on a #include line, the file to be #included is searched
-;; for in the same manner. This can be disabled with the ff-ignore-include
+;; for in the same manner. This can be disabled with the ff-ignore-include
;; variable, or by calling ff-get-other-file instead of ff-find-other-file.
;;
;; If the file was not found, ff-find-other-file will prompt you for where
;;; Commentary:
;;
;; This is a very generalized form of find; it basically implements a
-;; recursive directory descent. The conditions which bound the search
+;; recursive directory descent. The conditions which bound the search
;; are expressed as predicates, and I have not addressed the question
;; of how to wrap up the common chores that find does in a simpler
;; format than writing code for all the various predicates.
;;
;; Some random thoughts are to express simple queries directly with
;; user-level functions, and perhaps use some kind of forms interface
-;; for medium-level queries. Really complicated queries can be
+;; for medium-level queries. Really complicated queries can be
;; expressed in Lisp.
;;
;;; Todo
;;
;; It would be nice if we could sort the results without running the find
-;; again. Maybe that could work by storing the original file attributes?
+;; again. Maybe that could work by storing the original file attributes?
;;; Code:
The above procedure will only add the keywords for C mode, not
for modes derived from C mode. To add them for derived modes too,
-pass nil for MODE and add the call to c-mode-hook.
+pass nil for MODE and add the call to `c-mode-hook'.
For example:
from `after-change-functions'. It should return either a cons of the beginning
and end buffer positions \(in that order) of the region to refontify, or nil
\(which directs the caller to fontify a default region).
-This function should preserve the match-data.
+This function should preserve the match data.
The region it returns may start or end in the middle of a line.")
(defun font-lock-fontify-buffer (&optional interactively)
(defun font-lock-debug-fontify ()
"Reinitialize the font-lock machinery and (re-)fontify the buffer.
This functions is a convenience functions when developing font
-locking for a mode, and is not meant to be called from lisp functions."
+locking for a mode, and is not meant to be called from Lisp functions."
(declare (interactive-only t))
(interactive)
;; Make font-lock recalculate all the mode-specific data.
(or beg (point-min)) (or end (point-max)))))
(defun font-lock-update (&optional arg)
- "Updates the syntax highlighting in this buffer.
+ "Update the syntax highlighting in this buffer.
Refontify the accessible portion of this buffer, or enable Font Lock mode
in this buffer if it is currently disabled. With prefix ARG, toggle Font
Lock mode."
"Font lock keywords for C preprocessor directives.
`c-mode', `c++-mode' and `objc-mode' have their own font lock keywords
for C preprocessor directives. This definition is for the other modes
-in which C preprocessor directives are used. e.g. `asm-mode' and
+in which C preprocessor directives are used, e.g. `asm-mode' and
`ld-script-mode'.")
\f
(provide 'font-lock)
;; constructed. The current fields are available to the function
;; in the variable `forms-fields', they should *NOT* be modified.
;;
-;; - a lisp symbol, that must evaluate to one of the above.
+;; - a Lisp symbol, that must evaluate to one of the above.
;;
;; Optional variables which may be set in the control file:
;;
The contents may NOT be modified.")
(defcustom forms-use-text-properties t
- "Non-nil means to use text properties. "
+ "Non-nil means to use text properties."
:type 'boolean)
(defcustom forms-insert-after nil
;;; Internal variables.
(defvar forms--file-buffer nil
- "Buffer which holds the file data")
+ "Buffer which holds the file data.")
(defvar forms--total-records 0
"Total number of records in the data file.")
"Forms parser routine.")
(defvar-local forms--mode-setup nil
- "To keep track of forms-mode being set-up.")
+ "To keep track of `forms-mode' being set-up.")
(defvar forms--dynamic-text nil
"Array that holds dynamic texts to insert between fields.")
C-c C-p forms-prev-record p
C-c C-r forms-search-reverse r
C-c C-s forms-search-forward s
- C-c C-x forms-exit x
-"
+ C-c C-x forms-exit x"
(interactive)
;; This is not a simple major mode, as usual. Therefore, forms-mode
(define-key map [prior] #'forms-prev-record)
(define-key map [begin] #'forms-first-record)
(define-key map [last] #'forms-last-record)
- (define-key map [backtab] #'forms-prev-field)
- )
+ (define-key map [backtab] #'forms-prev-field))
\f
;;; Changed functions
" \\[describe-mode]:help"))))
(defun forms--trans (subj arg rep)
- "Translate in SUBJ all chars ARG into char REP. ARG and REP should
- be single-char strings."
+ "Translate in SUBJ all chars ARG into char REP.
+ARG and REP should be single-char strings."
(let ((i 0)
(re (regexp-quote arg))
(k (string-to-char rep)))
(defcustom gnus-agent-expire-unagentized-dirs t
"Whether expiration should expire in unagentized directories.
-Have gnus-agent-expire scan the directories under
+Have `gnus-agent-expire' scan the directories under
\(gnus-agent-directory) for groups that are no longer agentized.
When found, offer to remove them."
:version "22.1"
The gnus-agentize function is now called internally by gnus when
gnus-agent is set. If you wish to avoid calling gnus-agentize,
-customize gnus-agent to nil.
+customize `gnus-agent' to nil.
This will modify the `gnus-setup-news-hook', and
`message-send-mail-real-function' variables, and install the Gnus agent
(defun gnus-agent-flush-server (&optional server-or-method)
"Flush all agent index files for every subscribed group within
- the given SERVER-OR-METHOD. When called with nil, the current
- value of gnus-command-method identifies the server."
+the given SERVER-OR-METHOD. When called with nil, the current
+value of gnus-command-method identifies the server."
(let* ((gnus-command-method (if server-or-method
(gnus-server-to-method server-or-method)
gnus-command-method))
(defvar gnus-agent-file-loading-local nil)
(defun gnus-agent-load-local (&optional method)
- "Load the METHOD'S local file. The local file contains min/max
-article counts for each of the method's subscribed groups."
+ "Load the METHOD'S local file.
+The local file contains min/max article counts for each of the
+method's subscribed groups."
(let ((gnus-command-method (or method gnus-command-method)))
(when (or (null gnus-agent-article-local-times)
(zerop gnus-agent-article-local-times)
gnus-agent-article-local))
(defun gnus-agent-read-and-cache-local (file)
- "Load and read FILE then bind its contents to
-gnus-agent-article-local. If that variable had `dirty' (also known as
-modified) original contents, they are first saved to their own file."
+ "Load and read FILE then bind its contents to `gnus-agent-article-local'.
+If that variable had `dirty' (also known as modified) original
+contents, they are first saved to their own file."
(if (and gnus-agent-article-local
(gethash "+dirty" gnus-agent-article-local))
(gnus-agent-save-local))
hashtb))
(defun gnus-agent-save-local (&optional force)
- "Save gnus-agent-article-local under it method's agent.lib directory."
+ "Save `gnus-agent-article-local' under it method's agent.lib directory."
(let ((hashtb gnus-agent-article-local))
(when (and hashtb
(or force (gethash "+dirty" hashtb)))
which can safely encode any characters in text. This is used by the
commands including:
-* gnus-summary-save-article-file
-* gnus-summary-save-article-body-file
-* gnus-summary-write-article-file
-* gnus-summary-write-article-body-file
+* `gnus-summary-save-article-file'
+* `gnus-summary-save-article-body-file'
+* `gnus-summary-write-article-file'
+* `gnus-summary-write-article-body-file'
and the functions to which you may set `gnus-default-article-saver':
-* gnus-summary-save-in-file
-* gnus-summary-save-body-in-file
-* gnus-summary-write-to-file
-* gnus-summary-write-body-to-file
+* `gnus-summary-save-in-file'
+* `gnus-summary-save-body-in-file'
+* `gnus-summary-write-to-file'
+* `gnus-summary-write-body-to-file'
Those commands and functions save just text displayed in the article
buffer to a file if the value of this variable is non-nil. Note that
For example:
\((\"chinese\" . gnus-decode-encoded-word-region-by-guess)
mail-decode-encoded-word-region
- (\"chinese\" . rfc1843-decode-region))
-")
+ (\"chinese\" . rfc1843-decode-region))")
(defvar gnus-decode-header-methods-cache nil)
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
;;; Commentary:
;; Contents management by FCM version 0.1.
-;; Description:
-;; ===========
-
-;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is
+;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is
;; now fully documented in the Gnus manual.
;;; Code:
;;;###autoload
(defun turn-on-gnus-dired-mode ()
- "Convenience method to turn on gnus-dired-mode."
+ "Convenience method to turn on `gnus-dired-mode'."
(interactive)
(gnus-dired-mode 1))
:accessor gnus-icalendar-event:opt-participants
:initform nil
:type (or null t)))
- "generic iCalendar Event class")
+ "Generic iCalendar Event class.")
(defclass gnus-icalendar-event-request (gnus-icalendar-event)
nil
- "iCalendar class for REQUEST events")
+ "iCalendar class for REQUEST events.")
(defclass gnus-icalendar-event-cancel (gnus-icalendar-event)
nil
- "iCalendar class for CANCEL events")
+ "iCalendar class for CANCEL events.")
(defclass gnus-icalendar-event-reply (gnus-icalendar-event)
nil
- "iCalendar class for REPLY events")
+ "iCalendar class for REPLY events.")
(cl-defmethod gnus-icalendar-event:recurring-p ((event gnus-icalendar-event))
"Return t if EVENT is recurring."
Returns the article number of the message.
If GROUP is not already selected, the message will be the only one in
-the group's summary.
-"
+the group's summary."
;; TODO: is there a way to know at this point whether the group will
;; be newly-selected? If so we could clean up the logic at the end
;;
(t (gnus-message 1 "no list-unsubscribe in this group")))))
(defun gnus-mailing-list-post ()
- "Post message (really useful ?)"
+ "Post message (really useful ?)."
(interactive)
(let ((list-post
(with-current-buffer gnus-original-article-buffer
;;;###autoload
(defun gnus-group-split-update (&optional catch-all)
- "Computes nnmail-split-fancy from group params and CATCH-ALL.
+ "Computes `nnmail-split-fancy' from group params and CATCH-ALL.
It does this by calling (gnus-group-split-fancy nil nil CATCH-ALL).
If CATCH-ALL is nil, `gnus-group-split-default-catch-all-group' is used
(defcustom gnus-message-highlight-citation
t ;; gnus-treat-highlight-citation ;; gnus-cite dependency
- "Enable highlighting of different citation levels in message-mode."
+ "Enable highlighting of different citation levels in `message-mode'."
:version "23.1" ;; No Gnus
:group 'gnus-cite
:group 'gnus-message
nil))))
(defun gnus-registry-follow-group-p (group)
- "Determines if a group name should be followed.
+ "Determine if a group name should be followed.
Consults `gnus-registry-unfollowed-groups' and
`nnmail-split-fancy-with-parent-ignore-groups'."
(and group
;; we do special logic for ignoring to accept regular expressions and
;; nnmail-split-fancy-with-parent-ignore-groups as well
(defun gnus-registry-ignore-group-p (group)
- "Determines if a group name should be ignored.
+ "Determine if a group name should be ignored.
Consults `gnus-registry-ignored-groups' and
`nnmail-split-fancy-with-parent-ignore-groups'."
(and group
(defcustom gnus-pick-elegant-flow t
"If non-nil, `gnus-pick-start-reading' runs
- `gnus-summary-next-group' when no articles have been picked."
+`gnus-summary-next-group' when no articles have been picked."
:type 'boolean
:group 'gnus-summary-pick)
(defun gnus-summary-current-score (arg)
"Return the score of the current article.
- With prefix ARG, return the total score of the current (sub)thread."
+With prefix ARG, return the total score of the current (sub)thread."
(interactive "P" gnus-article-mode gnus-summary-mode)
(message "%s" (if arg
(gnus-thread-total-score
(defcustom gnus-search-ignored-newsgroups ""
"A regexp to match newsgroups in the active file that should
- be skipped when searching."
+be skipped when searching."
:version "24.1"
:type 'regexp)
:type 'regexp)
(defcustom gnus-search-swish++-raw-queries-p nil
- "If t, all Swish++ engines will only accept raw search query
- strings."
+ "If t, all Swish++ engines will only accept raw search query strings."
:type 'boolean
:version "28.1")
:version "28.1")
(defcustom gnus-search-swish-e-raw-queries-p nil
- "If t, all Swish-e engines will only accept raw search query
- strings."
+ "If t, all Swish-e engines will only accept raw search query strings."
:type 'boolean
:version "28.1")
:version "28.1")
(defcustom gnus-search-namazu-raw-queries-p nil
- "If t, all Namazu engines will only accept raw search query
- strings."
+ "If t, all Namazu engines will only accept raw search query strings."
:type 'boolean
:version "28.1")
:version "28.1")
(defcustom gnus-search-notmuch-raw-queries-p nil
- "If t, all Notmuch engines will only accept raw search query
- strings."
+ "If t, all Notmuch engines will only accept raw search query strings."
:type 'boolean
:version "28.1")
(defcustom gnus-search-imap-raw-queries-p nil
- "If t, all IMAP engines will only accept raw search query
- strings."
+ "If t, all IMAP engines will only accept raw search query strings."
:version "28.1"
:type 'boolean)
:type 'regexp)
(defcustom gnus-search-mairix-raw-queries-p nil
- "If t, all Mairix engines will only accept raw search query
- strings."
+ "If t, all Mairix engines will only accept raw search query strings."
:version "28.1"
:type 'boolean)
other keys. Value is a string, quoted if it contains spaces.
Key and value are separated by a colon, no space. Expressions
are implicitly ANDed; the \"or\" keyword can be used to
-OR. \"not\" will negate the following expression, or keys can be
+OR. \"not\" will negate the following expression, or keys can be
prefixed with a \"-\". The \"near\" operator will work for
engines that understand it; other engines will convert it to
\"or\". Parenthetical groups work as expected.
Search keys can be expanded with TAB during entry, or left
abbreviated so long as they remain unambiguous, ie \"f\" will
-search the \"from\" header. \"s\" will raise an error.
+search the \"from\" header. \"s\" will raise an error.
Other keys:
will be interpreted as mark:read.
\"tag\" will search tags -- right now that's translated to
-\"keyword\" in IMAP, and left as \"tag\" for notmuch. At some
+\"keyword\" in IMAP, and left as \"tag\" for notmuch. At some
point this should also be used to search marks in the Gnus
registry.
:type 'boolean)
(defcustom gnus-sieve-update-shell-command "echo put %f | sieveshell %s"
- "Shell command to execute after updating your Sieve script. The following
-formatting characters are recognized:
+ "Shell command to execute after updating your Sieve script.
+
+The following formatting characters are recognized:
%f Script's file name (gnus-sieve-file)
%s Server name (from gnus-sieve-select-method)"
'((((class color) (background light)) (:foreground "ForestGreen" :inverse-video t :italic t))
(((class color) (background dark)) (:foreground "PaleGreen" :inverse-video t :italic t))
(t (:inverse-video t :italic t)))
- "Face used for displaying the Cloud Host"
+ "Face used for displaying the Cloud Host."
:group 'gnus-server-visual)
(defface gnus-server-opened
(defun gnus-convert-mark-converter-prompt (converter no-prompt)
"Indicate whether CONVERTER requires `gnus-convert-old-newsrc' to
- display the conversion prompt. NO-PROMPT may be nil (prompt),
- t (no prompt), or any form that can be called as a function.
- The form should return either t or nil."
+display the conversion prompt. NO-PROMPT may be nil (prompt),
+t (no prompt), or any form that can be called as a function.
+The form should return either t or nil."
(put converter 'gnus-convert-no-prompt no-prompt))
(defun gnus-convert-converter-needs-prompt (converter)
\(setq gnus-newsgroup-variables
\\='(message-use-followup-to
(gnus-visible-headers .
- \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
-")
+ \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))")
(eval-when-compile
;; Bind features so that require will believe that gnus-sum has
follow up an article, type `\\[gnus-summary-followup]'. To mail a reply to the author
of an article, type `\\[gnus-summary-reply]'.
-There are approx. one gazillion commands you can execute in this
-buffer; read the Info manual for more information (`\\[gnus-info-find-node]').
+There are approximately one gazillion commands you can execute in
+this buffer; read the Info manual for more
+information (`\\[gnus-info-find-node]').
The following commands are available:
(defun gnus-forward-line-ignore-invisible (n)
"Move N lines forward (backward if N is negative).
-Like forward-line, but skip over (and don't count) invisible lines."
+Like `forward-line', but skip over (and don't count) invisible lines."
(let (done)
(while (and (> n 0) (not done))
;; If the following character is currently invisible,
(defun gnus-extract-references (references)
"Return a list of Message-IDs in REFERENCES (in In-Reply-To
- format), trimmed to only contain the Message-IDs."
+format), trimmed to only contain the Message-IDs."
(let ((ids (gnus-split-references references))
refs)
(dolist (id ids)
(t emacs-version))))
(defun gnus-rename-file (old-path new-path &optional trim)
- "Rename OLD-PATH as NEW-PATH. If TRIM, recursively delete
-empty directories from OLD-PATH."
+ "Rename OLD-PATH as NEW-PATH.
+If TRIM, recursively delete empty directories from OLD-PATH."
(when (file-exists-p old-path)
(let* ((old-dir (file-name-directory old-path))
;; (old-name (file-name-nondirectory old-path))
(concat old-dir "..")))))))))
(defun gnus-set-file-modes (filename mode &optional flag)
- "Wrapper for set-file-modes."
+ "Wrapper for `set-file-modes'."
(ignore-errors
(set-file-modes filename mode flag)))
;; Commands.
(defun gnus-uu-decode-uu (&optional n)
- "Uudecodes the current article."
+ "Uudecode the current article."
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-uustrip-article n))
(defun gnus-uu-decode-uu-and-save (n dir)
- "Decodes and saves the resulting file."
+ "Decode and save the resulting file."
(interactive
(list current-prefix-arg
(file-name-as-directory
(gnus-uu-decode-with-method #'gnus-uu-uustrip-article n dir nil nil t))
(defun gnus-uu-decode-unshar (&optional n)
- "Unshars the current article."
+ "Unshar the current article."
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-unshar-article n nil nil 'scan t))
(defun gnus-uu-decode-unshar-and-save (n dir)
- "Unshars and saves the current article."
+ "Unshar and save the current article."
(interactive
(list current-prefix-arg
(file-name-as-directory
(gnus-uu-decode-with-method #'gnus-uu-unshar-article n dir nil 'scan t))
(defun gnus-uu-decode-save (n file)
- "Saves the current article."
+ "Save the current article."
(interactive
(list current-prefix-arg
(if gnus-uu-save-separate-articles
(gnus-uu-decode-with-method #'gnus-uu-save-article n nil t))
(defun gnus-uu-decode-binhex (n dir)
- "Unbinhexes the current article."
+ "Unbinhex the current article."
(interactive
(list current-prefix-arg
(file-name-as-directory
(gnus-uu-decode-with-method #'gnus-uu-yenc-article n dir nil t))
(defun gnus-uu-decode-uu-view (&optional n)
- "Uudecodes and views the current article."
+ "Uudecode and view the current article."
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-uu n)))
(defun gnus-uu-decode-uu-and-save-view (n dir)
- "Decodes, views and saves the resulting file."
+ "Decode, view and save the resulting file."
(interactive
(list current-prefix-arg
(read-file-name "Uudecode, view and save in dir: "
(gnus-uu-decode-uu-and-save n dir)))
(defun gnus-uu-decode-unshar-view (&optional n)
- "Unshars and views the current article."
+ "Unshar and view the current article."
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-unshar n)))
(defun gnus-uu-decode-unshar-and-save-view (n dir)
- "Unshars and saves the current article."
+ "Unshar and save the current article."
(interactive
(list current-prefix-arg
(read-file-name "Unshar, view and save in dir: "
(gnus-uu-decode-unshar-and-save n dir)))
(defun gnus-uu-decode-save-view (n file)
- "Saves and views the current article."
+ "Save and view the current article."
(interactive
(list current-prefix-arg
(if gnus-uu-save-separate-articles
(gnus-uu-decode-save n file)))
(defun gnus-uu-decode-binhex-view (n file)
- "Unbinhexes and views the current article."
+ "Unbinhex and view the current article."
(interactive
(list current-prefix-arg
(read-file-name "Unbinhex, view and save in dir: "
;; Digest and forward articles
(defun gnus-uu-digest-mail-forward (&optional n post)
- "Digests and forwards all articles in this series."
+ "Digest and forward all articles in this series."
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-initialize)
(let ((gnus-uu-save-in-digest t)
(gnus-uu-mark-region (point-min) (point-max) t))
(defun gnus-uu-mark-thread ()
- "Marks all articles downwards in this thread."
+ "Mark all articles downwards in this thread."
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-save-hidden-threads
(let ((level (gnus-summary-thread-level)))
(gnus-summary-position-point))
(defun gnus-uu-unmark-thread ()
- "Unmarks all articles downwards in this thread."
+ "Unmark all articles downwards in this thread."
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((level (gnus-summary-thread-level)))
(while (and (gnus-summary-remove-process-mark
(gnus-uu-decode-postscript n)))
(defun gnus-uu-decode-postscript-and-save (n dir)
- "Extracts PostScript and saves the current article."
+ "Extract PostScript and save the current article."
(interactive (list current-prefix-arg
(file-name-as-directory
(read-directory-name "Save in dir: "
n dir nil nil t))
(defun gnus-uu-decode-postscript-and-save-view (n dir)
- "Decodes, views and saves the resulting file."
+ "Decode, view and save the resulting file."
(interactive (list current-prefix-arg
(read-file-name "Where do you want to save the file(s)? "
gnus-uu-default-dir
gnus-uu-unshar-warning))
(goto-char (point-min))
(display-buffer buffer)
- (yes-or-no-p "This is a shell archive, unshar it? "))
+ (yes-or-no-p "This is a shell archive, unshar it?"))
(kill-buffer buffer))
(setq state (list 'error))))))
(unless (memq 'error state)
(gnus-uu-post-insert-binary)))))
(defun gnus-uu-post-insert-binary-in-article ()
- "Inserts an encoded file in the buffer.
+ "Insert an encoded file in the buffer.
The user will be asked for a file name."
(interactive)
(save-excursion
(defcustom gnus-agent t
"Whether we want to use the Gnus agent or not.
-You may customize gnus-agent to disable its use. However, some
+You may customize `gnus-agent' to disable its use. However, some
back ends have started to use the agent as a client-side cache.
Disabling the agent may result in noticeable loss of performance."
:version "22.1"
;;;###autoload
(defun describe-function (function)
"Display the full documentation of FUNCTION (a symbol).
-When called from lisp, FUNCTION may also be a function object."
+When called from Lisp, FUNCTION may also be a function object."
(interactive (help-fns--describe-function-or-command-prompt))
;; We save describe-function-orig-buffer on the help xref stack, so
;;;###autoload
(defun describe-command (command)
"Display the full documentation of COMMAND (a symbol).
-When called from lisp, COMMAND may also be a function object."
+When called from Lisp, COMMAND may also be a function object."
(interactive (help-fns--describe-function-or-command-prompt 'is-command))
(describe-function command))
((char-table-p value) "deeper char-table ...")
(t (condition-case nil
(category-set-mnemonics value)
- (error "invalid"))))))
+ (error "Invalid"))))))
;;;###autoload
(defun describe-categories (&optional buffer)
(defun help-do-xref (_pos function args)
"Call the help cross-reference function FUNCTION with args ARGS.
-Things are set up properly so that the resulting help-buffer has
+Things are set up properly so that the resulting help buffer has
a proper [back] button."
;; There is a reference at point. Follow it.
(let ((help-xref-following t))
(+ N (/ N (/ hexl-bits 4))) )) ) ; char offset into hexl display line
(defun hexl-goto-address (address)
- "Go to hexl-mode (decimal) address ADDRESS.
+ "Go to `hexl-mode' (decimal) address ADDRESS.
Signal error if ADDRESS is out of range."
(interactive "nAddress: ")
(if (or (< address 0) (> address hexl-max-address))
;;
;; If the variable `hippie-expand-verbose' is non-nil, `hippie-expand'
;; outputs in a message which try-function in the list that is used
-;; currently (ie. was used currently and will be tried first the next
+;; currently (i.e. was used currently and will be tried first the next
;; time).
;; The variable `hippie-expand-max-buffers' determines in how many
;; buffers, apart from the current, to search for expansions in. It
(defun ibuffer-included-in-filters-p (buf filters)
"Return non-nil if BUF passes all FILTERS.
-BUF is a lisp buffer object, and FILTERS is a list of filter
+BUF is a Lisp buffer object, and FILTERS is a list of filter
specifications with the same structure as
`ibuffer-filtering-qualifiers'."
(not
(defun ibuffer-included-in-filter-p (buf filter)
"Return non-nil if BUF pass FILTER.
-BUF is a lisp buffer object, and FILTER is a filter
+BUF is a Lisp buffer object, and FILTER is a filter
specification, with the same structure as an element of the list
`ibuffer-filtering-qualifiers'."
(if (eq (car filter) 'not)
"Overlay used to display the list of completions.")
(defvar icomplete--initial-input nil
- "Initial input in the minibuffer when icomplete-mode was activated.
+ "Initial input in the minibuffer when `icomplete-mode' was activated.
Used to implement the option `icomplete-show-matches-on-no-input'.")
(defun icomplete-post-command-hook ()
:type 'hook)
(defcustom ido-rewrite-file-prompt-functions nil
- "List of functions to run when the find-file prompt is created.
+ "List of functions to run when the `find-file' prompt is created.
Each function on the list may modify the following dynamically bound
variables:
dirname - the (abbreviated) directory name
(defun ido-make-file-list-1 (dir &optional merged)
- "Return list of non-ignored files in DIR
+ "Return list of non-ignored files in DIR.
If MERGED is non-nil, each file is cons'ed with DIR."
(and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
(file-directory-p dir))
;;;###autoload
(defun ido-dired-other-window ()
- "\"Edit\" a directory. Like `ido-dired' but selects in another window.
+ "\"Edit\" a directory. Like `ido-dired' but select in another window.
The directory is selected interactively by typing a substring.
For details of keybindings, see `ido-find-file'."
(interactive)
;;;###autoload
(defun ido-dired-other-frame ()
- "\"Edit\" a directory. Like `ido-dired' but makes a new frame.
+ "\"Edit\" a directory. Like `ido-dired' but make a new frame.
The directory is selected interactively by typing a substring.
For details of keybindings, see `ido-find-file'."
(interactive)
:group 'image)
(defcustom iimage-mode-image-search-path nil
- "List of directories to search for image files for iimage-mode."
+ "List of directories to search for image files for `iimage-mode'."
:type '(choice (const nil) (repeat directory)))
(defvar iimage-mode-image-filename-regex
If no such buffer exists, it will be opened."
(interactive)
(unless buffer-file-name
- (error "The current buffer doesn't visit a file."))
+ (error "Current buffer is not visiting a file"))
(image-mode--mark-file buffer-file-name #'dired-mark "marked"))
(defun image-mode-unmark-file ()
If no such buffer exists, it will be opened."
(interactive)
(unless buffer-file-name
- (error "The current buffer doesn't visit a file."))
+ (error "Current buffer is not visiting a file"))
(image-mode--mark-file buffer-file-name #'dired-unmark "unmarked"))
(declare-function dired-mark "dired" (arg &optional interactive))
(cons images delay)))))
(defun image-animated-p (image)
- "Like `image-multi-frame-p', but returns nil if no delay is specified."
+ "Like `image-multi-frame-p', but return nil if no delay is specified."
(let ((multi (image-multi-frame-p image)))
(and (cdr multi) multi)))
\f
;;;###autoload
(defun batch-info-validate ()
- "Runs `Info-validate' on the files remaining on the command line.
+ "Run `Info-validate' on the files remaining on the command line.
Must be used only with -batch, and kills Emacs on completion.
Each file will be processed even if an error occurred previously.
For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\""
(defun use-default-char-width-table ()
"Internal use only.
-Setup char-width-table appropriate for non-CJK language environment."
+Setup `char-width-table' appropriate for non-CJK language environment."
(while (char-table-parent char-width-table)
(setq char-width-table (char-table-parent char-width-table))))
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
-;; This lisp code is a general framework for translating various
+;; This Lisp code is a general framework for translating various
;; representations of the same data.
;; among other things it can be used to translate TeX, HTML, and compressed
;; files to ISO 8859-1. It can also be used to translate different charsets
;; SEE ALSO:
; If you are interested in questions related to using the ISO 8859-1
-; characters set (configuring emacs, Unix, etc. to use ISO), then you
+; characters set (configuring Emacs, Unix, etc. to use ISO), then you
; can get the ISO 8859-1 FAQ via anonymous ftp from
; ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1
;; If this fails it will search for AUCTeX's TeX-master or tex-mode's
;; tex-main-file variable in the local variables section and visit
-;; that file to get the coding system from the master file. This check
+;; that file to get the coding system from the master file. This check
;; can be disabled by setting `latexenc-dont-use-TeX-master-flag' to
;; t.
;; If we have still not found a coding system we will try to use the
;; standard tex-mode's `tex-guess-main-file' and get the coding system
-;; from the main file. This check can be disabled by setting
+;; from the main file. This check can be disabled by setting
;; `latexenc-dont-use-tex-guess-main-file-flag' to t.
;; The functionality is enabled by adding the function
(,(plist-get props 'decode) . ,(plist-get props 'encode))
,properties ,eol-type))
(t
- (error "unsupported XEmacs style make-coding-style arguments: %S"
+ (error "Unsupported XEmacs style make-coding-style arguments: %S"
`(,name ,type ,doc-string ,props))))))
(defun merge-coding-systems (first second)
(bury-buffer quail-completion-buf)
;; Then, show the guidance.
- (when (and
+ (when (and
;; Don't try to display guidance on an expired minibuffer. This
;; would go into an infinite wait rather than executing the user's
;; command. Bug #45792.
JSONRPC `:result' or `:error' object, respectively. If this
doesn't happen after TIMEOUT seconds (defaults to
`jrpc-default-request-timeout'), the caller can expect TIMEOUT-FN
-to be called with no arguments. The default values of SUCCESS-FN,
+to be called with no arguments. The default values of SUCCESS-FN,
ERROR-FN and TIMEOUT-FN simply log the events into
`jsonrpc-events-buffer'.
enveloping headers such as \"Content-Length:\".
:ON-SHUTDOWN (optional), a function of one argument, the
-connection object, called when the process dies .")
+connection object, called when the process dies.")
(cl-defmethod initialize-instance ((conn jsonrpc-process-connection) slots)
(cl-call-next-method)
;; is that I can log onto machines with primitive operating systems (VMS and
;; ATT system V :-), and still have the features of shell-mode available for
;; command history, etc. It's also handy to be able to run a file transfer in
-;; an emacs window. The transfer is in the "background", but you can also
+;; an Emacs window. The transfer is in the "background", but you can also
;; monitor or stop it easily.
;; The ^\ key is bound to a function for sending escape sequences to kermit,
;;; Commentary:
-;; The kmacro package provides the user interface to emacs' basic
+;; The kmacro package provides the user interface to Emacs' basic
;; keyboard macro functionality. With kmacro, two function keys are
;; dedicated to keyboard macros, by default F3 and F4.
(defcustom kmacro-repeat-no-prefix t
- "Allow repeating certain macro commands without entering the C-x C-k prefix."
+ "Allow repeating certain macro commands without entering the \\[kmacro-keymap] prefix."
:type 'boolean)
(defcustom kmacro-call-repeat-key t
(defun kmacro-end-or-call-macro-repeat (arg)
- "As `kmacro-end-or-call-macro' but allows repeat without repeating prefix."
+ "As `kmacro-end-or-call-macro' but allow repeat without repeating prefix."
(interactive "P")
(let ((keys (kmacro-get-repeat-prefix)))
(kmacro-end-or-call-macro arg t)
c trans-c))
(defun indian-make-hash (table trans-table)
- "Indian Transliteration Hash for decode/encode"
+ "Indian Transliteration Hash for decode/encode."
(let* ((encode-hash (make-hash-table :test 'equal))
(decode-hash (make-hash-table :test 'equal))
(hashtbls (cons encode-hash decode-hash))
;; only Devanagari is supported now.
(concat "[" (char-to-string #x0900)
"-" (char-to-string #x097f) "]")
- "Regexp that matches to conversion")
+ "Regexp that matches to conversion.")
(defun indian-ucs-to-iscii-region (from to)
- "Converts the indian UCS characters in the region to ISCII.
-Returns new end position."
+ "Convert the indian UCS characters in the region to ISCII.
+Return new end position."
(interactive "r")
;; only Devanagari is supported now.
(save-excursion
(point-max))))
(defun indian-iscii-to-ucs-region (from to)
- "Converts the ISCII characters in the region to UCS.
-Returns new end position."
+ "Convert the ISCII characters in the region to UCS.
+Return new end position."
(interactive "r")
;; only Devanagari is supported now.
(save-excursion
;; the sale, use or other dealings in this Software without prior
;; written authorization of the copyright holder.
-
;;; Commentary:
;; This file implements an algorithm to find Thai word breaks using a
;; which means that you can easily index the list character by
;; character.
+;;; Code:
+
(defvar thai-word-table
(let ((table (list 'thai-words)))
(dolist (elt
(defun thai-update-word-table (file &optional append)
- "Update Thai word table by replacing the current word list with
-FILE. If called with a prefix argument, FILE is appended instead to
+ "Update Thai word table by replacing the current word list with FILE.
+If called with a prefix argument, FILE is appended instead to
the current word list."
(interactive "FThai word table file: \nP")
(let ((buf (generate-new-buffer "*thai-work*"))
(defun thai-kill-word (arg)
- "Like kill-word but pay attention to Thai word boundaries.
+ "Like `kill-word' but pay attention to Thai word boundaries.
With argument, do this that many times."
(interactive "p")
(kill-region (point) (progn (thai-forward-word arg) (point))))
(defun thai-backward-kill-word (arg)
- "Like backward-kill-word but pay attention to Thai word boundaries."
+ "Like `backward-kill-word' but pay attention to Thai word boundaries."
(interactive "p")
(thai-kill-word (- arg)))
(defun thai-transpose-words (arg)
- "Like transpose-words but pay attention to Thai word boundaries."
+ "Like `transpose-words' but pay attention to Thai word boundaries."
(interactive "*p")
(transpose-subr 'thai-forward-word arg))
;;;###autoload
(defun tibetan-decompose-region (from to)
"Decompose Tibetan text in the region FROM and TO.
-This is different from decompose-region because precomposed Tibetan characters
-are decomposed into normal Tibetan character sequences."
+This is different from `decompose-region' because precomposed
+Tibetan characters are decomposed into normal Tibetan character
+sequences."
(interactive "r")
(save-restriction
(narrow-to-region from to)
;;;###autoload
(defun tibetan-decompose-string (str)
"Decompose Tibetan string STR.
-This is different from decompose-string because precomposed Tibetan characters
-are decomposed into normal Tibetan character sequences."
+This is different from `decompose-string' because precomposed
+Tibetan characters are decomposed into normal Tibetan character
+sequences."
(let ((new "")
(len (length str))
(idx 0)
;;;###autoload
(defun tibetan-compose-buffer ()
"Composes Tibetan character components in the buffer.
-See also docstring of the function tibetan-compose-region."
+See also docstring of the function `tibetan-compose-region'."
(interactive)
(make-local-variable 'tibetan-decomposed)
(tibetan-compose-region (point-min) (point-max))
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Code
+;;; Code:
-;; Regexp matching with a sequence of Tai Viet characters.
-(defconst tai-viet-re "[\xaa80-\xaac2\xaadb-\xaadf]+")
+(defconst tai-viet-re "[\xaa80-\xaac2\xaadb-\xaadf]+"
+ "Regexp matching with a sequence of Tai Viet characters.")
-;; Char-table of information about glyph type of Tai Viet characters.
(defconst tai-viet-glyph-info
(let ((table (make-char-table nil))
(specials '((right-overhang . "ꪊꪋꪌꪍꪏꪓꪖꪜꪞꪡꪤꪨ")
(chars (cdr elt)))
(dotimes (i (length chars))
(aset table (aref chars i) category))))
- table))
+ table)
+ "Char-table of information about glyph type of Tai Viet characters.")
(defun tai-viet-compose-string (from to string)
"Compose Tai Viet characters in STRING between indices FROM and TO."
;; - skolt-sami-prefix
;; - kildin-sami-prefix
-;;; Code
+;;; Code:
(require 'quail)
;; Local Variables:
;; coding: utf-8
;; End:
+
+;;; vnvni.el ends here
((equal dump-mode "dump") "emacs")
((equal dump-mode "bootstrap") "emacs")
((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp")
- (t (error "unrecognized dump mode %s" dump-mode)))))
+ (t (error "Unrecognized dump mode %s" dump-mode)))))
(when (and (featurep 'native-compile)
(equal dump-mode "pdump"))
;; Don't enable this before bootstrap is completed, as the
;; Search a database of files and use dired commands on the result.
;;
;; Locate.el provides an interface to a program which searches a
-;; database of file names. By default, this program is the GNU locate
+;; database of file names. By default, this program is the GNU locate
;; command, but it could also be the BSD-style find command, or even a
;; user specified command.
;;
;; To use a more complicated expression, create a function which
;; takes a string (the name to find) as input and returns a list.
;; The first element should be the command to be executed, the remaining
-;; elements should be the arguments (including the name to find). Then put
+;; elements should be the arguments (including the name to find). Then put
;;
;; (setq locate-make-command-line 'my-locate-command-line)
;;
;; my-locate-command-line.
;;
;; You should make sure that whichever command you use works correctly
-;; from a shell prompt. GNU locate and BSD find expect the file databases
+;; from a shell prompt. GNU locate and BSD find expect the file databases
;; to either be in standard places or located via environment variables.
;; If the latter, make sure these environment variables are set in
;; your emacs process.
;;
;; Locate-mode assumes that each line output from the locate-command
;; consists exactly of a file name, possibly preceded or trailed by
-;; whitespace. If your file database has other information on the line (for
+;; whitespace. If your file database has other information on the line (for
;; example, the file size), you will need to redefine the function
;; `locate-get-file-positions' to return a list consisting of the first
;; character in the file name and the last character in the file name.
;;
;; To use locate-mode, simply type M-x locate and then the string
-;; you wish to find. You can use almost all of the dired commands in
+;; you wish to find. You can use almost all of the dired commands in
;; the resulting *Locate* buffer. It is worth noting that your commands
-;; do not, of course, affect the file database. For example, if you
+;; do not, of course, affect the file database. For example, if you
;; compress a file in the locate buffer, the actual file will be
;; compressed, but the entry in the file database will not be
-;; affected. Consequently, the database and the filesystem will be out
+;; affected. Consequently, the database and the filesystem will be out
;; of sync until the next time the database is updated.
;;
;; The command `locate-with-filter' keeps only lines matching a
"Return t if versioned string S1 should sort before versioned string S2.
Case is significant if `ls-lisp-ignore-case' is nil.
-This is the same as string-lessp (with the exception of case
+This is the same as `string-lessp' (with the exception of case
insensitivity), but sequences of digits are compared numerically,
as a whole, in the same manner as the `strverscmp' function available
in some standard C libraries does."
;; Extension commands for keyboard macros. These permit you to assign
;; a name to the last-defined keyboard macro, expand and insert the
-;; lisp corresponding to a macro, query the user from within a macro,
+;; Lisp corresponding to a macro, query the user from within a macro,
;; or apply a macro to each line in the reason.
;;; Code:
;; which (on systems that need it) is used during installation
;; to give appropriate permissions to movemail.
;;
-;; It has to be done from lisp in order to be sure of getting the
+;; It has to be done from Lisp in order to be sure of getting the
;; correct value of rmail-spool-directory.
;;; Code:
;; A NOTE TO THOSE WHO WOULD CHANGE THIS CODE... Since it is PD,
;; you're within your rights to do whatever you want. If you do
;; publish a new version with your changes in it, please (1) insert
-;; lisp comments describing the changes, (2) insert lisp comments
+;; Lisp comments describing the changes, (2) insert Lisp comments
;; that clearly delimit where your changes are, (3) email me a copy
;; (I can't always consistently follow the relevant usenet groups),
;; and (4) use a version number that is based on the version you're
;; --- you can generate/modify an X-Mailer: message header
;;
;; After a long list of options below, you will find the function
-;; feedmail-send-it. Hers's the best way to use the stuff in this
+;; feedmail-send-it. Hers's the best way to use the stuff in this
;; file:
;;
;; Save this file as feedmail.el somewhere on your elisp loadpath;
;; If you are wondering how to send your messages to some SMTP server
;; (which is not really a feedmail-specific issue), you are probably
;; looking for smtpmail.el, and it is probably already present in your
-;; emacs installation. Look at smtpmail.el for how to set that up, and
+;; Emacs installation. Look at smtpmail.el for how to set that up, and
;; then do this to hook it into feedmail:
;;
;; (autoload 'feedmail-buffer-to-smtpmail "feedmail" nil t)
There is a separate queue for draft messages, intended to prevent
you from accidentally sending incomplete messages. The queues are
disk-based and intended for later transmission. The messages are
-queued in their raw state as they appear in the mail-mode buffer and
+queued in their raw state as they appear in the `mail-mode' buffer and
can be arbitrarily edited later, before sending, by visiting the
appropriate file in the queue directory (and setting the buffer to
mail-mode or whatever). If you visit a file in the queue directory
"Duration of pause after feedmail-debug messages.
After some messages are divulged, it may be helpful to pause before
something else obliterates them. This value controls the duration of
-the pause. If the value is nil or 0, the sit-for is not done, which
+the pause. If the value is nil or 0, the `sit-for' is not done, which
has the effect of not pausing at all. Debug messages can be seen after
the fact in the messages buffer."
:version "24.1"
(sit-for feedmail-queue-chatty-sit-for))))
(defun feedmail-find-eoh (&optional noerror)
- "Internal; finds the end of message header fields, returns mark just before it."
+ "Internal; find the end of message header fields, return mark just before it."
;; all this funny business with line endings is to account for CRLF
;; weirdness that I don't think I'll ever figure out
(feedmail-say-debug ">in-> feedmail-find-eoh %s" noerror)
;; commands.
;; + more language styles.
;; + The key sequence 'C-c ! a C-y C-c ! b' should auto-fill the
-;; footnote in adaptive fill mode. This does not seem to be a bug in
+;; footnote in adaptive fill mode. This does not seem to be a bug in
;; `adaptive-fill' because it behaves that way on all point movements
;; + Handle footmode mode elegantly in all modes, even if that means refuses to
-;; accept the burden. For example, in a programming language mode, footnotes
+;; accept the burden. For example, in a programming language mode, footnotes
;; should be commented.
;; + Manually autofilling the a first footnote should not cause it to
;; wrap into the footnote section tag
;; + Current solution adds a second newline after the section tag, so it is
-;; clearly a separate paragraph. There may be stylistic objections to this.
+;; clearly a separate paragraph. There may be stylistic objections to this.
;; + Footnotes with multiple paragraphs should not have their first
;; line out-dented.
;; + Upon leaving footnote area, perform an auto-fill on an entire
;; + fill-paragraph takes arg REGION, but seemingly only when called
;; interactively.
;; + At some point, it became necessary to change `footnote-section-tag-regexp'
-;; to remove its trailing space. (Adaptive fill side-effect?)
+;; to remove its trailing space. (Adaptive fill side-effect?)
;; + useful for lazy testing
;; (setq footnote-narrow-to-footnotes-when-editing t)
;; (setq footnote-section-tag "Footnotes: ")
(defcustom footnote-align-to-fn-text t
"How to left-align footnote text.
If nil, footnote text is to be aligned flush left with left side
-of the footnote number. If non-nil, footnote text is to be aligned
+of the footnote number. If non-nil, footnote text is to be aligned
left with the first character of footnote text."
:type 'boolean)
"List of roman numerals with their values.")
(defconst footnote-roman-upper-regexp (upcase footnote-roman-lower-regexp)
- "Regexp of roman numerals. Not complete")
+ "Regexp of roman numerals. Not complete.")
(defun footnote--roman-upper (n)
"Generic Roman number footnoting."
(concat "[" (apply #'concat footnote-hebrew-symbolic) "]"))
(defun footnote--hebrew-symbolic (n)
- "Only 22 elements, per the style of eg. 'פירוש שפתי חכמים על רש״י'.
-Proceeds from `י' to `כ', from `צ' to `ק'. After `ת', rolls over to `א'."
+ "Only 22 elements, per the style of e.g. 'פירוש שפתי חכמים על רש״י'.
+Proceeds from `י' to `כ', from `צ' to `ק'. After `ת', rolls over to `א'."
(nth (mod (1- n) 22) footnote-hebrew-symbolic))
;;; list of all footnote styles
(defun footnote--get-area-point-max ()
"Return the end of footnote area.
This is either `point-max' or the start of a `.signature' string, as
-defined by variable `footnote-signature-separator'. If there is no
+defined by variable `footnote-signature-separator'. If there is no
footnote area, returns `point-max'."
(save-excursion (footnote--goto-char-point-max)))
;; should make sure your version does before including verbose addresses like
;; this. One solution to this, if you are on a system whose /bin/mail doesn't
;; work that way, (and you still want to be able to /bin/mail to send mail in
-;; addition to emacs) is to define minimal aliases (without full names) in
+;; addition to Emacs) is to define minimal aliases (without full names) in
;; your .mailrc file, and use define-mail-abbrev to redefine them when sending
-;; mail from emacs; this way, mail sent from /bin/mail will work, and mail
-;; sent from emacs will be pretty.
+;; mail from Emacs; this way, mail sent from /bin/mail will work, and mail
+;; sent from Emacs will be pretty.
;;
;; Aliases in the mailrc file may be nested. If you define aliases like
;; alias group1 fred ethel
;; normally cannot contain hyphens, but this code works around that for the
;; specific case of mail-alias word-abbrevs.
;;
-;; To read in the contents of another .mailrc-type file from emacs, use the
+;; To read in the contents of another .mailrc-type file from Emacs, use the
;; command Meta-X merge-mail-abbrevs. The rebuild-mail-abbrevs command is
;; similar, but will delete existing aliases first.
;;
(defun mail-resolve-all-aliases-1 (sym &optional so-far)
(if (memq sym so-far)
- (error "mail alias loop detected: %s"
+ (error "Mail alias loop detected: %s"
(mapconcat #'symbol-name (cons sym so-far) " <- ")))
(let ((definition (and (boundp sym) (symbol-value sym))))
(if definition
(defun mail-abbrev-expand-hook ()
"For use as the fourth arg to `define-abbrev'.
After expanding a mail-abbrev, if Auto Fill mode is on and we're past the
-fill-column, break the line at the previous comma, and indent the next line
+`fill-column', break the line at the previous comma, and indent the next line
with a space."
(when auto-fill-function
(let (p)
((string= character-coding "quoted-printable")
(mail-unquote-printable-region (point-min) (point-max)
nil nil t))
- (t (error "unsupported Content-Transfer-Encoding: %s"
+ (t (error "Unsupported Content-Transfer-Encoding: %s"
character-coding)))
(decode-coding-region (point-min) (point-max) coding-system))
(mailclient-encode-string-as-url
;; to be read in them. It assumes that new mail for the file `folder'
;; is written by the filter to a file called `folder.spool'. (If the
;; file writes directly to `folder' you may lose mail if new mail
-;; arrives whilst you are reading the folder in emacs, hence the use
+;; arrives whilst you are reading the folder in Emacs, hence the use
;; of a spool file.) For example, the following procmail recipe puts
;; any mail with `emacs' in the subject line into the spool file
;; `emacs.spool', ready to go into the folder `emacs'.
(kill-buffer mspools-buffer))
(define-derived-mode mspools-mode special-mode "MSpools"
- "Major mode for output from mspools-show.
+ "Major mode for output from `mspools-show'.
\\<mspools-mode-map>Move point to one of the items in this buffer, then use
\\[mspools-visit-spool] to go to the spool that the current line refers to.
\\[revert-buffer] to regenerate the list of spools.
;; reporter.el was written primarily for Emacs Lisp package authors so
;; that their users can more easily report bugs. When invoked,
;; `reporter-submit-bug-report' will set up an outgoing mail buffer
-;; with the appropriate bug report address, including a lisp
+;; with the appropriate bug report address, including a Lisp
;; expression the maintainer of the package can evaluate to completely
;; reproduce the environment in which the bug was observed (e.g. by
;; using `eval-last-sexp'). This package proved especially useful
(error indent-enclosing-p))))
(defun reporter-lisp-indent (_indent-point state)
- "A better lisp indentation style for bug reporting."
+ "A better Lisp indentation style for bug reporting."
(save-excursion
(goto-char (1+ (nth 1 state)))
(current-column)))
;;; rmail-spam-filter such that the spam is rejected by
;;; rmail-spam-filter itself.
+;;; Code:
+
(require 'rmail)
(require 'rmailsum)
(defvar rmail-remote-password-error "invalid usercode or password\\|
unknown user name or bad password\\|Authentication failed\\|MU_ERR_AUTH_FAILURE"
- "Regular expression matching incorrect-password POP or IMAP server error
-messages.
+ "Regexp matching incorrect-password POP or IMAP server error messages.
If you get an incorrect-password error that this expression does not match,
please report it with \\[report-emacs-bug].")
(defun rmail-get-remote-password (imap user host)
"Get the password for retrieving mail from a POP or IMAP server.
-If none has been set, the password is found via auth-source. If
+If none has been set, the password is found via auth-source. If
you use ~/.authinfo as your auth-source backend, then put
something like the following in that file:
(defun rmail-output-to-rmail-buffer (tembuf msg)
"Copy message in TEMBUF into the current Rmail buffer.
-Do what is necessary to make Rmail know about the new message. then
+Do what is necessary to make Rmail know about the new message, then
display message number MSG."
(save-excursion
(rmail-swap-buffers-maybe)
(defvar sc-fill-begin 1
"Buffer position to begin filling.")
(defvar sc-fill-line-prefix ""
- "Fill prefix of previous line")
+ "Fill prefix of previous line.")
;; filling
(defun sc-fill-if-different (&optional prefix)
km))
(defun menu-bar-define-mouse-key (map key def)
- "Like `define-key', but adds all possible prefixes for the mouse."
+ "Like `define-key', but add all possible prefixes for the mouse."
(define-key map (vector key) def)
(mapc (lambda (prefix) (define-key map (vector prefix key) def))
;; This list only needs to contain special window areas that
;; To use the file, put (require 'midnight) into your .emacs. Then, at
;; midnight, Emacs will run the normal hook `midnight-hook'. You can
;; put whatever you like there, say, `calendar'; by default there is
-;; only one function there - `clean-buffer-list'. It will kill the
+;; only one function there - `clean-buffer-list'. It will kill the
;; buffers matching `clean-buffer-list-kill-buffer-names' and
;; `clean-buffer-list-kill-regexps' and the buffers which where last
;; displayed more than `clean-buffer-list-delay-general' days ago,
;; post-command-hook to swap prompts when necessary
(defun minibuf-eldef-update-minibuffer ()
"Update a minibuffer's prompt to include a default only when applicable.
-This is intended to be used as a minibuffer post-command-hook for
+This is intended to be used as a minibuffer `post-command-hook' for
`minibuffer-electric-default-mode'; the minibuffer should have already
been set up by `minibuf-eldef-setup-minibuffer'."
(unless (eq minibuf-eldef-showing-default-in-prompt
;; <http://www.zip.com.au/~cs/app/wily/auug.html>. I'd like
;; to incorporate some of these ideas into mouse-copy. The only
;; lose is that this is not the current Emacs Way Of Doing Things, so
-;; there would be a learning curve for existing emacs users.
+;; there would be a learning curve for existing Emacs users.
;;
;;
;; Thanks:
and under post-19.29 but not early versions of Emacs.
19.29 and 19.30 seems to drop mouse drag events
-sometimes. (Reproducible under XFree86-3.1.1 (X11R6pl11) and
+sometimes. (Reproducible under XFree86-3.1.1 (X11R6pl11) and
XFree86-3.1.2 under Linux 1.2.x. Doesn't occur under X11R5 and SunOS
4.1.1.)
(defcustom mpc-host
(concat (or (getenv "MPD_HOST") "localhost")
(if (getenv "MPD_PORT") (concat ":" (getenv "MPD_PORT"))))
- "Host (and port) where the Music Player Daemon is running. The
-format is \"HOST\", \"HOST:PORT\", \"PASSWORD@HOST\" or
-\"PASSWORD@HOST:PORT\" where PASSWORD defaults to no password, PORT
-defaults to 6600 and HOST defaults to localhost."
+ "Host (and port) where the Music Player Daemon is running.
+The format is \"HOST\", \"HOST:PORT\", \"PASSWORD@HOST\" or
+\"PASSWORD@HOST:PORT\" where PASSWORD defaults to no password,
+PORT defaults to 6600 and HOST defaults to localhost."
:type 'string)
(defvar mpc-proc nil)
;;
;; 1. For dired to work on a host which marks symlinks with a trailing @ in
;; an ls -alF listing, you need to (setq dired-ls-F-marks-symlinks t).
-;; Most UNIX systems do not do this, but ULTRIX does. If you think that
+;; Most UNIX systems do not do this, but ULTRIX does. If you think that
;; there is a chance you might connect to an ULTRIX machine (such as
;; prep.ai.mit.edu), then set this variable accordingly. This will have
;; the side effect that dired will have problems with symlinks whose names
;; frequently, and ange-ftp seems to be unable to guess its host-type,
;; then setting the appropriate host-type regexp
;; (ange-ftp-vms-host-regexp, ange-ftp-mts-host-regexp, or
-;; ange-ftp-cms-host-regexp) accordingly should help. Also, please report
+;; ange-ftp-cms-host-regexp) accordingly should help. Also, please report
;; ange-ftp's inability to recognize the host-type as a bug.
;;
;; 3. For slow connections, you might get "listing unreadable" error
;; messages, or get an empty buffer for a file that you know has something
-;; in it. The solution is to increase the value of ange-ftp-retry-time.
+;; in it. The solution is to increase the value of ange-ftp-retry-time.
;; Its default value is 5 which is plenty for reasonable connections.
;; However, for some transatlantic connections I set this to 20.
;;
-;; 4. Beware of compressing files on non-UNIX hosts. Ange-ftp will do it by
+;; 4. Beware of compressing files on non-UNIX hosts. Ange-ftp will do it by
;; copying the file to the local machine, compressing it there, and then
-;; sending it back. Binary file transfers between machines of different
-;; architectures can be a risky business. Test things out first on some
-;; test files. See "Bugs" below. Also, note that ange-ftp copies files by
-;; moving them through the local machine. Again, be careful when doing
+;; sending it back. Binary file transfers between machines of different
+;; architectures can be a risky business. Test things out first on some
+;; test files. See "Bugs" below. Also, note that ange-ftp copies files by
+;; moving them through the local machine. Again, be careful when doing
;; this with binary files on non-Unix machines.
;;
;; 5. Beware that dired over ftp will use your setting of dired-no-confirm
;; (list of dired commands for which confirmation is not asked). You
;; might want to reconsider your setting of this variable, because you
;; might want confirmation for more commands on remote direds than on
-;; local direds. For example, I strongly recommend that you not include
-;; compress and uncompress in this list. If there is enough demand it
+;; local direds. For example, I strongly recommend that you not include
+;; compress and uncompress in this list. If there is enough demand it
;; might be a good idea to have an alist ange-ftp-dired-no-confirm of
;; pairs ( TYPE . LIST ), where TYPE is an operating system type and LIST
;; is a list of commands for which confirmation would be suppressed. Then
;; remote dired listings would take their (buffer-local) value of
-;; dired-no-confirm from this alist. Who votes for this?
+;; dired-no-confirm from this alist. Who votes for this?
;; ---------------------------------------------------------------------
;; Non-UNIX support:
;; VMS support:
;;
;; Ange-ftp has full support for VMS hosts. It should be able to
-;; automatically recognize any VMS machine. However, if it fails to do
+;; automatically recognize any VMS machine. However, if it fails to do
;; this, you can use the command ange-ftp-add-vms-host. Also, you can
;; set the variable ange-ftp-vms-host-regexp in your init file. We
;; would be grateful if you would report any failures to automatically
;; Therefore, to access a VMS file, you must enter the filename with upper
;; case letters.
;; 2. To access the latest version of file under VMS, you use the filename
-;; without the ";" and version number. You should always edit the latest
-;; version of a file. If you want to edit an earlier version, copy it to a
-;; new file first. This has nothing to do with ange-ftp, but is simply
-;; good VMS operating practice. Therefore, to edit FILE.TXT;3 (say 3 is
-;; latest version), do C-x C-f /ymir.claremont.edu:FILE.TXT. If you
+;; without the ";" and version number. You should always edit the latest
+;; version of a file. If you want to edit an earlier version, copy it to a
+;; new file first. This has nothing to do with ange-ftp, but is simply
+;; good VMS operating practice. Therefore, to edit FILE.TXT;3 (say 3 is
+;; latest version), do C-x C-f /ymir.claremont.edu:FILE.TXT. If you
;; inadvertently do C-x C-f /ymir.claremont.edu:FILE.TXT;3, you will find
;; that VMS will not allow you to save the file because it will refuse to
;; overwrite FILE.TXT;3, but instead will want to create FILE.TXT;4, and
-;; attach the buffer to this file. To get out of this situation, M-x
+;; attach the buffer to this file. To get out of this situation, M-x
;; write-file /ymir.claremont.edu:FILE.TXT will attach the buffer to
-;; latest version of the file. For this reason, in dired "f"
+;; latest version of the file. For this reason, in dired "f"
;; (dired-find-file), always loads the file sans version, whereas "v",
-;; (dired-view-file), always loads the explicit version number. The
+;; (dired-view-file), always loads the explicit version number. The
;; reasoning being that it reasonable to view old versions of a file, but
;; not to edit them.
;; 3. EMACS has a feature in which it does environment variable substitution
-;; in filenames. Therefore, to enter a $ in a filename, you must quote it
+;; in filenames. Therefore, to enter a $ in a filename, you must quote it
;; by typing $$.
;; MTS support:
;;
;; Ange-ftp has full support for hosts running
;; the Michigan terminal system. It should be able to automatically
-;; recognize any MTS machine. However, if it fails to do this, you can use
+;; recognize any MTS machine. However, if it fails to do this, you can use
;; the command ange-ftp-add-mts-host. As well, you can set the variable
-;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you
+;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you
;; would report any failures to automatically recognize a MTS host as a bug.
;;
;; Filename syntax:
;;
-;; MTS filenames are entered in a UNIX-y way. For example, if your account
+;; MTS filenames are entered in a UNIX-y way. For example, if your account
;; was YYYY, the file FILE in the account XXXX: on mtsg.ubc.ca would be
;; entered as
;; /YYYY@mtsg.ubc.ca:/XXXX:/FILE
-;; In other words, MTS accounts are treated as UNIX directories. Of course,
+;; In other words, MTS accounts are treated as UNIX directories. Of course,
;; to access a file in another account, you must have access permission for
;; it. If FILE were in your own account, then you could enter it in a
;; relative name fashion as
;; /YYYY@mtsg.ubc.ca:FILE
-;; MTS filenames can be up to 12 characters. Like UNIX, the structure of the
+;; MTS filenames can be up to 12 characters. Like UNIX, the structure of the
;; filename does not contain a TYPE (i.e. it can have as many "."'s as you
;; like.) MTS filenames are always in upper case, and hence be sure to enter
;; them as such! MTS is not case sensitive, but an EMACS running under UNIX
;; CMS. It should be able to automatically recognize any CMS machine.
;; However, if it fails to do this, you can use the command
;; ange-ftp-add-cms-host. As well, you can set the variable
-;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you
+;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you
;; would report any failures to automatically recognize a CMS host as a bug.
;;
;; Filename syntax:
;;
-;; CMS filenames are entered in a UNIX-y way. In other words, minidisks are
-;; treated as UNIX directories. For example to access the file READ.ME in
+;; CMS filenames are entered in a UNIX-y way. In other words, minidisks are
+;; treated as UNIX directories. For example to access the file READ.ME in
;; minidisk *.311 on cuvmb.cc.columbia.edu, you would enter
;; /anonymous@cuvmb.cc.columbia.edu:/*.311/READ.ME
;; If *.301 is the default minidisk for this account, you could access
;; FOO.BAR on this minidisk as
;; /anonymous@cuvmb.cc.columbia.edu:FOO.BAR
;; CMS filenames are of the form FILE.TYPE, where both FILE and TYPE can be
-;; up to 8 characters. Again, beware that CMS filenames are always upper
+;; up to 8 characters. Again, beware that CMS filenames are always upper
;; case, and hence must be entered as such.
;;
;; Tips:
;; 1. CMS machines, with the exception of anonymous accounts, nearly always
-;; need an account password. To have ange-ftp send an account password,
+;; need an account password. To have ange-ftp send an account password,
;; you can either include it in your .netrc file, or use
;; ange-ftp-set-account.
-;; 2. Ange-ftp cannot send "write passwords" for a minidisk. Hopefully, we
+;; 2. Ange-ftp cannot send "write passwords" for a minidisk. Hopefully, we
;; can fix this.
;;
;; BS2000 support:
;;
;; Ange-ftp has full support for BS2000 hosts. It should be able to
-;; automatically recognize any BS2000 machine. However, if it fails to
+;; automatically recognize any BS2000 machine. However, if it fails to
;; do this, you can use the command ange-ftp-add-bs2000-host. As well,
;; you can set the variable ange-ftp-bs2000-host-regexp in your .emacs
-;; file. We would be grateful if you would report any failures to auto-
+;; file. We would be grateful if you would report any failures to auto-
;; matically recognize a BS2000 host as a bug.
;;
;; If you want to access the POSIX subsystem on BS2000 you MUST use
;; Therefore, to access a BS2000 file, you must enter the filename with
;; upper case letters.
;; 2. EMACS has a feature in which it does environment variable substitution
-;; in filenames. Therefore, to enter a $ in a filename, you must quote it
+;; in filenames. Therefore, to enter a $ in a filename, you must quote it
;; by typing $$.
;; 3. BS2000 machines, with the exception of anonymous accounts, nearly
-;; always need an account password. To have ange-ftp send an account
+;; always need an account password. To have ange-ftp send an account
;; password, you can either include it in your .netrc file, or use
;; ange-ftp-set-account.
;;
;;
;; 2. Some combinations of FTP clients and servers break and get out of sync
;; when asked to list a non-existent directory. Some of the ai.mit.edu
-;; machines cause this problem for some FTP clients. Using
+;; machines cause this problem for some FTP clients. Using
;; ange-ftp-kill-ftp-process can restart the ftp process, which
;; should get things back in sync.
;;
;; 3. Ange-ftp does not check to make sure that when creating a new file,
;; you provide a valid filename for the remote operating system.
;; If you do not, then the remote FTP server will most likely
-;; translate your filename in some way. This may cause ange-ftp to
-;; get confused about what exactly is the name of the file. The
+;; translate your filename in some way. This may cause ange-ftp to
+;; get confused about what exactly is the name of the file. The
;; most common causes of this are using lower case filenames on systems
;; which support only upper case, and using filenames which are too
;; long.
;; disgusting way around this problem is to talk to the FTP process via
;; rlogin which does the 'right' things with pty's.
;;
-;; 6. For CMS support, we send too many cd's. Since cd's are cheap, I haven't
-;; worried about this too much. Eventually, we should have some caching
+;; 6. For CMS support, we send too many cd's. Since cd's are cheap, I haven't
+;; worried about this too much. Eventually, we should have some caching
;; of the current minidisk.
;;
;; 7. Some CMS machines do not assign a default minidisk when you ftp them as
-;; anonymous. It is then necessary to guess a valid minidisk name, and cd
-;; to it. This is (understandably) beyond ange-ftp.
+;; anonymous. It is then necessary to guess a valid minidisk name, and cd
+;; to it. This is (understandably) beyond ange-ftp.
;;
;; 8. Remote to remote copying of files on non-Unix machines can be risky.
;; Depending on the variable ange-ftp-binary-file-name-regexp, ange-ftp
-;; will use binary mode for the copy. Between systems of different
+;; will use binary mode for the copy. Between systems of different
;; architecture, this still may not be enough to guarantee the integrity
-;; of binary files. Binary file transfers from VMS machines are
-;; particularly problematical. Should ange-ftp-binary-file-name-regexp be
+;; of binary files. Binary file transfers from VMS machines are
+;; particularly problematical. Should ange-ftp-binary-file-name-regexp be
;; an alist of OS type, regexp pairs?
;;
;; 9. The code to do compression of files over ftp is not as careful as it
-;; should be. It deletes the old remote version of the file, before
+;; should be. It deletes the old remote version of the file, before
;; actually checking if the local to remote transfer of the compressed
-;; file succeeds. Of course to delete the original version of the file
+;; file succeeds. Of course to delete the original version of the file
;; after transferring the compressed version back is also dangerous,
;; because some OS's have severe restrictions on the length of filenames,
;; and when the compressed version is copied back the "-Z" or ".Z" may be
-;; truncated. Then, ange-ftp would delete the only remaining version of
+;; truncated. Then, ange-ftp would delete the only remaining version of
;; the file. Maybe ange-ftp should make backups when it compresses files
;; (of course, the backup "~" could also be truncated off, sigh...).
;; Suggestions?
;;
;; 10. If a dir listing is attempted for an empty directory on (at least
-;; some) VMS hosts, an ftp error is given. This is really an ftp bug, and
+;; some) VMS hosts, an ftp error is given. This is really an ftp bug, and
;; I don't know how to get ange-ftp work to around it.
;;
-;; 11. Bombs on filenames that start with a space. Deals well with filenames
+;; 11. Bombs on filenames that start with a space. Deals well with filenames
;; containing spaces, but beware that the remote ftpd may not like them
;; much.
;;
;; It needs to be reimplemented by modifying the parse-...-listing
;; functions to convert the directory listing to ls -l format.
;;
-;; 13. The famous @ bug. As mentioned above in TIPS, ULTRIX marks symlinks
-;; with a trailing @ in a ls -alF listing. In order to account for this
+;; 13. The famous @ bug. As mentioned above in TIPS, ULTRIX marks symlinks
+;; with a trailing @ in a ls -alF listing. In order to account for this
;; ange-ftp looks to chop trailing @'s off of symlink names when it is
-;; parsing a listing with the F switch. This will cause ange-ftp to
+;; parsing a listing with the F switch. This will cause ange-ftp to
;; incorrectly get the name of a symlink on a non-ULTRIX host if its name
-;; ends in an @. ange-ftp will correct itself if you take F out of the
-;; dired ls switches (C-u s will allow you to edit the switches). The
+;; ends in an @. ange-ftp will correct itself if you take F out of the
+;; dired ls switches (C-u s will allow you to edit the switches). The
;; dired buffer will be automatically reverted, which will allow ange-ftp
;; to fix its files hashtable. A cookie to anyone who can think of a
;; fast, sure-fire way to recognize ULTRIX over ftp.
;; and the current code should eventually be made compliant.
;;
;; nil = local host type, whatever that is (probably unix).
-;; Think nil as in "not a remote host". This value is used by
+;; Think nil as in "not a remote host". This value is used by
;; ange-ftp-dired-host-type for local buffers.
;;
-;; t = a remote host of unknown type. Think t as in true, it's remote.
+;; t = a remote host of unknown type. Think t as in true, it's remote.
;; Currently, `unix' is used as the default remote host type.
;; Maybe we should use t.
;;
;; TYPE = a remote host of TYPE type.
;;
;; TYPE:LIST = a remote host of TYPE type, using a specialized ftp listing
-;; program called list. This is currently only used for Unix
+;; program called list. This is currently only used for Unix
;; dl (descriptive listings), when ange-ftp-dired-host-type
;; is set to `unix:dl'.
;; Bug report codes:
;;
;; Because of their naive faith in this code, there are certain situations
-;; which the writers of this program believe could never happen. However,
+;; which the writers of this program believe could never happen. However,
;; being realists they have put calls to `error' in the program at these
-;; points. These errors provide a code, which is an integer, greater than 1.
+;; points. These errors provide a code, which is an integer, greater than 1.
;; To aid debugging. the error codes, and the functions in which they reside
;; are listed below.
;;
"Buffer name to hold directory listing data received from FTP process.")
(defvar ange-ftp-netrc-modtime nil
- "Last modified time of the netrc file from file-attributes.")
+ "Last modified time of the netrc file from `file-attributes'.")
(defvar ange-ftp-user-hashtable (make-hash-table :test 'equal)
"Hash table holding associations between HOST, USER pairs.")
(ange-ftp-error host user
(concat "DIR failed: " (cdr result)))))
(ange-ftp-del-tmp-name temp))))
- (error "Should never happen. Please report. Bug ref. no.: 1"))))
+ (error "This should never happen; please report this as a bug"))))
\f
;;;; ------------------------------------------------------------
;;;; Directory information caching support.
(concat "/" drive "/"))
dir (and dir "/")
file))
- (error "name %s didn't match" name))
+ (error "Name %s didn't match" name))
(let (drive dir file tmp quote)
(if (string-match "\\`\".+\"\\'" name)
(setq name (substring name 1 -1)
(setq file (match-string 2 name))
(concat (and acct (concat "/" acct "/"))
file))
- (error "name %s didn't match" name))
+ (error "Name %s didn't match" name))
(if (string-match "\\`/\\([^:]+:\\)/\\(.*\\)\\'" name)
(concat (match-string 1 name) (match-string 2 name))
;; Let's hope that mts will recognize it anyway.
(and pubset (concat "_/" pubset "/"))
(and userid (concat userid "/"))
filename))
- (error "name %s didn't match" name))
+ (error "Name %s didn't match" name))
;; and here we (maybe) have to remove the inserted "_/" 'cause
;; of our prevention of the special escape prefix above:
(if (string-match (concat "^/_/") name)
(define-key map [mouse-2] #'browse-url-button-open)
(define-key map "w" #'browse-url-button-copy)
map)
- "The keymap used for browse-url buttons.")
+ "The keymap used for `browse-url' buttons.")
(defface browse-url-button
'((t :inherit link))
- "Face for browse-url buttons (i.e., links)."
+ "Face for `browse-url' buttons (i.e., links)."
:version "27.1")
(defun browse-url-add-buttons ()
"Turn off or on support for the dictionary tooltip mode.
It is normally internally called with 1 to enable support for the
-tooltip mode. The hook function will check the value of the
-variable dictionary-tooltip-mode to decide if some action must be
-taken. When disabling the tooltip mode the value of this variable
+tooltip mode. The hook function will check the value of the
+variable `dictionary-tooltip-mode' to decide if some action must be
+taken. When disabling the tooltip mode the value of this variable
will be set to nil."
(interactive)
(tooltip-mode on)
;;;###autoload
(defun global-dictionary-tooltip-mode (&optional arg)
- "Enable/disable dictionary-tooltip-mode for all buffers.
+ "Enable/disable `dictionary-tooltip-mode' for all buffers.
-Internally it provides a default for the dictionary-tooltip-mode.
-It can be overwritten for each buffer using dictionary-tooltip-mode.
+Internally it provides a default for the `dictionary-tooltip-mode'.
+It can be overwritten for each buffer using `dictionary-tooltip-mode'.
Note: (global-dictionary-tooltip-mode 0) will not disable the mode
any buffer where (dictionary-tooltip-mode 1) has been called."
;;; Commentary:
;; This package provides a common interface to query directory servers using
;; different protocols such as LDAP, CCSO PH/QI or BBDB. Queries can be
-;; made through an interactive form or inline. Inline query strings in
+;; made through an interactive form or inline. Inline query strings in
;; buffers are expanded with appropriately formatted query results
;; (especially used to expand email addresses in message buffers). EUDC
;; also interfaces with the BBDB package to let you register query results
(eval-when-compile (require 'subr-x))
(defgroup eww nil
- "Emacs Web Wowser"
+ "Emacs Web Wowser."
:version "25.1"
:link '(custom-manual "(eww) Top")
:group 'web
trustfiles crlfiles keylist min-prime-bits
verify-flags verify-error verify-hostname-error
&allow-other-keys)
- "Negotiate a SSL/TLS connection. Returns proc. Signals gnutls-error.
+ "Negotiate a SSL/TLS connection. Return proc. Signal gnutls-error.
Note that arguments are passed CL style, :type TYPE instead of just TYPE.
"Keymap to hold goto-addr's mouse key defs under highlighted URLs.")
(defun goto-address-context-menu (menu click)
- "Populate MENU with goto-address commands at CLICK."
+ "Populate MENU with `goto-address' commands at CLICK."
(when (mouse-posn-property (event-start click) 'goto-address)
(define-key menu [goto-address-separator] menu-bar-separator)
(define-key menu [goto-address-at-mouse]
(defcustom ldap-default-port nil
"Default TCP port for LDAP connections.
-Initialized from the LDAP library at build time. Default value is 389."
+Initialized from the LDAP library at build time.
+Default value is 389."
:type '(choice (const :tag "Use library default" nil)
(integer :tag "Port number")))
(type . MIME-TYPE)
(test . TEST))
-where VIEWER is either a lisp command, e.g., a major-mode, or a
+where VIEWER is either a Lisp command, e.g., a major mode, or a
string containing a shell command for viewing files of the
defined MIME-TYPE. In case of a shell command, %s will be
replaced with the file.
MIME-TYPE is a regular expression being matched against the
actual MIME type. It is implicitly surrounded with ^ and $.
-TEST is a lisp form which is evaluated in order to test if the
+TEST is a Lisp form which is evaluated in order to test if the
entry should be chosen. The `test' entry is optional.
When selecting a viewer for a given MIME type, the first viewer
(defvar nsm-temporary-host-settings nil)
(defgroup nsm nil
- "Network Security Manager"
+ "Network Security Manager."
:version "25.1"
:group 'comm)
Reference:
-[1]: Schneier, Bruce (1996). Applied Cryptography (Second ed.). John
-Wiley & Sons. ISBN 0-471-11709-9.
+[1]: Schneier, Bruce (1996). Applied Cryptography (Second ed.).
+John Wiley & Sons. ISBN 0-471-11709-9.
[2]: N. Mavrogiannopoulos, FSF (Apr 2015). \"GnuTLS NEWS -- History
of user-visible changes.\" Version 3.4.0,
`https://gitlab.com/gnutls/gnutls/blob/master/NEWS'"
Reference:
-GnuTLS authors (2018). \"GnuTLS Manual 4.3.3 Anonymous
+GnuTLS authors (2018). \"GnuTLS Manual 4.3.3 Anonymous
authentication\",
`https://www.gnutls.org/manual/gnutls.html#Anonymous-authentication'"
(let ((kx (plist-get status :key-exchange)))
;;; Commentary:
;;
;; This package provides a simple method of inserting a URL based on the
-;; text at point in the current buffer. This is part of an on-going effort
+;; text at point in the current buffer. This is part of an on-going effort
;; to increase the information I provide people while reducing the amount
-;; of typing I need to do. No-doubt there are undiscovered Emacs packages
+;; of typing I need to do. No-doubt there are undiscovered Emacs packages
;; out there that do all of this and do it better, feel free to point me to
;; them, in the mean time I'm having fun playing with Emacs Lisp.
;;
;; The URLs are stored in an external file as a list of either cons cells,
-;; or lists. A cons cell entry looks like this:
+;; or lists. A cons cell entry looks like this:
;;
;; (<Lookup> . <URL>)
;;
;; where <Lookup> is a string that acts as the keyword lookup and <URL> is
-;; the URL associated with it. An example might be:
+;; the URL associated with it. An example might be:
;;
;; ("GNU" . "https://www.gnu.org/")
;;
;; (<Lookup> <URL> <Comment>)
;;
;; where <Lookup> and <URL> are the same as with the cons cell and <Comment>
-;; is any text you like that describes the URL. This description will be
-;; used when presenting a list of URLS using `quickurl-list'. An example
+;; is any text you like that describes the URL. This description will be
+;; used when presenting a list of URLS using `quickurl-list'. An example
;; might be:
;;
;; ("FSF" "https://www.fsf.org/" "The Free Software Foundation")
(defun quickurl-url-comment (url)
"Get the comment from a URL.
-If the URL has no comment an empty string is returned. Also note that this
-function is a setfable place."
+If the URL has no comment an empty string is returned. Also note
+that this function is a setfable place."
(declare
(gv-setter (lambda (store)
`(if (quickurl-url-commented-p ,url)
;;; Commentary:
+;;; Code:
+
(require 'sasl)
(require 'hmac-md5)
;; It is caller's responsibility to base64-decode challenges and
;; base64-encode responses in IMAP4 AUTHENTICATE command.
;;
-;; Passphrase should be longer than 16 bytes. (See RFC 2195)
+;; Passphrase should be longer than 16 bytes. (See RFC 2195)
-;;; Commentary:
+;;; Code:
(require 'sasl)
(require 'hmac-md5)
"Whether there is a daemon offering the Secret Service API.")
(defvar secrets-debug nil
- "Write debug messages")
+ "Write debug messages.")
(defconst secrets-service "org.freedesktop.secrets"
"The D-Bus name used to talk to Secret Service.")
(eval-when-compile (require 'cl-lib))
(defgroup shr-color nil
- "Simple HTML Renderer colors"
+ "Simple HTML Renderer colors."
:group 'shr)
(defcustom shr-color-visible-luminance-min 40
(require 'text-property-search)
(defgroup shr nil
- "Simple HTML Renderer"
+ "Simple HTML Renderer."
:version "25.1"
:group 'web)
(defun sieve-manage-capability (&optional name value buffer)
"Check if capability NAME of server BUFFER match VALUE.
-If it does, return the server value of NAME. If not returns nil.
+If it does, return the server value of NAME. If not return nil.
If VALUE is nil, do not check VALUE and return server value.
If NAME is nil, return the full server list of capabilities."
(with-current-buffer (or buffer (current-buffer))
(modify-syntax-entry ?\} "){" st)
(modify-syntax-entry ?\" "\"" st)
st)
- "Syntax table in use in sieve-mode buffers.")
+ "Syntax table in use in `sieve-mode' buffers.")
;; Key map definition
(substitute-command-keys "\\[sieve-upload]"))))
(defmacro sieve-change-region (&rest body)
- "Turns off sieve-region before executing BODY, then re-enables it after.
+ "Turn off sieve-region before executing BODY, then re-enables it after.
Used to bracket operations which move point in the sieve-buffer."
(declare (indent 0) (debug t))
`(progn
Comments start with -- and end with newline or another --.
Delete converts tabs to spaces as it moves back.
\\{snmp-mode-map}
-Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', then
+Turning on `snmp-mode' runs the hooks in `snmp-common-mode-hook', then
`snmp-mode-hook'."
(interactive)
Comments start with -- and end with newline or another --.
Delete converts tabs to spaces as it moves back.
\\{snmp-mode-map}
-Turning on snmp-mode runs the hooks in `snmp-common-mode-hook',
+Turning on `snmp-mode' runs the hooks in `snmp-common-mode-hook',
then `snmpv2-mode-hook'."
(interactive)
\f
;; Replacement functions for open-network-stream, etc.
(defvar socks-noproxy nil
- "List of regexps matching hosts that we should not socksify connections to")
+ "List of regexps matching hosts that we should not socksify connections to.")
(defun socks-find-route (host _service)
(let ((route socks-server)
"Program to run to open a telnet connection.")
(defvar telnet-initial-count -50
- "Initial value of `telnet-count'. Should be set to the negative of the
-number of terminal writes telnet will make setting up the host connection.")
+ "Initial value of `telnet-count'.
+Should be set to the negative of the number of terminal writes
+telnet will make setting up the host connection.")
(defvar telnet-maximum-count 4
"Maximum value `telnet-count' can have.
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)
"Return the compress command related to PROP.
-PROP is either `inline-compress' or `inline-decompress'. SIZE is
-the length of the file to be compressed.
+PROP is either `inline-compress' or `inline-decompress'.
+SIZE is the length of the file to be compressed.
If no corresponding command is found, nil is returned."
(when (and (integerp tramp-inline-compress-start-size)
(put #'tramp-trace-buffer-name 'tramp-suppress-trace t)
(defvar tramp-trace-functions nil
- "A list of non-Tramp functions to be traced with tramp-verbose > 10.")
+ "A list of non-Tramp functions to be traced with `tramp-verbose' > 10.")
(defun tramp-debug-message (vec fmt-string &rest arguments)
"Append message to debug buffer of VEC.
(require 'dbus)
(defvar zeroconf-debug nil
- "Write messages during service discovery")
+ "Write messages during service discovery.")
(defconst zeroconf-service-avahi "org.freedesktop.Avahi"
"The D-Bus name used to talk to Avahi.")
(defun zeroconf-get-service (name type)
"Return the service description of service NAME as list.
NAME must be a string. The service must be of service type
-TYPE. The resulting list has the format
+TYPE. The resulting list has the format
(INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)."
;; Due to the service browser, all known services are kept in
(defun zeroconf-resolve-service (service)
"Return all service attributes SERVICE as list.
NAME must be a string. The service must be of service type
-TYPE. The resulting list has the format
+TYPE. The resulting list has the format
(INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS)."
(let* ((name (zeroconf-service-name service))
(defvar-local comment-combine-change-calls t
"If non-nil (the default), use `combine-change-calls' around
- calls of `comment-region-function' and
- `uncomment-region-function'. This Substitutes a single call to
- each of the hooks `before-change-functions' and
- `after-change-functions' in place of those hooks being called
- for each individual buffer change.")
+calls of `comment-region-function' and
+`uncomment-region-function'. This Substitutes a single call to
+each of the hooks `before-change-functions' and
+`after-change-functions' in place of those hooks being called
+for each individual buffer change.")
(defvar comment-region-function 'comment-region-default
"Function to comment a region.
:sound-file The path to a sound file to play when the notification pops up.
:sound-name A themable named sound from the freedesktop.org sound naming
specification to play when the notification pops up.
- Similar to icon-name,only for sounds. An example would
+ Similar to icon-name, only for sounds. An example would
be \"message-new-instant\".
:suppress-sound Causes the server to suppress playing any sounds, if it has
that ability.
(defcustom nxml-prefer-utf-16-little-to-big-endian-flag (eq system-type
'windows-nt)
"Non-nil means prefer little-endian to big-endian byte-order for UTF-16.
-This is used only for saving a buffer; when reading the byte-order is
-auto-detected. It may be relevant both when there is no encoding declaration
-and when the encoding declaration specifies `UTF-16'."
+This is used only for saving a buffer; when reading the
+byte-order is auto-detected. It may be relevant both when there
+is no encoding declaration and when the encoding declaration
+specifies `UTF-16'."
:group 'nxml
:type 'boolean
:safe #'booleanp)
(define-key map "/" 'nxml-electric-slash)
(define-key map "\M-\t" 'completion-at-point)
map)
- "Keymap for nxml-mode.")
+ "Keymap for `nxml-mode'.")
(defvar nxml-font-lock-keywords
'(nxml-fontify-matcher)
- "Default font lock keywords for nxml-mode.")
+ "Default font lock keywords for `nxml-mode'.")
(defsubst nxml-set-face (start end face)
(when (and face (< start end))
string)
(defun nxml-cleanup ()
- "Clean up after nxml-mode."
+ "Clean up after `nxml-mode'."
;; Disable associated minor modes.
(rng-validate-mode -1)
;; Clean up fontification.
(defun nxml-dynamic-markup-word ()
"Dynamically markup the word before point.
This attempts to find a tag to put around the word before point based
-on the contents of the current buffer. The end-tag will be inserted at
+on the contents of the current buffer. The end-tag will be inserted at
point. The start-tag will be inserted at or before the beginning of
the word before point; the contents of the current buffer is used to
decide where.
(caar nxml-ns-state))
(defun nxml-ns-set-default (ns)
- "Changes the current default namespace.
+ "Change the current default namespace.
The change will be in effect until the end of the current element.
NS is a symbol or nil."
(setq nxml-ns-state
;; For state 3 it is t.
;; The special display is achieved by using overlays. The overlays
;; are computed from the nxml-outline-state property by
-;; `nxml-refresh-outline'. There overlays all have a category property
+;; `nxml-refresh-outline'. There overlays all have a category property
;; with an nxml-outline-display property with value t.
;;
;; For a section to be recognized as such, the following conditions must
(cond ((not (nxml-section-tag-forward))
(if (null tag-qnames)
nil
- (nxml-outline-error "missing end-tag %s"
+ (nxml-outline-error "Missing end-tag %s"
(car tag-qnames))))
;; section end-tag
((nxml-token-end-tag-p)
xmltok-start))
(let ((qname (xmltok-end-tag-qname)))
(unless tag-qnames
- (nxml-outline-error "extra end-tag %s" qname))
+ (nxml-outline-error "Extra end-tag %s" qname))
(unless (string= (car tag-qnames) qname)
- (nxml-outline-error "mismatched end-tag; expected %s, got %s"
+ (nxml-outline-error "Mismatched end-tag; expected %s, got %s"
(car tag-qnames)
qname)))
(cond ((> transparent-depth 0)
(setq found t))
(let ((qname (xmltok-start-tag-qname)))
(unless (string= (car open-tags) qname)
- (nxml-outline-error "mismatched end-tag"))
+ (nxml-outline-error "Mismatched end-tag"))
(setq open-tags (cdr open-tags)))))
(goto-char section-start-pos)
(and (not found)
;;; Commentary:
-;; This uses xmltok.el to do XML parsing. The fundamental problem is
-;; how to handle changes. We don't want to maintain a complete parse
+;; This uses xmltok.el to do XML parsing. The fundamental problem is
+;; how to handle changes. We don't want to maintain a complete parse
;; tree. We also don't want to reparse from the start of the document
;; on every keystroke. However, it is not possible in general to
;; parse an XML document correctly starting at a random point in the
;; middle. The main problems are comments, CDATA sections and
;; processing instructions: these can all contain things that are
-;; indistinguishable from elements. Literals in the prolog are also a
+;; indistinguishable from elements. Literals in the prolog are also a
;; problem. Attribute value literals are not a problem because
;; attribute value literals cannot contain less-than signs.
;;
;; we have found.
;;
;; The prolog has to be parsed specially, so we also keep track of the
-;; end of the prolog in `nxml-prolog-end'. The prolog is reparsed on
+;; end of the prolog in `nxml-prolog-end'. The prolog is reparsed on
;; every change to the prolog. This won't work well if people try to
-;; edit huge internal subsets. Hopefully that will be rare.
+;; edit huge internal subsets. Hopefully that will be rare.
;;
;; We rely on the `syntax-propertize-function' machinery to keep track
;; of the changes in the buffer. Fontification also relies on correct
;; `syntax-table' properties. This means that scanning for these
-;; constructs had better be quick. Fortunately it is. Firstly, the
+;; constructs had better be quick. Fortunately it is. Firstly, the
;; typical proportion of comments, CDATA sections and processing
;; instructions is small relative to other things. Secondly, to scan
;; we just search for the regexp <[!?].
(defun nxml-scan-element-forward (from &optional up)
"Scan forward from FROM over a single balanced element.
Point must be between tokens. Return the position of the end of
-the tag that ends the element. `xmltok-start' will contain the
+the tag that ends the element. `xmltok-start' will contain the
position of the start of the tag. If UP is non-nil, then scan
past end-tag of element containing point. If no element is
found, return nil. If a well-formedness error prevents scanning,
(defun nxml-scan-element-backward (from &optional up bound)
"Scan backward from FROM over a single balanced element.
Point must be between tokens. Return the position of the end of
-the tag that starts the element. `xmltok-start' will contain the
+the tag that starts the element. `xmltok-start' will contain the
position of the start of the tag. If UP is non-nil, then scan
past start-tag of element containing point. If BOUND is non-nil,
then don't scan back past BOUND. If no element is found, return
(require 'sgml-mode)
(defcustom rng-nxml-auto-validate-flag t
- "Non-nil means automatically turn on validation with nxml-mode."
+ "Non-nil means automatically turn on validation with `nxml-mode'."
:type 'boolean
:group 'relax-ng)
;; For usage information, see the documentation for rng-validate-mode.
;;
;; This file provides a minor mode that continually validates a buffer
-;; against a RELAX NG schema. The validation state is used to support
-;; schema-sensitive editing as well as validation. Validation is
+;; against a RELAX NG schema. The validation state is used to support
+;; schema-sensitive editing as well as validation. Validation is
;; performed while Emacs is idle. XML parsing is done using
-;; xmltok.el. This file is responsible for checking that end-tags
+;; xmltok.el. This file is responsible for checking that end-tags
;; match their start-tags. Namespace processing is handled by
-;; nxml-ns.el. The RELAX NG Compact Syntax schema is parsed into
+;; nxml-ns.el. The RELAX NG Compact Syntax schema is parsed into
;; internal form by rng-cmpct.el. This internal form is described by
;; rng-pttrn.el. Validation of the document by matching against this
-;; internal form is done by rng-match.el. Handling of W3C XML Schema
+;; internal form is done by rng-match.el. Handling of W3C XML Schema
;; datatypes is delegated by rng-match.el to rng-xsd.el. The minor
;; mode is intended to be used in conjunction with the nxml major
;; mode, but does not have to be.
;; parse and validate it from start to end. As we parse and validate
;; the buffer, we periodically cache the state. The state has three
;; components: the stack of open elements, the namespace processing
-;; state and the RELAX NG validation state. The state is cached as the
+;; state and the RELAX NG validation state. The state is cached as the
;; value of the rng-state text property on the closing greater-than of
;; tags (but at intervals, not on every tag). We keep track of the
;; position up to which cached state is known to be correct by adding
-;; a function to the buffer's after-change-functions. This is stored
+;; a function to the buffer's after-change-functions. This is stored
;; in the rng-validate-up-to-date-end variable. The first way in
;; which we make validation incremental is obvious: we start
;; validation from the first cached state before
;; minimizing destructive changes to the objects storing the state.
;; When state is changed, we use the old state to create new objects
;; representing the new state rather than destructively modifying the
-;; objects representing the old state. Copying the state is just a
+;; objects representing the old state. Copying the state is just a
;; matter of making a list of three objects, one for each component of
;; the state; the three objects themselves can be shared and do not
;; need to be copied.
(remove-hook 'after-change-functions #'rng-after-change-function t))))
(defun rng-set-schema-file-and-validate (filename)
- "Sets the schema and turns on `rng-validate-mode' if not already on.
+ "Set the schema and turn on `rng-validate-mode' if not already on.
The schema is set like `rng-set-schema'."
(interactive "fSchema file: ")
(rng-set-schema-file filename)
;;; Commentary:
-;; The main entry point is `rng-xsd-compile'. The validator
+;; The main entry point is `rng-xsd-compile'. The validator
;; knows to use this for the datatype library with URI
;; https://www.w3.org/2001/XMLSchema-datatypes because it
;; is the value of the rng-dt-compile property on that URI
;;; Commentary:
-;; This implements an XML 1.0 parser. It also implements the XML
+;; This implements an XML 1.0 parser. It also implements the XML
;; Namespaces Recommendation. It is designed to be conforming, but it
-;; works a bit differently from a normal XML parser. An XML document
+;; works a bit differently from a normal XML parser. An XML document
;; consists of the prolog and an instance. The prolog is parsed as a
;; single unit using `xmltok-forward-prolog'. The instance is
;; considered as a sequence of tokens, where a token is something like
-;; a start-tag, a comment, a chunk of data or a CDATA section. The
+;; a start-tag, a comment, a chunk of data or a CDATA section. The
;; tokenization of the instance is stateless: the tokenization of one
;; part of the instance does not depend on tokenization of the
;; preceding part of the instance. This allows the instance to be
;; value literals specifying default attribute values, and default
;; attribute values are not reported to the client.
;;
-;; 2. It does not implement internal entities containing elements. If
+;; 2. It does not implement internal entities containing elements. If
;; an internal entity is referenced and parsing its replacement text
;; yields one or more tags, then it will skip the reference and
;; report this to the client.
(defun pixel-visible-pos-in-window ()
"Return position shown on text line where cursor is in the selected window.
-This will look for positions of point and end-of-visual-line,
-then positions from beginning-of-visual-line to
-end-of-visual-line. When no char in a line is shown, this
+This will look for positions of point and `end-of-visual-line',
+then positions from `beginning-of-visual-line' to
+`end-of-visual-line'. When no char in a line is shown, this
returns nil."
(let* ((beginning-of-visual-line-pos (save-excursion (beginning-of-visual-line) (point)))
(end-of-visual-line-pos (save-excursion (end-of-visual-line) (point)))
solution)
(defun 5x5-play-solution (solution best)
- "Play a solution on an empty grid. This destroys the current game
-in progress because it is an animated attempt."
+ "Play a solution on an empty grid.
+This destroys the current game in progress because it is an
+animated attempt."
(5x5-new-game)
(let ((inhibit-quit t))
(dotimes (y 5x5-grid-size)
`5x5-solve-suggest' (press `\\[5x5-solve-suggest]') is called the
solution that is presented is the one that needs least number of
strokes --- other solutions can be viewed by rotating through the
-list. The list of solution is ordered by number of strokes, so
+list. The list of solution is ordered by number of strokes, so
rotating left just after calling `5x5-solve-suggest' will show
the solution with second least number of strokes, while rotating
right will show the solution with greatest number of strokes."
(fill-region-as-paragraph start (point) nil))))
(defun cookie1 (arg cookie-vec)
- "Inserts a cookie phrase ARG times."
+ "Insert a cookie phrase ARG times."
(cond ((zerop arg) t)
(t (insert (aref cookie-vec arg))
(insert " ")
;;;###autoload
(defun cookie-snarf (phrase-file &optional startmsg endmsg)
- "Reads in the PHRASE-FILE, returns it as a vector of strings.
-Emit STARTMSG and ENDMSG before and after. Caches the result; second
+ "Read the PHRASE-FILE, return it as a vector of strings.
+Emit STARTMSG and ENDMSG before and after. Cache the result; second
and subsequent calls on the same file won't go to disk."
(setq phrase-file (cookie-check-file phrase-file))
(let ((sym (intern-soft phrase-file cookie-cache)))
(modify-syntax-entry c "_" table) ;Digits are not part of words
(cl-incf c))
table)
- "Decipher mode syntax table")
+ "Decipher mode syntax table.")
(defvar-local decipher-alphabet nil)
;; This is an alist containing entries (PLAIN-CHAR . CIPHER-CHAR),
result)))
(defun dun-get-path (dirstring startlist)
- "Given a unix style pathname, build a list of path components (recursive)"
+ "Given a unix style pathname, build a list of path components (recursive)."
(let (slash)
(if (= (length dirstring) 0)
startlist
;;; **************
;;; Inserting a new fortune
(defun fortune-append (string &optional interactive file)
- "Appends STRING to the fortune FILE.
+ "Append STRING to the fortune FILE.
If INTERACTIVE is non-nil, don't compile the fortune file afterwards."
(setq file (expand-file-name
"Add the current score to the high score file.
If REVERSE is non-nil, treat lower scores as better than higher
-scores. This is useful for games where lower scores are better.
+scores. This is useful for games where lower scores are better.
On POSIX systems there may be a shared game directory for all users in
which the scorefiles are kept. On such systems Emacs doesn't create
(insert (int-to-string (prefix-numeric-value score))))))
(defun gametree-compute-and-insert-score ()
- "Compute current node score, maybe recursively from subnodes. Insert it.
+ "Compute current node score, maybe recursively from subnodes. Insert it.
Subnodes which have been manually scored are honored."
(interactive "*")
(let ((auto (not (and (looking-at gametree-score-regexp)
;;;###autoload
(defun handwrite ()
- "Turns the buffer into a \"handwritten\" document.
+ "Turn the buffer into a \"handwritten\" document.
The functions `handwrite-10pt', `handwrite-11pt', `handwrite-12pt'
and `handwrite-13pt' set up for various sizes of output.
:group 'games)
(defcustom hanoi-horizontal-flag nil
- "If non-nil, hanoi poles are oriented horizontally."
+ "Non-nil means that hanoi poles are oriented horizontally."
:type 'boolean)
(defcustom hanoi-move-period 1.0
;;;###autoload
(defun hanoi-unix-64 ()
- "Like hanoi-unix, but pretend to have a 64-bit clock.
+ "Like `hanoi-unix', but pretend to have a 64-bit clock.
This is, necessarily (as of Emacs 20.3), a crock. When the
current-time interface is made s2G-compliant, hanoi.el will need
to be updated."
(force-mode-line-update)))
(defun hanoi-put-face (start end value &optional object)
- "If hanoi-use-faces is non-nil, call put-text-property for face property."
+ "If `hanoi-use-faces' is non-nil, call `put-text-property' for face property."
(if hanoi-use-faces
(put-text-property start end 'face value object)))
(defvar life-window-start nil)
(defvar life--max-width nil
- "If non-nil, restrict width to this positive integer. ")
+ "If non-nil, restrict width to this positive integer.")
(defvar life--max-height nil
- "If non-nil, restrict height to this positive integer. ")
+ "If non-nil, restrict height to this positive integer.")
;; For mode line
(defvar life-current-generation nil)
then the digit. Thus, to guess that A=3, type `A 3'.
To leave the game to do other editing work, just switch buffers.
-Then you may resume the game with M-x mpuz.
+Then you may resume the game with \\[mpuz].
You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
(setq tab-width 30))
;;;###autoload
(defun spook ()
- "Adds that special touch of class to your outgoing mail."
+ "Add that special touch of class to your outgoing mail."
(interactive)
(cookie-insert spook-phrases-file
spook-phrase-default-count
(functionp (car elem))
(numberp (cadr elem)))
(apply 'zone-call elem))
- (t (error "bad `zone-call' elem: %S" elem))))
+ (t (error "Bad `zone-call' elem: %S" elem))))
program))))
;;;###autoload
(require 'epg)
(defgroup plstore nil
- "Searchable, partially encrypted, persistent plist store"
+ "Searchable, partially encrypted, persistent plist store."
:version "24.1"
:group 'files)
documentation).
This variable should be modified by customization engine. If this variable is
-modified by other means (for example, a lisp function), use `pr-update-menus'
+modified by other means (for example, a Lisp function), use `pr-update-menus'
function (see it for documentation) to update text printer menu."
:type 'symbol
:set 'pr-txt-name-custom-set)
\"share-name\"
This variable should be modified by customization engine. If this variable is
-modified by other means (for example, a lisp function), use `pr-update-menus'
+modified by other means (for example, a Lisp function), use `pr-update-menus'
function (see it for documentation) to update text printer menu.
Examples:
documentation).
This variable should be modified by customization engine. If this variable is
-modified by other means (for example, a lisp function), use `pr-update-menus'
+modified by other means (for example, a Lisp function), use `pr-update-menus'
function (see it for documentation) to update PostScript printer menu."
:type 'symbol
:set 'pr-ps-name-custom-set)
documentation).
This variable should be modified by customization engine. If this variable is
-modified by other means (for example, a lisp function), use `pr-update-menus'
+modified by other means (for example, a Lisp function), use `pr-update-menus'
function (see it for documentation) to update PostScript utility menu.
NOTE: Don't forget to download and install the utilities declared on
* If LOCAL is nil:
(set VARIABLE (eval VALUE))
- Note that VALUE can be any valid lisp expression. So, don't
+ Note that VALUE can be any valid Lisp expression. So, don't
forget to quote symbols and constant lists.
This setting is ignored if VARIABLE is equal to keyword
`inherits-from:'.
"Non-nil means list directory when processing a directory.
That is, any subdirectories (and the superdirectory) of the directory (given as
-argument of functions below) are also printed (as dired-mode listings).
+argument of functions below) are also printed (as `dired-mode' listings).
It's used by `pr-ps-directory-preview', `pr-ps-directory-using-ghostscript',
`pr-ps-directory-print', `pr-ps-directory-ps-print', `pr-printify-directory'
(define-key map "q" 'pr-interface-quit)
(define-key map "?" 'pr-interface-help)
map)
- "Keymap for pr-interface.")
+ "Keymap for `pr-interface'.")
(defmacro pr-interface-save (&rest body)
`(with-current-buffer pr-i-buffer
(defun pr-interface-help (&rest _ignore)
- "printing buffer interface help."
+ "Printing buffer interface help."
(interactive)
(pr-show-setup pr-interface-help-message "*Printing Interface Help*"))
;; - Allow "sudo kill PID", "sudo renice PID"
;; `proced-send-signal' operates on multiple processes one by one.
;; With "sudo" we want to execute one "kill" or "renice" command
-;; for all marked processes. Is there a `sudo-call-process'?
+;; for all marked processes. Is there a `sudo-call-process'?
;;
;; Thoughts and Ideas
;; - Currently, `process-attributes' returns the list of
km)
"Keymap for Proced commands.")
-(easy-menu-define
- proced-menu proced-mode-map "Proced Menu"
+(easy-menu-define proced-menu proced-mode-map
+ "Proced Menu."
`("Proced"
["Mark" proced-mark
:help "Mark Current Process"]
"The current profile.")
(defvar-local profiler-report-reversed nil
- "True if calltree is rendered in bottom-up. Do not touch this
-variable directly.")
+ "True if calltree is rendered in bottom-up.
+Do not touch this variable directly.")
(defvar-local profiler-report-order nil
- "The value can be `ascending' or `descending'. Do not touch
-this variable directly.")
+ "The value can be `ascending' or `descending'.
+Do not touch this variable directly.")
(defun profiler-report-make-entry-part (entry)
(let ((string (cond
buffer))
(defun profiler-report-setup-buffer (profile)
- "Make a buffer for PROFILE with rendering the profile and
-return it."
+ "Make a buffer for PROFILE with rendering the profile and return it."
(let ((buffer (profiler-report-setup-buffer-1 profile)))
(with-current-buffer buffer
(profiler-report-render-calltree))
t)))
(defun profiler-report-toggle-entry (&optional arg)
- "Expand entry at point if the tree is collapsed,
-otherwise collapse. With prefix argument, expand all subentries
-below entry at point."
+ "Expand entry at point if the tree is collapsed, otherwise collapse.
+With prefix argument, expand all subentries below entry at
+point."
(interactive "P")
(or (profiler-report-expand-entry arg)
(profiler-report-collapse-entry)))
(defun c-lineup-ObjC-method-call (langelem)
"Line up selector args as Emacs Lisp mode does with function args:
Go to the position right after the message receiver, and if you are at
-the end of the line, indent the current line c-basic-offset columns
+the end of the line, indent the current line `c-basic-offset' columns
from the opening bracket; otherwise you are looking at the first
character of the first method call argument, so line up the current
line with it.
(defun c-lineup-ObjC-method-call-colons (langelem)
"Line up selector args as Project Builder / XCode: colons of first
- selector portions on successive lines are aligned. If no decision can
- be made return NIL, so that other lineup methods can be tried. This is
- typically chained with `c-lineup-ObjC-method-call'.
+selector portions on successive lines are aligned. If no decision can
+be made return NIL, so that other lineup methods can be tried. This is
+typically chained with `c-lineup-ObjC-method-call'.
Works with: objc-method-call-cont."
(save-excursion
"[#\n\r]"))))))))
(defun c-awk-beginning-of-defun (&optional arg)
- "Move backward to the beginning of an AWK \"defun\". With ARG, do it that
-many times. Negative arg -N means move forward to Nth following beginning of
-defun. Returns t unless search stops due to beginning or end of buffer.
+ "Move backward to the beginning of an AWK \"defun\".
+With ARG, do it that many times. Negative arg -N means move
+forward to Nth following beginning of defun. Returns t unless
+search stops due to beginning or end of buffer.
By a \"defun\" is meant either a pattern-action pair or a function. The start
of a defun is recognized as code starting at column zero which is neither a
(eval-when-compile (cc-bytecomp-setup-environment))))
(defmacro cc-bytecomp-defvar (var)
- "Binds the symbol as a variable during compilation of the file,
+ "Bind the symbol as a variable during compilation of the file,
to silence the byte compiler. Don't use within `eval-when-compile'."
(declare (debug nil))
`(eval-when-compile
(defvar c--unsafe-post-self-insert-hook-functions
'(electric-pair-post-self-insert-function)
- "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")
+ "Known unsafe functions when members of `post-self-insert-hook' in CC Mode.")
(defun c--call-post-self-insert-hook-more-safely-1 ()
;; Call post-self-insert-hook, having removed from `post-self-insert-hook'
(defun c-defun-name-1 ()
"Return the name of the current defun, at the current narrowing,
-or NIL if there isn't one. \"Defun\" here means a function, or
+or nil if there isn't one. \"Defun\" here means a function, or
other top level construct with a brace block."
(c-save-buffer-state
(beginning-of-defun-function end-of-defun-function
(defun c-backward-conditional (count &optional target-depth with-else)
"Move back across a preprocessor conditional, leaving mark behind.
-A prefix argument acts as a repeat count. With a negative argument,
+A prefix argument acts as a repeat COUNT. With a negative argument,
move forward across a preprocessor conditional.
The optional arguments TARGET-DEPTH and WITH-ELSE are historical,
and have the same meanings as in `c-scan-conditionals'. If you
-are calling c-forward-conditional from a program, you might want
+are calling `c-forward-conditional' from a program, you might want
to call `c-scan-conditionals' directly instead."
(interactive "p")
(let ((new-point (c-scan-conditionals (- count) target-depth with-else)))
"Remove all text-properties PROPERTY from the region (FROM, TO)
which have the value VALUE, as tested by `equal'. These
properties are assumed to be over individual characters, having
-been put there by c-put-char-property. POINT remains unchanged."
+been put there by `c-put-char-property'. POINT remains unchanged."
(let ((place from) end-place)
(while ; loop round occurrences of (PROPERTY VALUE)
(progn
"Remove all text-properties PROPERTY from the region [FROM, TO)
which have the value VALUE, as tested by `equal'. These
properties are assumed to be over individual characters, having
-been put there by c-put-char-property. POINT remains unchanged."
+been put there by `c-put-char-property'. POINT remains unchanged."
(declare (debug t))
(if c-use-extents
;; XEmacs
treated as whitespace. The line breaks that end line comments are
considered to be the comment enders, so the point cannot be at the end
of the same line to move over a line comment. Unlike
-c-backward-syntactic-ws, this function doesn't move back over
+`c-backward-syntactic-ws', this function doesn't move back over
preprocessor directives.
Note that this function might do hidden buffer changes. See the
This function should be added to the `before-change-functions'
hook by major modes that use CC Mode's filling functionality
without initializing CC Mode. Currently (2020-06) these are
-js-mode and mhtml-mode."
+`js-mode' and `mhtml-mode'."
(c-truncate-lit-pos-cache beg))
(defun c-foreign-init-lit-pos-cache ()
This function should be called from the mode functions of major
modes which use CC Mode's filling functionality without
-initializing CC Mode. Currently (2020-06) these are js-mode and
-mhtml-mode."
+initializing CC Mode. Currently (2020-06) these are `js-mode' and
+`mhtml-mode'."
(c-truncate-lit-pos-cache 1))
\f
;; the rest of the file is fontified normally.
(defun c-ml-string-make-closer-re (_opener)
- "Return c-ml-string-any-closer-re.
+ "Return `c-ml-string-any-closer-re'.
This is a suitable language specific value of
`c-make-ml-string-closer-re-function' for most languages with
c-ml-string-any-closer-re)
(defun c-ml-string-make-opener-re (_closer)
- "Return c-ml-string-opener-re.
+ "Return `c-ml-string-opener-re'.
This is a suitable language specific value of
`c-make-ml-string-opener-re-function' for most languages with
;; are some variants.
;;
;; Suppose the major mode for the current buffer is one of the modes
-;; provided by cc-mode. `c-guess' guesses the indentation style by
+;; provided by cc-mode. `c-guess' guesses the indentation style by
;; examining the indentation in the region between beginning of buffer
;; and `c-guess-region-max'.
-;; and installs the guessed style. The name for installed style is given
+;; and installs the guessed style. The name for installed style is given
;; by `c-guess-style-name'.
;;
;; `c-guess-buffer' does the same but in the whole buffer.
;; `c-guess-region' does the same but in the region between the point
;; and the mark. `c-guess-no-install', `c-guess-buffer-no-install'
;; and `c-guess-region-no-install' guess the indentation style but
-;; don't install it. You can review a guessed style with `c-guess-view'.
+;; don't install it. You can review a guessed style with `c-guess-view'.
;; After reviewing, use `c-guess-install' to install the style
;; if you prefer it.
;;
;; or implicitly with `c-guess', `c-guess-buffer', or `c-guess-region',
;; a style name is given by `c-guess-style-name' with the above form.
;;
-;; If you want to reuse the guessed style in future emacs sessions,
-;; you may want to put it to your .emacs. `c-guess-view' is for
-;; you. It emits Emacs Lisp code which defines the last guessed
-;; style, in a temporary buffer. You can put the emitted code into
-;; your .emacs. This command was suggested by Alan Mackenzie.
+;; If you want to reuse the guessed style in future Emacs sessions,
+;; you may want to put it to your .emacs. `c-guess-view' is for
+;; you. It emits Emacs Lisp code which defines the last guessed
+;; style, in a temporary buffer. You can put the emitted code into
+;; your .emacs. This command was suggested by Alan Mackenzie.
;;; Code:
(defcustom c-guess-region-max 50000
"The maximum region size for examining indent information with `c-guess'.
It takes a long time to examine indent information from a large region;
-this option helps you limit that time. nil means no limit."
+this option helps you limit that time. nil means no limit."
:version "24.1"
:type 'integer
:group 'c)
(defun c-guess-dump-guessed-style (&optional printer)
"Show the guessed style.
`pp' is used to print the style but if PRINTER is given,
-PRINTER is used instead. If PRINTER is not nil, it
+PRINTER is used instead. If PRINTER is not nil, it
is called with one argument, the guessed style."
(interactive)
(let ((style (c-guess-make-style c-guess-guessed-basic-offset
c-emacs-variable-inits-tail c-emacs-variable-inits))
(defmacro c-lang-defvar (var val &optional doc)
- "Declares the buffer local variable VAR to get the value VAL. VAL is
-evaluated and assigned at mode initialization. More precisely, VAL is
-evaluated and bound to VAR when the result from the macro
-`c-init-language-vars' is evaluated.
+ "Declares the buffer local variable VAR to get the value VAL.
+VAL is evaluated and assigned at mode initialization. More
+precisely, VAL is evaluated and bound to VAR when the result from
+the macro `c-init-language-vars' is evaluated.
`c-lang-const' is typically used in VAL to get the right value for the
language being initialized, and such calls will be macro expanded to
`',var)
(defmacro c-lang-setvar (var val)
- "Causes the variable VAR to be made buffer local and to get set to the
-value VAL. VAL is evaluated and assigned at mode initialization. More
+ "Make variable VAR buffer local and set it to value VAL.
+VAL is evaluated and assigned at mode initialization. More
precisely, VAL is evaluated and bound to VAR when the result from the
macro `c-init-language-vars' is evaluated. VAR is typically a standard
Emacs variable like `comment-start'.
"[ \t\n\r]*"))
(defun cc-imenu-java-build-type-args-regex (depth)
- "Builds regexp for type arguments list with DEPTH allowed
+ "Build regexp for type arguments list with DEPTH allowed
nested angle brackets constructs."
(if (> depth 0)
(concat "<"
(make-variable-buffer-local 'c-max-syn-tab-mkr)
(defun c-basic-common-init (mode default-style)
- "Do the necessary initialization for the syntax handling routines
-and the line breaking/filling code. Intended to be used by other
-packages that embed CC Mode.
+ "Initialize the syntax handling routines and the line breaking/filling code.
+Intended to be used by other packages that embed CC Mode.
MODE is the CC Mode flavor to set up, e.g. `c-mode' or `java-mode'.
DEFAULT-STYLE tells which indentation style to install. It has the
(defvar c-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table c))
- "Syntax table used in c-mode buffers.")
+ "Syntax table used in `c-mode' buffers.")
(defvar c-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in c-mode buffers.")
+ "Keymap used in `c-mode' buffers.")
;; Add bindings which are only useful for C.
(define-key c-mode-map "\C-c\C-e" 'c-macro-expand)
-(easy-menu-define c-c-menu c-mode-map "C Mode Commands"
+(easy-menu-define c-c-menu c-mode-map "C Mode Commands."
(cons "C" (c-lang-const c-mode-menu c)))
;; In XEmacs >= 21.5 modes should add their own entries to
"Major mode for editing C code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
-c-mode buffer. This automatically sets up a mail buffer with version
+`c-mode' buffer. This automatically sets up a mail buffer with version
information already added. You just need to add a description of the
problem, including a reproducible test case, and send the message.
(define-key c++-mode-map "<" 'c-electric-lt-gt)
(define-key c++-mode-map ">" 'c-electric-lt-gt)
-(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands"
+(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands."
(cons "C++" (c-lang-const c-mode-menu c++)))
;;;###autoload
(defvar objc-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table objc))
- "Syntax table used in objc-mode buffers.")
+ "Syntax table used in `objc-mode' buffers.")
(defvar objc-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in objc-mode buffers.")
+ "Keymap used in `objc-mode' buffers.")
;; Add bindings which are only useful for Objective-C.
(define-key objc-mode-map "\C-c\C-e" 'c-macro-expand)
-(easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands"
+(easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands."
(cons "ObjC" (c-lang-const c-mode-menu objc)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
(define-derived-mode objc-mode prog-mode "ObjC"
"Major mode for editing Objective C code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
-objc-mode buffer. This automatically sets up a mail buffer with
+`objc-mode' buffer. This automatically sets up a mail buffer with
version information already added. You just need to add a description
of the problem, including a reproducible test case, and send the
message.
(defvar java-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table java))
- "Syntax table used in java-mode buffers.")
+ "Syntax table used in `java-mode' buffers.")
(defvar java-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in java-mode buffers.")
+ "Keymap used in `java-mode' buffers.")
;; Add bindings which are only useful for Java.
;; Regexp trying to describe the beginning of a Java top-level
(defconst c-Java-defun-prompt-regexp
"^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()\^?=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f\v]*\\)+\\)?\\s-*")
-(easy-menu-define c-java-menu java-mode-map "Java Mode Commands"
+(easy-menu-define c-java-menu java-mode-map "Java Mode Commands."
(cons "Java" (c-lang-const c-mode-menu java)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))
(define-derived-mode java-mode prog-mode "Java"
"Major mode for editing Java code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
-java-mode buffer. This automatically sets up a mail buffer with
+`java-mode' buffer. This automatically sets up a mail buffer with
version information already added. You just need to add a description
of the problem, including a reproducible test case, and send the
message.
(defvar idl-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table idl))
- "Syntax table used in idl-mode buffers.")
+ "Syntax table used in `idl-mode' buffers.")
(defvar idl-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in idl-mode buffers.")
+ "Keymap used in `idl-mode' buffers.")
;; Add bindings which are only useful for IDL.
-(easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands"
+(easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands."
(cons "IDL" (c-lang-const c-mode-menu idl)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))
(define-derived-mode idl-mode prog-mode "IDL"
"Major mode for editing CORBA's IDL, PSDL and CIDL code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
-idl-mode buffer. This automatically sets up a mail buffer with
+`idl-mode' buffer. This automatically sets up a mail buffer with
version information already added. You just need to add a description
of the problem, including a reproducible test case, and send the
message.
(defvar pike-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table pike))
- "Syntax table used in pike-mode buffers.")
+ "Syntax table used in `pike-mode' buffers.")
(defvar pike-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in pike-mode buffers.")
+ "Keymap used in `pike-mode' buffers.")
;; Additional bindings.
(define-key pike-mode-map "\C-c\C-e" 'c-macro-expand)
-(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
+(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands."
(cons "Pike" (c-lang-const c-mode-menu pike)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
(define-derived-mode pike-mode prog-mode "Pike"
"Major mode for editing Pike code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
-pike-mode buffer. This automatically sets up a mail buffer with
+`pike-mode' buffer. This automatically sets up a mail buffer with
version information already added. You just need to add a description
of the problem, including a reproducible test case, and send the
message.
(defvar awk-mode-map
(let ((map (c-make-inherited-keymap)))
map)
- "Keymap used in awk-mode buffers.")
+ "Keymap used in `awk-mode' buffers.")
;; Add bindings which are only useful for awk.
(define-key awk-mode-map "#" 'self-insert-command);Overrides electric parent binding.
(define-key awk-mode-map "/" 'self-insert-command);Overrides electric parent binding.
(define-key awk-mode-map "\C-\M-a" 'c-awk-beginning-of-defun)
(define-key awk-mode-map "\C-\M-e" 'c-awk-end-of-defun)
-(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
+(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands."
(cons "AWK" (c-lang-const c-mode-menu awk)))
;; (require 'cc-awk) brings these in.
(define-derived-mode awk-mode prog-mode "AWK"
"Major mode for editing AWK code.
To submit a problem report, enter `\\[c-submit-bug-report]' from an
-awk-mode buffer. This automatically sets up a mail buffer with version
+`awk-mode' buffer. This automatically sets up a mail buffer with version
information already added. You just need to add a description of the
problem, including a reproducible test case, and send the message.
;;;###autoload
(defun c-add-style (style description &optional set-p)
- "Adds a style to `c-style-alist', or updates an existing one.
+ "Add a style to `c-style-alist', or update an existing one.
STYLE is a string identifying the style to add or update. DESCRIPTION
is an association list describing the style and must be of the form:
This variable must be set appropriately before CC Mode is loaded.
The list of variables to buffer localize are:
- c-basic-offset
- c-comment-only-line-offset
- c-indent-comment-alist
- c-indent-comments-syntactically-p
- c-block-comment-prefix
- c-comment-prefix-regexp
- c-doc-comment-style
- c-cleanup-list
- c-hanging-braces-alist
- c-hanging-colons-alist
- c-hanging-semi&comma-criteria
- c-backslash-column
- c-backslash-max-column
- c-label-minimum-indentation
- c-offsets-alist
- c-special-indent-hook
- c-indentation-style"
+ `c-basic-offset'
+ `c-comment-only-line-offset'
+ `c-indent-comment-alist'
+ `c-indent-comments-syntactically-p'
+ `c-block-comment-prefix'
+ `c-comment-prefix-regexp'
+ `c-doc-comment-style'
+ `c-cleanup-list'
+ `c-hanging-braces-alist'
+ `c-hanging-colons-alist'
+ `c-hanging-semi&comma-criteria'
+ `c-backslash-column'
+ `c-backslash-max-column'
+ `c-label-minimum-indentation'
+ `c-offsets-alist'
+ `c-special-indent-hook'
+ `c-indentation-style'"
:type 'boolean
:safe 'booleanp
:group 'c)
(defvar c-string-par-start
;; (concat "\\(" (default-value 'paragraph-start) "\\)\\|[ \t]*\\\\$")
"\f\\|[ \t]*\\\\?$"
- "Value of paragraph-start used when scanning strings.
+ "Value of `paragraph-start' used when scanning strings.
It treats escaped EOLs as whitespace.")
(defvar c-string-par-separate
;; (concat "\\(" (default-value 'paragraph-separate) "\\)\\|[ \t]*\\\\$")
"[ \t\f]*\\\\?$"
- "Value of paragraph-separate used when scanning strings.
+ "Value of `paragraph-separate' used when scanning strings.
It treats escaped EOLs as whitespace.")
(defvar c-sentence-end-with-esc-eol
;; N.B.: "$" would be illegal when not enclosed like "\\($\\)".
"\\|" "[.?!][]\"')}]* ?\\\\\\($\\)[ \t\n]*"
"\\)")
- "Value used like sentence-end used when scanning strings.
+ "Value used like `sentence-end' used when scanning strings.
It treats escaped EOLs as whitespace.")
\f
Can be overwritten by `cperl-hairy' if nil.
Uses `abbrev-mode' to do the expansion. If you want to use your
-own abbrevs in cperl-mode, but do not want keywords to be
+own abbrevs in `cperl-mode', but do not want keywords to be
electric, you must redefine `cperl-mode-abbrev-table': do
\\[edit-abbrevs], search for `cperl-mode-abbrev-table', and, in
that paragraph, delete the words that appear at the ends of lines and
\\{cperl-mode-map}
-Setting the variable `cperl-font-lock' to t switches on font-lock-mode
+Setting the variable `cperl-font-lock' to t switches on `font-lock-mode'
\(even with older Emacsen), `cperl-electric-lbrace-space' to t switches
on electric space between $ and {, `cperl-electric-parens-string' is
the string that contains parentheses that should be electric in CPerl
(not (in ":"))))))))
(defun cperl-get-state (&optional parse-start start-state)
- "Return list (START STATE DEPTH PRESTART),
+ "Return list (START STATE DEPTH PRESTART).
START is a good place to start parsing, or equal to
-PARSE-START if preset,
+PARSE-START if preset.
STATE is what is returned by `parse-partial-sexp'.
DEPTH is true is we are immediately after end of block
which contains START.
(error "Got strange value of indent: %s" i))))))
(defun cperl-calculate-indent-within-comment ()
- "Return the indentation amount for line, assuming that
-the current line is to be regarded as part of a block comment."
+ "Return the indentation amount for line.
+Assume that the current line is to be regarded as part of a block
+comment."
(let (end)
(save-excursion
(beginning-of-line)
beg end))))
(defun cperl-map-pods-heres (func &optional prop s end)
- "Executes a function over regions of pods or here-documents.
+ "Execute a function over regions of pods or here-documents.
PROP is the text-property to search for; default to `in-pod'. Stop when
function returns nil."
(let (pos posend has-prop (cont t))
(remove-text-properties beg end '(face nil))))
(defun cperl-font-lock-fontify-region-function (beg end loudly)
- "Extends the region to safe positions, then calls the default function.
+ "Extend the region to safe positions, then call the default function.
Newer `font-lock's can do it themselves.
We unwind only as far as needed for fontification. Syntaxification may
do extra unwind via `cperl-unwind-to-safe'."
;;
;; Char ::= #x9 | #xA | #xD
;; | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
-;; /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
+;; /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
;;
;; /* NOTE:
;;
;; Document authors are encouraged to avoid "compatibility characters", as
;; defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of
;; [Unicode3]). The characters defined in the following ranges are also
-;; discouraged. They are either control characters or permanently undefined
+;; discouraged. They are either control characters or permanently undefined
;; Unicode characters:
;;
;; [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],
;; [#7FFFE-#x7FFFF], [#8FFFE-#x8FFFF], [#9FFFE-#x9FFFF],
;; [#AFFFE-#xAFFFF], [#BFFFE-#xBFFFF], [#CFFFE-#xCFFFF],
;; [#DFFFE-#xDFFFF], [#EFFFE-#xEFFFF], [#FFFFE-#xFFFFF],
-;; [#10FFFE-#x10FFFF]. */
+;; [#10FFFE-#x10FFFF]. */
;;
;;
;; /* White Space */
;; Although the EntityValue production allows the definition of a general
;; entity consisting of a single explicit < in the literal (e.g., <!ENTITY
;; mylt "<">), it is strongly advised to avoid this practice since any
-;; reference to that entity will cause a well-formedness error. */
+;; reference to that entity will cause a well-formedness error. */
;;
;;
;; /* Character Data */
;;
;;
;; rule ::= symbol '::=' expression
-;; /* rules are separated by at least one blank line. */
+;; /* rules are separated by at least one blank line. */
;;
;; expression ::= concatenation ('|' concatenation)*
;;
Load the compiled code when finished.
Use `emacs-lisp-byte-compile-and-load' in combination with
-`native-comp-deferred-compilation' set to `t' to achieve asynchronous
+`native-comp-deferred-compilation' set to t to achieve asynchronous
native compilation."
(interactive nil emacs-lisp-mode)
(emacs-lisp--before-compile-buffer)
(defun last-sexp-setup-props (beg end value alt1 alt2)
"Set up text properties for the output of `elisp--eval-last-sexp'.
-BEG and END are the start and end of the output in current-buffer.
+BEG and END are the start and end of the output in current buffer.
VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
alternative printed representations that can be displayed."
(let ((map (make-sparse-keymap)))
"Return the file name of the file whose tags point is within.
Assumes the tags table is the current buffer.
If RELATIVE is non-nil, file name returned is relative to tags
-table file's directory. If RELATIVE is nil, file name returned
+table file's directory. If RELATIVE is nil, file name returned
is complete."
(funcall file-of-tag-function relative))
;; The function f90-comment-region toggles insertion of
;; the variable f90-comment-region in every line of the region.
-;; One common convention for free vs. fixed format is that free format files
-;; have the ending .f90 or .f95 while fixed format files have the ending .f.
-;; Emacs automatically loads Fortran files in the appropriate mode based
-;; on extension. You can modify this by adjusting the variable auto-mode-alist.
+;; One common convention for free vs. fixed format is that free format
+;; files have the ending .f90 or .f95 while fixed format files have
+;; the ending .f. Emacs automatically loads Fortran files in the
+;; appropriate mode based on extension. You can modify this by
+;; adjusting the variable `auto-mode-alist'.
;; For example:
;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode))
;; (if f90-auto-keyword-case ; change case of all keywords on startup
;; (f90-change-keywords f90-auto-keyword-case))))
;;
-;; in your init file. You can also customize the lists
-;; f90-font-lock-keywords, etc.
+;; in your init file. You can also customize the lists
+;; `f90-font-lock-keywords', etc.
;;
;; The auto-fill and abbreviation minor modes are accessible from the F90 menu,
;; or by using M-x auto-fill-mode and M-x abbrev-mode, respectively.
;; Remarks
-;; 1) Line numbers are by default left-justified. If f90-leave-line-no is
+;; 1) Line numbers are by default left-justified. If f90-leave-line-no is
;; non-nil, the line numbers are never touched.
;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled
;; correctly, but I imagine them to be rare.
;; 3) Regexps for hilit19 are no longer supported.
;; 4) For FIXED FORMAT code, use fortran mode.
;; 5) Preprocessor directives, i.e., lines starting with # are left-justified
-;; and are untouched by all case-changing commands. There is, at present, no
+;; and are untouched by all case-changing commands. There is, at present, no
;; mechanism for treating multi-line directives (continued by \ ).
;; 6) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented.
;; You are urged to use f90-do loops (with labels if you wish).
;; f90-font-lock-1, f90-font-lock-2, f90-font-lock-3, f90-font-lock-4
;; Original author's thanks
-;; Thanks to all the people who have tested the mode. Special thanks to Jens
+;; Thanks to all the people who have tested the mode. Special thanks to Jens
;; Bloch Helmers for encouraging me to write this code, for creative
;; suggestions as well as for the lists of hpf-commands.
;; Also thanks to the authors of the fortran and pascal modes, on which some
(cond ((derived-mode-p 'c++-mode) "c++")
(t "c")))))
-(defvar-local flymake-cc--proc nil "Internal variable for `flymake-cc'")
+(defvar-local flymake-cc--proc nil "Internal variable for `flymake-cc'.")
;; forward declare this to shoosh compiler (instead of requiring
;; flymake-proc)
2 4 5 6))
;; compilation-error-regexp-alist)
(flymake-proc-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
- "Patterns for matching error/warning lines. Each pattern has the form
-\(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX).
-Use `flymake-proc-reformat-err-line-patterns-from-compile-el' to add patterns
-from compile.el")
+ "Patterns for matching error/warning lines.
+
+Each pattern has the form:
+
+ (REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX)
+
+Use `flymake-proc-reformat-err-line-patterns-from-compile-el' to
+add patterns from compile.el.")
(define-obsolete-variable-alias 'flymake-warning-re 'flymake-proc-diagnostic-type-pred "26.1")
(defvar flymake-proc-diagnostic-type-pred
(defun flymake-proc-legacy-flymake (report-fn &rest args)
"Flymake backend based on the original Flymake implementation.
This function is suitable for inclusion in
-`flymake-diagnostic-functions'. For backward compatibility, it
+`flymake-diagnostic-functions'. For backward compatibility, it
can also be executed interactively independently of
`flymake-mode'."
;; Interactively, behave as if flymake had invoked us through its
(revert-buffer))))
(defun flymake--update-diagnostics-listings (buffer)
- "Update diagnostics listings somehow relevant to BUFFER"
+ "Update diagnostics listings somehow relevant to BUFFER."
(dolist (probe (buffer-list))
(with-current-buffer probe
(when (or (and (eq major-mode 'flymake-project-diagnostics-mode)
`fortran-comment-line-extra-indent'
Amount of extra indentation for text in full-line comments (default 0).
`fortran-comment-indent-style'
- How to indent the text in full-line comments. Allowed values are:
+ How to indent the text in full-line comments. Allowed values are:
nil don't change the indentation
`fixed' indent to `fortran-comment-line-extra-indent' beyond the
value of either
for your debugger.
If COMMAND-LINE requests that gdb attaches to a process PID, gdb
will run in *gud-PID*, otherwise it will run in *gud*; in these
-cases the initial working directory is the default-directory of
+cases the initial working directory is the `default-directory' of
the buffer in which this command was invoked.
COMMAND-LINE should include \"-i=mi\" to use gdb's MI text interface.
;;;###autoload
(defvar grep-history nil "History list for grep.")
;;;###autoload
-(defvar grep-find-history nil "History list for grep-find.")
+(defvar grep-find-history nil "History list for `grep-find'.")
;; History of lgrep and rgrep regexp and files args.
(defvar grep-regexp-history nil)
;; <shane@spr.com> added support for xdb (HPUX debugger). Rick Sladkey
;; <jrs@world.std.com> wrote the GDB command completion code. Dave Love
;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant
-;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
+;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
;; debugger.) Jan Nieuwenhuizen added support for the Guile REPL (Guile
for your debugger.
If COMMAND-LINE requests that gdb attaches to a process PID, gdb
will run in *gud-PID*, otherwise it will run in *gud*; in these
-cases the initial working directory is the default-directory of
+cases the initial working directory is the `default-directory' of
the buffer in which this command was invoked."
(interactive (list (gud-query-cmdline 'gud-gdb)))
(define-derived-mode gud-mode comint-mode "Debugger"
"Major mode for interacting with an inferior debugger process.
- You start it up with one of the commands M-x gdb, M-x sdb, M-x dbx,
-M-x perldb, M-x xdb, or M-x jdb. Each entry point finishes by executing a
+ You start it up with one of the commands \\[gdb], \\[sdb], \\[dbx],
+\\[perldb], \\[xdb], or \\[jdb]. Each entry point finishes by executing a
hook; `gdb-mode-hook', `sdb-mode-hook', `dbx-mode-hook',
`perldb-mode-hook', `xdb-mode-hook', or `jdb-mode-hook' respectively.
`gud-jdb-sourcepath') list(s) to derive a file
pathname relative to its classpath directory. The values in
`gud-jdb-classpath' are assumed to have been converted to absolute
-pathname standards using file-truename.
+pathname standards using `file-truename'.
If F is visited by a buffer and its mode is CC-mode(Java),
syntactic information of LINE is used to find the enclosing (nested)
class string which is appended to the top level
(error "`defined' followed by non-identifier: %S" target))
(if (and paren
(not (eq (hif-nexttoken) 'hif-rparen)))
- (error "missing right parenthesis for `defined'"))
+ (error "Missing right parenthesis for `defined'"))
(setq hif-token
(list 'hif-defined 'hif-lparen target 'hif-rparen)))
(push hif-token tokens))
;; completion for its tags.
;;
;; This file is a completion plugin which implements this kind of
-;; completion. It is also an example which shows how completion plugins
+;; completion. It is also an example which shows how completion plugins
;; should be programmed.
;;
;; New versions of IDLWAVE, documentation, and more information available
;; - You can force an update of the tag list with the usual command
;; to update routine info in IDLWAVE: C-c C-i
+;;; Code:
+
(require 'idlwave)
(declare-function idlwave-shell-buffer "idlw-shell")
;; Define the menu for the Help application
-(easy-menu-define
- idlwave-help-menu idlwave-help-mode-map
- "Menu for Help IDLWAVE system"
+(easy-menu-define idlwave-help-menu idlwave-help-mode-map
+ "Menu for Help IDLWAVE system."
'("IDLHelp"
["Definition <-> Help Text" idlwave-help-toggle-header-match-and-def t]
["Find DocLib Header" idlwave-help-find-header t]
(defcustom idlwave-shell-frame-parameters
'((height . 30) (unsplittable . nil))
- "The frame parameters for a dedicated idlwave-shell frame.
+ "The frame parameters for a dedicated `idlwave-shell' frame.
See also `idlwave-shell-use-dedicated-frame'.
The default makes the frame splittable, so that completion works correctly."
:group 'idlwave-shell-general-setup
(defcustom idlwave-shell-use-toolbar t
"Non-nil means, use the debugging toolbar in all IDL related buffers.
-Starting the shell will then add the toolbar to all idlwave-mode buffers.
+Starting the shell will then add the toolbar to all `idlwave-mode' buffers.
Exiting the shell will removed everywhere.
At any time you can toggle the display of the toolbar with
-`C-c C-d C-t' (`idlwave-shell-toggle-toolbar')."
+\\[idlwave-shell-toggle-toolbar]."
:group 'idlwave-shell-general-setup
:type 'boolean)
;; Other variables
(defvar idlwave-shell-temp-pro-file nil
- "Absolute pathname for temporary IDL file for compiling regions")
+ "Absolute pathname for temporary IDL file for compiling regions.")
(defvar idlwave-shell-temp-rinfo-save-file nil
"Absolute pathname for temporary IDL file save file for routine_info.
"Additional info displayed in the mode line.")
(defvar idlwave-shell-default-directory nil
- "The default directory in the idlwave-shell buffer, of outside use.")
+ "The default directory in the `idlwave-shell' buffer, of outside use.")
(defvar idlwave-shell-last-save-and-action-file nil
"The last file which was compiled with `idlwave-shell-save-and-...'.")
(defconst idlwave-shell-trace-message-re
"^% At " ;; First line of a trace message
- "A regular expression matching IDL trace messages. These are the
-messages containing file and line information of a current
-traceback.")
+ "A regular expression matching IDL trace messages.
+These are the messages containing file and line information of a
+current traceback.")
(defconst idlwave-shell-step-messages
'("^% Stepped to:"
(forward-line (- arg)))))
(defun idlwave-shell-up-or-history (&optional arg)
-"When in last line of process buffer, move to previous input.
- Otherwise just go up one line."
+ "When in last line of process buffer, move to previous input.
+Otherwise just go up one line."
(interactive "p")
(idlwave-shell-move-or-history t arg))
(defun idlwave-shell-down-or-history (&optional arg)
-"When in last line of process buffer, move to next input.
- Otherwise just go down one line."
+ "When in last line of process buffer, move to next input.
+Otherwise just go down one line."
(interactive "p")
(idlwave-shell-move-or-history nil arg))
(cons sysdir (nreverse dirs))))
(defun idlwave-shell-routine-info-filter ()
- "Function which parses the special output from idlwave_routine_info.pro."
+ "Parse the special output from idlwave_routine_info.pro."
(let ((text idlwave-shell-command-output)
(start 0)
sep sep-re file type spec specs name cs key keys class entry)
(idlwave-new-sintern-type execcomm)
(defun idlwave-shell-complete (&optional arg)
- "Do completion in the idlwave-shell buffer.
+ "Do completion in the `idlwave-shell' buffer.
Calls `idlwave-shell-complete-filename' after some executive commands or
in strings. Otherwise, calls `idlwave-complete' to complete modules and
keywords."
(and (memq (preceding-char) '(?\' ?\")) t))))
(defun idlwave-shell-batch-command ()
- "Return t if we're in a batch command statement like @foo"
+ "Return t if we're in a batch command statement like \"@foo\"."
(let ((limit (point-at-bol)))
(save-excursion
;; Skip backwards over filename
(and (eq (preceding-char) ?@) (not (idlwave-in-quote))))))
(defun idlwave-shell-shell-command ()
- "Return t if we're in a shell command statement like $ls"
+ "Return t if we're in a shell command statement like \"$ls\"."
(save-excursion
(idlwave-beginning-of-statement)
(looking-at "\\$")))
(if (not (idlwave-shell-valid-frame frame))
;; fixme: errors are dangerous in shell filters. but i think i
;; have never encountered this one.
- (error "invalid frame - unable to access file: %s" (car frame))
+ (error "Invalid frame - unable to access file: %s" (car frame))
;;
;; buffer : the buffer to display a line in.
;; select-shell: current buffer is the shell.
module - the module for breakpoint internal to IDL.
Remaining elements of the cdr:
-data - Data associated with the breakpoint by idlwave-shell currently
+data - Data associated with the breakpoint by `idlwave-shell' currently
contains four items:
count - number of times to execute breakpoint. When count reaches 0
the breakpoint is cleared and removed from the alist.
command - command to execute when breakpoint is reached, either a
- lisp function to be called with `funcall' with no arguments or a
+ Lisp function to be called with `funcall' with no arguments or a
list to be evaluated with `eval'.
condition - any condition to apply to the breakpoint.
["Toggle Toolbar" idlwave-shell-toggle-toolbar t]
["Exit IDL" idlwave-shell-quit t]))
-(easy-menu-define
- idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus"
+(easy-menu-define idlwave-mode-debug-menu idlwave-mode-map
+ "IDL debugging menus."
idlwave-shell-menu-def)
-(easy-menu-define
- idlwave-shell-mode-menu idlwave-shell-mode-map "IDL shell menus"
+(easy-menu-define idlwave-shell-mode-menu idlwave-shell-mode-map
+ "IDL shell menus."
idlwave-shell-menu-def)
;; The Breakpoint Glyph -------------------------------------------------------
\" \",
\" \",
\" \"};")
- "The edit-cmd icon")
+ "The edit-cmd icon.")
(defvar idlwave-toolbar-run-icon
(idlwave-toolbar-make-button
;;
;; Moving the point backwards in conjunction with abbrev expansion
;; does not work as I would like it, but this is a problem with
-;; emacs abbrev expansion done by the self-insert-command. It ends
+;; Emacs abbrev expansion done by the self-insert-command. It ends
;; up inserting the character that expanded the abbrev after moving
;; point backward, e.g., "\cl" expanded with a space becomes
;; "LONG( )" with point before the close paren. This is solved by
(defconst idlwave-continuation-char ?$
"Character which is inserted as a last character on previous line by
- \\[idlwave-split-line] to begin a continuation line. Normally $.")
+\\[idlwave-split-line] to begin a continuation line. Normally $.")
(defconst idlwave-mode-version "6.1_em22")
(defvar idlwave--command-function nil
"If non-nil, a function called from `post-command-hook'.
-It is evaluated in the lisp function `idlwave-command-hook' which is
+It is evaluated in the Lisp function `idlwave-command-hook' which is
placed in `post-command-hook'.")
(defun idlwave-command-hook ()
iname))
(defun idlwave-sintern-keyword-list (kwd-list &optional set)
- "Sintern a set of keywords (file (key . link) (key2 . link2) ...)"
+ "Sintern a set of keywords (file (key . link) (key2 . link2) ...)."
(mapc (lambda(x)
(setcar x (idlwave-sintern-keyword (car x) set)))
(cdr kwd-list))
;;----- Scanning buffers -------------------
(defun idlwave-get-routine-info-from-buffers (buffers)
- "Call `idlwave-get-buffer-routine-info' on idlwave-mode buffers in BUFFERS."
+ "Call `idlwave-get-buffer-routine-info' on `idlwave-mode' buffers in BUFFERS."
(let (buf routine-lists res)
(save-excursion
(while (setq buf (pop buffers))
idlwave-shell-automatic-start)]))
(easy-menu-define idlwave-mode-menu idlwave-mode-map
- "IDL and WAVE CL editing menu"
+ "IDL and WAVE CL editing menu."
idlwave-mode-menu-def)
(easy-menu-define idlwave-mode-debug-menu idlwave-mode-map
- "IDL and WAVE CL editing menu"
+ "IDL and WAVE CL editing menu."
idlwave-mode-debug-menu-def)
(defun idlwave-customize ()
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary
+;;; Commentary:
-;; This is based on Karl Landstrom's barebones javascript-mode. This
+;; This is based on Karl Landstrom's barebones javascript-mode. This
;; is much more robust and works with cc-mode's comment filling
;; (mostly).
;;
unnecessarily: it has an associated cost in performance.
If :strip-prototype is present and non-nil, then if the class
-name as matched contains
-")
+name as matched contains.")
(defconst js--available-frameworks
(cl-loop for style in js--class-styles
then the \".\"s will be lined up:
let x = svg.mumble()
- .chained;
-"
+ .chained;"
:version "26.1"
:type 'boolean
:safe 'booleanp)
This enables proper font-locking and indentation of code using
Facebook’s “JSX” syntax extension for JavaScript, for use with
-Facebook’s “React” library. Font-locking is like sgml-mode.
-Indentation is also like sgml-mode, although some indentation
+Facebook’s “React” library. Font-locking is like `sgml-mode'.
+Indentation is also like `sgml-mode', although some indentation
behavior may differ slightly to align more closely with the
conventions of the React developer community.
(defun js--get-all-known-symbols ()
"Return a hash table of all JavaScript symbols.
-This searches all existing `js-mode' buffers. Each key is the
+This searches all existing `js-mode' buffers. Each key is the
name of a symbol (possibly disambiguated with <N>, where N > 1),
and each value is a marker giving the location of that symbol."
(cl-loop with symbols = (make-hash-table :test 'equal)
("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)
)
cpp-font-lock-keywords)
- "Default font-lock-keywords for `ld-script-mode'.")
+ "Default `font-lock-keywords' for `ld-script-mode'.")
;;;###autoload
(define-derived-mode ld-script-mode prog-mode "LD-Script"
- "A major mode to edit GNU ld script files"
+ "A major mode to edit GNU ld script files."
(setq-local comment-start "/* ")
(setq-local comment-end " */")
(setq-local font-lock-defaults '(ld-script-font-lock-keywords nil)))
;; corresponding continuation lines).
(defun octave-smie--funcall-p ()
- "Return non-nil if we're in an expression context. Moves point."
+ "Return non-nil if we're in an expression context. Move point."
(looking-at "[ \t]*("))
(defun octave-smie--end-index-p ()
(nth 8 (syntax-ppss)))
(defun octave-looking-at-kw (regexp)
- "Like `looking-at', but sets `case-fold-search' nil."
+ "Like `looking-at', but set `case-fold-search' nil first."
(let ((case-fold-search nil))
(looking-at regexp)))
;;; Commentary:
-;; To enter OPascal mode when you find an Object Pascal source file, one must
-;; override the auto-mode-alist to associate OPascal with .pas (and .dpr and
-;; .dpk) files. Emacs, by default, will otherwise enter Pascal mode. E.g.
+;; To enter OPascal mode when you find an Object Pascal source file,
+;; one must override the auto-mode-alist to associate OPascal with
+;; .pas (and .dpr and .dpk) files. Emacs, by default, will otherwise
+;; enter Pascal mode. For example:
;;
;; (autoload 'opascal-mode "opascal")
;; (add-to-list 'auto-mode-alist
(defconst opascal-begin-previous-tokens
`(,@opascal-decl-sections ,@opascal-routine-statements)
- "Tokens that a begin token aligns with, but only if not part of a nested
-routine.")
+ "Tokens that a begin token aligns with, but only if not part of a \
+nested routine.")
(defconst opascal-space-chars "\000-\011\013- ") ; all except \n
(defconst opascal-non-space-chars (concat "^" opascal-space-chars))
(concat unit ".pas")))
(file (opascal-find-unit-file unit-file)))
(if (null file)
- (error "unit not found: %s" unit-file)
+ (error "Unit not found: %s" unit-file)
(find-file file)
(if (not (derived-mode-p 'opascal-mode))
(opascal-mode)))
:version "28.1")
(defvar perl-mode-abbrev-table nil
- "Abbrev table in use in perl-mode buffers.")
+ "Abbrev table in use in `perl-mode' buffers.")
(define-abbrev-table 'perl-mode-abbrev-table ())
(defvar perl-mode-map
(defface perl-heredoc
'((t (:inherit font-lock-string-face)))
- "The face for here-documents. Inherits from font-lock-string-face.")
+ "The face for here-documents. Inherits from `font-lock-string-face'.")
(defun perl-font-lock-syntactic-face-function (state)
(cond
;;;###autoload
(defun perl-flymake (report-fn &rest _args)
- "Perl backend for Flymake. Launches
-`perl-flymake-command' (which see) and passes to its standard
-input the contents of the current buffer. The output of this
-command is analyzed for error and warning messages."
+ "Perl backend for Flymake.
+Launch `perl-flymake-command' (which see) and pass to its
+standard input the contents of the current buffer. The output of
+this command is analyzed for error and warning messages."
(unless (executable-find (car perl-flymake-command))
(error "Cannot find a suitable checker"))
Commands:
Tab indents for Prolog; with argument, shifts rest
of expression rigidly with the current line.
-Paragraphs are separated only by blank lines and `%%'. `%'s start comments.
+Paragraphs are separated only by blank lines and `%%'. `%'s start comments.
Return at end of buffer sends line as input.
Return not at end copies rest of line to end and sends it.
(let ((pname (prolog-program-name))
(pswitches (prolog-program-switches)))
(if (null pname)
- (error "This Prolog system has defined no interpreter."))
+ (error "This Prolog system has defined no interpreter"))
(unless (comint-check-proc "*prolog*")
(with-current-buffer (get-buffer-create "*prolog*")
(prolog-inferior-mode)
This function must be called from the source code buffer."
(if prolog-process-flag
- (error "Another Prolog task is running."))
+ (error "Another Prolog task is running"))
(prolog-ensure-process t)
(let* ((buffer (get-buffer-create prolog-compilation-buffer))
(real-file buffer-file-name)
)
(if prolog-help-function-i
(funcall prolog-help-function-i predicate)
- (error "Sorry, no help method defined for this Prolog system."))))
+ (error "Sorry, no help method defined for this Prolog system"))))
))
(pop-to-buffer nil)
(Info-goto-node prolog-info-predicate-index)
(if (not (re-search-forward str nil t))
- (error "Help on predicate `%s' not found." predicate))
+ (error "Help on predicate `%s' not found" predicate))
(setq oldp (point))
(if (re-search-forward str nil t)
(process-send-string "prolog" (concat "apropos(" string ").\n"))
(display-buffer "*prolog*"))
(t
- (error "Sorry, no Prolog apropos available for this Prolog system."))))
+ (error "Sorry, no Prolog apropos available for this Prolog system"))))
(defun prolog-atom-under-point ()
"Return the atom under or left to the point."
(easy-menu-define
prolog-edit-menu-runtime prolog-mode-map
- "Runtime Prolog commands available from the editing buffer"
+ "Runtime Prolog commands available from the editing buffer."
;; FIXME: Don't use a whole menu for just "Run Mercury". --Stef
`("System"
;; Runtime menu name.
ps-mode-submit-bug-report
t]))
-(easy-menu-define ps-mode-main ps-mode-map "PostScript" ps-mode-menu-main)
+(easy-menu-define ps-mode-main ps-mode-map "PostScript Menu." ps-mode-menu-main)
\f
(1 font-lock-function-name-face))
(,(rx symbol-start "class" (1+ space) (group (1+ (or word ?_))))
(1 font-lock-type-face)))
- "Font lock keywords to use in python-mode for level 1 decoration.
+ "Font lock keywords to use in `python-mode' for level 1 decoration.
This is the minimum decoration level, including function and
class declarations.")
;; Extras:
"__all__")
symbol-end) . font-lock-builtin-face))
- "Font lock keywords to use in python-mode for level 2 decoration.
+ "Font lock keywords to use in `python-mode' for level 2 decoration.
This is the medium decoration level, including everything in
`python-font-lock-keywords-level-1', as well as keywords and
(or ")" "]") (* space)
assignment-operator))
(1 font-lock-variable-name-face)))
- "Font lock keywords to use in python-mode for maximum decoration.
+ "Font lock keywords to use in `python-mode' for maximum decoration.
This decoration level includes everything in
`python-font-lock-keywords-level-2', as well as constants,
; is more than 1, or t (which it is,
; by default).
)
- "List of font lock keyword specifications to use in python-mode.
+ "List of font lock keyword specifications to use in `python-mode'.
Which one will be chosen depends on the value of
`font-lock-maximum-decoration'.")
(or (python-shell-get-process)
(if interactivep
(user-error
- "Start a Python process first with `M-x run-python' or `%s'."
+ "Start a Python process first with `M-x run-python' or `%s'"
;; Get the binding.
(key-description
(where-is-internal
#'run-python overriding-local-map t)))
- (error
- "No inferior Python process running."))))
+ (error "No inferior Python process running"))))
(defun python-shell-get-or-create-process (&optional cmd dedicated show)
"Get or create an inferior Python process for current buffer and return it.
docstring)))))
(defvar-local python-eldoc-get-doc t
- "Non-nil means eldoc should fetch the documentation
- automatically. Set to nil by `python-eldoc-function' if
- `python-eldoc-function-timeout-permanent' is non-nil and
- `python-eldoc-function' times out.")
+ "Non-nil means eldoc should fetch the documentation automatically.
+Set to nil by `python-eldoc-function' if
+`python-eldoc-function-timeout-permanent' is non-nil and
+`python-eldoc-function' times out.")
(defcustom python-eldoc-function-timeout 1
"Timeout for `python-eldoc-function' in seconds."
map)
"Keymap used in Ruby mode.")
-(easy-menu-define
- ruby-mode-menu
- ruby-mode-map
- "Ruby Mode Menu"
+(easy-menu-define ruby-mode-menu ruby-mode-map
+ "Ruby Mode Menu."
'("Ruby"
["Beginning of Block" ruby-beginning-of-block t]
["End of Block" ruby-end-of-block t]
(defun ruby-forward-string (term &optional end no-error expand)
"Move forward across one balanced pair of string delimiters.
-Skips escaped delimiters. If EXPAND is non-nil, also ignores
+Skips escaped delimiters. If EXPAND is non-nil, also ignores
delimiters in interpolated strings.
TERM should be a string containing either a single, self-matching
(symbolp v))
(symbol-value v)
v))
- (error "`%s' is not a known product; use `sql-add-product' to add it first." product)
+ (error "`%s' is not a known product; use `sql-add-product' to add it first" product)
nil)))
(defun sql-product-font-lock (keywords-only imenu)
"Display a SQLi buffer based on `sql-display-sqli-buffer-function'.
If BUF is hidden or `sql-display-sqli-buffer-function' is nil,
-then the buffer will not be displayed. Otherwise the BUF is
+then the buffer will not be displayed. Otherwise the BUF is
displayed."
(unless (sql-buffer-hidden-p buf)
(cond
["Tcl help" tcl-help-on-word tcl-help-directory-list]))
(defvar inferior-tcl-buffer nil
- "The current inferior-tcl process buffer.
+ "The current `inferior-tcl' process buffer.
MULTIPLE PROCESS SUPPORT
===========================================================================
(defcustom verilog-auto-ignore-concat nil
"Non-nil means ignore signals in {...} concatenations for AUTOWIRE etc.
This will exclude signals referenced as pin connections in {...}
-or (...) from AUTOWIRE, AUTOOUTPUT and friends. See also AUTONOHOOKUP."
+or (...) from AUTOWIRE, AUTOOUTPUT and friends. See also AUTONOHOOKUP."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-ignore-concat 'safe-local-variable #'verilog-booleanp)
"Keymap used in Verilog mode.")
;; menus
-(easy-menu-define
- verilog-menu verilog-mode-map "Menu for Verilog mode"
+(easy-menu-define verilog-menu verilog-mode-map
+ "Menu for Verilog mode."
(verilog-easy-menu-filter
`("Verilog"
("Choose Compilation Action"
(search-forward ";" nil t))
(defun verilog-single-declaration-end (limit)
- "Returns pos where current (single) declaration statement ends.
+ "Return pos where current (single) declaration statement ends.
Also, this function moves POINT forward to the start of a variable name
(skipping the range-part and whitespace).
Function expected to be called with POINT just after a declaration keyword.
-LIMIT sets the max POINT for searching and moving to. No such limit if LIMIT
+LIMIT sets the max POINT for searching and moving to. No such limit if LIMIT
is 0.
Meaning of *single* declaration:
- Eg. In a module's port-list -
+ E.g. In a module's port-list -
module test(input clk, rst, x, output [1:0] y);
Here 'input clk, rst, x' is 1 *single* declaration statement,
and 'output [1:0] y' is the other single declaration. In the 1st single
-declaration, POINT is moved to start of 'clk'. And in the 2nd declaration,
+declaration, POINT is moved to start of 'clk'. And in the 2nd declaration,
POINT is moved to 'y'."
the same input/output list as another module, but no internals.
Specifically, it finds all outputs in the module, and if that
input is not otherwise declared as a register or wire, nor comes
-from a AUTOINST submodule's output, creates a tieoff. AUTOTIEOFF
+from a AUTOINST submodule's output, creates a tieoff. AUTOTIEOFF
does not examine assignments to determine what is already driven.
AUTORESET ties signals to deasserted, which is presumed to be zero.
;; ------------------------------------------------------------------------
(define-skeleton verilog-sk-ovm-class
- "Insert a class definition"
+ "Insert a class definition."
()
> "class " (setq name (skeleton-read "Name: ")) " extends " (skeleton-read "Extends: ") ";" \n
> _ \n
> "endclass" (progn (electric-verilog-terminate-line) nil))
(define-skeleton verilog-sk-uvm-object
- "Insert a class definition"
+ "Insert a class definition."
()
> "class " (setq name (skeleton-read "Name: ")) " extends " (skeleton-read "Extends: ") ";" \n
> _ \n
> "endclass" (progn (electric-verilog-terminate-line) nil))
(define-skeleton verilog-sk-uvm-component
- "Insert a class definition"
+ "Insert a class definition."
()
> "class " (setq name (skeleton-read "Name: ")) " extends " (skeleton-read "Extends: ") ";" \n
> _ \n
> (- verilog-indent-level-behavioral) "endfunction" (progn (electric-verilog-terminate-line) nil))
(define-skeleton verilog-sk-always
- "Insert always block. Uses the minibuffer to prompt
-for sensitivity list."
+ "Insert always block. Prompt for sensitivity list."
()
> "always @ ( /*AUTOSENSE*/ ) begin\n"
> _ \n
> (- verilog-indent-level-behavioral) "end" \n > )
(define-skeleton verilog-sk-specify
- "Insert specify block. "
+ "Insert specify block."
()
> "specify\n"
> _ \n
> (- verilog-indent-level-behavioral) "endspecify" \n > )
(define-skeleton verilog-sk-generate
- "Insert generate block. "
+ "Insert generate block."
()
> "generate\n"
> _ \n
(defconst vhdl-begin-fwd-re
"\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b\\([^_]\\|\\'\\)"
- "A regular expression for searching forward that matches all known
-\"begin\" keywords.")
+ "Regexp for searching forward that matches all known \"begin\" keywords.")
(defconst vhdl-begin-bwd-re
"\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b[^_]"
- "A regular expression for searching backward that matches all known
-\"begin\" keywords.")
+ "Regexp for searching backward that matches all known \"begin\" keywords.")
(defun vhdl-begin-p (&optional lim)
"Return t if we are looking at a real \"begin\" keyword.
))
(defun vhdl-get-block-state (&optional lim)
- "Finds and records all the closest opens.
+ "Find and records all the closest opens.
LIM is the furthest back we need to search (it should be the
previous libunit keyword)."
(let ((here (point))
(setq copy (cdr copy))))))))
(defun vhdl-align-region-2 (begin end match &optional substr spacing)
- "Align a range of lines from BEGIN to END. The regular expression
-MATCH must match exactly one field: the whitespace to be
-contracted/expanded. The alignment column will equal the
-rightmost column of the widest whitespace block. SPACING is
-the amount of extra spaces to add to the calculated maximum required.
-SPACING defaults to 1 so that at least one space is inserted after
-the token in MATCH."
+ "Align a range of lines from BEGIN to END.
+The regular expression MATCH must match exactly one field: the
+whitespace to be contracted/expanded. The alignment column will
+equal the rightmost column of the widest whitespace block.
+SPACING is the amount of extra spaces to add to the calculated
+maximum required. SPACING defaults to 1 so that at least one
+space is inserted after the token in MATCH."
(setq spacing (or spacing 1))
(setq substr (or substr 1))
(save-excursion
(beginning-of-line 2))))))
(defun vhdl-align-inline-comment-region (beg end &optional spacing no-message)
- "Align inline comments within a region. Groups of code lines separated by
-empty lines are aligned individually, if `vhdl-align-groups' is non-nil."
+ "Align inline comments within a region.
+Groups of code lines separated by empty lines are aligned
+individually, if `vhdl-align-groups' is non-nil."
(interactive "r\nP")
(save-excursion
(let (orig pos)
(message "Aligning inline comments...done"))))
(defun vhdl-align-inline-comment-buffer ()
- "Align inline comments within buffer. Groups of code lines separated by
-empty lines are aligned individually, if `vhdl-align-groups' is non-nil."
+ "Align inline comments within buffer.
+Groups of code lines separated by empty lines are aligned
+individually, if `vhdl-align-groups' is non-nil."
(interactive)
(vhdl-align-inline-comment-region (point-min) (point-max)))
;; Fixup whitespace
(defun vhdl-fixup-whitespace-region (beg end &optional no-message)
- "Fixup whitespace in region. Surround operator symbols by one space,
-eliminate multiple spaces (except at beginning of line), eliminate spaces at
-end of line, do nothing in comments and strings."
+ "Fixup whitespace in region.
+Surround operator symbols by one space, eliminate multiple
+spaces (except at beginning of line), eliminate spaces at end of
+line, do nothing in comments and strings."
(interactive "r")
(unless no-message (message "Fixing up whitespace..."))
(save-excursion
(unless no-message (message "Fixing up whitespace...done")))
(defun vhdl-fixup-whitespace-buffer ()
- "Fixup whitespace in buffer. Surround operator symbols by one space,
-eliminate multiple spaces (except at beginning of line), eliminate spaces at
-end of line, do nothing in comments."
+ "Fixup whitespace in buffer.
+Surround operator symbols by one space, eliminate multiple
+spaces (except at beginning of line), eliminate spaces at end of
+line, do nothing in comments."
(interactive)
(vhdl-fixup-whitespace-region (point-min) (point-max)))
reset))
(defun vhdl-template-standard-package (library package)
- "Insert specification of a standard package. Include a library
-specification, if not already there."
+ "Insert specification of a standard package.
+Include a library specification, if not already there."
(let ((margin (current-indentation)))
(unless (equal library "std")
(unless (or (save-excursion
"Regexp to match start of construct to hide.")
(defun vhdl-hs-forward-sexp-func (count)
- "Find end of construct to hide (for hideshow). Only searches forward."
+ "Find end of construct to hide (for hideshow). Only search forward."
(let ((pos (point)))
(vhdl-prepare-search-2
(beginning-of-line)
(goto-char end))))))
(defun vhdl-font-lock-match-item (limit)
- "Match, and move over, any declaration item after point. Adapted from
+ "Match, and move over, any declaration item after point.
+Adapted from
`font-lock-match-c-style-declaration-item-and-skip-to-next'."
(condition-case nil
(save-restriction
;; Variables
(defvar vhdl-entity-alist nil
- "Cache with entities and corresponding architectures for each
-project/directory.")
+ "Cache with entities and corresponding architectures for each project/directory.")
;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (ent-key ent-name ent-file ent-line
(declare-function speedbar-goto-this-file "speedbar" (file))
(defun vhdl-speedbar-expand-dirs (_directory)
- "Expand subdirectories in DIRECTORY according to
- `speedbar-shown-directories'."
+ "Expand subdirectories in DIRECTORY according to `speedbar-shown-directories'."
;; (nicked from `speedbar-default-directory-list')
(let ((sf (cdr (reverse speedbar-shown-directories)))
(vhdl-speedbar-update-current-unit nil))
(declare-function speedbar-line-text "speedbar" (&optional p))
(defun vhdl-speedbar-line-text ()
- "Calls `speedbar-line-text' and removes text properties."
+ "Call `speedbar-line-text' and remove text properties."
(let ((string (speedbar-line-text)))
(set-text-properties 0 (length string) nil string)
string))
(or project-options compiler-options)))
(defun vhdl-compile ()
- "Compile current buffer using the VHDL compiler specified in
-`vhdl-compiler'."
+ "Compile current buffer using the VHDL compiler specified in `vhdl-compiler'."
(interactive)
(vhdl-compile-init)
(let* ((project (vhdl-aget vhdl-project-alist vhdl-project))
`vhdl-indent-comment-like-next-code-line': (new)
Specify whether comment lines are indented like following code line.
`vhdl-array-index-record-field-in-sensitivity-list': (new)
- Specify whether to include array indices / record fields in sensitivity list.
-")
+ Specify whether to include array indices / record fields in sensitivity list.")
(defconst vhdl-doc-keywords nil
(require 'ring)
(require 'project)
-(defgroup xref nil "Cross-referencing commands"
+(defgroup xref nil "Cross-referencing commands."
:version "25.1"
:group 'tools)
The result must be a list of xref objects. If IDENTIFIER
contains sufficient information to determine a unique definition,
-return only that definition. If there are multiple possible
+return only that definition. If there are multiple possible
definitions, return all of them. If no definitions can be found,
return nil.
(goto-char pos))
(defun xref--goto-location (location)
- "Set buffer and point according to xref-location LOCATION."
+ "Set buffer and point according to `xref-location' LOCATION."
(let ((marker (xref-location-marker location)))
(set-buffer (marker-buffer marker))
(xref--goto-char marker)))
(defun xref-pop-to-location (item &optional action)
"Go to the location of ITEM and display the buffer.
ACTION controls how the buffer is displayed:
- nil -- switch-to-buffer
- `window' -- pop-to-buffer (other window)
- `frame' -- pop-to-buffer (other frame)
+ nil -- `switch-to-buffer'
+ `window' -- `pop-to-buffer' (other window)
+ `frame' -- `pop-to-buffer' (other frame)
If SELECT is non-nil, select the target window."
(let* ((marker (save-excursion
(xref-location-marker (xref-item-location item))))
(put-text-property (+ pos xref-truncation-width) eol 'invisible 'ellipsis))))))
(defun xref--insert-xrefs (xref-alist)
- "Insert XREF-ALIST in the current-buffer.
+ "Insert XREF-ALIST in the current buffer.
XREF-ALIST is of the form ((GROUP . (XREF ...)) ...), where
GROUP is a string for decoration purposes and XREF is an
`xref-item' object."
;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)"))
;;
;; Note that Curly has the PostScript string delimiters inside his quotes --
-;; those aren't misplaced lisp delimiters!
+;; those aren't misplaced Lisp delimiters!
;;
;; Without them, PostScript would attempt to call the undefined function Curly,
;; which would result in a PostScript error.
;; Valid values for `ps-print-control-characters' are:
;;
;; 8-bit This is the value to use when you want an ASCII encoding of
-;; any control or non-ASCII character. Control characters are
+;; any control or non-ASCII character. Control characters are
;; encoded as "^D", and non-ASCII characters have an
;; octal encoding.
;;
;; European 8-bits accented characters are printed according
;; the current font.
;;
-;; nil No ASCII encoding. Any character is printed according the
+;; nil No ASCII encoding. Any character is printed according the
;; current font.
;;
;; Any other value is treated as nil.
;; ps-font-info-database))
;; - Now you can use this font family with any size:
;; (setq ps-font-family 'Helvetica)
-;; - if you want to use this family in another emacs session, you must put into
+;; - if you want to use this family in another Emacs session, you must put into
;; your `~/.emacs':
;; (require 'ps-print)
;; (setq ps-font-info-database (append ...)))
;; -----------------------
;;
;; As ps-print uses PostScript to print buffers, it is possible to have other
-;; attributes associated with faces. So the new attributes used by ps-print
+;; attributes associated with faces. So the new attributes used by ps-print
;; are:
;;
;; strikeout - like underline, but the line is in middle of text.
;; * Check `ps-paper-type': Sudhakar Frederick <sfrederi@asc.corp.mot.com>
;;
;; Thanks to Jacques Duthen <duthen@cegelec-red.fr> (Jack) for version 3.4 I
-;; started from. [vinicius]
+;; started from. [vinicius]
;;
;; Thanks to Jim Thompson <?@?> for the 2.8 version I started from. [jack]
;;
(alist-get register register-alist))
(defun set-register (register value)
- "Set contents of Emacs register named REGISTER to VALUE. Returns VALUE.
+ "Set contents of Emacs register named REGISTER to VALUE. Return VALUE.
See the documentation of the variable `register-alist' for possible VALUEs."
(setf (alist-get register register-alist) value))
;; The user decides which fields are "precious", F2 for example. When
;; the registry is pruned, any entries without the F2 field will be
;; removed until the size is :max-size * :prune-factor _less_ than the
-;; maximum database size. No entries with the F2 field will be removed
+;; maximum database size. No entries with the F2 field will be removed
;; at PRUNE TIME, which means it may not be possible to prune back all
;; the way to the target size.
Attempts to prune the number of entries down to \(*
:max-size :prune-factor) less than the max-size limit, so
-pruning doesn't need to happen on every save. Removes only
+pruning doesn't need to happen on every save. Removes only
entries without the :precious keys, so it may not be possible to
reach the target limit.
(defcustom query-replace-from-to-separator " → "
"String that separates FROM and TO in the history of replacement pairs.
When nil, the pair will not be added to the history (same behavior
-as in emacs 24.5)."
+as in Emacs 24.5)."
:group 'matching
:type '(choice
(const :tag "Disabled" nil)
"Overlays used to temporarily highlight occur matches.")
(defvar occur-collect-regexp-history '("\\1")
- "History of regexp for occur's collect operation")
+ "History of regexp for occur's collect operation.")
(defcustom read-regexp-defaults-function nil
"Function that provides default regexp(s) for `read-regexp'.
"Minibuffer setup functions from other packages.")
(defvar rfn-eshadow-update-overlay-hook nil
- "Customer overlay functions from other packages")
+ "Customer overlay functions from other packages.")
\f
;;; Internal variables
(setq tree nil))))))))
(defun rtree-delq (tree number)
- "Remove NUMBER from TREE destructively. Returns the new tree."
+ "Remove NUMBER from TREE destructively. Return the new tree."
(let ((result tree)
prev)
(while tree
:type 'file)
(defcustom save-place-version-control nil
- "Controls whether to make numbered backups of master save-place file.
+ "Controls whether to make numbered backups of master `save-place' file.
It can have four values: t, nil, `never', and `nospecial'. The first
three have the same meaning that they do for the variable
`version-control', and the final value `nospecial' means just use the
&optional parameters)
(let* ((display (or display
(frame-parameter nil 'display)
- (error "Please specify display.")))
+ (error "Please specify display")))
(w (or (cdr (assq 'window-system parameters))
(window-system-for-display display))))
`(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row)))
(defmacro ses-sym-rowcol (sym)
- "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
-is nil if SYM is not a symbol that names a cell."
+ "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
+Result is nil if SYM is not a symbol that names a cell."
(declare (debug t))
`(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell))))
(if (eq rc :ses-named)
t)
(defmacro ses-column-printers (printers)
- "Load the vector of column printers from the spreadsheet file and checks
+ "Load the vector of column printers from the spreadsheet file and check
them for safety. This is a macro to prevent propagate-on-load viruses."
(or (and (vectorp printers) (= (length printers) ses--numcols))
(error "Bad column-printers vector"))
t)
(defmacro ses-default-printer (def)
- "Load the global default printer from the spreadsheet file and checks it
+ "Load the global default printer from the spreadsheet file and check it
for safety. This is a macro to prevent propagate-on-load viruses."
(setq ses--default-printer (ses-safe-printer def))
(ses-printer-record def)
t)
(defmacro ses-header-row (row)
- "Load the header row from the spreadsheet file and checks it
+ "Load the header row from the spreadsheet file and check it
for safety. This is a macro to prevent propagate-on-load viruses."
(or (and (wholenump row) (or (zerop ses--numrows) (< row ses--numrows)))
(error "Bad header-row"))
buffer-undo-list))
(defun ses-reset-header-string ()
- "Flag the header string for update. Upon undo, the header string will be
-updated again."
+ "Flag the header string for update.
+Upon undo, the header string will be updated again."
(push '(apply ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
(or (and (= (following-char) ?\n)
(eq (car-safe x) 'ses-local-printer)
(apply #'ses--local-printer (cdr x)))
- (error "local printer-def error"))
+ (error "Local printer-def error"))
(setq ses--numlocprn (1+ ses--numlocprn))))))
;; Load cell definitions.
(dotimes (row ses--numrows)
(forward-char 1))))
(defun ses-clear-cell-backward (count)
- "Move to previous cell and then delete it. With prefix, delete several
-cells."
+ "Move to previous cell and then delete it. With prefix, delete several cells."
(interactive "*p")
(if (< count 0)
(1value (ses-clear-cell-forward (- count)))
(advice-add 'copy-region-as-kill :around #'ses--advice-copy-region-as-kill)
(defun ses-copy-region (beg end)
- "Treat the region as rectangular. Convert the intangible attributes to
-SES attributes recording the contents of the cell as of the time of copying."
+ "Treat the region as rectangular.
+Convert the intangible attributes to SES attributes recording the
+contents of the cell as of the time of copying."
(when (= end ses--data-marker)
;;Avoid overflow situation
(setq end (1- ses--data-marker)))
x))
(defun ses-copy-region-helper (line)
- "Converts one line (of a rectangle being extracted from a spreadsheet) to
+ "Convert one line (of a rectangle being extracted from a spreadsheet) to
external form by attaching to each print cell a `ses' attribute that records
the corresponding data cell."
(or (> (length line) 1)
(setq this-command 'yank))
(defun ses-yank-cells (text arg)
- "If the TEXT has a proper set of `ses' attributes, insert the text as
-cells, else return nil. The cells are reprinted--the supplied text is
+ "If TEXT has a proper set of `ses' attributes, insert it as cells.
+Otherwise, return nil. The cells are reprinted--the supplied text is
ignored because the column widths, default printer, etc. at yank time might
be different from those at kill-time. ARG is a list to indicate that
formulas are to be inserted without relocation."
(defun ses-define-local-printer (name definition)
"Define a local printer with name NAME and definition DEFINITION.
-NAME shall be a symbol. Use TAB to complete over existing local
+NAME shall be a symbol. Use TAB to complete over existing local
printer names.
DEFINITION shall be either a string formatter, e.g.:
(apply #'+ (apply #'ses-delete-blanks args)))
(defun ses-average (list)
- "Computes the sum of the numbers in LIST, divided by their length. Blanks
-are ignored. Result is always floating-point, even if all args are integers."
+ "Calculate the sum of the numbers in LIST, divided by their length.
+Blanks are ignored. Result is always floating-point, even if all
+args are integers."
(setq list (apply #'ses-delete-blanks list))
(/ (float (apply #'+ list)) (length list)))
extra-test-exclusive)
"Try the current buffer when outside navigation.
But return nil if we navigated to the current buffer by the means
-of `next-error' command. Otherwise, return it if it's next-error
+of `next-error' command. Otherwise, return it if it's `next-error'
capable."
;; Check that next-error-buffer has no buffer-local value
;; (i.e. we never navigated to the current buffer from another),
(defun transpose-subr (mover arg &optional special)
"Subroutine to do the work of transposing objects.
Works for lines, sentences, paragraphs, etc. MOVER is a function that
-moves forward by units of the given object (e.g. forward-sentence,
-forward-paragraph). If ARG is zero, exchanges the current object
+moves forward by units of the given object (e.g. `forward-sentence',
+`forward-paragraph'). If ARG is zero, exchanges the current object
with the one containing mark. If ARG is an integer, moves the
current object past ARG following (if ARG is positive) or
preceding (if ARG is negative) objects, leaving point after the
;; considered internal-use only (with `global-so-long-mode' the interface
;; for enabling or disabling the automated behaviour). FIXME: Establish a
;; way to support the original use-case, or rename to `so-long--enabled'.
- "Internal use. Non-nil when any so-long functionality has been used.")
+ "Internal use. Non-nil when any `so-long' functionality has been used.")
(defvar-local so-long--active nil ; internal use
"Non-nil when `so-long' mitigations are in effect.")
still overriding minor modes and variables (as if `so-long-action' had been set
to `so-long-minor-mode').
-The value `so-long-inhibit' means that so-long will not take any action at all
+The value `so-long-inhibit' means that `so-long' will not take any action at all
for this file.
If nil, then do not treat files with file-local modes any differently to other
;;;###autoload
(defun so-long-commentary ()
- "View the so-long documentation in `outline-mode'."
+ "View the `so-long' documentation in `outline-mode'."
(interactive)
(let ((buf "*So Long: Commentary*"))
(when (buffer-live-p (get-buffer buf))
;;;###autoload
(defun so-long-customize ()
- "Open the so-long `customize' group."
+ "Open the `so-long' customize group."
(interactive)
(customize-group 'so-long))
so-long-revert-function 'turn-off-so-long-minor-mode))))
(defun so-long-inhibit (&optional _mode)
- "Prevent so-long from having any effect at all.
+ "Prevent `so-long' from having any effect at all.
This is a `so-long-file-local-mode-function' option."
(setq so-long--inhibited t))
;;;###autoload
(defun so-long-enable ()
- "Enable the so-long library's functionality.
+ "Enable the `so-long' library's functionality.
Equivalent to calling (global-so-long-mode 1)"
(interactive)
(global-so-long-mode 1))
(defun so-long-disable ()
- "Disable the so-long library's functionality.
+ "Disable the `so-long' library's functionality.
Equivalent to calling (global-so-long-mode 0)"
(interactive)
the sort order.
The next four arguments are functions to be called to move point
-across a sort record. They will be called many times from within sort-subr.
+across a sort record. They will be called many times from within `sort-subr'.
NEXTRECFUN is called with point at the end of the previous record.
It moves point to the start of the next record.
It should move point to the end of the buffer if there are no more records.
-The first record is assumed to start at the position of point when sort-subr
+The first record is assumed to start at the position of point when `sort-subr'
is called.
ENDRECFUN is called with point within the record.
"Return VALUE with its bits shifted left by COUNT.
If COUNT is negative, shifting is actually to the right.
In this case, if VALUE is a negative fixnum treat it as unsigned,
-i.e., subtract 2 * most-negative-fixnum from VALUE before shifting it."
+i.e., subtract 2 * `most-negative-fixnum' from VALUE before shifting it."
(when (and (< value 0) (< count 0))
(when (< value most-negative-fixnum)
(signal 'args-out-of-range (list value count)))
Any input that is not one of CHARS is ignored.
If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore
-keyboard-quit events while waiting for a valid input.
+`keyboard-quit' events while waiting for a valid input.
If you bind the variable `help-form' to a non-nil value
while calling this function, then pressing `help-char'
If `buffer-invisibility-spec' isn't a list before calling this
function, `buffer-invisibility-spec' will afterwards be a list
with the value `(t ELEMENT)'. This means that if text exists
-that invisibility values that aren't either `t' or ELEMENT, that
+that invisibility values that aren't either t or ELEMENT, that
text will become visible."
(if (eq buffer-invisibility-spec t)
(setq buffer-invisibility-spec (list t)))
(defun remove-from-invisibility-spec (element)
"Remove ELEMENT from `buffer-invisibility-spec'.
If `buffer-invisibility-spec' isn't a list before calling this
-function, it will be made into a list containing just `t' as the
-only list member. This means that if text exists with non-`t'
+function, it will be made into a list containing just t as the
+only list member. This means that if text exists with non-t
invisibility values, that text will become visible."
(setq buffer-invisibility-spec
(if (consp buffer-invisibility-spec)
;;; Commentary:
;; This package provides access to mouse event as reported by the gpm-Linux
-;; package. It tries to reproduce the functionality offered by Emacs under X.
+;; package. It tries to reproduce the functionality offered by Emacs under X.
;; The "gpm" server runs under Linux, so this package is rather
;; Linux-dependent.
(defun tab-bar--update-tab-bar-lines (&optional frames)
"Update the `tab-bar-lines' frame parameter in FRAMES.
If the optional parameter FRAMES is omitted, update only
-the currently selected frame. If it is `t', update all frames
+the currently selected frame. If it is t, update all frames
as well as the default for new frames. Otherwise FRAMES should be
a list of frames to update."
(let ((frame-lst (cond ((null frames)
"Defines what to do when the last tab is closed.
If nil, do nothing and show a message, like closing the last window or frame.
If `delete-frame', delete the containing frame, as a web browser would do.
-If `tab-bar-mode-disable', disable tab-bar-mode so that tabs no longer show
+If `tab-bar-mode-disable', disable `tab-bar-mode' so that tabs no longer show
in the frame.
If the value is a function, call that function with the tab to be closed
as an argument."
#'tar-parse-octal-integer "27.1")
(defun tar-parse-octal-integer-safe (string)
- (if (zerop (length string)) (error "empty string"))
+ (if (zerop (length string)) (error "Empty string"))
(mapc (lambda (c)
(if (or (< c ?0) (> c ?7))
(error "`%c' is not an octal digit" c)))
The header will lack a proper checksum; use `tar-header-block-checksum'
to compute one, or request `tar-header-serialize' to do that.
-Other tar-mode facilities may also require the data-start header
+Other `tar-mode' facilities may also require the data-start header
field to be set to a valid value.
If SIZE is not given or nil, it defaults to 0.
(interactive
(list (read-string "New name: "
(tar-header-name (tar-current-descriptor)))))
- (if (string= "" new-name) (error "zero length name"))
+ (if (string= "" new-name) (error "Zero length name"))
(let ((encoded-new-name (encode-coding-string new-name
tar-file-name-coding-system))
(descriptor (tar-current-descriptor))
(setq prefix (substring encoded-new-name 0 (match-beginning 0)))
(setq encoded-new-name (substring encoded-new-name (match-end 0))))
- (if (> (length encoded-new-name) 98) (error "name too long"))
+ (if (> (length encoded-new-name) 98) (error "Name too long"))
(setf (tar-header-name descriptor) new-name)
(tar-alter-one-field 0
(substring (concat encoded-new-name (make-string 99 0)) 0 99))
;;; Commentary:
;; This file provides a simple way to define powerful templates, or
-;; macros, if you wish. It is mainly intended for, but not limited to,
+;; macros, if you wish. It is mainly intended for, but not limited to,
;; other programmers to be used for creating shortcuts for editing
-;; certain kind of documents. It was originally written to be used by
+;; certain kind of documents. It was originally written to be used by
;; a HTML editing mode written by Nelson Minar <nelson@santafe.edu>,
;; and his html-helper-mode.el is probably the best example of how to
;; use this program.
;; A template is defined as a list of items to be inserted in the
-;; current buffer at point. Some of the items can be simple strings,
+;; current buffer at point. Some of the items can be simple strings,
;; while other can control formatting or define special points of
;; interest in the inserted text.
;; If a template defines a "point of interest" that point is inserted
;; in a buffer-local list of "points of interest" that the user can
;; jump between with the commands `tempo-backward-mark' and
-;; `tempo-forward-mark'. If the template definer provides a prompt for
+;; `tempo-forward-mark'. If the template definer provides a prompt for
;; the point, and the variable `tempo-interactive' is non-nil, the
;; user will be prompted for a string to be inserted in the buffer,
;; using the minibuffer.
;; current region if the template command is called with a prefix (or
;; a non-nil argument).
-;; More flexible templates can be created by including lisp symbols,
+;; More flexible templates can be created by including Lisp symbols,
;; which will be evaluated as variables, or lists, which will be
-;; evaluated as lisp expressions.
+;; evaluated as Lisp expressions.
;; See the documentation for tempo-define-template for the different
;; items that can be used to define a tempo template.
;; One of the more powerful features of tempo templates are automatic
-;; completion. With every template can be assigned a special tag that
+;; completion. With every template can be assigned a special tag that
;; should be recognized by `tempo-complete-tag' and expanded to the
-;; complete template. By default the tags are added to a global list
+;; complete template. By default the tags are added to a global list
;; of template tags, and are matched against the last word before
-;; point. But if you assign your tags to a specific list, you can also
+;; point. But if you assign your tags to a specific list, you can also
;; specify another method for matching text in the buffer against the
-;; tags. In the HTML mode, for instance, the tags are matched against
+;; tags. In the HTML mode, for instance, the tags are matched against
;; the text between the last `<' and point.
;; When defining a template named `foo', a symbol named
expression with at least one \\( \\) pair. When searching for tags,
`tempo-complete-tag' calls `re-search-backward' with this string, and
the string between the first \\( and \\) is used for matching against
-each string in the tag list. If one is found, the whole text between
+each string in the tag list. If one is found, the whole text between
the first \\( and the point is replaced with the inserted template.
You will probably want to include \\=\\= at the end of the regexp to
happens when you call the template function with a prefix argument.
- (s NAME): Inserts text previously read with the (p ..) construct.
Finds the insertion saved under NAME and inserts it. Acts like `p'
- if tempo-interactive is nil.
+ if `tempo-interactive' is nil.
- `&': If there is only whitespace between the line start and point,
nothing happens. Otherwise a newline is inserted.
- `%': If there is only whitespace between point and end of line,
;;; tempo-insert
(defun tempo-insert (element on-region)
- "Insert a template element.
-Insert one element from a template. If ON-REGION is non-nil the `r'
+ "Insert a template ELEMENT.
+Insert one element from a template. If ON-REGION is non-nil the `r'
elements are replaced with the current region.
See documentation for `tempo-define-template' for the kind of elements
;;; tempo-save-named
(defun tempo-save-named (name data) ; Had an optional prompt for 'v
- "Save some data for later insertion
+ "Save some data for later insertion.
The contents of DATA is saved under the name NAME.
The data can later be retrieved with `tempo-lookup-named'.
;;; tempo-invalidate-collection
(defun tempo-invalidate-collection (&optional global)
- "Marks the tag collection as obsolete.
+ "Mark the tag collection as obsolete.
Whenever it is needed again it will be rebuilt. If GLOBAL is non-nil,
mark the tag collection of all buffers as obsolete, not just the
current one."
;; This file defines a general command-interpreter-in-a-buffer package
;; (term mode). The idea is that you can build specific process-in-a-buffer
-;; modes on top of term mode -- e.g., lisp, shell, scheme, T, soar, ....
+;; modes on top of term mode -- e.g., Lisp, shell, Scheme, T, soar, ....
;; This way, all these specific packages share a common base functionality,
;; and a common set of bindings, which makes them easier to use (and
;; saves code, implementation time, etc., etc.).
;; Based on a function by David Reitter <dreitter@inf.ed.ac.uk> ;
;; see https://lists.gnu.org/r/emacs-devel/2005-09/msg00681.html .
(defun ns-toggle-toolbar (&optional frame)
- "Switches the tool bar on and off in frame FRAME.
- If FRAME is nil, the change applies to the selected frame."
+ "Switch the tool bar on and off in frame FRAME.
+If FRAME is nil, the change applies to the selected frame."
(interactive)
(modify-frame-parameters
frame (list (cons 'tool-bar-lines
(scroll-up n))
(defun kill-region-and-unmark (beg end)
- "Like `kill-region', but pops the mark [which equals point, anyway.]"
+ "Like `kill-region', but pops the mark [which equals point, anyway]."
(interactive "r")
(kill-region beg end)
(setq this-command 'kill-region-and-unmark)
(interactive)
(eval (nth 0 command-history)))
-(defvar grep-arg nil "Default arg for RE-search")
+(defvar grep-arg nil "Default arg for RE-search.")
(defun grep-arg ()
(if (memq last-command '(research-forward research-backward)) grep-arg
(let* ((command (car command-history))
down, this function is called. It calls the functions in the hook
`emacs-save-session-functions'. Functions are called with the current
buffer set to a temporary buffer. Functions should use `insert' to insert
-lisp code to save the session state. The buffer is saved in a file in the
+Lisp code to save the session state. The buffer is saved in a file in the
home directory of the user running Emacs. The file is evaluated when
Emacs is restarted by the session manager.
Can be nil to mean \"no timeout\".")
(defvar xterm-query-redisplay-timeout 0.2
- "Seconds to wait before allowing redisplay during terminal
- query." )
+ "Seconds to wait before allowing redisplay during terminal query." )
(defun xterm--read-event-for-query ()
- "Like read-event, but inhibit redisplay.
+ "Like `read-event', but inhibit redisplay.
By not redisplaying right away for xterm queries, we can avoid
-unsightly flashing during initialization. Give up and redisplay
+unsightly flashing during initialization. Give up and redisplay
anyway if we've been waiting a little while."
(let ((start-time (current-time)))
(or (let ((inhibit-redisplay t))
(+ window-y window-start-y))))
(defun artist--adjust-x (x)
- "Adjust the X position wrt. `display-line-numbers-mode'."
+ "Adjust the X position with regards to `display-line-numbers-mode'."
(let ((adjust (line-number-display-width)))
(if (= adjust 0)
x
km)
"Keymap used in BibTeX mode.")
-(easy-menu-define
- bibtex-edit-menu bibtex-mode-map "BibTeX-Edit Menu in BibTeX mode"
+(easy-menu-define bibtex-edit-menu bibtex-mode-map
+ "BibTeX-Edit Menu in BibTeX mode."
'("BibTeX-Edit"
("Moving inside an Entry"
["End of Field" bibtex-find-text t]
(conf-mode-initialize "!"))
(defun conf-toml-recognize-section (limit)
- "Font-lock helper function for conf-toml-mode.
+ "Font-lock helper function for `conf-toml-mode'.
Handles recognizing TOML section names, like [section],
\[[section]], or [something.\"else\".section]."
(save-excursion
to keep filling to the end of the paragraph (or next hard newline,
if variable `use-hard-newlines' is on).
-Return the fill-prefix used for filling the last paragraph.
+Return the `fill-prefix' used for filling the last paragraph.
If `sentence-end-double-space' is non-nil, then period followed by one
space does not end a sentence, so don't break a line there."
("svenska" "sv_SE")
("hebrew" "he_IL"))
"Alist with known matching locales for standard dict names in
- `ispell-dictionary-base-alist'.")
+`ispell-dictionary-base-alist'.")
;;; **********************************************************************
Move southwest (sw) after insertion: \\[picture-movement-sw]
Move southeast (se) after insertion: \\[picture-movement-se]
- Move westnorthwest (wnw) after insertion: C-u \\[picture-movement-nw]
- Move eastnortheast (ene) after insertion: C-u \\[picture-movement-ne]
- Move westsouthwest (wsw) after insertion: C-u \\[picture-movement-sw]
- Move eastsoutheast (ese) after insertion: C-u \\[picture-movement-se]
+ Move westnorthwest (wnw) after insertion: \\[universal-argument] \\[picture-movement-nw]
+ Move eastnortheast (ene) after insertion: \\[universal-argument] \\[picture-movement-ne]
+ Move westsouthwest (wsw) after insertion: \\[universal-argument] \\[picture-movement-sw]
+ Move eastsoutheast (ese) after insertion: \\[universal-argument] \\[picture-movement-se]
The current direction is displayed in the mode line. The initial
direction is right. Whitespace is inserted and tabs are changed to
(if (string-match "\\`[ \t]*\\'" (or first-re ""))
(user-error "Empty regular expression"))
(if (string-match first-re "")
- (user-error "Regular expression matches the empty string."))
+ (user-error "Regular expression matches the empty string"))
(save-excursion
(save-window-excursion
(reftex-display-index nil nil 'redo))
(defun reftex-index-restrict-to-section (&optional force)
- "Restrict index to entries defined in same document sect. as entry at point."
+ "Restrict index to entries defined in same document section as entry at point."
;; Optional FORCE means, even if point is not on an index entry.
(interactive)
(let* ((data (get-text-property (point) :data))
(make-variable-buffer-local 'reftex-isearch-minor-mode)
(easy-menu-define reftex-mode-menu reftex-mode-map
- "Menu used in RefTeX mode"
+ "Menu used in RefTeX mode."
`("Ref"
["Table of Contents" reftex-toc t]
["Recenter TOC" reftex-toc-recenter t]
;; register table menu under global tools menu
(easy-menu-define table-global-menu-map nil
- "Table global menu" table-global-menu)
+ "Table global menu." table-global-menu)
(easy-menu-add-item (current-global-map) '("menu-bar" "tools") "--")
(easy-menu-add-item (current-global-map)
'("menu-bar" "tools") table-global-menu-map)
"Move point forward to the beginning of the next cell.
With argument ARG, do it ARG times;
a negative argument ARG = -N means move backward N cells.
-Do not specify NO-RECOGNIZE and UNRECOGNIZE. They are for internal use only.
+
+Do not specify NO-RECOGNIZE and UNRECOGNIZE. They are for
+internal use only.
Sample Cell Traveling Order (In Irregular Table Cases)
+--+ |4 | |4 | +--+ |5 +--+--+6 | |3 +--+--+4 | |5 | |6 |
|5 +--+ | | +--+5 | | |7 |8 | | | |5 |6 | | | | | |
| |6 | | | |6 | | +--+--+--+--+ +--+--+--+--+ +--+-----+--+
-+--+--+--+ +--+--+--+
-"
++--+--+--+ +--+--+--+"
;; After modifying this function, test against the above tables in
;; the doc string. It is quite tricky. The tables above do not
;; mean to cover every possible cases of cell layout, of course.
CALS (DocBook DTD):
URL `https://www.oasis-open.org/html/a502.htm'
- URL `https://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751'
-"
+ URL `https://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751'"
(interactive
(let* ((_ (unless (table--probe-cell) (error "Table not found here")))
(completion-ignore-case t)
(insert ?\n))))))
(defun table--cell-horizontal-char-p (c)
- "Test if character C is one of the horizontal characters"
+ "Test if character C is one of the horizontal characters."
(memq c (string-to-list table-cell-horizontal-chars)))
(defun table--generate-source-scan-lines (dest-buffer _language origin-cell tail-cell col-list row-list)
(set-marker marker-point nil)))
(defun table--fill-region-strictly (beg end)
- "Fill region strictly so that no line exceeds fill-column.
+ "Fill region strictly so that no line exceeds `fill-column'.
When a word exceeds fill-column the word is chopped into pieces. The
chopped location is indicated with table-word-continuation-char."
(or (and (markerp beg) (markerp end))
(if (and (symbolp (car (cdr (car texinfo-stack))))
(> 1 (length (symbol-name (car (cdr (car texinfo-stack)))))))
(error
- "@enumerate: Use a number or letter, eg: 1, A, a, 3, B, or d." ))
+ "@enumerate: Use a number or letter, eg: 1, A, a, 3, B, or d"))
(texinfo-discard-line-with-args)
(setq fill-column (- fill-column 5)))
(if (or (equal ?\[ (string-to-char enumerating-symbol))
(equal ?\{ (string-to-char enumerating-symbol)))
(error
- "Too many items in enumerated list; alphabet ends at Z."))
+ "Too many items in enumerated list; alphabet ends at Z"))
(insert ?\b (format "%3s. " enumerating-symbol) ?\n)
(setcar (cdr (car texinfo-stack))
(make-symbol
(string-to-char enumerating-symbol))))))
(t
(error
- "@enumerate: Use a number or letter, eg: 1, A, a, 3, B or d." )))
+ "@enumerate: Use a number or letter, eg: 1, A, a, 3, B or d")))
(forward-line -1)))
(put 'alphaenumerate 'texinfo-item 'texinfo-alphaenumerate-item)
;; Case 3: Trouble
(t
(error
- "You probably need to specify column widths for @multitable correctly.")))
+ "You probably need to specify column widths for @multitable correctly")))
;; Check whether columns fit on page.
(let ((desired-columns
(+
(apply #'+ texinfo-multitable-width-list))))
(if (> desired-columns fill-column)
(error
- "Multi-column table width, %d chars, is greater than page width, %d chars."
+ "Multi-column table width, %d chars, is greater than page width, %d chars"
desired-columns fill-column)))
texinfo-multitable-width-list))
;; The function bounds-of-thing-at-point finds the beginning and end
;; positions by moving first forward to the end of the "thing", and then
;; backwards to the beginning. By default, it uses the corresponding
-;; forward-"thing" operator (eg. forward-word, forward-line).
+;; forward-"thing" operator (e.g. forward-word, forward-line).
;;
;; Special cases are allowed for using properties associated with the named
;; "thing":
(float-time end-time))))))))))
(defun display-time-update ()
- "Update the display-time info for the mode line.
+ "Update the `display-time' info for the mode line.
However, don't redisplay right now.
This is used for things like Rmail `g' that want to force an
;;;###autoload
(defun emacs-init-time (&optional format)
"Return a string giving the duration of the Emacs initialization.
-FORMAT is a string to format the result, using `format'. If nil,
+FORMAT is a string to format the result, using `format'. If nil,
the default format \"%f seconds\" is used."
(interactive)
(let ((str (format (or format "%f seconds")
For example, \"=\" is hard to reach using my custom keyboard
layout, so I substitute \"(\" for that, which is easy to reach
-using a layout optimized for lisp.
+using a layout optimized for Lisp.
(setq transient-substitute-key-function
(lambda (obj)
desc)))
(cl-defmethod transient-format-description ((obj transient-group))
- "Format the description by calling the next method. If the result
-doesn't use the `face' property at all, then apply the face
-`transient-heading' to the complete string."
+ "Format the description by calling the next method.
+If the result doesn't use the `face' property at all, then apply
+the face `transient-heading' to the complete string."
(when-let ((desc (cl-call-next-method obj)))
(if (text-property-not-all 0 (length desc) 'face nil desc)
desc
(propertize desc 'face 'transient-heading))))
(cl-defmethod transient-format-description :around ((obj transient-suffix))
- "Format the description by calling the next method. If the result
-is nil, then use \"(BUG: no description)\" as the description.
-If the OBJ's `key' is currently unreachable, then apply the face
-`transient-unreachable' to the complete string."
+ "Format the description by calling the next method.
+If the result is nil, then use \"(BUG: no description)\" as the
+description. If the OBJ's `key' is currently unreachable, then
+apply the face `transient-unreachable' to the complete string."
(let ((desc (or (cl-call-next-method obj)
(and (slot-boundp transient--prefix 'suffix-description)
(funcall (oref transient--prefix suffix-description)
(error "gnutls-error: %s" e))
(error
(url-http-activate-callback)
- (error "error: %s" e)))
- (error "error: gnutls support needed!")))
+ (error "Error: %s" e)))
+ (error "Error: gnutls support needed!")))
(t
(url-http-debug "error response: %d" url-http-response-status)
(url-http-activate-callback))))))
;;; Commentary:
-;; Anyway, here's a teaser. It's quite broken in lots of regards, but at
-;; least it seem to work. At least a little. At least when called
+;; Anyway, here's a teaser. It's quite broken in lots of regards, but at
+;; least it seem to work. At least a little. At least when called
;; manually like this (I've no idea how it's supposed to be called):
;; (url-imap (url-generic-parse-url "imap://cyrus.andrew.cmu.edu/archive.c-client;UID=1021"))
\(This is the same format as produced by `url-parse-query-string')
This will return a string
-\"key1=val1&key2=val2&key3=val1&key3=val2&key4&key5\". Keys may
+\"key1=val1&key2=val2&key3=val1&key3=val2&key4&key5\". Keys may
be strings or symbols; if they are symbols, the symbol name will
be used.
domain-match -- Send last location if the new location is within the
same domain
host-match -- Send last location if the new location is on the
- same host
-"
+ same host"
:version "27.1"
:type '(radio (const :tag "Always send" none)
(const :tag "Domains match" domain-match)
(defcustom ediff-before-setup-hook nil
"Hooks to run before Ediff begins to set up windows and buffers.
This hook can be used to save the previous window config, which can be restored
-on ediff-quit or ediff-suspend."
+on `ediff-quit' or `ediff-suspend'."
:type 'hook
:group 'ediff-hook)
(defcustom ediff-before-setup-windows-hook nil
"use `with-eval-after-load' instead." "28.1")
(defcustom ediff-mode-hook nil
- "Hook run just after ediff-mode is set up in the control buffer.
+ "Hook run just after `ediff-mode' is set up in the control buffer.
This is done before any windows or frames are created. One can use it to
set local variables that determine how the display looks like."
:type 'hook
(delete-overlay overlay)))))
(defun ediff-overlay-put (overlay prop value)
- "Calls `overlay-put', but checks if overlay's buffer exists."
+ "Call `overlay-put', but check if OVERLAY's buffer exists."
(if (ediff-buffer-live-p (overlay-buffer overlay))
(overlay-put overlay prop value)
(delete-overlay overlay)))
;; RCS.el support
(defun rcs-ediff-view-revision (&optional rev)
-;; View previous RCS revision of current file.
-;; With prefix argument, prompts for a revision name.
+ "View previous RCS revision of current file.
+With prefix argument, prompts for a revision name."
(interactive (list (if current-prefix-arg
(read-string "Revision: "))))
(let* ((filename (buffer-file-name (current-buffer)))
(goto-char opoint))))
(defun emerge-mark-difference (arg)
- "Leaves the point before this difference and the mark after it.
+ "Leave the point before this difference and the mark after it.
With prefix argument, puts mark before, point after."
(interactive "P")
(emerge-validate-difference)
;; Define a key, even if a prefix of it is defined
(defun emerge-force-define-key (keymap key definition)
- "Like `define-key', but forcibly creates prefix characters as needed.
+ "Like `define-key', but forcibly create prefix characters as needed.
If some prefix of KEY has a non-prefix definition, it is redefined."
;; Find out if a prefix of key is defined
(let ((v (lookup-key keymap key)))
(line-end-position))))))))
(defun vc-cvs-parse-uhp (path)
- "parse user@host/path into (user@host /path)"
+ "Parse user@host/path into (user@host /path)."
(if (string-match "\\([^/]+\\)\\(/.*\\)" path)
(list (match-string 1 path) (match-string 2 path))
(list nil path)))
empty string, that means to check ou tht ehead of the trunk.
If optional arg DESTFILE is given, it is an alternate filename to
-write the contents to.
-"
+write the contents to."
;; This should LOCK the resource.
)
If optional arg CONTENTS-DONE is non-nil, then the contents of FILE
have already been reverted from a version backup, and this function
-only needs to update the status of URL within the backend.
-"
+only needs to update the status of URL within the backend."
;; Should do a GET if !contents_done
;; Should UNLOCK the file.
)
If REV2 is nil, use the current workfile contents as the nwer version.
It should return a status of either 0 (no differences found), or
-1 (either non-empty diff or the diff is run asynchronously).
-"
+1 (either non-empty diff or the diff is run asynchronously)."
;; We should do this asynchronously...
;; How would we do it at all, that is the question!
)
;;;###autoload
(defun vc-dir-bookmark-jump (bmk)
- "Provides the bookmark-jump behavior for a `vc-dir' buffer.
+ "Provide the `bookmark-jump' behavior for a `vc-dir' buffer.
This implements the `handler' function interface for the record
type returned by `vc-dir-bookmark-make-record'."
(let* ((file (bookmark-prop-get bmk 'filename))
;;; Commentary:
;; The functions contained in this file send various VT control codes
-;; to the terminal where emacs is running. The following functions are
+;; to the terminal where Emacs is running. The following functions are
;; available.
;; Function Action
;; FIXME: Can't we use the normal mechanism for that? --Stef
(if (and
(buffer-modified-p)
- (not (y-or-n-p "Buffer changed. Discard changes and kill buffer? ")))
+ (not (y-or-n-p "Buffer changed. Discard changes and kill buffer?")))
(error "Error")))
;; Added to after-change-functions in wdired-change-to-wdired-mode to
(declare (doc-string 3))
;;
(unless (or (null doc) (stringp doc))
- (error "widget documentation must be nil or a string."))
+ (error "Widget documentation must be nil or a string"))
(put name 'widget-type (cons class args))
(put name 'widget-documentation (purecopy doc))
name)
direction. Keybindings are of the form PREFIX MODIFIERS-{left,right,up,down},
where PREFIX is a prefix key and MODIFIERS is either a list of modifiers or
a single modifier.
-If PREFIX is `none', no prefix is used. If MODIFIERS is `none', the keybindings
-are directly bound to the arrow keys.
+If PREFIX is `none', no prefix is used. If MODIFIERS is `none',
+the keybindings are directly bound to the arrow keys.
Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
(interactive)
(unless prefix (setq prefix '(?\C-x)))
(defun window-with-parameter (parameter &optional value frame any minibuf)
"Return first window on FRAME with PARAMETER non-nil.
FRAME defaults to the selected frame. Optional argument VALUE
-non-nil means only return a window whose window-parameter value
+non-nil means only return a window whose `window-parameter' value
for PARAMETER equals VALUE (comparison is done with `equal').
Optional argument ANY non-nil means consider internal windows
too.
(defun window--sides-reverse-on-frame-p (frame)
"Return non-nil when side windows should appear reversed on FRAME.
This uses some heuristics to guess the user's intentions when the
-selected window of FRAME is a side window ."
+selected window of FRAME is a side window."
(cond
;; Reverse when `window-sides-reversed' is t. Do not reverse when
;; `window-sides-reversed' is nil.
WARNING: This is NOT the way to work on another buffer temporarily
within a Lisp program! Use `set-buffer' instead. That avoids
-messing with the window-buffer correspondences.
+messing with the `window-buffer' correspondences.
If the selected window cannot display the specified buffer
because it is a minibuffer window or strongly dedicated to
"Cannot switch buffers in a dedicated window"))
('prompt
(if (y-or-n-p
- (format "Window is dedicated to %s; undedicate it"
+ (format "Window is dedicated to %s; undedicate it?"
(window-buffer)))
(progn
(set-window-dedicated-p nil nil)
(setq repeat-map 'other-window-repeat-map)
(other-window -1)))
map)
- "Keymap to repeat other-window key sequences. Used in `repeat-mode'.")
+ "Keymap to repeat `other-window' key sequences. Used in `repeat-mode'.")
(put 'other-window 'repeat-map 'other-window-repeat-map)
(defvar resize-window-repeat-map
(defsubst winner-equal (a b)
- "Check whether two Winner configurations (as produced by
-`winner-conf') are equal."
+ "Return t if two Winner configurations (as produced by `winner-conf') are equal."
(equal (cdr a) (cdr b)))
"_DIR=\""
(group-n 2 (or "/" "$HOME/") (*? (or (not (any "\"")) "\\\"")))
"\""))
- "Regexp matching non-comment lines in xdg-user-dirs config files.")
+ "Regexp matching non-comment lines in `xdg-user-dirs' config files.")
(defvar xdg-user-dirs nil
"Alist of directory keys and values.")
(when (and k v) (cons k (xdg--substitute-home-env v))))))
(defun xdg--user-dirs-parse-file (filename)
- "Return alist of xdg-user-dirs from FILENAME."
+ "Return alist of `xdg-user-dirs' from FILENAME."
(let (elt res)
(when (file-readable-p filename)
(with-temp-buffer
;;; Macros to parse the list
(defconst xml-undefined-entity "?"
- "What to substitute for undefined entities")
+ "What to substitute for undefined entities.")
(defconst xml-default-ns '(("" . "")
("xml" . "http://www.w3.org/XML/1998/namespace")
;; This is actually useful when you are running X11 locally, but is
;; working on remote machine over a modem line or through a gateway.
-;; It works by translating xterm escape codes into generic emacs mouse
+;; It works by translating xterm escape codes into generic Emacs mouse
;; events so it should work with any package that uses the mouse.
;; You don't have to turn off xterm mode to use the normal xterm mouse
"\e[?1000h\e[?1003h\e[?1005h\e[?1006h"
"Control sequence to enable xterm mouse tracking.
Enables basic mouse tracking, mouse motion events and finally
-extended tracking on terminals that support it. The following
+extended tracking on terminals that support it. The following
escape sequences are understood by modern xterms:
\"\\e[?1000h\" \"Basic mouse mode\": Enables reports for mouse
- clicks. There is a limit to the maximum row/column
+ clicks. There is a limit to the maximum row/column
position (<= 223), which can be reported in this
basic mode.
\"\\e[?1005h\" \"UTF-8 coordinate extension\": Enables an extension
to the basic mouse mode, which uses UTF-8
- characters to overcome the 223 row/column limit. This
+ characters to overcome the 223 row/column limit. This
extension may conflict with non UTF-8 applications or
non UTF-8 locales.
(should (abbrev-table-empty-p table))))
(ert-deftest kill-all-abbrevs-test ()
- "Test undefining all defined abbrevs"
+ "Test undefining all defined abbrevs."
(unless noninteractive
(ert-skip "Cannot test kill-all-abbrevs in interactive mode"))
abbrev-table-name-list))))))
(ert-deftest abbrev-table-name-test ()
- "Test returning name of abbrev-table"
+ "Test returning name of abbrev-table."
(let ((ert-test-abbrevs (setup-test-abbrev-table))
(no-such-table nil))
(should (equal 'ert-test-abbrevs (abbrev-table-name ert-test-abbrevs)))
(should (equal nil (abbrev-table-name no-such-table)))))
(ert-deftest clear-abbrev-table-test ()
- "Test clearing single abbrev table"
+ "Test clearing single abbrev table."
(let ((ert-test-abbrevs (setup-test-abbrev-table)))
(should (equal "abbrev-ert-test" (abbrev-expansion "a-e-t" ert-test-abbrevs)))
(clear-abbrev-table ert-test-abbrevs)
(should (equal t (abbrev-table-empty-p ert-test-abbrevs)))))
(ert-deftest list-abbrevs-test ()
- "Test generation of abbrev list buffer"
+ "Test generation of abbrev list buffer."
;; Somewhat redundant as prepare-abbrev-list-buffer is also tested.
;; all abbrevs
(let ((abbrev-buffer (prepare-abbrev-list-buffer)))
(kill-buffer abbrev-buffer)))
(ert-deftest prepare-abbrev-list-buffer-test ()
- "Test generation of abbrev list buffer"
+ "Test generation of abbrev list buffer."
;; all abbrevs
(let ((ert-test-abbrevs (setup-test-abbrev-table)))
(with-current-buffer (prepare-abbrev-list-buffer)
(kill-buffer "*Abbrevs*"))))
(ert-deftest insert-abbrevs-test ()
- "Test inserting abbrev definitions into buffer"
+ "Test inserting abbrev definitions into buffer."
(with-temp-buffer
(insert-abbrevs)
(should (progn
(search-forward "global-abbrev-table")))))
(ert-deftest edit-abbrevs-test ()
- "Test editing abbrevs from buffer"
+ "Test editing abbrevs from buffer."
(defvar ert-edit-abbrevs-test-table nil)
(let ((ert-test-abbrevs (setup-test-abbrev-table)))
(with-temp-buffer
(abbrev-expansion "e-a-t" ert-edit-abbrevs-test-table))))))
(ert-deftest define-abbrevs-test ()
- "Test defining abbrevs from buffer"
+ "Test defining abbrevs from buffer."
(defvar ert-bad-abbrev-table nil)
(defvar ert-good-abbrev-table nil)
(defvar ert-redefine-abbrev-table nil)
(should (equal nil (abbrev-expansion "g-a-t" ert-good-abbrev-table)))))
(ert-deftest read-write-abbrev-file-test ()
- "Test reading and writing abbrevs from file"
+ "Test reading and writing abbrevs from file."
(let ((temp-test-file (make-temp-file "ert-abbrev-test"))
(ert-test-abbrevs (setup-test-abbrev-table)))
(write-abbrev-file temp-test-file)
(delete-file temp-test-file)))
(ert-deftest read-write-abbrev-file-test-with-props ()
- "Test reading and writing abbrevs from file"
+ "Test reading and writing abbrevs from file."
(let ((temp-test-file (make-temp-file "ert-abbrev-test"))
(ert-test-abbrevs (setup-test-abbrev-table-with-props)))
(write-abbrev-file temp-test-file)
(delete-file temp-test-file)))
(ert-deftest abbrev-edit-save-to-file-test ()
- "Test saving abbrev definitions in buffer to file"
+ "Test saving abbrev definitions in buffer to file."
(defvar ert-save-test-table nil)
(let ((temp-test-file (make-temp-file "ert-abbrev-test"))
(ert-test-abbrevs (setup-test-abbrev-table)))
(provide 'arc-mode-tests)
-;; arc-mode-tests.el ends here
+;;; arc-mode-tests.el ends here
(should-not (auth-source-remembered-p '(:host t)))))
(ert-deftest auth-source-test-searches ()
- "Test auth-source searches with various parameters"
+ "Test auth-source searches with various parameters."
:tags '(auth-source auth-source/netrc)
(let* ((entries '("machine a1 port a2 user a3 password a4"
"machine b1 port b2 user b3 password b4"
;; Originally, there are many test functions scattered among the
;; Semantic source files. This file consolidates them.
+;;; Code:
+
(require 'data-debug)
;;; From semantic-complete
All systems are different. Ask questions along the way."
(interactive)
(let ((doload nil))
- (when (y-or-n-p "Create a system database to test with? ")
+ (when (y-or-n-p "Create a system database to test with?")
(call-interactively 'semanticdb-create-ebrowse-database)
(setq doload t))
;; Should we load in caches