;;;###autoload
(defun pcomplete/ack ()
"Completion for the `ack' command.
-Start an argument with '-' to complete short options and '--' for
+Start an argument with `-' to complete short options and `--' for
long options."
;; No space after =
(while t
(defcustom ada-build-check-cmd
(concat "${cross_prefix}gnatmake -u -c -gnatc ${gnatmake_opt} ${full_current} -cargs -I${src_dir} ${comp_opt}")
"Default command to syntax check a single file.
-Overridden by project variable 'check_cmd'."
+Overridden by project variable `check_cmd'."
:type 'string)
(defcustom ada-build-make-cmd
(concat "${cross_prefix}gnatmake -P${gpr_file} -o ${main} ${main} ${gnatmake_opt} "
"-cargs -I${src_dir} ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}")
"Default command to compile the application.
-Overridden by project variable 'make_cmd'."
+Overridden by project variable `make_cmd'."
:type 'string)
;; FIXME: make this more intelligent to work on Windows cmd shell?
;; runtime.
(defcustom ada-build-run-cmd "./${main}"
"Default command to run the application, in a spawned shell.
-Overridden by project variable 'run_cmd'."
+Overridden by project variable `run_cmd'."
:type 'string)
;;;; code
${var} is a project variable or environment variable, $var an
environment variable.
-A prefix may be specified with the format '-<prefix>${var}'; then
+A prefix may be specified with the format `-<prefix>${var}'; then
the value is expanded with the prefix prepended. If the value is
a list, the prefix is prepended to each list element. For
-example, if src_dir contains 'dir_1 dir_2', '-I${src_dir}'
-expands to '-Idir_1 -Idir_2'.
+example, if src_dir contains `dir_1 dir_2', `-I${src_dir}'
+expands to `-Idir_1 -Idir_2'.
As a special case, ${full_current} is replaced by the current
buffer file name including the directory and extension."
(defun ada-build-find-select-prj-file ()
"Search for a project file in the current directory, parse and select it.
The file must have the same basename as the project variable
-'main' or the current buffer if 'main' is nil, and extension from
+`main' or the current buffer if `main' is nil, and extension from
`ada-prj-file-extensions'. Returns non-nil if a file is
selected, nil otherwise."
(let* ((base-file-name (file-name-base
(require 'compile)
(defcustom ada-fix-sort-context-clause t
- "*If non-nil, sort context clause when inserting 'with'"
+ "*If non-nil, sort context clause when inserting `with'"
:type 'boolean
:group 'ada)
)))
(defun ada-fix-add-use-type (type)
- "Insert 'use type' clause for TYPE at start of declarative part for current construct."
+ "Insert `use type' clause for TYPE at start of declarative part for current construct."
(ada-goto-declarative-region-start); leaves point after 'is'
(newline)
(insert "use type " type ";")
(indent-according-to-mode))
(defun ada-fix-add-use (package)
- "Insert 'use' clause for PACKAGE at start of declarative part for current construct."
+ "Insert `use' clause for PACKAGE at start of declarative part for current construct."
(ada-goto-declarative-region-start); leaves point after 'is'
(newline)
(insert "use " package ";")
)
(defun ada-gnat-compile ()
- "Set Ada mode global vars to use 'gnat' for compiling."
+ "Set Ada mode global vars to use `gnat' for compiling."
(add-to-list 'ada-prj-file-ext-extra "gpr")
(add-to-list 'ada-prj-parser-alist '("gpr" . gnat-parse-gpr))
(add-to-list 'ada-select-prj-compiler '(gnat . ada-gnat-compile-select-prj))
(defconst ada-gnat-file-line-col-regexp "\\(.*\\):\\([0-9]+\\):\\([0-9]+\\)")
(defun ada-gnat-xref-other (identifier file line col)
- "For `ada-xref-other-function', using 'gnat find', which is Ada-specific."
+ "For `ada-xref-other-function', using `gnat find', which is Ada-specific."
(when (eq ?\" (aref identifier 0))
;; gnat find wants the quotes on operators, but the column is after the first quote.
result))
(defun ada-gnat-xref-parents (identifier file line col)
- "For `ada-xref-parents-function', using 'gnat find', which is Ada-specific."
+ "For `ada-xref-parents-function', using `gnat find', which is Ada-specific."
(let* ((arg (format "%s:%s:%d:%d" identifier file line col))
(switches (list
(make-variable-buffer-local 'ada-indent-label)
(defcustom ada-indent-record-rel-type 3
- "Indentation for 'record' relative to 'type' or 'use'.
+ "Indentation for `record' relative to `type' or `use'.
An example is:
type A is
(make-variable-buffer-local 'ada-indent-record-rel-type)
(defcustom ada-indent-renames 2
- "Indentation for 'renames' relative to the matching subprogram keyword.
+ "Indentation for `renames' relative to the matching subprogram keyword.
-For 'renames' of non-subprograms the indentation is
+For `renames' of non-subprograms the indentation is
`ada-indent-broken' relative to the line containing the matching
keyword.
(make-variable-buffer-local 'ada-indent-renames)
(defcustom ada-indent-return 0
- "Indentation for 'return' relative to the matching 'function' keyword.
+ "Indentation for `return' relative to the matching `function' keyword.
If the function has parameters, then if `ada-indent-return' is
zero or less the indentation is abs `ada-indent-return' relative
to the open parenthesis; if `ada-indent-return' is one or more,
-indentation is relative to line containing 'function'.
+indentation is relative to line containing `function'.
If the function has no parameters, `ada-indent-broken' is used
-relative to line containing 'function'.
+relative to line containing `function'.
An example is:
function A (B : Integer)
(message "WARNING: setting `ada-indent-use' to obsolete `ada-use-indent'")
ada-use-indent)
ada-indent-broken)
- "Indentation for the lines in a 'use' statement.
+ "Indentation for the lines in a `use' statement.
An example is:
use Ada.Text_IO,
(message "WARNING: setting `ada-indent-when' to obsolete `ada-when-indent'")
ada-when-indent)
3)
- "Indentation for 'when' relative to 'exception', 'case', 'or' in select.
+ "Indentation for `when' relative to `exception', `case', `or' in select.
An example is:
case A is
(message "WARNING: setting `ada-indent-with' to obsolete `ada-with-indent'")
ada-with-indent)
ada-indent-broken)
- "Indentation for the lines in a 'with' context clause.
+ "Indentation for the lines in a `with' context clause.
An example is:
with Ada.Text_IO,
(defcustom ada-case-exception-file nil
"Default list of special casing exceptions dictionaries for identifiers.
-Override with 'casing' project variable.
+Override with `casing' project variable.
New exceptions may be added interactively via `ada-case-create-exception'.
If an exception is defined in multiple files, the first occurence is used.
"See the variable `align-region-separate' for more information.")
(defun ada-align ()
- "If region is active, apply 'align'. If not, attempt to align
+ "If region is active, apply `align'. If not, attempt to align
current construct."
(interactive)
(if (use-region-p)
"Function to scan a region, return a list of subprogram parameter declarations (in inverse declaration order).
Function is called with two args BEGIN END (the region).
Each parameter declaration is represented by a list
-'((identifier ...) aliased-p in-p out-p not-null-p access-p constant-p protected-p type default)."
+((identifier ...) aliased-p in-p out-p not-null-p access-p constant-p protected-p type default)."
;; Summary of Ada syntax for a parameter specification:
;; ... : [aliased] {[in] | out | in out | [null_exclusion] access [constant | protected]} ...
)
(defun ada-case-adjust-keyword ()
"Adjust the case of the previous word as a keyword.
-'word' here is allowed to be underscore-separated (GPR external_as_list)."
+`word' here is allowed to be underscore-separated (GPR external_as_list)."
(save-excursion
(let ((end (point-marker))
(start (progn (skip-syntax-backward "w_") (point))))
- filename containing the identifier (full path)
- line number containing the identifier
- column of the start of the identifier
-Returns a list '(file line column) giving the corresponding location.
-'file' may be absolute, or on `compilation-search-path'. If point is
+Returns a list (FILE LINE COLUMN) giving the corresponding location.
+FILE may be absolute, or on `compilation-search-path'. If point is
at the specification, the corresponding location is the body, and vice
versa.")
- filename containing the identifier
- line number containing the identifier
- column of the start of the identifier
-Returns a list '(file line column) giving the corresponding location.
-'file' may be absolute, or on `compilation-search-path'.")
+Returns a list (FILE LINE COLUMN) giving the corresponding location.
+FILE may be absolute, or on `compilation-search-path'.")
(defun ada-show-overridden (other-window)
"Show the overridden declaration of identifier at point."
;; Supplied by indentation engine
"Function called with no parameters; it should move forward to
the next keyword in the statement following the one point is
-in (ie from 'if' to 'then'). If not in a keyword, move forward to
+in (ie from `if' to `then'). If not in a keyword, move forward to
the next keyword in the current statement. If at the last
keyword, move forward to the first keyword in the next statement
or next keyword in the containing statement.")
;; Supplied by indentation engine
"Function called with no parameters; it should move to the previous
keyword in the statement following the one point is in (ie from
-'then' to 'if'). If at the first keyword, move to the previous
+`then' to `if'). If at the first keyword, move to the previous
keyword in the previous statement or containing statement.")
(defun ada-prev-statement-keyword ()
(defun gnat-get-paths-1 (src-dirs prj-dirs)
"Append list of source and project dirs in current gpr project to SRC-DIRS, PRJ-DIRS.
-Uses 'gnat list'. Returns new (SRC-DIRS PRJ-DIRS)."
+Uses `gnat list'. Returns new (SRC-DIRS PRJ-DIRS)."
(with-current-buffer (gnat-run-buffer)
;; gnat list -v -P can return status 0 or 4; always lists compiler dirs
;;
(defun gpr-query-get-src-dirs (src-dirs)
"Append list of source dirs in current gpr project to SRC-DIRS.
-Uses 'gpr_query'. Returns new list."
+Uses `gpr_query'. Returns new list."
(with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
(gpr-query-session-send "source_dirs" t)
(defun gpr-query-get-prj-dirs (prj-dirs)
"Append list of project dirs in current gpr project to PRJ-DIRS.
-Uses 'gpr_query'. Returns new list."
+Uses `gpr_query'. Returns new list."
(with-current-buffer (gpr-query--session-buffer (gpr-query-cached-session))
(gpr-query-session-send "project_path" t)
Leave this alone to retain defaults.
Default value:
- '(:family \"Terminus\" :foundry \"xos4\"
+ (:family \"Terminus\" :foundry \"xos4\"
:slant normal :weight normal
:height 100 :width normal)")
as follows:
(async-start
- `(lambda ()
- (require 'smtpmail)
+ \\=`(lambda ()
+ (require \\='smtpmail)
(with-temp-buffer
(insert ,(buffer-substring-no-properties (point-min) (point-max)))
;; Pass in the variable environment for smtpmail
- ,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
+ ,(async-inject-variables \"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
(smtpmail-send-it)))
- 'ignore)"
+ \\='ignore)"
`(setq
,@(let (bindings)
(mapatoms
(async-start
(lambda ()
(delete-file \"a remote file on a slow link\" nil))
- 'ignore)
+ \\='ignore)
Note: Even when FINISH-FUNC is present, a future is still
returned except that it yields no value (since the value is
\"-d\" can set a mixer device file (default /dev/mixer), for
example
- (setq aumix-mode-switches '(\"-d\" \"/dev/mixer2\"))"
+ (setq aumix-mode-switches \\='(\"-d\" \"/dev/mixer2\"))"
:type '(repeat string)
:group 'aumix-mode)
returned (usually inactive ones are ignored).
Note that this function returns any overlay. If you want to
-restrict it to auto overlays, include '(identity auto-overlay) in
+restrict it to auto overlays, include (identity auto-overlay) in
PROP-TEST."
(when (null point) (setq point (point)))
overlays are returned (usually inactive ones are ignored).
Note that this function returns any overlay. If you want to
-restrict it to auto overlays, include '(identity auto-overlay) in
+restrict it to auto overlays, include (identity auto-overlay) in
PROP-TEST."
;; make sure prop-test is a list of lists, even if there's only one, and
(defun auto-o-position (item list)
"Find the first occurrence of ITEM in LIST.
Return the index of the matching item, or nil of not found.
-Comparison is done with 'equal."
+Comparison is done with `equal'."
(let (el (i 0))
(catch 'found
(while (setq el (nth i list))
(CLASS @optional :id DEFINITION-ID @rest REGEXP1 REGEXP2 ... )
CLASS is a symbol specifying the auto-overlay class. The standard
-classes are 'word, 'line, 'self, 'flat and 'nested. The :id
+classes are `word', `line', `self', `flat' and `nested'. The :id
property is optional. It should be a symbol that can be used to
uniquely identify DEFINITION (see
`auto-overlay-unload-definition').
symbol) and VALUE is its value.
The properties :edge and :id are optional. The :edge property
-EDGE should be one of the symbols 'start or 'end. If it is not
-specified, :edge is assumed to be 'start. The :id property is a
+EDGE should be one of the symbols `start' or `end'. If it is not
+specified, :edge is assumed to be `start'. The :id property is a
symbol that can be used to uniquely identify REGEXP (see
`auto-overlay-unload-regexp')."
symbol) and VALUE is its value.
The properties :edge and :id are optional. The :edge property
-EDGE should be one of the symbols 'start or 'end. If it is not
-specified, :edge is assumed to be 'start. The :id property is a
+EDGE should be one of the symbols `start' or `end'. If it is not
+specified, :edge is assumed to be `start'. The :id property is a
symbol that can be used to uniquely identify REGEXP (see
`auto-overlay-unload-regexp')."
buffer location specified by the number or marker and make it
unmatched. If START or END are non-nil but neither of the above,
make that edge unmatched. If START or END are null, don't change
-that edge. However, if END is null, and START is an 'end overlay,
+that edge. However, if END is null, and START is an `end' overlay,
match end of OVERLAY rather than start.
If NO-PARSE is non-nil, block re-parsing due to exclusive overlay
changes. If NO-PROPS is non-nil, block updating of overlay's
properties. If PROTECT-MATCH is non-nil, don't modify any match
-overlays associated with OVERLAY (i.e. don't modify their 'parent
+overlays associated with OVERLAY (i.e. don't modify their `parent'
properties)."
(let ((old-start (overlay-start overlay))
"Delete OVERLAY from buffer.
If PROTECT-MATCH is non-nil, don't modify any match overlays
-associated with OVERLAY (i.e. leave their 'parent properties
+associated with OVERLAY (i.e. leave their `parent' properties
alone). If NO-PARSE is non-nil, block re-parsing due to exclusive
overlay changes."
:type 'boolean)
(defcustom avy-word-punc-regexp "[!-/:-@[-`{-~]"
- "Regexp of punctuation chars that count as word starts for `avy-goto-word-1.
+ "Regexp of punctuation chars that count as word starts for `avy-goto-word-1'.
When nil, punctuation chars will not be matched.
-\"[!-/:-@[-`{-~]\" will match all printable punctuation chars."
+\"[!-/:-@[-\\=`{-~]\" will match all printable punctuation chars."
:type 'regexp)
(defcustom avy-ignored-modes '(image-mode doc-view-mode pdf-view-mode)
(avy--remove-leading-chars))
(defun avy--next-visible-point ()
- "Return the next closest point without 'invisible property."
+ "Return the next closest point without `invisible' property."
(let ((s (point)))
(while (and (not (= (point-max) (setq s (next-overlay-change s))))
(get-char-property s 'invisible)))
s))
(defun avy--next-invisible-point ()
- "Return the next closest point with 'invisible property."
+ "Return the next closest point with `invisible' property."
(let ((s (point)))
(while (and (not (= (point-max) (setq s (next-overlay-change s))))
(not (get-char-property s 'invisible))))
(defun avy--read-candidates ()
"Read as many chars as possible and return their occurences.
At least one char must be read, and then repeatedly one next char
-may be read if it is entered before `avy-timeout-seconds'. `DEL'
-deletes the last char entered, and `RET' exits with the currently
+may be read if it is entered before `avy-timeout-seconds'. DEL
+deletes the last char entered, and RET exits with the currently
read string immediately instead of waiting for another char for
`avy-timeout-seconds'.
The format of the result is the same as that of `avy--regex-candidates'.
"Execute FORMS in the background and test ASSERTION.
See `bug-hunter' for a description on the ASSERTION.
-If ASSERTION is 'interactive, the form is run through
+If ASSERTION is `interactive', the form is run through
`bug-hunter--run-form-interactively'. Otherwise, a slightly
modified version of the form combined with ASSERTION is run
through `bug-hunter--run-form'."
form.
The user may decide to not provide input, in which case
-'interactive is returned. Note, this is different from the user
-typing `RET' at an empty prompt, in which case nil is returned."
+`interactive' is returned. Note, this is different from the user
+typing RET at an empty prompt, in which case nil is returned."
(pcase (read-char-choice (if (display-graphic-p)
bug-hunter--hunt-type-prompt
(replace-regexp-in-string "To bisect interactively,.*\n" ""
(defcustom company-elisp-detect-function-context t
"If enabled, offer Lisp functions only in appropriate contexts.
-Functions are offered for completion only after ' and \(."
+Functions are offered for completion only after \\=' and \(."
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
* In a buffer-local value of `company-backends', grouped with a backend or
several that provide actual text completions.
- (add-hook 'js-mode-hook
+ (add-hook \\='js-mode-hook
(lambda ()
- (set (make-local-variable 'company-backends)
- '((company-dabbrev-code company-yasnippet)))))
+ (set (make-local-variable \\='company-backends)
+ \\='((company-dabbrev-code company-yasnippet)))))
* After keyword `:with', grouped with other backends.
- (push '(company-semantic :with company-yasnippet) company-backends)
+ (push \\='(company-semantic :with company-yasnippet) company-backends)
* Not in `company-backends', just bound to a key.
- (global-set-key (kbd \"C-c y\") 'company-yasnippet)
+ (global-set-key (kbd \"C-c y\") \\='company-yasnippet)
"
(interactive (list 'interactive))
(cl-case command
CALLBACK is a function called with the selected result if the user
successfully completes the input.
-Example: \(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
+Example: \(company-begin-with \\='\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
(let ((begin-marker (copy-marker (point) t)))
(company-begin-backend
(lambda (command &optional arg &rest ignored)
"Scope level at which to start coloring.
If top-level variables and functions do not become global, but
-are scoped to a file (as in Node.js), set this to `1'."
+are scoped to a file (as in Node.js), set this to 1."
:type 'integer
:safe #'integerp
:group 'context-coloring)
(defcustom csv-field-quotes '("\"")
"Field quotes: a list of *single-character* strings.
-For example: (\"\\\"\"), the default, or (\"\\\"\" \"'\" \"`\").
+For example: (\"\\\"\"), the default, or (\"\\\"\" \"\\='\" \"\\=`\").
A field can be delimited by a pair of any of these characters.
All must be different from the field separators, `csv-separators'."
:type '(repeat string)
(set-default 'csv-comment-start value)))
(defcustom csv-align-style 'left
- "Aligned field style: one of 'left, 'centre, 'right or 'auto.
+ "Aligned field style: one of `left', `centre', `right' or `auto'.
Alignment style used by `csv-align-fields'.
Auto-alignment means left align text and right align numbers."
:type '(choice (const left) (const centre)
(defun csv-interactive-args (&optional type)
"Get arg or field(s) and region interactively, offering sensible defaults.
Signal an error if the buffer is read-only.
-If TYPE is noarg then return a list `(beg end)'.
-Otherwise, return a list `(arg beg end)', where arg is:
+If TYPE is noarg then return a list (beg end).
+Otherwise, return a list (arg beg end), where arg is:
the raw prefix argument by default\;
a single field index if TYPE is single\;
a list of field indices or index ranges if TYPE is multiple.
(defun cycle-quotes--fix-escapes (beg end escape-char unescape-char)
"Fix character escapes between BEG and END.
-Instances of ESCAPE-CHAR will be escaped by `\', while instances
-where UNESCAPE-CHAR are escaped by `\' will have their escape
+Instances of ESCAPE-CHAR will be escaped by `\\', while instances
+where UNESCAPE-CHAR are escaped by `\\' will have their escape
character removed."
(let ((escape-string (string escape-char))
(unescape-string (string unescape-char)))
proxy, or a Lisp form which returns a string. The format of the
string must comply with the standard D-Bus introspection data
format as described in:
-`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format>'.
+`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format'.
INTERFACE is a name of interface which is represented by this
proxy.
skeleton, or a Lisp form which returns a string. The format of the
string must comply with the standard D-Bus introspection data
format as described in:
-`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format>'.
+`http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format'.
INTERFACE is a name of interface which is represented by this
skeleton.
(defcustom debbugs-gnu-mail-backend 'gnus
"*The email backend to use for reading bug report email exchange.
-If this is 'gnus, the default, use Gnus.
-If this is 'rmail, use Rmail instead."
+If this is `gnus', the default, use Gnus.
+If this is `rmail', use Rmail instead."
:group 'debbugs-gnu
:type '(choice (const :tag "Use Gnus" 'gnus)
(const :tag "Use Rmail" 'rmail))
(defcustom debbugs-cache-expiry (* 60 60)
"How many seconds debbugs query results are cached.
-`t' or 0 disables caching, `nil' disables expiring."
+t or 0 disables caching, nil disables expiring."
:group 'debbugs
:type '(choice (const :tag "Always" t)
(const :tag "Never" nil)
`done': The email address of the worker who has closed the bug (if done).
- `archived': `t' if the bug is archived, `nil' otherwise.
+ `archived': t if the bug is archived, nil otherwise.
`unarchived': The date the bug has been unarchived, if ever.
`body': The message body.
- `attachments' A list of possible attachments, or `nil'. Not
+ `attachments' A list of possible attachments, or nil. Not
implemented yet server side."
(car (soap-invoke debbugs-wsdl debbugs-port "get_bug_log" bug-number)))
Examples:
\(debbugs-search-est
- '\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
- '\(:severity \"normal\" :operator \"STRINC\")
- '\(:date :order \"NUMA\"))
+ \\='\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
+ \\='\(:severity \"normal\" :operator \"STRINC\")
+ \\='\(:date :order \"NUMA\"))
=> \(\(\(msg_num . 21)
\(date . 1229208302)
;; Show all messages from me between 2011-08-01 and 2011-08-31.
\(debbugs-search-est
- '\(:max 20)
- '\(:@author \"me\" :operator \"ISTRINC\")
- `\(:date
+ \\='\(:max 20)
+ \\='\(:@author \"me\" :operator \"ISTRINC\")
+ \\=`\(:date
,\(floor \(float-time \(encode-time 0 0 0 1 8 2011)))
,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
:operator \"NUMBT\"))"
Example: Return the originator of last submitted bug.
\(debbugs-get-attribute
- \(car \(apply #'debbugs-get-status \(debbugs-newest-bugs 1))) 'originator)"
+ \(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1))) \\='originator)"
(cdr (assoc attribute bug-or-message)))
(defun debbugs-get-message-numbers (messages)
of the message. Further elements of the list, if any, are
attachments of the message.
-If there is no message with MESSAGE-NUMBER, the function returns `nil'.
+If there is no message with MESSAGE-NUMBER, the function returns nil.
Example: Return the first message of last submitted bug.
-\(let \(\(messages \(apply #'debbugs-get-bug-log \(debbugs-newest-bugs 1))))
+\(let \(\(messages \(apply #\\='debbugs-get-bug-log \(debbugs-newest-bugs 1))))
\(debbugs-get-message messages
\(car \(debbugs-get-message-numbers messages))))"
(while (and messages
either symbol depends on actual Debbugs server configuration.
For gnu.org, use the former; for debian.org - the latter.
-FILENAME, if non-`nil', is the name of file to store mbox. If
-FILENAME is `nil', the downloaded mbox is inserted into the
+FILENAME, if non-nil, is the name of file to store mbox. If
+FILENAME is nil, the downloaded mbox is inserted into the
current buffer."
(let (url (mt "") bn)
(unless (setq url (plist-get
\(which is not very useful, since an unranked `dictree-complete'
query already does this much more efficiently\).
-CACHE-POLICY should be a symbol ('time, 'length, or 'both), which
-determines which query operations are cached. The 'time setting
+CACHE-POLICY should be a symbol (`time', `length', or `both'), which
+determines which query operations are cached. The `time' setting
caches queries that take longer (in seconds) than the
-corresponding CACHE-THRESHOLD value. The 'length setting caches
+corresponding CACHE-THRESHOLD value. The `length' setting caches
lookups of key sequences that are longer than
LOOKUP-CACHE-THRESHOLD value (since those are likely to be the
slower ones), and caches completions of prefixes that are shorter
than the corresponding CACHE-THRESHOLD (since those are likely to
-be the slower ones in that case). The setting 'both requires both
+be the slower ones in that case). The setting `both' requires both
conditions to be satisfied simultaneously. In this case,
CACHE-THRESHOLD must be a plist with properties :time and :length
specifying the corresponding cache thresholds.
-CACHE-UPDATE-POLICY should be a symbol ('synchronize or 'delete),
+CACHE-UPDATE-POLICY should be a symbol (`synchronize' or `delete'),
which determines how the caches are updated when data is inserted
or deleted. The former updates tainted cache entries, which makes
queries faster but insertion and deletion slower, whereas the
for side-effects only.
FUNCTION will be passed two arguments: a key of type
-TYPE ('string, 'vector, or 'list, defaulting to 'vector) from the
+TYPE (`string', `vector', or `list', defaulting to `vector') from the
dictionary, and the data associated with that key. The dictionary
entries will be traversed in \"lexical\" order, i.e. the order
defined by the dictionary's comparison function (cf.
`dictree-create').
-If TYPE is 'string, it must be possible to apply the function
+If TYPE is `string', it must be possible to apply the function
`string' to the elements of sequences stored in DICT.
FUNCTION is applied in ascending order, or descending order if
FUNCTION should take two arguments: a key sequence from the
dictionary and its associated data.
-Optional argument TYPE (one of the symbols vector, lisp or
-string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+Optional argument TYPE (one of the symbols `vector', `lisp' or
+`string'; defaults to `vector') sets the type of sequence passed to
+FUNCTION. If TYPE is `string', it must be possible to apply the
function `string' to the individual elements of key sequences
stored in DICT.
FUNCTION should take two arguments: a key sequence from the
dictionary and its associated data.
-Optional argument TYPE (one of the symbols vector, lisp or
-string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+Optional argument TYPE (one of the symbols `vector', `lisp' or
+`string'; defaults to `vector') sets the type of sequence passed to
+FUNCTION. If TYPE is `string', it must be possible to apply the
function `string' to the individual elements of key sequences
stored in DICT.
applied, just that the resulting list is in the correct order,
then
- (trie-mapf function 'cons trie type (not reverse))
+ (trie-mapf function \\='cons trie type (not reverse))
is more efficient.
RESULTFUN defines a function used to process results before
adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
value is what gets added to the final result list, instead of the
default key-data cons cell."
;; run completion query
;; Persistent storage
(defun dictree-save (dict &optional compilation)
- "Save dictionary DICT to it's associated file.
+ "Save dictionary DICT to its associated file.
Use `dictree-write' to save to a different file.
Optional argument COMPILATION determines whether to save the
faster. However, only the uncompiled version is portable between
different Emacs versions.
-If optional argument COMPILATION is the symbol 'compiled, only
+If optional argument COMPILATION is the symbol `compiled', only
the compiled version will be created, whereas if it is the symbol
-'uncompiled, only the uncompiled version will be created.
+`uncompiled', only the uncompiled version will be created.
Interactively, DICT and FILENAME are read from the mini-buffer,
and OVERWRITE is the prefix argument."
created. If BUFFER is omitted, the current buffer is used.
TYPE determines the type of sequence to use to represent the
-keys, and should be one of 'string, 'vector or 'list. The default
-is 'vector.
+keys, and should be one of `string', `vector' or `list'. The default
+is `vector'.
Note that if the data does not have a read syntax, the dumped
data can not be used to recreate the dictionary using
`dictree-populate-from-file'.
Interactively, DICT and BUFFER are read from the mini-buffer,
-TYPE is always 'string."
+TYPE is always `string'."
(interactive (list (read-dict "Dictionary: ")
(read-buffer
"Buffer to dump to (defaults to current): "
FILENAME if it already exists, unless OVERWRITE is non-nil.
TYPE determines the type of sequence to use to represent the
-keys, and should be one of 'string, 'vector or 'list. The default
-is 'vector.
+keys, and should be one of `string', `vector' or `list'. The default
+is `vector'.
Note that if the data does not have a read syntax and no , the dumped
data can not be used to recreate the dictionary using
`dictree-populate-from-file'.
Interactively, DICT and FILE are read from the mini-buffer,
-OVERWRITE is the prefix argument, and TYPE is always 'string."
+OVERWRITE is the prefix argument, and TYPE is always `string'."
(interactive (list (read-dict "Dictionary: ")
(read-file-name "File to dump to: " nil "")))
(when (and (called-interactively-p 'any) (symbolp dict))
(define-minor-mode diff-hl-amend-mode
"Show changes against the second-last revision in `diff-hl-mode'.
Most useful with backends that support rewriting local commits,
-and most importantly, 'amending' the most recent one.
+and most importantly, \"amending\" the most recent one.
Currently only supports Git, Mercurial and Bazaar."
:lighter " Amend"
(if diff-hl-amend-mode
(defvar djvu-resolve-url nil
"Flag for resolving internal URLs.
-If 'long replace short page numbers by long FileIDs.
-If 'short replace long FileIDs by short page numbers.
+If `long' replace short page numbers by long FileIDs.
+If `short' replace long FileIDs by short page numbers.
If nil do nothing.")
(defvar djvu-image-size 1024
(defcustom ediprolog-program-switches nil
"List of switches passed to the Prolog process. Example:
-'(\"-G128M\" \"-O\")"
+(\"-G128M\" \"-O\")"
:group 'ediprolog
:type '(repeat string))
(erase-buffer)
(insert str)
(goto-char (point-min))
- ;; remove normal consult status lines, which start with "%"
+ ;; remove normal consult status lines, which start with "%"
(while (re-search-forward "^[\t ]*%.*\n" nil t)
(delete-region (match-beginning 0) (match-end 0))))
(setq str (buffer-string)))
:group 'lisp)
(defcustom el-search-this-expression-identifier 'exp
- "Identifier referring to the current expression in pattern input.
+ "Identifier ID referring to the current expression in pattern input.
When entering a PATTERN in an interactive \"el-search\" command,
-the pattern actually used will be
-
- `(and ,el-search-this-expression-identifier ,pattern)
-
+the pattern actually used will be (and ID PATTERN).
The default value is `exp'."
:type 'symbol)
;;; electric-spacing minor mode
(defcustom electric-spacing-double-space-docs t
- "Enable double spacing of . in document lines - e,g, type '.' => get '. '."
+ "Enable double spacing of . in document lines - e.g., type `.' => get `. '."
:type 'boolean
:group 'electricity)
the mode if ARG is omitted or nil.
This is a local minor mode. When enabled, typing an operator automatically
-inserts surrounding spaces. e.g., `=' becomes ` = ',`+=' becomes ` += '. This
-is very handy for many programming languages."
+inserts surrounding spaces. e.g., `=' becomes ` = ', `+=' becomes ` += '.
+This is very handy for many programming languages."
:global nil
:group 'electricity
:lighter " _+_")
;;
;; (require 'enwc-setup)
;; (enwc-setup)
-;;
+;;
;; to your .emacs file.
(require 'dbus)
(defun enwc-get-current-nw-id ()
"Gets the id of the current network id,
-or `nil' if there isn't one."
+or nil if there isn't one."
(funcall enwc-get-current-nw-id-func enwc-using-wired))
(defun enwc-check-connecting-p ()
(goto-char 0)
(forward-line))
(enwc-scan-internal)))
-
+
(defun enwc-find-network (essid &optional networks)
"Checks through NETWORKS for the network with essid ESSID,
and returns the network identifier. Uses `enwc-last-scan' if
Recurse over all (non-hidden) directories below DIR and parse
interfaces found within them using `f90-parse-interfaces-in-dir',
-a directory is considered hidden if it's name doesn't start with
+a directory is considered hidden if its name doesn't start with
an alphanumeric character."
(interactive "DParse files in tree: ")
(let (dirs
(defun f90-insert-fluidity-refcount (file fname)
"Insert a Fluidity reference count template for FILE.
-If FNAME matches \\\\`Reference_count_.*\\\\.F90 then this file
+If FNAME matches \\\\=`Reference_count_\\([^\\.]+\\)\\.F90 then this file
needs a reference count interface, so insert one."
(when (string-match "\\`Reference_count_\\([^\\.]+\\)\\.F90" fname)
(insert-file-contents-literally
(defvar *test-running-tests* nil)
(defmacro deftest (name parameters &rest body)
"Define a test function. Within a test function we can call
- other test functions or use 'check' to run individual test
+ other test functions or use `check' to run individual test
cases."
`(prog1 ',name
(setf (gethash ',name *test-tests*)
,@body)))))
(defmacro test-check (&rest forms)
- "Run each expression in 'forms' as a test case."
+ "Run each expression in FORMS as a test case."
`(test-combine-results
,@(cl-loop for (expr res) in forms
collect `(test-report-result (equal (condition-case _
',expr ',res))))
(defmacro test-combine-results (&rest forms)
- "Combine the results (as booleans) of evaluating 'forms' in order."
+ "Combine the results (as booleans) of evaluating FORMS in order."
(let ((result (make-symbol "result")))
`(let ((,result t))
,@(cl-loop for f in forms collect `(unless ,f (setf ,result nil)))
,result)))
(defun test-report-result (result res req)
- "Report the results of a single test case. Called by 'check'."
+ "Report the results of a single test case. Called by `check'."
(if result
(insert (format "%s ... %S: %S\n"
(propertize "pass"
((f90-split-arglist "foo, dimension(1, size(a, b))")
("foo" "dimension(1, size(a, b))"))
((f90-parse-names-list "a=1, B=>null()") ("a" "b"))))
-
+
(deftest all ()
(test-combine-results
(test-run-test 'type-modifiers)
(defcustom ggtags-highlight-tag 0.25
"If non-nil time in seconds before highlighting tag at point.
-Set to `nil' to disable tag highlighting."
+Set to nil to disable tag highlighting."
:set (lambda (sym value)
(when (fboundp 'ggtags-setup-highlight-tag-at-point)
(ggtags-setup-highlight-tag-at-point value))
t))
(defun gnome-c-snippet-insert-constructor (package class)
- "Insert 'constructor' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `constructor' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (arglist-start body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-set_property (package class)
- "Insert 'set_property' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `set_property' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (arglist-start body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-get_property (package class)
- "Insert 'get_property' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `get_property' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (arglist-start body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-dispose (package class)
- "Insert 'dispose' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `dispose' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-finalize (package class)
- "Insert 'finalize' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `finalize' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-dispatch_properties_changed (package class)
- "Insert 'dispatch_properties_changed vfunc of GObjectClass for
+ "Insert `dispatch_properties_changed' vfunc of GObjectClass for
PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (arglist-start body-start)
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-notify (package class)
- "Insert 'notify' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `notify' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (arglist-start body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-constructed (package class)
- "Insert 'constructed' vfunc of GObjectClass for PACKAGE and CLASS."
+ "Insert `constructed' vfunc of GObjectClass for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(let (body-start)
(insert "\
(indent-region body-start (point))))
(defun gnome-c-snippet-insert-class-init (package class)
- "Insert '_class_init' function for PACKAGE and CLASS."
+ "Insert `_class_init' function for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(insert "\
static void
"))
(defun gnome-c-snippet-insert-init (package class)
- "Insert '_init' function for PACKAGE and CLASS."
+ "Insert `_init' function for PACKAGE and CLASS."
(interactive (gnome-c-snippet--read-package-and-class nil))
(insert "\
static void
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
-;; Keywords:
+;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;;; Commentary:
-;;
+;;
;;; Code:
recently opened and viewed. The symbol received means gnorb will
collect the most recent messages by Date header.
-In other words, if this variable is set to 'received, and a
+In other words, if this variable is set to `received', and a
record's messages field is already full of recently-received
messages, opening a five-year-old message (for instance) from
this record will not push a link to the message into the field."
(defcustom gnorb-bbdb-message-link-format-one "%:count"
"How a single message is formatted in the list of recent messages.
This format string is used in single-line display -- note that by
-default, no user-created xfields are displayed in the 'one-line
+default, no user-created xfields are displayed in the `one-line'
layout found in `bbdb-layout-alist'. If you want this field to
-appear there, put its name in the \"order\" list of the 'one-line
+appear there, put its name in the \"order\" list of the `one-line'
layout.
Available information for each message includes the subject, the
(defun gnorb-registry-capture ()
"When capturing from a Gnus message, add our new Org heading id
-to the message's registry entry, under the 'gnorb-ids key."
+to the message's registry entry, under the `gnorb-ids' key."
(when (and (with-current-buffer
(org-capture-get :original-buffer)
(memq major-mode '(gnus-summary-mode gnus-article-mode)))
(defun gnorb-delete-association (msg-id org-id)
"Disassociate a message and a headline.
-This removes an Org heading's ORG-ID from the 'gnorb-ids key of
+This removes an Org heading's ORG-ID from the `gnorb-ids' key of
the MSG-ID."
(let ((org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids)))
(when (member org-id org-ids)
deleted-count)))
(defun gnorb-registry-org-id-search (id)
- "Find all messages that have the org ID in their 'gnorb-ids
+ "Find all messages that have the org ID in their `gnorb-ids'
key."
(registry-search gnus-registry-db :member `((gnorb-ids ,id))))
(defun gnorb-registry-tracked-messages ()
- "Return all message-ids that have non-empty 'gnorb-ids keys."
+ "Return all message-ids that have non-empty `gnorb-ids' keys."
(registry-search gnus-registry-db :regex `((gnorb-ids ".+"))))
(defun gnorb-registry-tracked-headings ()
(defun gnorb-scan-links (bound &rest types)
"Scan from point to BOUND looking for links of type in TYPES.
-TYPES is a list of symbols, possible values include 'bbdb, 'mail,
-and 'gnus."
+TYPES is a list of symbols, possible values include `bbdb', `mail',
+and `gnus'."
;; this function could be refactored somewhat -- lots of code
;; repetition. It also should be a little faster for when we're
;; scanning for gnus links only, that's a little slow. We should
:diamond -- the part of the subprocess name after \"gnugo\", may be \"\"
:game-over -- nil until game over at which time its value is set to
- the alist `((live GROUP ...) (dead GROUP ...))'
+ the alist ((live GROUP ...) (dead GROUP ...))
:sgf-collection -- after a `loadsgf' command, entire parse tree of file,
a simple list of one or more gametrees, updated in
Optional arg RSEL controls side effects and return value.
If nil, display the history in the echo area as \"(N moves)\"
followed by the space-separated list of moves. When called
-interactively with a prefix arg (i.e., RSEL is `(4)'), display
+interactively with a prefix arg (i.e., RSEL is (4)), display
similarly, but suffix with the mover (either \":B\" or \":W\").
RSEL may also be a symbol that selects what to return:
car -- the most-recent move
\"t\": `toggle-truncate-lines',
\"f\": `auto-fill-mode',
\"a\": `abbrev-mode',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-toggle/body'.
\"t\": `toggle-truncate-lines',
\"f\": `auto-fill-mode',
\"a\": `abbrev-mode',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-toggle/body'.
\"t\": `toggle-truncate-lines',
\"f\": `auto-fill-mode',
\"a\": `abbrev-mode',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-toggle/body'.
\"t\": `toggle-truncate-lines',
\"f\": `auto-fill-mode',
\"a\": `abbrev-mode',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-toggle/body'.
-Call the head: `nil'."
+Call the head: nil."
(interactive)
(hydra-default-pre)
(hydra-keyboard-quit)
\"t\": `toggle-truncate-lines',
\"f\": `auto-fill-mode',
\"a\": `abbrev-mode',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-toggle/body'."
(interactive)
\"j\": `next-line',
\"k\": `previous-line',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-vi/body'.
\"j\": `next-line',
\"k\": `previous-line',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-vi/body'.
\"j\": `next-line',
\"k\": `previous-line',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-vi/body'.
-Call the head: `nil'."
+Call the head: nil."
(interactive)
(hydra-default-pre)
(set-cursor-color "#e52b50")
\"j\": `next-line',
\"k\": `previous-line',
-\"q\": `nil'
+\"q\": nil
The body can be accessed via `hydra-vi/body'."
(interactive)
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3, or
;; (at your option) any later version.
-;;
+;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
-;;
+;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
:type 'boolean)
(defcustom ioccur-case-fold-search 'smart
- "Add 'smart' option to `case-fold-search'.
+ "Add smart option to `case-fold-search'.
When smart is enabled, Ignore case in the search strings
if pattern contains no uppercase characters.
Otherwise, with a nil or t value, the behavior is same as
`case-fold-search'.
-Default value is smart, other possible values are nil and t."
+Default value is `smart', other possible values are nil and t."
:group 'ioccur
:type 'symbol)
(if all
(add-text-properties
(point) (point-at-eol)
- '(face ioccur-match-face))
+ '(face ioccur-match-face))
(while (and (funcall ioccur-search-function ioccur-pattern nil t)
;; Don't try to highlight line with a length <= 0.
(> (- (match-end 0) (match-beginning 0)) 0))
cur-str
(propertize "|" 'face 'ioccur-cursor))))
(substring str (1+ real-index)))))))
-
+
;; Start incremental loop.
(while (let ((char (ioccur-read-char-or-event
(concat prompt (set-cursor ioccur-pattern index)))))
((right ?\C-z) ; Persistent action.
(ioccur-jump-without-quit) t)
((?\C- ) ; Persistent action save mark.
- (ioccur-jump-without-quit t) t)
+ (ioccur-jump-without-quit t) t)
((left ?\C-j) ; Jump and kill search buffer.
(setq ioccur-exit-and-quit-p t) nil)
((next ?\C-v) ; Scroll down.
tab/S-tab are bound to history.
C-d/u are for following in other buffer.
Use C-t to Scroll up.
-
+
When you quit incremental search with RET, see `ioccur-mode'
for commands provided in the `ioccur-buffer'."
(interactive "P")
(make-overlay (point-at-bol) (1+ (point-at-eol)))))
(overlay-put ioccur-match-overlay 'face 'ioccur-match-overlay-face))
-
+
(provide 'ioccur)
;;; ioccur.el ends here
as long as i_n exists.
-Example: (iterator-scan #'* 1 (iterator-number-range 1))
+Example: (iterator-scan #\\='* 1 (iterator-number-range 1))
returns an iterator of the factorials."
(let ((res init))
(iterator--cons
;;** `counsel-locate'
(defcustom counsel-locate-options nil
- "Command line options for `locate`."
+ "Command line options for `locate'."
:group 'ivy
:type '(repeat string))
Each static source is a function that takes no argument and
returns a list of strings.
-The '(original-source) determines the position of the original
+The (original-source) determines the position of the original
dynamic source.
Extra dynamic sources aren't supported yet.
(cl-subseq recentf-list 0 20))
(ivy-set-sources
- 'counsel-locate
- '((small-recentf)
+ \\='counsel-locate
+ \\='((small-recentf)
(original-source)))
"
(setq ivy--sources-list
"Store the index of the current candidate.")
(defvar ivy-exit nil
- "Store 'done if the completion was successfully selected.
+ "Store `done' if the completion was successfully selected.
Otherwise, store nil.")
(defvar ivy--all-candidates nil
(move-marker (make-marker) (point))))))
(defun ivy-completion-common-length (str)
- "Return the length of the first 'completions-common-part face in STR."
+ "Return the length of the first `completions-common-part' face in STR."
(let ((pos 0)
(len (length str)))
(while (and (<= pos len)
"Specifies how to group classes and how to order resulting
groups in the imports list.
-Each element should be of the form `(CLASSNAME-REGEXP . ORDER)'
-where `CLASSNAME-REGEXP' is a regexp matching the fully qualified
+Each element should be of the form (CLASSNAME-REGEXP . ORDER)
+where CLASSNAME-REGEXP is a regexp matching the fully qualified
class name. Lowest-order groups are placed earlier.
The order of classes which were not matched is defined by
NEW-IMPORTS is a list of additional imports; each element should
be of the form (CLASS . TYPE), where CLASS is a string and TYPE
-is `'ordinary' or `'static'. Interactively, NEW-IMPORTS is nil."
+is `ordinary' or `static'. Interactively, NEW-IMPORTS is nil."
(interactive)
(barf-if-buffer-read-only)
(save-excursion
{rules: {password: {required: function() {}}}}
when NODE is the inner `js2-object-prop-mode',
-it returns `(\"rules\" \"password\")'."
+it returns (\"rules\" \"password\")."
(let (rlt (n node))
(while (setq n (js2-imenu-parent-prop-node n))
(push (js2-prop-node-name (js2-object-prop-node-left n)) rlt))
(defcustom js2-concat-multiline-strings t
"When non-nil, `js2-line-break' in mid-string will make it a
-string concatenation. When `eol', the '+' will be inserted at the
+string concatenation. When `eol', the `+' will be inserted at the
end of the line, otherwise, at the beginning of the next line."
:type '(choice (const t) (const eol) (const nil))
:group 'js2-mode)
:group 'js2-mode)
(defcustom js2-strict-cond-assign-warning t
- "Non-nil to warn about expressions like if (a = b).
-This often should have been '==' instead of '='. If the warning
+ "Non-nil to warn about usage like `if (a = b)'.
+This often should have been `==' instead of `='. If the warning
is enabled, you can suppress it on a per-expression basis by
-parenthesizing the expression, e.g. if ((a = b)) ..."
+parenthesizing the expression, e.g., `if ((a = b)) ...'."
:type 'boolean
:group 'js2-mode)
function <member-expr> ( [ arg-list ] ) { <body> }
-Where member-expr is a non-parenthesized 'member expression', which
+Where member-expr is a non-parenthesized `member expression', which
is anything at the grammar level of a new-expression or lower, meaning
any expression that does not involve infix or unary operators.
current scope, and extern-name which is the name of the value in the
imported or exported scope. By default these are the same, but if the
name is aliased as in {foo as bar}, it would have an extern-name node
-containing 'foo' and a local-name node containing 'bar'."
+containing `foo' and a local-name node containing `bar'."
local-name ; js2-name-node with the variable name in this scope
extern-name) ; js2-name-node with the value name in the exporting module
(js2-visit-ast extern-name v))))
(defun js2-print-extern-binding (n _i)
- "Print a representation of a single extern binding. E.g. 'foo' or
-'foo as bar'."
+ "Print a representation of a single extern binding. E.g. `foo' or
+`foo as bar'."
(let ((local-name (js2-export-binding-node-local-name n))
(extern-name (js2-export-binding-node-extern-name n)))
(insert (js2-name-node-name extern-name))
len
name)))
"AST node for a complete namespace import.
-E.g. the '* as lib' expression in:
+E.g. the `* as lib' expression in:
-import * as lib from 'src/lib'
+import * as lib from \\='src/lib\\='
It contains a single name node referring to the bound name."
name) ; js2-name-node of the bound name.
module-id
metadata-p)))
"AST node for the from clause in an import or export statement.
-E.g. from 'my/module'. It can refere to either an external module, or to the
+E.g. from \\='my/module\\='. It can refere to either an external module, or to the
modules metadata itself."
module-id ; string containing the module specifier.
metadata-p) ; true if this clause refers to the module's metadata
len label target)))
"AST node for a break statement.
The label field is a `js2-name-node', possibly nil, for the named label
-if provided. E.g. in 'break foo', it represents 'foo'. The target field
+if provided. E.g. in `break foo', it represents `foo'. The target field
is the target of the break - a label node or enclosing loop/switch statement.")
(put 'cl-struct-js2-break-node 'js2-visitor 'js2-visit-jump-node)
company..employee.(@id < 100)
-in this case, the @id is a `js2-xml-ref' that is part of an infix '<'
+in this case, the @id is a `js2-xml-ref' that is part of an infix `<'
expression whose parent is a `js2-xml-dot-query-node'."
namespace
at-pos
"AST node for an E4X XML [expr] property-ref expression.
The JavaScript syntax is an optional @, an optional ns::, and a name.
- [ '@' ] [ name '::' ] name
+ [ `@' ] [ name `::' ] name
Examples include name, ns::name, ns::*, *::name, *::*, @attr, @ns::attr,
@ns::*, @*::attr, @*::*, and @*.
"AST node for an E4X XML [expr] member-ref expression.
Syntax:
- [ '@' ] [ name '::' ] '[' expr ']'
+ [ `@' ] [ name `::' ] `[' expr `]'
Examples include ns::[expr], @ns::[expr], @[expr], *::[expr] and @*::[expr].
(pos js2-ts-cursor)
len name value
eq-pos quote-type)))
- "AST node representing a foo='bar' XML attribute value. Not yet used."
+ "AST node representing a foo=\\='bar\\=' XML attribute value. Not yet used."
name ; a `js2-xml-name-node'
value ; a `js2-xml-name-node'
eq-pos ; buffer position of "=" sign
(defun js2-always-defined-boolean-p (node)
"Check if NODE always evaluates to true or false in boolean context.
-Returns 'ALWAYS_TRUE, 'ALWAYS_FALSE, or nil if it's neither always true
+Returns `ALWAYS_TRUE', `ALWAYS_FALSE', or nil if it's neither always true
nor always false."
(let ((tt (js2-node-type node))
num)
(error "Invalid token: %s" code)))))
(defsubst js2-tt-sym (tok)
- "Return symbol for TOK given its code, e.g. 'js2-LP for code 86."
+ "Return symbol for TOK given its code, e.g. `js2-LP' for code 86."
(intern (js2-tt-name tok)))
(defconst js2-token-codes
"Hashtable mapping token type symbols to their bytecodes.")
(defsubst js2-tt-code (sym)
- "Return code for token symbol SYM, e.g. 86 for 'js2-LP."
+ "Return code for token symbol SYM, e.g. 86 for `js2-LP'."
(or (gethash sym js2-token-codes)
(error "Invalid token symbol: %s " sym))) ; signal code bug
(defun js2-read-unicode-escape ()
"Read a \\uNNNN sequence from the input.
-Assumes the ?\ and ?u have already been read.
+Assumes the ?\\ and ?u have already been read.
Returns the unicode character, or nil if it wasn't a valid character.
Doesn't change the values of any scanner variables."
;; I really wish I knew a better way to do this, but I can't
do
(puthash (symbol-name k) 'js2-RESERVED table))
table)
- "JavaScript reserved words by name, mapped to 'js2-RESERVED.")
+ "JavaScript reserved words by name, mapped to `js2-RESERVED'.")
(defun js2-collect-string (buf)
"Convert BUF, a list of chars, to a string.
(defun js2-string-to-keyword (s)
"Return token for S, a string, if S is a keyword or reserved word.
-Returns a symbol such as 'js2-BREAK, or nil if not keyword/reserved."
+Returns a symbol such as `js2-BREAK', or nil if not keyword/reserved."
(or (gethash s js2-keyword-names)
(gethash s js2-reserved-word-names)))
(js2-record-object-literal node qname (js2-node-pos node)))))))))
(defun js2-compute-nested-prop-get (node)
- "If NODE is of form foo.bar, foo['bar'], or any nested combination, return
+ "If NODE is of form foo.bar, foo[\\='bar\\='], or any nested combination, return
component nodes as a list. Otherwise return nil. Element-gets are treated
as property-gets if the index expression is a string, or a positive integer."
(let (left right head)
appends the list's flattened elements to the current element. Also
changes the tails into conses. For instance, this pre-flattened trie
-'(a ((b 20)
+ (a ((b 20)
(c ((d 30)
(e 40)))))
becomes
-'(a (b . 20)
+ (a (b . 20)
(c (d . 30)
(e . 40)))
Note that the root of the trie has no key, just a list of chains.
This is also true for the value of any key with multiple children,
-e.g. key 'c' in the example above."
+e.g. key `c' in the example above."
(cond
((listp (car trie))
(mapcar #'js2-flatten-trie trie))
so the value is not necessarily reliable.
An optional callback CB can be specified to report parsing
-progress. If `(functionp CB)' returns t, it will be called with
+progress. If (functionp CB) returns t, it will be called with
the current line number once before parsing begins, then again
each time the lexer reaches a new line number.
-CB can also be a list of the form `(symbol cb ...)' to specify
+CB can also be a list of the form (symbol cb ...) to specify
multiple callbacks with different criteria. Each symbol is a
criterion keyword, and the following element is the callback to
call
"Parse the bindings in an import statement.
This can take many forms:
-ImportedDefaultBinding -> 'foo'
-NameSpaceImport -> '* as lib'
-NamedImports -> '{foo as bar, bang}'
-ImportedDefaultBinding , NameSpaceImport -> 'foo, * as lib'
-ImportedDefaultBinding , NamedImports -> 'foo, {bar, baz as bif}'
+ImportedDefaultBinding -> `foo'
+NameSpaceImport -> `* as lib'
+NamedImports -> `{foo as bar, bang}'
+ImportedDefaultBinding , NameSpaceImport -> `foo, * as lib'
+ImportedDefaultBinding , NamedImports -> `foo, {bar, baz as bif}'
Try to match namespace imports and named imports first because nothing can
come after them. If it is an imported default binding, then it could have named
clause))
(defun js2-parse-namespace-import ()
- "Parse a namespace import expression such as '* as bar'.
+ "Parse a namespace import expression such as `* as bar'.
The current token must be js2-MUL."
(let ((beg (js2-current-token-beg)))
(if (js2-match-contextual-kwd "as")
(defun js2-parse-from-clause ()
- "Parse the from clause in an import or export statement. E.g. from 'src/lib'"
+ "Parse the from clause in an import or export statement.
+E.g., \"from \\='src/lib\\='\"."
(if (js2-match-contextual-kwd "from")
(let ((beg (js2-current-token-beg)))
(cond
(defun js2-maybe-parse-export-binding (&optional import-p)
"Attempt to parse a binding expression found inside an import/export statement.
-This can take the form of either as single js2-NAME token as in 'foo' or as in a
-rebinding expression 'bar as foo'. If it matches, it will return an instance of
+This can take the form of either as single js2-NAME token as in `foo' or as in a
+rebinding expression `bar as foo'. If it matches, it will return an instance of
js2-export-binding-node and consume all the tokens. If it does not match, it
consumes no tokens."
(let ((extern-name (when (js2-match-prop-name) (js2-current-token-string)))
(defun js2-parse-export ()
"Parse an export statement.
-The Last matched token must be js2-EXPORT. Currently, the 'default' and 'expr'
+The Last matched token must be js2-EXPORT. Currently, the `default' and `expr'
expressions should only be either hoistable expressions (function or generator)
or assignment expressions, but there is no checking to enforce that and so it
will parse without error a small subset of
(defun js2-parse-variables (decl-type pos)
"Parse a comma-separated list of variable declarations.
-Could be a 'var', 'const' or 'let' expression, possibly in a for-loop initializer.
+Could be a `var', `const' or `let' expression, possibly in a for-loop initializer.
DECL-TYPE is a token value: either VAR, CONST, or LET depending on context.
-For 'var' or 'const', the keyword should be the token last scanned.
+For `var' or `const', the keyword should be the token last scanned.
POS is the position where the node should start. It's sometimes the
var/const/let keyword, and other times the beginning of the first token
@* @*::attr @*::*
@[expr] @*::[expr] @ns::[expr]
-Called if we peeked an '@' token."
+Called if we peeked an `@' token."
(let ((tt (js2-get-prop-name-token))
(at-pos (js2-current-token-beg)))
(cond
(defun js2-parse-property-name (at-pos s member-type-flags)
"Check if :: follows name in which case it becomes qualified name.
-AT-POS is a natural number if we just read an '@' token, else nil.
-S is the name or string that was matched: an identifier, 'throw' or '*'.
-MEMBER-TYPE-FLAGS is a bit set tracking whether we're a '.' or '..' child.
+AT-POS is a natural number if we just read an `@' token, else nil.
+S is the name or string that was matched: an identifier, `throw' or `*'.
+MEMBER-TYPE-FLAGS is a bit set tracking whether we're a `.' or `..' child.
-Returns a `js2-xml-ref-node' if it's an attribute access, a child of a '..'
+Returns a `js2-xml-ref-node' if it's an attribute access, a child of a `..'
operator, or the name is followed by ::. For a plain name, returns a
`js2-name-node'. Returns a `js2-error-node' for malformed XML expressions."
(let ((pos (or at-pos (js2-current-token-beg)))
"Parse a legacy array comprehension (JavaScript 1.7).
EXPR is the first expression after the opening left-bracket.
POS is the beginning of the LB token preceding EXPR.
-We should have just parsed the 'for' keyword before calling this function."
+We should have just parsed the `for' keyword before calling this function."
(let ((current-scope js2-current-scope)
loops first filter result)
(unwind-protect
(defun js2-parse-array-comp (pos)
"Parse an ES6 array comprehension.
POS is the beginning of the LB token.
-We should have just parsed the 'for' keyword before calling this function."
+We should have just parsed the `for' keyword before calling this function."
(let ((pn (js2-parse-comprehension pos 'ARRAY)))
(js2-must-match js2-RB "msg.no.bracket.arg" pos)
pn))
result))
(defun js2-parse-comp-loop (pn &optional only-of-p)
- "Parse a 'for [each] (foo [in|of] bar)' expression in an Array comprehension.
+ "Parse a `for [each] (foo [in|of] bar)' expression in an Array comprehension.
The current token should be the initial FOR.
-If ONLY-OF-P is non-nil, only the 'for (foo of bar)' form is allowed."
+If ONLY-OF-P is non-nil, only the `for (foo of bar)' form is allowed."
(let ((pos (js2-comp-loop-node-pos pn))
tt iter obj foreach-p forof-p in-pos each-pos lp rp)
(when (and (not only-of-p) (js2-match-token js2-NAME))
(defun set-jsx-indentation ()
(setq-local sgml-basic-offset js2-basic-offset))
- (add-hook 'js2-jsx-mode-hook #'set-jsx-indentation)"
+ (add-hook \\='js2-jsx-mode-hook #\\='set-jsx-indentation)"
(set (make-local-variable 'indent-line-function) #'js2-jsx-indent-line))
(defun js2-mode-exit ()
(defun js2-search-object-for-prop (object prop-names)
"Return node in OBJECT that matches PROP-NAMES or nil.
PROP-NAMES is a list of values representing a path to a value in OBJECT.
-i.e. ('name' 'value') = {name : { value: 3}}"
+i.e. (\\='name\\=' \\='value\\=') = {name : { value: 3}}"
(let (node
(temp-object object)
(temp t) ;temporay node
React.render(
<div></div>,
- document.querySelector('.root')
+ document.querySelector(\\='.root\\=')
);"
(let ((current-pos (point))
(current-line (line-number-at-pos))
(move-to-column (+ landmark-x-offset (* landmark-square-width (1- x)))))
(defun landmark-plot-square (square value)
- "Draw 'X', 'O' or '.' on SQUARE depending on VALUE, leave point there."
+ "Draw `X', `O' or `.' on SQUARE depending on VALUE, leave point there."
(or (= value 1)
(landmark-goto-square square))
(let ((inhibit-read-only t))
"Call `provide' with the feature's symbol name made from
source-code's file basename sans extension. For example if you
write (provide-me) inside file ~/lisp/foo.el, this is the same as
-writing: (provide 'foo).
+writing: (provide \\='foo).
With a prefix, that prefix is prepended to the `provide' So in
the previous example, if you write (provide-me \"bar-\") this is the
-same as writing (provide 'bar-foo)."
+same as writing (provide \\='bar-foo)."
`(provide (intern (concat ,prefix (file-name-sans-extension
(file-name-nondirectory (__FILE__)))))))
(make-variable-buffer-local 'loc-changes-alist)
(defvar loc-changes-alist '()
"A buffer-local association-list (alist) of line numbers and
-their corresponding markers in the buffer. The 'key' is the line number; the value
+their corresponding markers in the buffer. The key is the line number; the value
the marker"
)
function names in the minimap, given you have font locking
enabled. This variable can have the following values:
-'as-fallback (the default) -- The feature will only be activated
+`as-fallback' (the default) -- The feature will only be activated
if information from CEDET's semantic analyzer isn't available
(see: `minimap-display-semantic-overlays').
-'always -- Always active.
+`always' -- Always active.
nil -- Inactive."
:type '(choice (const :tag "Fallback if CEDET unavailable." 'as-fallback)
(const :tag "Always active." 'always)
the minimap and must be explicitly synced. This variable
specifies which overlay properties should be synced by
`minimap-sync-overlays'. Most importantly, this variable should
-include 'invisible', so that hidden text does not appear in the
+include `invisible', so that hidden text does not appear in the
minimap buffer."
:type '(repeat symbol)
:group 'minimap)
(defcustom minimap-major-modes '(prog-mode)
"Major modes for which a minimap should be created.
-This can also be a parent mode like 'prog-mode.
+This can also be a parent mode like `prog-mode'.
If nil, a minimap must be explicitly created for each buffer."
:type '(repeat symbol)
:group 'minimap)
Initial sort is from most to least recently used:
-- First active shells, flagged with '+' a plus sign
-- Then, inactive shells, flagged with '.' a period
-- Then historical shells that currently have no buffer, flagged with 'x' an ex
+- First active shells, flagged with `+' a plus sign
+- Then, inactive shells, flagged with `.' a period
+- Then historical shells that currently have no buffer, flagged with `x' an ex
\\{multishell-list-mode-map\}"
(setq tabulated-list-format
"Edit your current and historic list of shell buffers.
If optional COMPLETING is nil, we present the full
-`multishell-history' list in a popped buffer named '*Shells*'.
+`multishell-history' list in a popped buffer named `*Shells*'.
In the buffer, hit ? or h for a list of commands.
(defcustom multishell-command-key "\M- "
"The key to use if `multishell-activate-command-key' is true.
-You can instead manually bind `multishell-pop-to-shell` using emacs
-lisp, eg: (global-set-key \"\\M- \" 'multishell-pop-to-shell)."
+You can instead manually bind `multishell-pop-to-shell' using emacs
+lisp, eg: (global-set-key \"\\M- \" \\='multishell-pop-to-shell)."
:type 'key-sequence)
(defvar multishell--responsible-for-command-key nil
(defcustom multishell-activate-command-key nil
"Set this to impose the `multishell-command-key' binding.
-You can instead manually bind `multishell-pop-to-shell` using emacs
-lisp, eg: (global-set-key \"\\M- \" 'multishell-pop-to-shell)."
+You can instead manually bind `multishell-pop-to-shell' using emacs
+lisp, eg: (global-set-key \"\\M- \" \\='multishell-pop-to-shell)."
:type 'boolean
:set 'multishell-activate-command-key-setter)
- With a single universal argument, prompt for the buffer name
to use (without the asterisks that shell mode will put around
- the name), defaulting to 'shell'.
+ the name), defaulting to `shell'.
Completion is available.
The shell buffer name you give to the prompt for a universal arg
can include an appended path. That will be used for the startup
directory. You can use tramp remote syntax to specify a remote
-shell. If there is an element after a final '/', that's used for
+shell. If there is an element after a final `/', that's used for
the buffer name. Otherwise, the host, domain, or path is used.
For example:
-* '#root/sudo:root@localhost:/etc' for a buffer named \"*#root*\" with a
+* `#root/sudo:root@localhost:/etc' for a buffer named \"*#root*\" with a
root shell starting in /etc.
-* '/ssh:example.net:' for a shell buffer in your homedir on example.net.
+* `/ssh:example.net:' for a shell buffer in your homedir on example.net.
The buffer will be named \"*example.net*\".
-* '#ex/ssh:example.net|sudo:root@example.net:/var/log' for a root shell
+* `#ex/ssh:example.net|sudo:root@example.net:/var/log' for a root shell
starting in /var/log on example.net named \"*#ex*\".
-* 'interior/ssh:gateway.corp.com|ssh:interior.corp.com:' to go
+* `interior/ssh:gateway.corp.com|ssh:interior.corp.com:' to go
via gateway.corp.com to your homedir on interior.corp.com. The
buffer will be named \"*interior*\". You could append a sudo
hop to the path, combining the previous example, and so on.
;; Situate:
- (cond
+ (cond
((and (or curr-buff-proc from-buffer-is-shell)
(not arg)
(defun multishell-resolve-target-name-and-path (shell-spec)
"Given name/tramp-style address shell spec, resolve buffer name and directory.
-The name is the part of the string up to the first '/' slash, if
+The name is the part of the string up to the first `/' slash, if
any. Missing pieces are filled in from remote path elements, if
any, and multishell history. Given a tramp-style remote address
and no name part, either the user@host is used for the buffer
are effectively trimmed). If nil, all zero-length substrings are retained,
which correctly parses CSV format, for example.
-Note that the effect of `(split-string STRING)' is the same as
-`(split-string STRING split-string-default-separators t)'). In the rare
+Note that the effect of (split-string STRING) is the same as
+(split-string STRING split-string-default-separators t). In the rare
case that you wish to retain zero-length substrings when splitting on
-whitespace, use `(split-string STRING split-string-default-separators)'.
+whitespace, use (split-string STRING split-string-default-separators).
Modifies the match data; use `save-match-data' if necessary."
(let ((keep-nulls (not (if separators omit-nulls t)))
"Specify whether the heading faces should be auto-generated.
The default is to scale them.
-Choosing 'outline will copy the colors from the outline-mode
+Choosing `outline' will copy the colors from the outline-mode
headings.
If you want to customize each of the headings individually, set
'detect
"iso-8859-1")
"The charset to append to the HTML <meta> tag.
-If set to the symbol 'detect, use `muse-html-encoding-map' to try
+If set to the symbol `detect', use `muse-html-encoding-map' to try
and determine the HTML charset from emacs's coding. If set to a
string, this string will be used to force a particular charset"
:type '(choice string symbol)
"Modes that we allow the <src> tag to colorize.
If t, permit the <src> tag to colorize any mode.
-If a list of mode names, such as '(\"html\" \"latex\"), and the
+If a list of mode names, such as (\"html\" \"latex\"), and the
lang argument to <src> is not in the list, then use fundamental
mode instead."
:type '(choice (const :tag "Any" t)
:group 'press)
(defcustom muse-http-maintainer (concat "webmaster@" (system-name))
- "The maintainer address to use for the HTTP 'From' field."
+ "The maintainer address to use for the HTTP `From' field."
:type 'string
:group 'muse-http)
:type 'number)
(defcustom muse-ipc-ignore-done nil
- "If non-nil, ignore any 'done' messages that we get from clients."
+ "If non-nil, ignore any `done' messages that we get from clients."
:group 'muse-ipc
:type 'boolean)
(defun muse-alter-list-item-indentation (operation)
"Alter the indentation of the current list item.
-Valid values of OPERATION are 'increase and 'decrease."
+Valid values of OPERATION are `increase' and `decrease'."
(let ((pstart (muse-get-paragraph-start))
(list-item (format muse-list-item-regexp
(concat "[" muse-regexp-blank "]*")))
"\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)")
"Regexp used to match the beginning of a list item.
This is used by `muse-list-edit-minor-mode'.
-The '%s' will be replaced with a whitespace regexp when publishing.")
+The `%s' will be replaced with a whitespace regexp when publishing.")
(defun muse-l-e-m-m-insert-list-item ()
"Insert a list item at the current point, taking into account
CONTEXT is used to figure out what kind of specials to escape.
The following contexts exist in Muse.
-'underline _underlined text_
-'literal =monospaced text= or <code> region (monospaced, escaped)
-'emphasis *emphasized text*
-'email email@example.com
-'url http://example.com
-'url-desc [[...][description of an explicit link]]
-'image [[image.png]]
-'example <example> region (monospaced, block context, escaped)
-'verbatim <verbatim> region (escaped)
-'footnote footnote text
-'document normal text"
+`underline' _underlined text_
+`literal' =monospaced text= or <code> region (monospaced, escaped)
+`emphasis' *emphasized text*
+`email' email@example.com
+`url' http://example.com
+`url-desc' [[...][description of an explicit link]]
+`image' [[image.png]]
+`example' <example> region (monospaced, block context, escaped)
+`verbatim' <verbatim> region (escaped)
+`footnote' footnote text
+`document' normal text"
(let ((specials (muse-style-element :specials nil t)))
(cond ((functionp specials)
(setq specials (funcall specials context)))
(defcustom muse-regexp-use-character-classes 'undecided
"Indicate whether to use extended character classes like [:space:].
-If 'undecided, Muse will use them if your emacs is known to support them.
+If `undecided', Muse will use them if your emacs is known to support them.
Emacs 22 and Emacs 21.3.50 are known to support them. XEmacs
does not support them.
"\\|[" muse-regexp-blank "]-[" muse-regexp-blank "]*"
"\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)")
"Regexp used to match the beginning of a list item.
-The '%s' will be replaced with a whitespace regexp when publishing."
+The `%s' will be replaced with a whitespace regexp when publishing."
:type 'regexp
:group 'muse-regexp)
The rating is stripped out in the returned list.
Default sorting is highest-first.
-If TEST if specified, use it to sort the list. The default test is '>."
+If TEST if specified, use it to sort the list. The default test is `>'."
(unless test (setq test '>))
(mapcar (function cdr)
(muse-sort-with-closure
(defun muse-list* (arg &rest rest)
"Return a new list with specified args as elements, cons'd to last arg.
-Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
-`(cons A (cons B (cons C D)))'."
+Thus, (muse-list* A B C D) is equivalent to (nconc (list A B C) D)' or to
+(cons A (cons B (cons C D)))."
(cond ((not rest) arg)
((not (cdr rest)) (cons arg (car rest)))
(t (let* ((n (length rest))
(defun muse-list-item-type (str)
"Determine the type of list given STR.
-Returns either 'ul, 'ol, 'dl-term, 'dl-entry, or nil."
+Returns either `ul', `ol', `dl-term', `dl-entry', or nil."
(save-match-data
(cond ((or (string= str "")
(< (length str) 2))
Each element of this list should have the form (ALIAS . NAMESPACE),
both strings. For example, if you set this variable to
((\"fl\" . \"font-lock\"))
-then expressions like `(font-lock-add-keywords nil kwds)' will
-displayed as `(fl/add-keywords nil kwds)' instead.
+then expressions like (font-lock-add-keywords nil kwds) will be
+displayed as (fl/add-keywords nil kwds) instead.
Furthermore typing `fl' followed by `\\[nameless-insert-name]' will
automatically insert `font-lock-'."
(if (and notes-mode-complete-subjects (not notes-subject-table))
(setq notes-subject-table (make-vector
(- (expt
- 8
+ 8
(length
(format
"%o"
(defun notes-index-goto-date (date &optional direction)
"Goto the DATE in the current line of the index file, modified by DIRECTION.
-If DIRECTION is 'this, go there.
-If DIRECTION is 'next or 'prev, go to the corresponding entry.
+If DIRECTION is `this', go there.
+If DIRECTION is `next' or `prev', go to the corresponding entry.
If the entry doesn't exist, then go to the nearest entry according
-to DIRECTION (and the next one if DIRECTION is 'this)."
+to DIRECTION (and the next one if DIRECTION is `this')."
(cond
((eq direction 'prev)
(notes-index-date-search
(defun notes-index-link (link &optional tag where)
"* Follow a notes-index LINK.
Optionally takes a subject TAG and
-WHERE ('otherwindow or nil) to open the new file."
+WHERE (`otherwindow' or nil) to open the new file."
(interactive "sNotes-index link: ")
(notes-w3-url (notes-file-to-url link tag) where t))
(defun notes-index-follow-link (pt &optional where)
"Follow a link at PT in notes-index-mode.
The link is taken from the location PT,
-and the new information is shown WHERE (either 'otherwindow or not)."
+and the new information is shown WHERE (either `otherwindow' or nil)."
(interactive "d")
(save-excursion
(let (start date tag)
;;; Commentary:
-;;
+;;
;;; Code:
(defun notes-beginning-of-defun ()
- "Go to the beginning of a notes ``section''."
+ "Go to the beginning of a notes “section”."
(interactive)
(let
((old-point (point)))
(re-search-backward notes-beginning-of-defun-regexp nil 'to-limit))))
(defun notes-end-of-defun ()
- "Go to the end of a notes ``section''."
+ "Go to the end of a notes “section”."
(interactive)
(let ((regexp notes-beginning-of-defun-regexp))
(if (looking-at regexp)
;; undoing our work).
(if (eq start-buffer (car end-buffer-and-point))
(goto-char (cdr end-buffer-and-point)))))
-
+
(defun notes-follow-next-link ()
"Go to the next link for this topic."
(if value
(car (cdr value))
key)))
-
+
(defun notes-complete-subject ()
"Complete the notes subject under point."
(interactive)
(let
- ((subject (save-excursion
- (beginning-of-line)
+ ((subject (save-excursion
+ (beginning-of-line)
(notes-extract-subject t)))
old-completion-ignore-case
full-subject)
(t ;; Do our own completion.
(setq full-subject (try-completion subject notes-subject-table)
subject (completing-read "Subject: "
- notes-subject-table nil nil
+ notes-subject-table nil nil
(if (stringp full-subject)
full-subject
subject)))
(goto-char (point-min))
(if (re-search-forward
(concat "^" (regexp-quote subject) ":.* \\([0-9]+\\)$")
- (point-max) t)
+ (point-max) t)
(save-window-excursion
(cond ((and (notes-w3-url
(notes-file-to-url (match-string 1) subject))
(delete-char 6)
(insert this-url)
(setq last-url (notes-current-url))
- (if (and (null pre-modified)
+ (if (and (null pre-modified)
(>= notes-electric-prevnext 2))
(save-buffer))))))))
(if last-url
(save-excursion
(beginning-of-line)
(and (not (eq cur-point (point))) ;; normal return if at b-o-ln
- (notes-extract-subject t))))
+ (notes-extract-subject t))))
(progn (notes-underline-line)
(if notes-electric-prevnext
(notes-fix-prevnext-this-entry)))
If the current date doesn't exist, error in DIRECTION.
Returns nil if on errors (no index; no date in DIRECTION),
otherwise the point of the hit."
- (interactive)
+ (interactive)
(let ((start-buffer (current-buffer))
(subject (notes-extract-subject)) ; get subject if on it
- (date (if (null (buffer-file-name)) nil
+ (date (if (null (buffer-file-name)) nil
(file-name-nondirectory (buffer-file-name)))))
;; Try and get the subject, either forward...
(if (not subject)
- (save-excursion
+ (save-excursion
(notes-beginning-of-defun)
(setq subject (notes-extract-subject))))
;; ...or backwards.
(if (not subject)
- (save-excursion
+ (save-excursion
(notes-end-of-defun)
(setq subject (notes-extract-subject))))
;; Form and jump to the url for the index-entry.
" '"
;; FIXME: Use shell-quote-argument.
(buffer-file-name) "'") 't)))))
-
+
\f
;;;
;;; encryption
;; or mailcrypt 3.4.x or >=3.5.x
;;
-(defvar notes-encryption-library
+(defvar notes-encryption-library
'mailcrypt
; (cond
; ((fboundp 'mc-encrypt-region) 'mailcrypt)
(forward-line 1)))
(setq start (point))
;; sanity check
- (if (re-search-forward "^-----BEGIN PGP MESSAGE"
- (progn
- (save-excursion
- (notes-end-of-defun)
+ (if (re-search-forward "^-----BEGIN PGP MESSAGE"
+ (progn
+ (save-excursion
+ (notes-end-of-defun)
(point))) t)
(error "Note is already encrypted."))
;; find the end
(save-excursion
(if (not (looking-at notes-beginning-of-defun-regexp))
(notes-beginning-of-defun))
- (if (null (re-search-forward "^-----BEGIN PGP"
- (progn
- (save-excursion
- (notes-end-of-defun)
+ (if (null (re-search-forward "^-----BEGIN PGP"
+ (progn
+ (save-excursion
+ (notes-end-of-defun)
(point))) t))
(error "Note is not encrypted."))
(beginning-of-line)
other notes files.
See the file notes-variables.el for all customization options.
-To change options, (require 'notes-variables) in your .emacs
+To change options, (require \\='notes-variables) in your .emacs
and then change things.
Subjects in notes mode are lines beginning with an asterisk
-and underlined with dashes. Subjects can be completed
+and underlined with dashes. Subjects can be completed
with \\[notes-complete-subject] and are automatically underlined.
You may wish to add this code to your .emacs file:
- (add-to-list 'auto-mode-alist
- (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\'\" 'notes-mode))
- (define-key global-map [?\\C-c ?n] 'notes-index-todays-link)
+ (add-to-list \\='auto-mode-alist
+ (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\\\='\" \\='notes-mode))
+ (define-key global-map [?\\C-c ?n] \\='notes-index-todays-link)
to automatically enter notes mode.
I have two suggestions for how to organize your notes files.
(defun notes-w3-url (url &optional where best-effort)
"Open a notes-url. Handle simple URLs here, or call notes-w3-alternate-url.
Takes the URL as an argument. Optionally you specify
-WHERE the information should appear (either 'otherwindow or not,
-defaults to not).
+WHERE the information should appear (either `otherwindow' or nil,
+defaults to nil).
BEST-EFFORT causes notes-w3-url allows the tag portion of the URL to not
match. If there's no tag match, it looks for the nearest matching prefix.
notes-w3-url handles only <file://localhost/...> (or <file:///...>) URLs.
Other URLs it hands off to the routine in notes-w3-alternate-url
for processing. If you use w3-mode, then
- (setq notes-w3-alternate-url 'w3-follow-link)
+ (setq notes-w3-alternate-url \\='w3-follow-link)
will have w3 handle tough URLs."
(if (string-match "\\`[Uu][Rr][Ll]:" url)
(setq url (substring url 4)))
t))))
(defun notes-w3-url-tag-backup (tag)
- "Strip the last ``part'' off of TAG."
+ "Strip the last “part” off of TAG."
(let ((result)
(separators " /\t.:")
(buf (get-buffer-create " *notes-w3-url-tag-backup")))
"Find the TAG in the current buffer according to MODE.
BEST-EFFORT is either t (do prefix matching),
nil find the tag exactly,
-or 'searching (used internally)."
+or `searching' (used internally)."
(cond
((not tag) nil)
((and (string= tag "") (eq best-effort 'searching)) nil)
(if (not best-effort)
(error "Cannot find tag ``%s'' in %s." tag fname))
(notes-w3-url-tag (notes-w3-url-tag-backup tag) 'searching)))))
-
+
(defun notes-w3-pass-through-alternate-url (url &optional where)
"Pass a click event through to the old binding for notes-w3-url.
Try this combination:
- (add-hook 'notes-mode-load-hooks
+ (add-hook \\='notes-mode-load-hooks
(function (lambda ()
(define-key notes-mode-map [mouse-2]
- 'notes-w3-follow-link-mouse)
+ \\='notes-w3-follow-link-mouse)
(setq notes-w3-alternate-url
- 'notes-w3-my-alternate-url))))"
+ \\='notes-w3-my-alternate-url))))"
(let ((event last-input-event))
(funcall (lookup-key
(current-global-map)
;;;###autoload
(defun notes-w3-follow-link (pt &optional where)
"* Follow the URL at the point.
-Takes a PT to look at and a WHERE to open the URL ('otherwindow or nil).
+Takes a PT to look at and a WHERE to open the URL (`otherwindow' or nil).
This code works hard to recognize URLs based on context information.
URLs can be quoted by whitespace, beginning and end of lines,
or the official < and >.
(defvar notes-bold-face 'notes-bold-face
"* Face to use for notes-index-mode and notes-mode subjects.
-The default face is copied from 'bold.")
+The default face is copied from `bold'.")
(defvar notes-font-lock-keywords
'(("^\\* .*$" . notes-bold-face)
(defvar oauth--token-data)
(defun oauth2-authz-bearer-header (token)
- "Return 'Authoriztions: Bearer' header with TOKEN."
+ "Return `Authoriztions: Bearer' header with TOKEN."
(cons "Authorization" (format "Bearer %s" token)))
(defun oauth2-extra-headers (extra-headers)
- "Return EXTRA-HEADERS with 'Authorization: Bearer' added."
+ "Return EXTRA-HEADERS with `Authorization: Bearer' added."
(cons (oauth2-authz-bearer-header (oauth2-token-access-token (car oauth--token-data)))
extra-headers))
#'ofw--preserve-state))
(defun ofw-delete-from-overriding ()
- "Remove ourselves from 'display-buffer-overriding-action' action list, if present."
+ "Remove ourselves from `display-buffer-overriding-action' action list, if present."
(let ((functions (car display-buffer-overriding-action))
(attrs (cdr display-buffer-overriding-action)))
(setq functions (remq #'ofw-display-buffer-other-frame
"Show BUFFER in another window in the current frame,
creating new window if needed and allowed.
If successful, return window; else return nil.
-Intended for 'display-buffer-overriding-action'."
+Intended for `display-buffer-overriding-action'."
;; Reset for next display-buffer call. Normally, this is taken care
;; of by ofw--reset-prefix, but we do it here in case the user does
;; two ofw prefixed commands consecutively.
(defun ofw-display-buffer-other-frame (buffer alist)
"Show BUFFER in another frame, creating a new frame if needed.
If successful, return window; else return nil.
-Intended for 'display-buffer-overriding-action'."
+Intended for `display-buffer-overriding-action'."
;; Reset for next display-buffer call.
(ofw-delete-from-overriding)
(funcall orig-fun buffer norecord force-same-window)))
(defun ofw--suspend-and-restore (orig-func &rest args)
- "Call ORIG-FUNC without any ofw actions on 'display-buffer-overriding-action'."
+ "Call ORIG-FUNC without any ofw actions on `display-buffer-overriding-action'."
(let ((display-buffer-overriding-action display-buffer-overriding-action))
(ofw-delete-from-overriding)
(apply orig-func args)))
-;;; poker.el --- Texas hold'em poker
+;;; poker.el --- Texas hold 'em poker
;; Copyright (C) 2014 Free Software Foundation, Inc.
;;; Commentary:
-;; poker.el provides texas hold'em poker gameplay for Emacs.
+;; poker.el provides Texas hold 'em poker gameplay for Emacs.
;;; Requires:
(cons 'wagered 0)
(cons 'pocket nil)
(cons 'fcr-fn fcr-fn)))
-
+
(defun poker-player-name (player)
"Return the name of poker PLAYER."
(cdr (assq 'name player)))
(poker-player-name (car winners))
(poker-distribute-winnings winners players))
winners))
-
+
;; pre-flop, second round of bets, no raises allowed
((and (null board) (cl-remove-if
(lambda (player)
;;;###autoload
(define-key menu-bar-games-menu
- [poker] '(menu-item "Texas hold'em poker" poker
- :help "Play texas hold'em poker"))
+ [poker] '(menu-item "Texas hold 'em poker" poker
+ :help "Play Texas hold 'em poker"))
;;; Tests:
minor-mode list.
If you'd like to use a list of regexps, simply use something like the following:
- (setq rm-blacklist (mapconcat 'identity list-of-regexps \"\\\\|\"))
+ (setq rm-blacklist (mapconcat \\='identity list-of-regexps \"\\\\|\"))
Don't forget to start each string with a blank space, as most
minor-mode lighters start with a space."
the minor-mode list.
If you'd like to use a list of regexps, simply use something like the following:
- (setq rm-whitelist (mapconcat 'identity list-of-regexps \"\\\\|\"))
+ (setq rm-whitelist (mapconcat \\='identity list-of-regexps \"\\\\|\"))
Don't forget to start each string with a blank space, as most
minor-mode lighters start with a space."
(defcustom scroll-restore-cursor-type 'box
"Type of cursor when original position is off-screen.
Applied if and only if `scroll-restore-handle-cursor' is either
-'type or t.
+`type' or t.
Be careful when another application uses that type. Otherwise,
you might get unexpected results when Scroll Restore mode resets
(defcustom scroll-restore-cursor-color "DarkCyan"
"Background color of cursor when original position is off-screen.
Applied if and only if `scroll-restore-handle-cursor' is either
-'color or t.
+`color' or t.
Observe that when Emacs changes the color of the cursor, the
change applies to all windows on the associated frame.
(defface scroll-restore-region
'((t :inherit region))
- "Face for Scroll Restore region when `scroll-restore-handle-region' is
+ "Face for Scroll Restore region when `scroll-restore-handle-region' is
non-nil.")
;; Note: We can't use `point-before-scroll' for our purposes because
(interactive "r\nP")
(let ((before-input (marker-position (process-mark (inferior-shen-proc))))
result)
-
+
(run-hook-with-args 'shen-pre-eval-hook start end)
(comint-send-region (inferior-shen-proc) start end)
(comint-send-string (inferior-shen-proc) "\n")
(defvar shen-prev-l/c-dir/file nil
"Record last directory and file used in loading or compiling.
-This holds a cons cell of the form `(DIRECTORY . FILE)'
+This holds a cons cell of the form (DIRECTORY . FILE)
describing the last `shen-load-file' or `shen-compile-file' command.")
(defvar shen-source-modes '(shen-mode)
(,(concat "\\_<\\(signature\\)\\s-+\\(" sml-id-re "\\)")
(1 font-lock-keyword-face)
(2 font-lock-interface-def-face))
-
+
(,sml-keywords-regexp . font-lock-keyword-face)
,@(sml-font-lock-symbols-keywords))
"Regexps matching standard SML keywords.")
(defvar sml-use-command "use \"%s\""
"Template for loading a file into the inferior SML process.
-Set to \"use \\\"%s\\\"\" for SML/NJ or Edinburgh ML;
+Set to \"use \\\"%s\\\"\" for SML/NJ or Edinburgh ML;
set to \"PolyML.use \\\"%s\\\"\" for Poly/ML, etc.")
(defvar sml-cd-command "OS.FileSys.chDir \"%s\""
(current-buffer))))
(defun sml-send-function (&optional and-go)
- "Send current paragraph to the inferior SML process.
+ "Send current paragraph to the inferior SML process.
With a prefix argument AND-GO switch to the repl buffer as well."
(interactive "P")
(save-excursion
;; always obvious to spot it).
;;
;; Sample messages:
- ;;
+ ;;
;; Data.sml:31.9-33.33 Error: right-hand-side of clause doesn't agree with function result type [tycon mismatch]
;; expression: Hstring
;; result type: Hstring * int
"Alist of code templates.
You can extend this alist to your heart's content. For each additional
template NAME in the list, declare a keyboard macro or function (or
-interactive command) called 'sml-form-NAME'.
-If 'sml-form-NAME' is a function it takes no arguments and should
+interactive command) called `sml-form-NAME'.
+If `sml-form-NAME' is a function it takes no arguments and should
insert the template at point\; if this is a command it may accept any
sensible interactive call arguments\; keyboard macros can't take
arguments at all.
just move to the proper indentation if the line is blank\; otherwise
insert at point (which forces indentation to current column).
-The default form to insert is 'whatever you inserted last time'
+The default form to insert is whatever you inserted last time
\(just hit return when prompted\)\; otherwise the command reads with
completion from `sml-forms-alist'."
(interactive
;;
;; A large number of abbrevs which expand function
;; initials to their name. A few examples:
-;;
+;;
;; - wcb -> with-current-buffer
;; - i -> insert
;; - r -> require '
;; - a -> and
-;;
+;;
;; However, these are defined in a way such that they ONLY expand in a
;; place where you would use a function, so hitting SPC after "(r"
;; expands to "(require '", but hitting SPC after "(delete-region r"
;; thought-flow" way of writing. The bindings are as follows, I
;; understand these don't fully adhere to conventions, and I'd
;; appreciate suggestions on better bindings.
-;;
+;;
;; - M-RET :: Break line, and insert "()" with point in the middle.
;; - C-RET :: Do `forward-up-list', then do M-RET.
-;;
+;;
;; Hitting RET followed by a `(' was one of the most common key sequences
;; for me while writing elisp, so giving it a quick-to-hit key was a
;; significant improvement.
-;;
+;;
;; - C-c f :: Find function under point. If it is not defined, create a
;; definition for it below the current function and leave point inside.
;; - C-c v :: Same, but for variable.
-;;
+;;
;; With these commands, you just write your code as you think of it. Once
;; you hit a "stop-point" of sorts in your tought flow, you hit `C-c f/v`
;; on any undefined functions/variables, write their definitions, and hit
;; `C-u C-SPC` to go back to the main function.
-;;
+;;
;;; Small Example
;;
;; With the above (assuming you use something like paredit or
;; electric-pair-mode), if you write:
;;
;; ( w t b M-RET i SPC text
-;;
+;;
;; You get
-;;
+;;
;; (with-temp-buffer (insert text))
;;; Code:
(defun sotlisp-define-function-abbrev (name expansion)
"Define a function abbrev expanding NAME to EXPANSION.
This abbrev will only be expanded in places where a function name is
-sensible. Roughly, this is right after a `(' or a `#''.
+sensible. Roughly, this is right after a `(' or a `#\\=''.
If EXPANSION is any string, it doesn't have to be the just the
name of a function. In particular:
- if it contains a `$', this char will not be inserted and
point will be moved to its position after expansion.
- if it contains a space, only a substring of it up to the
-first space is inserted when expanding after a `#'' (this is done
+first space is inserted when expanding after a `#\\='' (this is done
by defining two different abbrevs).
For instance, if one defines
then triggering `expand-abbrev' after \"d\" expands in the
following way:
(d => (delete-char 1
- #'d => #'delete-char"
+ #\\='d => #\\='delete-char"
(define-abbrev emacs-lisp-mode-abbrev-table
name t #'sotlisp--expand-function
;; Don't override user abbrevs
(skip-chars-backward "\r\n[:blank:]")
(setq p (point-marker))
(backward-up-list)))
- ;; Re-comment everything before it.
+ ;; Re-comment everything before it.
(ignore-errors
(comment-region beg p))
;; And everything after it.
If TYPE is nil, the frames of this spinner are given by the first
element of `spinner-types'.
If TYPE is a symbol, it specifies an element of `spinner-types'.
-If TYPE is 'random, use a random element of `spinner-types'.
+If TYPE is `random', use a random element of `spinner-types'.
If TYPE is a list, it should be a list of symbols, and a random
one is chosen as the spinner type.
If TYPE is a vector, it should be a vector of strings and these
If TYPE-OR-OBJECT is an object created with `make-spinner',
simply activate it. This method is designed for minor modes, so
they can use the spinner as part of their lighter by doing:
- '(:eval (spinner-print THE-SPINNER))
+ \\='(:eval (spinner-print THE-SPINNER))
To stop this spinner, call `spinner-stop' on it.
If TYPE-OR-OBJECT is anything else, a buffer-local spinner is
Example:
- (stream-scan #'* 1 (stream-range 1))
+ (stream-scan #\\='* 1 (stream-range 1))
returns a stream of the factorials."
(let ((res init))
(defun svg-clock--create-def-elements (foreground background)
"Return a list of SVG elements using the colors FOREGROUND and BACKGROUND.
-The elements are supposed to be added to an SVG object as 'defs'.
-The SVG may then 'use': 'clock-face, 'second-hand, 'minute-hand
-and 'hour-hand. The clock-face has a size of 1x1."
+The elements are supposed to be added to an SVG object as `defs'.
+The SVG may then `use': `clock-face', `second-hand', `minute-hand'
+and `hour-hand'. The clock-face has a size of 1x1."
(list (svg-clock-symbol 'tickshort
(svg-clock-line .5 .02 .5 .04
`(stroke . ,foreground)
(defconst timerfunctions-introduction
- "timerfunctions.el contains some 'enhanced' versions of a few timer.el
+ "timerfunctions.el contains some “enhanced” versions of a few timer.el
functions. It is also used by vel.el, idledo.el etc.
Suppose you want Emacs to run an action every REDOSECS for
Provides ability to inhibit timeout during parts of the body.
Note that most of the time, you may not need this functionality
-at all unless you want to be very 'clean' about things---you
+at all unless you want to be very “clean” about things---you
could get by with the regular with-timeout and not using
sit-for's in the body. Or with the regular with-timeout and
using unwind-protect.
During the execution of the body, we SHALL NOT time out when INHIBITP
evals to non-nil. Thus, for example, you might initially setq a
-variable my-var as nil, supply inhibitp as 'my-var, and then you may
+variable my-var as nil, supply inhibitp as `my-var', and then you may
setq my-var to t or nil within the body of tf-with-timeout to enable
or disable timeout. The best use of this functionality is to setq
inhibitp to t when during parts of loops where you do not want the
(let ((myinhibit t))
- (tf-with-timeout 'myinhibit 'mytag 'mytimedoutvar
+ (tf-with-timeout \\='myinhibit \\='mytag \\='mytimedoutvar
(2 2)
(setq a nil)
(setq b nil)
wastes precious cpu time. Simple, don't include it, just after a long
inhibited body, you can include a timeout check within the body
instead of (sleep-for 0.02):
- (tf-with-timeout-check 'mytag 'mytimedoutvar 'myinhibitp)
+ (tf-with-timeout-check \\='mytag \\='mytimedoutvar \\='myinhibitp)
Moreover, if that is the main check you rely on, you it perhaps makes
sense to increase the value of tf-with-timeout-repeat-sec, so that
(require 'tiny nil t)
(defun with-text-value (txt fn &rest args)
- "Return the result of (apply 'FN ARGS), in a temp buffer with TXT,
+ "Return the result of (apply FN ARGS), in a temp buffer with TXT,
with point at the end of TXT."
(with-temp-buffer
(insert txt)
* END - integer (required)
* EXPR - Lisp expression: function body with argument x (defaults to x)
Parens are optional if it's unambiguous:
- - `(* 2 (+ x 3))' <-> *2+x3
- - `(exp x)' <-> expx
+ - `(* 2 (+ x 3))' <-> *2+x3
+ - `(exp x)' <-> expx
A closing paren may be added to resolve ambiguity:
- - `(* 2 (+ x 3) x) <-> *2+x3)
+ - `(* 2 (+ x 3) x)' <-> *2+x3)
* FORMAT - string, `format'-style (defaults to \"%s\")
| separator can be omitted if FORMAT starts with %.
the remote host \"bar\", and it inverses the fringe face for
frames using the remote user \"root\":
- '((nil \"^root$\" (fringe (:inherit fringe :inverse-video t)))
+ ((nil \"^root$\" (fringe (:inherit fringe :inverse-video t)))
(\"^foo$\" nil (default (:background \"Red\")))
(\"^bar$\" nil (default (:background \"Green\"))))
;; REQUIRES:
;; -----------------------------
-;; This module works without any requires, but in order to use the audio
-;; functions, you need to install the Emacs package "emms", by Joe Drew,
+;; This module works without any requires, but in order to use the audio
+;; functions, you need to install the Emacs package "emms", by Joe Drew,
;; and the external program "mpg321", by Jorgen Schafer and Ulrik Jensen,
;; both under GPL licenses.
;;
;; -------------------------
;; Transcribe is a tool to make audio transcriptions for discourse analysis
;; in the classroom.
-;; It allows the transcriber to control the audio easily while typing, as well as
-;; automate the insertion of xml tags, in case the transcription protocol
+;; It allows the transcriber to control the audio easily while typing, as well as
+;; automate the insertion of xml tags, in case the transcription protocol
;; include them.
-;; The analysis functions will search for a specific structure
-;; of episodes that can be automatically added with the macro NewEpisode.
-;; The function expects the speech acts to be transcribed inside a turn xml
+;; The analysis functions will search for a specific structure
+;; of episodes that can be automatically added with the macro NewEpisode.
+;; The function expects the speech acts to be transcribed inside a turn xml
;; tag with the identifier of the speaker with optional move attribute.
-;; Each speech act is spected inside a <l1> or <l2> tag, depending
-;; on the language used by the person. The attributes expected are the
-;; number of clauses that form the utterance, the number of errors the
+;; Each speech act is spected inside a <l1> or <l2> tag, depending
+;; on the language used by the person. The attributes expected are the
+;; number of clauses that form the utterance, the number of errors the
;; transcriber observes, and the function of the speech act. The parser will
;; work even if some attributes are missing.
-;;
-;;
+;;
+;;
;; AUDIO COMMANDS
;; ------------------------------
-;; C-x C-p ------> Play audio file. You will be prompted for the name
+;; C-x C-p ------> Play audio file. You will be prompted for the name
;; of the file. The recommended format is mp2.
;; <f5> ---------> Pause or play audio.
;; C-x <right> --> seek audio 10 seconds forward.
;; C-x <left> --->seek audio 10 seconds backward.
-;; <f8> ---------> seek interactively: positive seconds go forward and
+;; <f8> ---------> seek interactively: positive seconds go forward and
;; negative seconds go backward
;;
;; XML TAGGING COMMANDS
;; --------------------------------------------------
-;; C-x C-n ------> Create new episode structure. This is useful in case your
+;; C-x C-n ------> Create new episode structure. This is useful in case your
;; xml file structure requires it.
-;; <f2> ---------> Interactively insert a function attribute in a speech act
+;; <f2> ---------> Interactively insert a function attribute in a speech act
;; (l1 or l2) tag.
;; <f3> ---------> Interactively insert a move attribute in a turn (person) tag
;; <f4> ---------> Interactively insert an attribute (any kind)
;; (append transcribe-attribute-list transcribe-function-list transcribe-move-list)
(defun transcribe-analyze-episode (episode person)
- "This calls the external python package analyze_episodes2.py. The new
+ "This calls the external python package analyze_episodes2.py. The new
function transcribe-analyze implements its role now."
(interactive "sepisode: \nsperson:")
- (shell-command (concat (expand-file-name "analyze_episodes2.py")
+ (shell-command (concat (expand-file-name "analyze_episodes2.py")
" -e " episode " -p " person " -i " buffer-file-name )))
(defun transcribe-raw-to-buffer ()
"EXPERIMENTAL - Convert the xml tagged transcription to raw transcription, with the names
and the persons and the utterances only. The raw transcription will be send to buffer called
- 'Raw Output'"
+ `Raw Output'."
(interactive)
(let* ((xml (xml-parse-region (point-min) (point-max)))
(results (car xml))
(episodes (xml-get-children results 'episode)))
-
+
(dolist (episode episodes)
(let* ((transcription (xml-get-children episode 'transcription)))
-
+
(dolist (turn transcription)
(dolist (intervention (xml-node-children turn))
(if (listp intervention)
- (progn
+ (progn
(with-current-buffer "Raw Output"
(insert (format "%s\t" (line-number-at-pos)))
(insert (format "%s:\t" (car intervention)))
(insert (format "%s " (nth 2 utterance))))
(insert (format "%s" utterance))))))
-
+
(with-current-buffer "Raw Output"
(insert (format "%s" (line-number-at-pos)))
(insert (format "%s" intervention))))))))))
(defun transcribe-analyze (episodenumber personid)
- "Extract from a given episode and person the number of asunits per
+ "Extract from a given episode and person the number of asunits per
second produced, and the number of clauses per asunits, for L2 and L1.
It writes two output files, one for L2 utterances and one for L1
utterances, so that they can be used with external programs. Output will
- be inserted in 'Statistics Output' buffer"
+ be inserted in `Statistics Output' buffer."
(interactive "sepisodenumber: \nspersonid:")
(let* ((interventionsl2 '())
(interventionsl1 '())
(demand nil)
;; (clausesmessage nil)
(number nil))
-
+
(dolist (episode episodes)
(let*((numbernode (xml-get-children episode 'number))
(tasknode (xml-get-children episode 'task)))
-
+
(setq number (nth 2 (car numbernode)))
(when (equal episodenumber number)
(let* ((durationnode (xml-get-children episode 'duration))
(transcription (xml-get-children episode 'transcription)))
-
+
(setq duration (nth 2 (car durationnode)))
-
+
(dolist (task tasknode)
(let* ((rolenode (xml-get-children task 'role))
(contextnode (xml-get-children task 'context))
))
(dolist (turn transcription)
- (let* ((interventionnode (xml-get-children turn
+ (let* ((interventionnode (xml-get-children turn
(intern personid))))
-
+
(dolist (intervention interventionnode)
(let* ((l2node (xml-get-children intervention 'l2))
(l1node (xml-get-children intervention 'l1)))
-
+
(dolist (l2turn l2node)
(let* ((l2 (nth 2 l2turn))
(attrs (nth 1 l2turn))
(clausesl2nodeinc (cdr (assq 'clauses attrs)))
(errorsl2inc (cdr (assq 'errors attrs)))
(function (cdr (assq 'function attrs))))
-
+
(when (string-equal function "initiating")
(setq initiating (+ initiating 1)))
(when (string-equal function "responding")
(when (string-equal function "interpersonal")
(setq interpersonal (+ interpersonal 1)))
(when attrs
- (setq clausesl2 (+ clausesl2 (string-to-number
+ (setq clausesl2 (+ clausesl2 (string-to-number
clausesl2nodeinc)))
(setq errorsl2 (+ errorsl2 (string-to-number
errorsl2inc))))
- (when l2
+ (when l2
;; (add-to-list 'interventionsl2 l2)
- (cl-pushnew l2 interventionsl2 :test #'equal)
+ (cl-pushnew l2 interventionsl2 :test #'equal)
(setq asunitsl2 (1+ asunitsl2)))))
(dolist (l1turn l1node)
(let*((l1 (nth 2 l1turn))
(clausesl1node (nth 1 l1turn))
(clausesl1nodeinc (cdr (car clausesl1node))))
-
+
(when (not (equal clausesl1node nil))
- (setq clausesl1 (+ clausesl1 (string-to-number
+ (setq clausesl1 (+ clausesl1 (string-to-number
clausesl1nodeinc))))
- (when l1
+ (when l1
;; (add-to-list 'interventionsl1 l1)
- (cl-pushnew l1 interventionsl1 :test #'equal)
+ (cl-pushnew l1 interventionsl1 :test #'equal)
(setq asunitsl1 (1+ asunitsl1)))))))))))))
(reverse interventionsl2)
;; (write-region (format "%s" interventionsl2) nil (format "transcribe-output-%s-%s-l2.txt" episodenumber personid))
(controlperasunitl2 (/ control asunitsl2))
(expressiveperasunitl2 (/ expressive asunitsl2))
(interpersonalperasunitl2 (/ interpersonal asunitsl2)))
-
+
;; (princ clausesmessage)
(princ (format "episode: %s, duration: %s, person: %s\n" episodenumber duration personid))
- (with-current-buffer "Statistics Output"
+ (with-current-buffer "Statistics Output"
(insert (format "%s,%s,%s,0,0,%s,%s,%s,%s,%s,QUAN-L2,segmented,aux,level,subject,yearofclil,month\n" personid episodenumber duration role context demand asunitspersecondl2 asunitspersecondl1)))
- (princ (format "L2(Asunits/second): %s, L2(clauses/Asunit): %s, L2(errors/Asunit):%s, L1(Asunits/second): %s\n"
+ (princ (format "L2(Asunits/second): %s, L2(clauses/Asunit): %s, L2(errors/Asunit):%s, L1(Asunits/second): %s\n"
asunitspersecondl2 clausesperasunitl2 errorsperasunitl2 asunitspersecondl1))
(princ (format "Functions/unit: Initiating: %s, Responding: %s, Control: %s, Expressive: %s, Interpersonal: %s" initiatingperasunitl2 respondingperasunitl2 controlperasunitl2 expressiveperasunitl2 interpersonalperasunitl2)))))
(defun transcribe-analyze-all ()
- "Analyze all file and output to 'Statistics Output' buffer. The buffer will
+ "Analyze all file and output to `Statistics Output' buffer. The buffer will
lost all previous data. The data in the buffer can be saved to a file and be
- passed to 'R' for statistical analysis."
+ passed to R for statistical analysis."
(interactive)
(let* ((xml (xml-parse-region (point-min) (point-max)))
(results (car xml))
(episodes (xml-get-children results 'episode)))
-
+
(with-current-buffer "Statistics Output"
(erase-buffer)
(insert "person,episode,duration,C-UNITS(L2),C-UNITS(L1),role,context,demand,QUAN-L2,QUAN-L1,QUAL-L2,segmented,aux,level,subjects,yearofCLIL,month\n"))
(number (nth 2 (car numbernode)))
(participantsstring (nth 2 (car participantsnode)))
(participants (split-string participantsstring)))
-
- (dolist (participant participants)
+
+ (dolist (participant participants)
(transcribe-analyze number participant))))))
(defun transcribe-add-attribute (att val)
"Adds a xml attribute at cursor with the name and value specified (autocompletion possible)"
- (interactive (list(completing-read "attibute name:" transcribe-attribute-list)(read-string "value:")))
+ (interactive (list(completing-read "attibute name:" transcribe-attribute-list)(read-string "value:")))
(insert (format "%s=\"%s\"" att val)))
(defun transcribe-add-attribute-function (val)
- "Adds the xml attribute 'function' at cursor with the name specified (autocompletion possible)"
- (interactive (list(completing-read "function name:" transcribe-function-list)))
+ "Adds the xml attribute `function' at cursor with the name specified (autocompletion possible)"
+ (interactive (list(completing-read "function name:" transcribe-function-list)))
(insert (format "function=\"%s\"" val)))
(defun transcribe-add-attribute-move (val)
- "Adds the xml attribute 'move' at cursor with the name specified (autocompletion possible"
- (interactive (list(completing-read "move name:" transcribe-move-list)))
+ "Adds the xml attribute `move' at cursor with the name specified (autocompletion possible"
+ (interactive (list(completing-read "move name:" transcribe-move-list)))
(insert (format "move=\"%s\"" val)))
(defun transcribe-xml-tag-l1 ()
(defun trie--position (item list)
"Find the first occurrence of ITEM in LIST.
Return the index of the matching item, or nil of not found.
-Comparison is done with 'equal."
+Comparison is done with `equal'."
(let ((i 0))
(catch 'found
(while (progn
Optional argument TYPE (one of the symbols vector, lisp or
string; defaults to vector) sets the type of sequence passed to
-FUNCTION. If TYPE is 'string, it must be possible to apply the
+FUNCTION. If TYPE is `string', it must be possible to apply the
function `string' to the individual elements of key sequences
stored in TRIE.
applied, just that the resulting list is in the correct order,
then
- (trie-mapf function 'cons trie type (not reverse))
+ (trie-mapf function \\='cons trie type (not reverse))
is more efficient.
RESULTFUN defines a function used to process results before
adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
value is what gets added to the final result list, instead of the
default key-data cons cell."
RESULTFUN defines a function used to process results before
adding them to the final result list. If specified, it should
-accept two arguments: a key and its associated data. It's return
+accept two arguments: a key and its associated data. Its return
value is what gets added to the final result list, instead of the
default key-data cons cell."
`url-get-authentication'. Their meaning depends on the current
implementation - this function is well and truly coupled.
-url-get-authentication' calls `url-ntlm-auth' once when checking
+`url-get-authentication' calls `url-ntlm-auth' once when checking
what authentication schemes are supported (PROMPT and ARGS are
nil), and then twice for every stage of the handshake: the first
time PROMPT is nil, the second, t; ARGS contains the server
The default values for the regular expressions are
- \\=\\<'* (regexp-start)
+ \\=\\<\\='* (regexp-start)
\\w+? (regexp-body)
- '*\\=\\> (regexp-end)
+ \\='*\\=\\> (regexp-end)
Effectively they match a series of word characters defined in
- the effective syntax table. Single quotes (') at the start
+ the effective syntax table. Single quotes (\\=') at the start
and end of a word are excluded. This is probably a good thing
when using `wcheck-mode' as a spelling checker.
to define exceptions to the `regexp-body' match. The default
value is
- \\`'+\\'
+ \\\\=`\\='+\\\\='
which discards the body string if it consists only of single
quotes. This was chosen as the default because the default
(connection . nil)
(face . wcheck-default-face)
(syntax . text-mode-syntax-table)
- (regexp-start . \"\\\\=\\<'*\")
+ (regexp-start . \"\\\\=\\<\\='*\")
(regexp-body . \"\\\\w+?\")
- (regexp-end . \"'*\\\\=\\>\")
- (regexp-discard . \"\\\\`'+\\\\'\")
+ (regexp-end . \"\\='*\\\\=\\>\")
+ (regexp-discard . \"\\\\\\=`\\='+\\\\\\='\")
(case-fold . nil)
(read-or-skip-faces
((emacs-lisp-mode c-mode) read
function.
(ws-start
- '(((lambda (_) t) .
+ \\='(((lambda (_) t) .
(lambda (proc request)
- (ws-response-header proc 200 '(\"Content-type\" . \"text/plain\"))
+ (ws-response-header proc 200 \\='(\"Content-type\" . \"text/plain\"))
(process-send-string proc \"hello world\")
t)))
8080)
be encoded appropriately including sending the appropriate data
upon the end of transmission for chunked transfer encoding.
-For example with the header `(\"Content-Encoding\" . \"gzip\")',
+For example with the header (\"Content-Encoding\" . \"gzip\"),
any data subsequently written to PROC using `ws-send' will be
compressed using the command specified in `ws-gzip-cmd'."
;; update process to reflect any Content or Transfer encodings
A websocket struct is created with `websocket-open'.
-`ready-state' contains one of 'connecting, 'open, or
-'closed, depending on the state of the websocket.
+`ready-state' contains one of `connecting', `open', or
+`closed', depending on the state of the websocket.
The W3C API \"bufferedAmount\" call is not currently implemented,
since there is no elisp API to get the buffered amount from the
which is the list of parameter strings to use for that extension.
The parameter strings are of the form \"key=value\" or \"value\".
EXTENSIONS can be NIL if none are in use. An example value would
-be '(\"deflate-stream\" . (\"mux\" \"max-channels=4\")).
+be (\"deflate-stream\" . (\"mux\" \"max-channels=4\")).
Cookies that are set via `url-cookie-store' will be used during
communication with the server, and cookies received from the
rethrow the error, or else you may miss some websocket messages.
You similarly must not generate any other errors in this method.
If you want to debug errors, set
-`websocket-callback-debug-on-error' to `t', but this also can be
+`websocket-callback-debug-on-error' to t, but this also can be
dangerous is the debugger is quit out of. If not specified,
`websocket-default-error-handler' is used.
;;
;;; Commentary:
-;;
+;;
;;;; History: first experimental version Jan 2013
;;
ACTIONS is an array indexed by parser state, of alists indexed by
terminal tokens. The value of each item in the alists is one of:
-'error
+`error'
-'accept
+`accept'
integer - shift; gives new state
-'(nonterm . index) - reduce by nonterm production index.
+(nonterm . index) - reduce by nonterm production index.
-'(integer (nonterm . index)) - a shift/reduce conflict
-'((nonterm . index) (nonterm . index)) - a reduce/reduce conflict
+(integer (nonterm . index)) - a shift/reduce conflict
+((nonterm . index) (nonterm . index)) - a reduce/reduce conflict
-The first item in the alist must have the key 'default (not a
+The first item in the alist must have the key `default' (not a
terminal token); it is used when no other item matches the
current token.
(defun wisi-parsers-active (parser-states active-count)
"Return the type of parser cycle to execute.
PARSER-STATES[*].active is the last action a parser took. If it
-was 'shift, that parser used the input token, and should not be
+was `shift', that parser used the input token, and should not be
executed again until another input token is available, after all
parsers have shifted the current token or terminated.
Returns one of:
-'accept : all PARSER-STATES have active set to nil or 'accept -
+`accept' : all PARSER-STATES have active set to nil or `accept' -
done parsing
-'shift : all PARSER-STATES have active set to nil, 'accept, or
-'shift - get a new token, execute 'shift parsers.
+`shift' : all PARSER-STATES have active set to nil, `accept', or
+`shift' - get a new token, execute `shift' parsers.
-'reduce : some PARSER-STATES have active set to 'reduce - no new
-token, execute 'reduce parsers."
+`reduce' : some PARSER-STATES have active set to `reduce' - no new
+token, execute `reduce' parsers."
(let ((result nil)
(i 0)
(shift-count 0)
(defun wisi-parse-elim-identical (parser-states active-parser-count)
"Check for parsers in PARSER-STATES that have reached identical states eliminate one.
Return new ACTIVE-PARSER-COUNT. Assumes all parsers have active
-nil, 'shift, or 'accept."
+nil, `shift', or `accept'."
;; parser-states passed by reference; active-parser-count by copy
;; see test/ada_mode-slices.adb for example
(dotimes (parser-i (1- (length parser-states)))
(defvar-local wisi-string-quote-escape-doubled nil
"Non-nil if a string delimiter is escaped by doubling it (as in Ada).")
(defvar-local wisi-string-quote-escape nil
- "Cons '(delim . character) where 'character' escapes quotes in strings delimited by 'delim'.")
+ "Cons (delim . character) where `character' escapes quotes in strings delimited by `delim'.")
(defvar-local wisi-string-single-term nil) ;; string delimited by single quotes
(defvar-local wisi-symbol-term nil)
(defvar-local wisi-number-term nil)
CLASS ...] where TOKEN-NUMBER is the (1 indexed) token number in
the production, CLASS is the wisi class of that token. Use in a
grammar action as:
- (wisi-statement-action [1 'statement-start 7 'statement-end])"
+ (wisi-statement-action [1 \\='statement-start 7 \\='statement-end])"
(save-excursion
(let ((first-item t)
first-keyword-mark
- To signal that the user quit the prompting process, you can
signal `quit' with
- (signal 'quit \"user quit!\")."
+ (signal \\='quit \"user quit!\")."
:type '(repeat function)
:group 'yasnippet)
- If set to `full', every submenu is listed
-- If set to `nil', hide the menu.
+- If set to nil, hide the menu.
Any other non-nil value, every submenu is listed."
:type '(choice (const :tag "Full" full)
expansion simply by placing the cursor after a valid tab trigger,
using whichever commands.
-Optionally, set this to something like '(self-insert-command) if
+Optionally, set this to something like (self-insert-command) if
you to wish restrict expansion to only happen when the last
letter of the snippet tab trigger was typed immediately before
the trigger key itself."
in which case it is called again from the previous position and
may once more reposition point.
-For example, if `yas-key-syntaxes'' value is '(\"w\" \"w_\"),
+For example, if `yas-key-syntaxes' has the value (\"w\" \"w_\"),
trigger keys composed exclusively of \"word\"-syntax characters
are looked for first. Failing that, longer keys composed of
\"word\" or \"symbol\" syntax are looked for. Therefore,
* Otherwise, the snippet is not considered.
- * If it evaluates to the symbol 'always, all snippets are
+ * If it evaluates to the symbol `always', all snippets are
considered for expansion, regardless of any conditions.
* If it evaluates to t or some other non-nil value
Here's an example preventing snippets from being expanded from
inside comments, in `python-mode' only, with the exception of
-snippets returning the symbol 'force-in-comment in their
+snippets returning the symbol `force-in-comment' in their
conditions.
- (add-hook 'python-mode-hook
+ (add-hook \\='python-mode-hook
(lambda ()
(setq yas-buffer-local-condition
- '(if (python-in-string/comment)
- '(require-snippet-condition . force-in-comment)
+ \\='(if (python-in-string/comment)
+ \\='(require-snippet-condition . force-in-comment)
t))))
The default value is similar, it filters out potential snippet
(defconst yas--backquote-lisp-expression-regexp
"`\\([^`]*\\)`"
- "A regexp to recognize a \"`lisp-expression`\" expression." )
+ "A regexp to recognize a \"\\=`lisp-expression\\=`\" expression." )
(defconst yas--transform-mirror-regexp
"${\\(?:\\([0-9]+\\):\\)?$\\([ \t\n]*([^}]*\\)"
SUBMENU has the same form as MENU. NAME is also added to the
list of groups of the snippets defined thereafter.
-OMIT-ITEMS is a list of snippet uuid's that will always be
+OMIT-ITEMS is a list of snippet uuids that will always be
omitted from MODE's menu, even if they're manually loaded."
(let* ((table (yas--table-get-create mode))
(hash (yas--table-uuidhash table)))
changed-text))
(defun yas--save-backquotes ()
- "Save all the \"`(lisp-expression)`\"-style expressions
+ "Save all the \"\\=`(lisp-expression)\\=`\"-style expressions
with their evaluated value into `yas--backquote-markers-and-strings'."
(while (re-search-forward yas--backquote-lisp-expression-regexp nil t)
(let ((current-string (match-string-no-properties 1)) transformed)
;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
-;;
+;;
;; Created: 2013-11-11
;;
;; Keywords: files tools
(defun ztree-diff-model-subtree (parent path side diff)
"Create a subtree with given PARENT for the given PATH.
-Argument SIDE either 'left or 'right side.
+Argument SIDE either `left' or `right' side.
Argument DIFF different status to be assigned to all created nodes."
(let ((files (ztree-directory-files path))
(result nil))
(defun ztree-diff-model-update-diff (old new)
"Get the diff status depending if OLD or NEW is not nil.
-If the OLD is 'ignore, do not change anything"
+If the OLD is `ignore', do not change anything"
;; if the old whole directory is ignored, ignore children's status
(cond ((eql old 'ignore) 'ignore)
;; if the new status is ignored, use old
;; otherwise only update status when the child status is not ignore
(mapc (lambda (child)
(when (or (eql status 'ignore)
- (not
+ (not
(or (eql status 'ignore)
(eql (ztree-diff-node-different child) 'ignore))))
(setf (ztree-diff-node-different child) status)
(ztree-diff-node-update-diff-from-parent child)))
children)))
-
-
+
+
(defun ztree-diff-model-find-in-files (list shortname is-dir)
"Find in LIST of files the file with name SHORTNAME.
(setf ztree-diff-model-ignore-fun ignore-p))
(defun ztree-diff-model-set-progress-fun (progess-fun)
- (setf ztree-diff-model-progress-fun progess-fun))
+ (setf ztree-diff-model-progress-fun progess-fun))
(provide 'ztree-diff-model)
;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
-;;
+;;
;; Created: 2013-11-11
;;
;; Keywords: files tools
(defconst ztree-diff-hidden-files-regexp "^\\."
"Hidden files regexp.
-By default all filest starting with dot '.', including . and ..")
+By default all filest starting with dot `.', including . and ..")
(defface ztreep-diff-header-face
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
(eql diff 'diff))
;; or it is ignored but we show ignored for now
(and (eql diff 'ignore)
- ztree-diff-show-filtered-files)
+ ztree-diff-show-filtered-files)
;; or they are same but we show same for now
(and (eql diff 'same)
ztree-diff-show-equal-files))))
(defun ztree-diff-update-wait-message (&optional msg)
- "Update the wait mesage with one more '.' progress indication."
+ "Update the wait mesage with one more `.' progress indication."
(if msg
(setq ztree-diff-wait-message msg)
(when ztree-diff-wait-message
(ztree-diff-update-wait-message (concat "Comparing " dir1 " and " dir2 " ..."))
(ztree-diff-node-recreate model)
(message "Done.")
-
+
(ztree-refresh-buffer)))
;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
-;;
+;;
;; Created: 2013-11-11
;;
;; Keywords: files tools
;;; Commentary:
;;
;; Add the following to your .emacs file:
-;;
+;;
;; (push (substitute-in-file-name "path-to-ztree-directory") load-path)
;; (require 'ztree-dir)
;;
(defconst ztree-hidden-files-regexp "^\\."
"Hidden files regexp.
-By default all filest starting with dot '.', including . and ..")
+By default all filest starting with dot `.', including . and ..")
;;
;; Configurable variables
-;;
+;;
(defvar ztree-dir-move-focus nil
"If set to true moves the focus to opened window when the
"Determines if the file with FILENAME should be visible."
(let ((name (ztree-file-short-name filename)))
(and (not (or (string= name ".") (string= name "..")))
- (or
- ztree-dir-show-filtered-files
+ (or
+ ztree-dir-show-filtered-files
(not (cl-find-if (lambda (rx) (string-match rx name)) ztree-dir-filter-list))))))
(find-file-other-window node))
(hard
(save-selected-window (find-file-other-window node)))
- (t
+ (t
(find-file node)))))
;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
-;;
+;;
;; Created: 2013-11-11
;;
;; Keywords: files tools
(defun ztree-printable-string (string)
- "Strip newline character from file names, like 'Icon\n.
+ "Strip newline character from file names, like `Icon\n'.
Argument STRING string to process.'."
(replace-regexp-in-string "\n" "" string))
;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;;
;; Author: Alexey Veretennikov <alexey.veretennikov@gmail.com>
-;;
+;;
;; Created: 2013-11-11
;;
;; Keywords: files tools
Used in order to not to use cl package and `lexical-let'")
(defvar-local ztree-line-tree-properties nil
- "Hash with key - line number, value - property ('left, 'right, 'both).
+ "Hash with key - line number, value - property (`left', `right', `both').
Used for 2-side trees, to determine if the node exists on left or right
or both sides")
"Function returning list of node contents.")
(defvar-local ztree-node-side-fun nil
- "Function returning position of the node: 'left, 'right or 'both.
-If not defined(by default) - using single screen tree, otherwise
+ "Function returning position of the node: `left', `right' or `both'.
+If not defined (by default) - using single screen tree, otherwise
the buffer is split to 2 trees")
(defvar-local ztree-node-face-fun nil
#'(lambda (f) (not (funcall ztree-node-is-expandable-fun f)))
nodes)
comp))))
-
+
(defun ztree-draw-char (c x y &optional face)
"Draw char C at the position (1-based) (X Y).
(if ztree-draw-unicode-lines #x251C ?\|))
(defun ztree-draw-vertical-line (y1 y2 x &optional face)
- "Draw a vertical line of '|' characters from Y1 row to Y2 in X column.
+ "Draw a vertical line of `|' characters from Y1 row to Y2 in X column.
Optional argument FACE face to draw line with."
(let ((ver-line-char (ztree-vertical-line-char))
(count (abs (- y1 y2))))
(ztree-draw-char ver-line-char x (+ y1 count) face)))))
(defun ztree-draw-vertical-rounded-line (y1 y2 x &optional face)
- "Draw a vertical line of '|' characters finishing with '`' character.
+ "Draw a vertical line of `|' characters finishing with `\\=`' character.
Draws the line from Y1 row to Y2 in X column.
Optional argument FACE facet to draw the line with."
(let ((ver-line-char (ztree-vertical-line-char))
Optional argument FACE face to write text with."
(let ((node-sign #'(lambda (exp)
(let ((sign (concat "[" (if exp "-" "+") "]")))
- (insert (propertize sign
+ (insert (propertize sign
'font-lock-face
ztreep-expand-sign-face)))))
;; face to use. if FACE is not null, use it, otherwise