(defcustom dnd-open-file-other-window nil
- "If non-nil, always use find-file-other-window to open dropped files."
+ "If non-nil, always use `find-file-other-window' to open dropped files."
:version "22.1"
:type 'boolean)
(defun exec-path ()
"Return list of directories to search programs to run in remote subprocesses.
The remote host is identified by `default-directory'. For remote
-hosts that do not support subprocesses, this returns `nil'.
+hosts that do not support subprocesses, this returns nil.
If `default-directory' is a local directory, this function returns
the value of the variable `exec-path'."
(let ((handler (find-file-name-handler default-directory 'exec-path)))
;;;###autoload
(define-derived-mode bat-mode prog-mode "Bat"
- "Major mode for editing DOS/Windows batch files.\n
+ "Major mode for editing DOS/Windows batch files.
Start a new script from `bat-template'. Read help pages for DOS commands
with `bat-cmd-help'. Navigate between sections using `imenu'.
Run script using `bat-run' and `bat-run-args'.\n
"Enable `bug-reference-mode' and force auto-setup.
Enabling `bug-reference-mode' runs its auto-setup only if
`bug-reference-bug-regexp' and `bug-reference-url-format' are not
-set already. This function sets the latter to `nil'
+set already. This function sets the latter to nil
buffer-locally, so that the auto-setup will always run.
This is mostly intended for MUA modes like `rmail-mode' where the
;; (add-hook 'cfengine3-mode-hook 'eldoc-mode)
;; You may also find the command `cfengine3-reformat-json-string'
-;; useful, just bind it to a key you prefer. It will take the current
-;; string and reformat it as JSON. So if you're editing JSON inside
+;; useful, just bind it to a key you prefer. It will take the current
+;; string and reformat it as JSON. So if you're editing JSON inside
;; the policy, it's a quick way to make it more legible without
;; manually reindenting it. For instance:
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
-}
-"
+}"
:version "24.4"
:type '(list
(choice (const :tag "Anchor at beginning of promise" promise)
;; CATEGORY: [a-zA-Z_]+:
(defun cfengine3--current-function ()
- "Look up current CFEngine 3 function"
+ "Look up current CFEngine 3 function."
(let* ((syntax (cfengine3-make-syntax-cache))
(flist (assq 'functions syntax)))
(when flist
"This is how compilers number the first column, usually 1 or 0.
If this is buffer-local in the destination buffer, Emacs obeys
that value, otherwise it uses the value in the *compilation*
-buffer. This enables a major-mode to specify its own value.")
+buffer. This enables a major mode to specify its own value.")
(defvar compilation-parse-errors-filename-function #'identity
"Function to call to post-process filenames while parsing error messages.
especially the TAB character.
If this is buffer-local in the destination buffer, Emacs obeys
that value, otherwise it uses the value in the *compilation*
-buffer. This enables a major-mode to specify its own value."
+buffer. This enables a major mode to specify its own value."
:type 'boolean
:version "20.4")
(set-window-margins w (- (car (window-margins w)) 2))))
(defun compilation--set-up-arrow-spec-in-margins ()
- "Set up compilation-arrow-overlay to display as an arrow in margins."
+ "Set up `compilation-arrow-overlay' to display as an arrow in margins."
(setq overlay-arrow-string "")
(setq compilation-arrow-overlay
(make-overlay overlay-arrow-position overlay-arrow-position))
#'compilation--tear-down-arrow-spec-in-margins nil t))
(defun compilation--tear-down-arrow-spec-in-margins ()
- "Restore compilation-arrow-overlay to not using the margins, which are removed."
+ "Restore `compilation-arrow-overlay' to not using the margins, which are removed."
(when (overlayp compilation-arrow-overlay)
(overlay-put compilation-arrow-overlay 'before-string nil)
(delete-overlay compilation-arrow-overlay)
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
-that begin with \"cperl-electric\".
-"
+that begin with \"cperl-electric\"."
:type '(choice (const null) boolean)
:group 'cperl-affected-by-hairy)
10) Uses a linear-time algorithm for indentation of regions.
-11) Syntax-highlight, indentation, sexp-recognition inside regular expressions.
-")
+11) Syntax-highlight, indentation, sexp-recognition inside regular expressions.")
(defvar cperl-speed 'please-ignore-this-line
"This is an incomplete compendium of what is available in other parts
backslashes of escape sequences
`font-lock-variable-name-face' Interpolated constructs, embedded code,
POSIX classes (inside charclasses)
- `font-lock-comment-face' Embedded comments
-
-")
+ `font-lock-comment-face' Embedded comments")
\f
(defvar cperl-outline-regexp
(rx (sequence line-start (0+ blank) (eval cperl--imenu-entries-rx)))
- "The regular expression used for outline-minor-mode")
+ "The regular expression used for `outline-minor-mode'.")
(defvar cperl-mode-syntax-table nil
"Syntax table in use in CPerl mode buffers.")
;; Moreover, one takes positive approach (looks for else,grep etc)
;; another negative (looks for bless,tr etc)
(defun cperl-after-block-p (lim &optional pre-block)
- "Return true if the preceding } (if PRE-BLOCK, following {) delimits a block.
+ "Return non-nil if the preceding } (if PRE-BLOCK, following {) delimits a block.
Would not look before LIM. Assumes that LIM is a good place to begin a
statement. The kind of block we treat here is one after which a new
statement would start; thus the block in ${func()} does not count."
(error nil))))
(defun cperl-after-expr-p (&optional lim chars test)
- "Return true if the position is good for start of expression.
+ "Return non-nil if the position is good for start of expression.
TEST is the expression to evaluate at the found position. If absent,
CHARS is a string that contains good characters to have before us (however,
`}' is treated \"smartly\" if it is not in the list)."
(skip-chars-forward " \t"))
(defun cperl-after-block-and-statement-beg (lim)
- "Return true if the preceding ?} ends the statement."
+ "Return non-nil if the preceding ?} ends the statement."
;; We assume that we are after ?\}
(and
(cperl-after-block-p lim)
(defvar cperl-font-lock-keywords nil
"Additional expressions to highlight in Perl mode. Default set.")
(defvar cperl-font-lock-keywords-2 nil
- "Additional expressions to highlight in Perl mode. Maximal set")
+ "Additional expressions to highlight in Perl mode. Maximal set.")
(defun cperl-load-font-lock-keywords ()
(or cperl-faces-init (cperl-init-faces))
cperl-font-lock-keywords-2)
(defun cperl-font-lock-syntactic-face-function (state)
- "Apply faces according to their syntax type. In CPerl mode, this
-is used for here-documents which have been marked as c-style
-comments. For everything else, delegate to the default
-function."
+ "Apply faces according to their syntax type.
+In CPerl mode, this is used for here-documents which have been
+marked as c-style comments. For everything else, delegate to the
+default function."
(cond
;; A c-style comment is a HERE-document. Fontify if requested.
((and (eq 2 (nth 7 state))
(filename nodename &optional no-going-back strict-case))
(defun cperl-info-buffer (type)
- ;; Returns buffer with documentation. Creates if missing.
+ ;; Return buffer with documentation. Creates if missing.
;; If TYPE, this vars buffer.
;; Special care is taken to not stomp over an existing info buffer
(let* ((bname (if type "*info-perl-var*" "*info-perl*"))
(declare-function imenu-choose-buffer-index "imenu" (&optional prompt alist))
(defun cperl-imenu-on-info ()
- "Shows imenu for Perl Info Buffer.
+ "Show imenu for Perl Info Buffer.
Opens Perl Info buffer if needed."
(interactive)
(require 'imenu)
"Add to TAGS data for \"pure\" Perl files in the current directory and kids.
Use as
emacs -batch -q -no-site-file -l emacs/cperl-mode.el \\
- -f cperl-add-tags-recurse-noxs
-"
+ -f cperl-add-tags-recurse-noxs"
(cperl-write-tags nil nil t t nil t))
(defun cperl-add-tags-recurse-noxs-fullpath ()
Writes down fullpath, so TAGS is relocatable (but if the build directory
is relocated, the file TAGS inside it breaks). Use as
emacs -batch -q -no-site-file -l emacs/cperl-mode.el \\
- -f cperl-add-tags-recurse-noxs-fullpath
-"
+ -f cperl-add-tags-recurse-noxs-fullpath"
(cperl-write-tags nil nil t t nil t ""))
(defun cperl-add-tags-recurse ()
"Add to TAGS file data for Perl files in the current directory and kids.
Use as
emacs -batch -q -no-site-file -l emacs/cperl-mode.el \\
- -f cperl-add-tags-recurse
-"
+ -f cperl-add-tags-recurse"
(cperl-write-tags nil nil t t))
(defvar cperl-tags-file-name "TAGS"
=begin formatname Start directly formatted region.
=end formatname End directly formatted region.
=for formatname text Paragraph in special format.
-=encoding encodingname Encoding of the document.
-")
+=encoding encodingname Encoding of the document.")
(defun cperl-switch-to-doc-buffer (&optional interactive)
- "Go to the perl documentation buffer and insert the documentation."
+ "Go to the Perl documentation buffer and insert the documentation."
(interactive "p")
(let ((buf (get-buffer-create cperl-doc-buffer)))
(if interactive
;;; Interface to the command system
(defgroup postscript nil
- "Printing with PostScript"
+ "Printing with PostScript."
:tag "PostScript"
:version "20"
:group 'environment)
(easy-menu-define
ebrowse-member-name-object-menu ebrowse-member-mode-map
- "Object menu for member names"
+ "Object menu for member names."
'("Ebrowse"
["Find Definition" ebrowse-find-member-definition
:help "Find this member's definition in the source files"
(easy-menu-define
ebrowse-tree-buffer-class-object-menu ebrowse-tree-mode-map
- "Object menu for classes in the tree buffer"
+ "Object menu for classes in the tree buffer."
'("Class"
["Functions" ebrowse-tree-command:show-member-functions
:help "Display a list of member functions"
(easy-menu-define
ebrowse-tree-buffer-object-menu ebrowse-tree-mode-map
- "Object menu for tree buffers"
+ "Object menu for tree buffers."
'("Ebrowse"
["Filename Display" ebrowse-toggle-file-name-display
:help "Toggle display of source files names"
(list bitmap)))))))
(defun flymake--highlight-line (diagnostic)
- "Highlight buffer with info in DIGNOSTIC."
+ "Highlight buffer with info in DIAGNOSTIC."
(let ((type (or (flymake--diag-type diagnostic)
:error))
(ov (make-overlay
(defvar flymake-mode-map
(let ((map (make-sparse-keymap))) map)
- "Keymap for `flymake-mode'")
+ "Keymap for `flymake-mode'.")
;;;###autoload
(define-minor-mode flymake-mode
((bound-and-true-p semantic-c-takeover-hideif)
(semantic-c-hideif-defined var))
;; Here we can't use hif-lookup as an empty definition like `#define EMPTY'
- ;; is considered defined but is evaluated as `nil'.
+ ;; is considered defined but is evaluated as nil.
((assq var hide-ifdef-env) 1)
((and (setq def (assq var hif-predefine-alist))
(funcall (cdr def))) 1)
and MATCH is the string matched by the regexp.
This function will either return the color, as a hex RGB string;
-or `nil' if no color could be recognized. When this function
+or nil if no color could be recognized. When this function
returns, point will be at the end of the recognized color."
(cond
((eq (aref match 0) ?#)
(defcustom css-fontify-colors t
"Whether CSS colors should be fontified using the color as the background.
-When non-`nil', a text representing CSS color will be fontified
+When non-nil, a text representing CSS color will be fontified
such that its background is the color itself. E.g., #ff0000 will
be fontified with a red background."
:version "26.1"
;; A separate file, enriched.txt, contains further documentation and other
;; important information about this code. It also serves as an example
;; file in text/enriched format. It should be in the etc directory of your
-;; emacs distribution.
+;; Emacs distribution.
;;; Code:
(custom-add-option 'text-mode-hook 'turn-on-flyspell)
(defvar flyspell-buffers nil
- "For remembering buffers running flyspell")
+ "For remembering buffers running flyspell.")
(make-obsolete-variable 'flyspell-buffers "not used." "28.1")
;;*---------------------------------------------------------------------*/
;;* has to be spell checked. */
;;*---------------------------------------------------------------------*/
(defvar flyspell-pre-buffer nil "Buffer current before `this-command'.")
-(defvar flyspell-pre-point nil "Point before running `this-command'")
-(defvar flyspell-pre-column nil "Column before running `this-command'")
+(defvar flyspell-pre-point nil "Point before running `this-command'.")
+(defvar flyspell-pre-column nil "Column before running `this-command'.")
(defvar flyspell-pre-pre-buffer nil)
(defvar flyspell-pre-pre-point nil)
(make-variable-buffer-local 'flyspell-pre-point) ;Why?? --Stef
;;* flyspell-overlay-p ... */
;;*---------------------------------------------------------------------*/
(defun flyspell-overlay-p (o)
- "Return true if O is an overlay used by flyspell."
+ "Return non-nil if O is an overlay used by flyspell."
(and (overlayp o) (overlay-get o 'flyspell-overlay)))
;;*---------------------------------------------------------------------*/
;; `a': Accept word for this session.
;; `A': Accept word and place in buffer-local dictionary.
;; `r': Replace word with typed-in value. Rechecked.
-;; `R': Replace word with typed-in value. Query-replaced in buffer. Rechecked.
+;; `R': Replace word with typed-in value. Query-replaced in buffer. Rechecked.
;; `?': Show these commands
;; `x': Exit spelling buffer. Move cursor to original point.
;; `X': Exit spelling buffer. Leaves cursor at the current point, and permits
result))
(defmacro ispell-with-safe-default-directory (&rest body)
- "Execute the forms in BODY with a reasonable
-`default-directory'."
+ "Execute the forms in BODY with a reasonable `default-directory'."
(declare (indent 0) (debug t))
`(let ((default-directory default-directory))
(unless (file-accessible-directory-p default-directory)
;; `grep' returns status 1 and no output when word not found, which
;; is a perfectly normal thing.
(if (stringp status)
- (error "error: %s exited with signal %s"
+ (error "Error: %s exited with signal %s"
(file-name-nondirectory prog) status)
;; Else collect words into `results' in FIFO order.
(goto-char (point-max))
;; Can kill the current ispell process
(defun ispell-buffer-local-dict (&optional no-reload)
- "Initializes local dictionary and local personal dictionary.
+ "Initialize local dictionary and local personal dictionary.
If optional NO-RELOAD is non-nil, do not reload any dictionary.
When a dictionary is defined in the buffer (see variable
`ispell-dictionary-keyword'), it will override the local setting
;;; Addresses related variables
(defcustom pages-addresses-file-name "~/addresses"
- "Standard name for file of addresses. Entries separated by page-delimiter.
+ "Standard name for file of addresses. Entries separated by `page-delimiter'.
Used by `pages-directory-for-addresses' function."
:type 'file)
(move-to-column column t))))
(defun picture-yank-rectangle (&optional insertp)
- "Overlay rectangle saved by \\[picture-clear-rectangle]
+ "Overlay rectangle saved by \\[picture-clear-rectangle].
The rectangle is positioned with upper left corner at point, overwriting
existing text. With prefix argument, the rectangle is inserted instead,
shifting existing text. Leaves mark at one corner of rectangle and
(sit-for 0))))
(defun r2b-match (exp)
- "Returns string matched in current buffer."
+ "Return string matched in current buffer."
(buffer-substring (match-beginning exp) (match-end exp)))
(defcustom r2b-out-buf-name "*Out*"
;;; Variables and constants
(defvar reftex-cite-regexp-hist nil
- "The history list of regular expressions used for citations")
+ "The history list of regular expressions used for citations.")
(defconst reftex-citation-prompt
"Select: [n]ext [p]revious [r]estrict [ ]full_entry [q]uit RET [?]Help+more"
- "Prompt and help string for citation selection")
+ "Prompt and help string for citation selection.")
(defconst reftex-citation-help
" n / p Go to next/previous entry (Cursor motion works as well).
;; Some constants and variables
(defconst reftex-index-phrases-comment-regexp "^[ \t]*%.*"
- "Regular expression to match comment lines in phrases buffer")
+ "Regular expression to match comment lines in phrases buffer.")
(defconst reftex-index-phrases-macrodef-regexp
"^\\(>>>INDEX_MACRO_DEFINITION:\\)[ \t]+\\(\\S-\\)\\( *\t[ \t]*\\)\\([^\t]*[^ \t]\\)\\( *\t[ \t]*\\)\\(\\S-+\\)"
"Regular expression to match macro definition lines the phrases buffer.")
(defun reftex-index-phrases-replace-space (pos)
"If there is a space at POS, replace it with a newline char.
-Does not do a save-excursion."
+Does not do a `save-excursion'."
(when (equal (char-after pos) ?\ )
(goto-char pos)
(delete-char 1)
:type 'boolean)
(defcustom reftex-revisit-to-follow nil
- "Non-nil means, follow-mode will revisit files if necessary.
-If nil, follow-mode will be suspended for stuff in unvisited files."
+ "Non-nil means, `follow-mode' will revisit files if necessary.
+If nil, `follow-mode' will be suspended for stuff in unvisited files."
:group 'reftex-table-of-contents-browser
:group 'reftex-referencing-labels
:type 'boolean)
"Non-nil means, echoed information for cite macros is cached.
The information displayed in the echo area for cite macros is
cached and even saved along with the parsing information. The
-cache survives document scans. In order to clear it, use M-x
-reftex-reset-mode <RET>."
+cache survives document scans. In order to clear it, use
+\\[reftex-reset-mode]."
:group 'reftex-viewing-cross-references
:type 'boolean)
;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -*- lexical-binding: t; -*-
+
;; Copyright (C) 1997-2000, 2003-2021 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
(defun reftex-convert-string (string split-re invalid-re dot keep-fp
nwords maxchar invalid abbrev sep
ignore-words &optional downcase)
- "Convert a string (a sentence) to something shorter.
+ "Convert STRING (a sentence) to something shorter.
SPLIT-RE is the regular expression used to split the string into words.
INVALID-RE matches characters which are invalid in the final string.
DOT t means add dots to abbreviated words.
(compilation-start command))
(defsubst sgml-at-indentation-p ()
- "Return true if point is at the first non-whitespace character on the line."
+ "Return t if point is at the first non-whitespace character on the line."
(save-excursion
(skip-chars-backward " \t")
(bolp)))
"</nav>")
(define-skeleton html-html5-template
- "Initial HTML5 template"
+ "Initial HTML5 template."
nil
"<!DOCTYPE html>" \n
"<html lang=\"en\">" \n
;; holders. Amazingly there have been no direct support for WYSIWYG
;; table editing tasks in Emacs. Many people must have experienced
;; manipulating existing overwrite-mode and picture-mode for this task
-;; and only dreamed of having such a lisp package which supports this
+;; and only dreamed of having such a Lisp package which supports this
;; specific task directly. Certainly, I have been one of them. The
;; most difficult part of dealing with table editing in Emacs probably
;; is how to realize localized rectangular editing effect. Emacs has
This is always set to nil at the entry to `table-with-cache-buffer' before
executing body forms.")
(defvar-local table-mode-indicator nil
- "For mode line indicator")
+ "For mode line indicator.")
;; This is not a real minor-mode but placed in the minor-mode-alist
;; so that we can show the indicator on the mode line handy.
(unless (assq table-mode-indicator minor-mode-alist)
By applying `table-release', which does the opposite process, the
contents become once again plain text. `table-release' works as
-companion command to `table-capture' this way.
-"
+companion command to `table-capture' this way."
(interactive
(let ((col-delim-regexp)
(row-delim-regexp))
(defun table--untabify-line (&optional from)
"Untabify current line.
-Unlike save-excursion this guarantees preserving the cursor location
+Unlike `save-excursion' this guarantees preserving the cursor location
even when the point is on a tab character which is to be removed.
Optional FROM narrows the subject operation from this point to the end
of line."
(defun table--insert-rectangle (rectangle)
"Insert text of RECTANGLE with upper left corner at point.
-Same as insert-rectangle except that mark operation is eliminated."
+Same as `insert-rectangle' except that mark operation is eliminated."
(let ((lines rectangle)
(insertcolumn (current-column))
(first t))
collect (cons char (shell-quote-argument file))))
(defun tex-format-cmd (format fspec)
- "Like `format-spec' but adds user-specified args to the command.
+ "Like `format-spec' but add user-specified args to the command.
Only applies the FSPEC to the args part of FORMAT."
(setq fspec (tex--quote-spec fspec))
(if (not (string-match "\\([^ /\\]+\\) " format))
the `makeinfo' program. These files must be written in a very restricted and
modified version of TeX input format.
- Editing commands are like text-mode except that the syntax table is
+ Editing commands are like `text-mode' except that the syntax table is
set up so expression commands skip Texinfo bracket groups. To see
what the Info version of a region of the Texinfo file will look like,
use \\[makeinfo-region], which runs `makeinfo' on the current region.
Here are the functions:
- texinfo-update-node \\[texinfo-update-node]
- texinfo-every-node-update \\[texinfo-every-node-update]
- texinfo-sequential-node-update
+ `texinfo-update-node' \\[texinfo-update-node]
+ `texinfo-every-node-update' \\[texinfo-every-node-update]
+ `texinfo-sequential-node-update'
- texinfo-make-menu \\[texinfo-make-menu]
- texinfo-all-menus-update \\[texinfo-all-menus-update]
- texinfo-master-menu
+ `texinfo-make-menu' \\[texinfo-make-menu]
+ `texinfo-all-menus-update' \\[texinfo-all-menus-update]
+ `texinfo-master-menu'
- texinfo-indent-menu-description (column &optional region-p)
+ `texinfo-indent-menu-description' (column &optional region-p)
The `texinfo-column-for-description' variable specifies the column to
which menu descriptions are indented.
string. The function is called with `default-directory' set to
within the repository.
-If no list entry produces a useful revision, return `nil'."
+If no list entry produces a useful revision, return nil."
:type '(repeat (choice
(const :tag "Active bookmark" builtin-active-bookmark)
(string :tag "Hg template")
(defcustom vc-hg-use-file-version-for-mode-line-version nil
"When enabled, the modeline contains revision information for the visited file.
When not, the revision in the modeline is for the repository
-working copy. `nil' is the much faster setting for
+working copy. nil is the much faster setting for
large repositories."
:type 'boolean
:version "26.1")
(defcustom windmove-display-no-select nil
"Whether the window should be selected after displaying the buffer in it.
-If `nil', then the new window where the buffer is displayed will be selected.
+If nil, then the new window where the buffer is displayed will be selected.
If `ignore', then don't select a window: neither the new nor the old window,
thus allowing the next command to decide what window it selects.
Other non-nil values will reselect the old window that was selected before.
(face-at-point)))))
(ert-deftest perl-backend ()
- "Test the perl backend"
+ "Test the perl backend."
(skip-unless (executable-find "perl"))
(flymake-tests--with-flymake ("test.pl")
(flymake-goto-next-error)
(defvar ruby-mode-hook)
(ert-deftest ruby-backend ()
- "Test the ruby backend"
+ "Test the ruby backend."
(skip-unless (executable-find "ruby"))
;; Some versions of ruby fail if HOME doesn't exist (bug#29187).
(let* ((tempdir (make-temp-file "flymake-tests-ruby" t))
(lambda (_report-fn)
;; HACK: Shoosh log during tests
(setq-local warning-minimum-log-level :emergency)
- (error "crashed"))))
+ (error "Crashed"))))
(insert "Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore et dolore
manha aliqua. Ut enim ad minim veniam, quis nostrud
(should-error (flymake-goto-next-error nil nil t))))))
(ert-deftest recurrent-backend ()
- "Test a backend that calls REPORT-FN multiple times"
+ "Test a backend that calls REPORT-FN multiple times."
(with-temp-buffer
(let (tick)
(cl-letf
(provide 'flymake-tests)
-;;; flymake.el ends here
+;;; flymake-tests.el ends here