;;; allout.el --- extensive outline mode for use alone and with other modes
-;; Copyright (C) 1992-1994, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1994, 2001-2016 Free Software Foundation, Inc.
;; Author: Ken Manheimer <ken dot manheimer at gmail...>
;; Maintainer: Ken Manheimer <ken dot manheimer at gmail...>
(defcustom allout-command-prefix "\C-c "
"Key sequence to be used as prefix for outline mode command key bindings.
-Default is '\C-c<space>'; just '\C-c' is more short-and-sweet, if you're
+Default is `\C-c<space>'; just `\C-c' is more short-and-sweet, if you're
willing to let allout use a bunch of \C-c keybindings."
:type 'string
:group 'allout-keybindings
that are not prefixed.
Use vector format for the keys:
- - put literal keys after a '?' question mark, eg: '?a', '?.'
+ - put literal keys after a `?' question mark, eg: `?a', `?.'
- enclose control, shift, or meta-modified keys as sequences within
parentheses, with the literal key, as above, preceded by the name(s)
of the modifiers, eg: [(control ?a)]
preceding command key.
Use vector format for the keys:
- - put literal keys after a '?' question mark, eg: '?a', '?.'
+ - put literal keys after a `?' question mark, eg: `?a', `?.'
- enclose control, shift, or meta-modified keys as sequences within
parentheses, with the literal key, as above, preceded by the name(s)
of the modifiers, eg: [(control ?a)]
"Default allout outline layout specification.
This setting specifies the outline exposure to use when
-`allout-layout' has the local value `t'. This docstring describes the
+`allout-layout' has the local value t. This docstring describes the
layout specifications.
A list value specifies a default layout for the current buffer,
Allout outline mode will use the mode-specific `allout-mode-leaders' or
comment-start string, if any, to lead the topic prefix string, so topic
headers look like comments in the programming language. It will also use
-the comment-start string, with an '_' appended, for `allout-primary-bullet'.
+the comment-start string, with an `_' appended, for `allout-primary-bullet'.
String values are used as literals, not regular expressions, so
do not escape any regular-expression characters.
:group 'allout)
;;;_ - allout-title
(defcustom allout-title '(or buffer-file-name (buffer-name))
- "Expression to be evaluated to determine the title for LaTeX
-formatted copy."
+ "Expression to evaluate to determine the title for LaTeX formatted copy."
:type 'sexp
+ :risky t
:group 'allout)
;;;_ - allout-line-skip
(defcustom allout-line-skip ".05cm"
automatically activated. The layout dictated by the value will be used to
set the initial exposure when `allout-mode' is activated.
-\*You should not setq-default this variable non-nil unless you want every
+*You should not setq-default this variable non-nil unless you want every
visited file to be treated as an allout file.*
The value would typically be set by a file local variable. For
\(This is the layout used for the allout.el source file.)
`allout-default-layout' describes the specification format.
-`allout-layout' can additionally have the value `t', in which
+`allout-layout' can additionally have the value t, in which
case the value of `allout-default-layout' is used.")
(make-variable-buffer-local 'allout-layout)
;;;###autoload
being followed by a legitimate item of excessively greater depth.
The classic example of a mistaken item, for a standard allout
-outline configuration, is a body line that begins with an '...'
+outline configuration, is a body line that begins with an `...'
ellipsis. This happens to contain a legitimate depth-2 header
-prefix, constituted by two '..' dots at the beginning of the
+prefix, constituted by two `..' dots at the beginning of the
line. The only thing that can distinguish it *in principle* from
a legitimate one is if the following real header is at a depth
that is discontinuous from the depth of 2 implied by the
buffer-local value, then it is left as nil on resumption.
The pairs are lists whose car is the name of the variable and car of the
-cdr is the new value: '(some-var some-value)'. The pairs can actually be
+cdr is the new value: `(some-var some-value)'. The pairs can actually be
triples, where the third element qualifies the disposition of the setting,
as described further below.
-If the optional third element is the symbol 'extend, then the new value
+If the optional third element is the symbol `extend', then the new value
created by `cons'ing the second element of the pair onto the front of the
existing value.
-If the optional third element is the symbol 'append, then the new value is
+If the optional third element is the symbol `append', then the new value is
extended from the existing one by `append'ing a list containing the second
element of the pair onto the end of the existing value.
Extension, and resumptions in general, should not be used for hook
-functions -- use the 'local mode of `add-hook' for that, instead.
+functions -- use the `local' mode of `add-hook' for that, instead.
The settings are stored on `allout-mode-prior-settings'."
(while pairs
It consists of an encrypted random string useful only to verify that a
passphrase entered by the user is effective for decryption. The passphrase
-itself is \*not* recorded in the file anywhere, and the encrypted contents
+itself is *not* recorded in the file anywhere, and the encrypted contents
are random binary characters to avoid exposing greater susceptibility to
search attacks.
buffer with name derived from derived from that
of current buffer -- \"*BUFFERNAME exposed*\".
\\[allout-flatten-exposed-to-buffer] `allout-flatten-exposed-to-buffer'
- Like above 'copy-exposed', but convert topic
+ Like above `copy-exposed', but convert topic
prefixes to section.subsection... numeric
format.
\\[customize-variable] allout-auto-activation
subsequent decryption attempts until the cache times-out. That
can take several minutes. (Decryption of other entries is not
affected.) Upgrade your EasyPG version, if you can, and you can
-deliberately clear your gpg-agent's cache by sending it a '-HUP'
+deliberately clear your gpg-agent's cache by sending it a `-HUP'
signal.
See `allout-toggle-current-subtree-encryption' function docstring
use-layout
(and (not (string= allout-auto-activation "activate"))
(if (string= allout-auto-activation "ask")
- (if (y-or-n-p (format "Expose %s with layout '%s'? "
- (buffer-name)
- use-layout))
+ (if (y-or-n-p (format-message
+ "Expose %s with layout `%s'? "
+ (buffer-name) use-layout))
t
(message "Skipped %s layout." (buffer-name))
nil)
t)))
(save-excursion
- (message "Adjusting '%s' exposure..." (buffer-name))
+ (message "Adjusting `%s' exposure..." (buffer-name))
(goto-char 0)
(allout-this-or-next-heading)
(condition-case err
(progn
(apply 'allout-expose-topic (list use-layout))
- (message "Adjusting '%s' exposure... done."
+ (message "Adjusting `%s' exposure... done."
(buffer-name)))
;; Problem applying exposure -- notify user, but don't
;; interrupt, eg, file visit:
(save-excursion
(goto-char (allout-current-bullet-pos))
(setq choice (solicit-char-in-string
- (format "Select bullet: %s ('%s' default): "
- sans-escapes
- (allout-substring-no-properties default-bullet))
+ (format-message
+ "Select bullet: %s (`%s' default): "
+ sans-escapes
+ (allout-substring-no-properties default-bullet))
sans-escapes
t)))
(message "")
(save-match-data
(let* ((inhibit-field-text-motion t)
(depth (+ (allout-current-depth) relative-depth))
- (opening-on-blank (if (looking-at "^\$")
+ (opening-on-blank (if (looking-at "^$")
(not (setq before nil))))
;; bunch o vars set while computing ref-topic
opening-numbered
- - exposes the body of the corresponding topic.
Examples:
-\(allout-expose-topic '(-1 : 0))
+\(allout-expose-topic \\='(-1 : 0))
Close this and all following topics at current level, exposing
only their immediate children, but close down the last topic
at this current level completely.
-\(allout-expose-topic '(-1 () : 1 0))
+\(allout-expose-topic \\='(-1 () : 1 0))
Close current topic so only the immediate subtopics are shown;
show the children in the second to last topic, and completely
close the last one.
-\(allout-expose-topic '(-2 : -1 *))
+\(allout-expose-topic \\='(-2 : -1 *))
Expose children and grandchildren of all topics at current
level except the last two; expose children of the second to
last and completely open the last one."
;; Specified but not a buffer -- get it:
(let ((got (get-buffer frombuf)))
(if (not got)
- (error (concat "allout-process-exposed: source buffer "
- frombuf
- " not found."))
+ (error "allout-process-exposed: source buffer %s not found."
+ frombuf)
(setq frombuf got))))
;; not specified -- default it:
(setq frombuf (current-buffer)))
LISTIFIED is a list representing each topic header and body:
- \`(depth prefix text)'
+ `(depth prefix text)'
-or \`(depth prefix text bullet-plus)'
+or `(depth prefix text bullet-plus)'
If `bullet-plus' is specified, it is inserted just after the entire prefix."
(setq listified (cdr listified))
(defun allout-toggle-current-subtree-encryption (&optional keymode-cue)
"Encrypt clear or decrypt encoded topic text.
-Allout uses Emacs 'epg' library to perform encryption. Symmetric
+Allout uses Emacs `epg' library to perform encryption. Symmetric
and keypair encryption are supported. All encryption is ascii
armored.
encryption are encrypted. See `allout-encrypt-unencrypted-on-saves'
for auto-encryption specifics.
-\*NOTE WELL* that automatic encryption that happens during saves will
+*NOTE WELL* that automatic encryption that happens during saves will
default to symmetric encryption -- you must deliberately (re)encrypt key-pair
encrypted topics if you want them to continue to use the key-pair cipher.
recipients with the file, by selecting no recipients in the
dialog.
-Encryption and decryption uses the Emacs 'epg' library.
+Encryption and decryption uses the Emacs `epg' library.
Encrypted text will be ascii-armored.
(declare-function epg-decrypt-string "epg" (context cipher))
(declare-function epg-encrypt-string "epg"
(context plain recipients &optional sign always-trust))
-(declare-function epg-user-id-string "epg" (user-id))
-(declare-function epg-key-user-id-list "epg" (key))
+(declare-function epg-user-id-string "epg" (user-id) t)
+(declare-function epg-key-user-id-list "epg" (key) t)
;;;_ > allout-encrypt-string (text decrypt allout-buffer keymode-cue
;;; &optional rejected)
subsequent decryption attempts until the cache times-out. That
can take several minutes. (Decryption of other entries is not
affected.) Upgrade your EasyPG version, if you can, and you can
-deliberately clear your gpg-agent's cache by sending it a '-HUP'
+deliberately clear your gpg-agent's cache by sending it a `-HUP'
signal."
(require 'epg)
"Return the point of the next topic pending encryption, or nil if none.
Such a topic has the `allout-topic-encryption-bullet' without an
-immediately following '*' that would mark the topic as being encrypted.
+immediately following `*' that would mark the topic as being encrypted.
It must also have content."
(let (done got content-beg)
(save-match-data
(if (allout-goto-prefix)
t
(allout-open-topic 2)
- (insert (concat "Dummy outline topic header -- see"
- "`allout-mode' docstring: `^Hm'."))
+ (insert (substitute-command-keys
+ (concat "Dummy outline topic header -- see"
+ " `allout-mode' docstring: `\\[describe-mode]'.")))
(allout-adjust-file-variable
"allout-layout" (or allout-layout '(-1 : 0))))))
;;;_ > allout-file-vars-section-data ()
got)
(dolist (sym configvar-value)
(if (not (boundp sym))
- (if (yes-or-no-p (format "%s entry `%s' is unbound -- remove it? "
- configvar-name sym))
+ (if (yes-or-no-p (format-message
+ "%s entry `%s' is unbound -- remove it? "
+ configvar-name sym))
(delq sym (symbol-value configvar-name)))
(push (symbol-value sym) got)))
(reverse got)))
(defun regexp-sans-escapes (regexp &optional successive-backslashes)
"Return a copy of REGEXP with all character escapes stripped out.
-Representations of actual backslashes -- '\\\\\\\\' -- are left as a
+Representations of actual backslashes -- `\\\\\\\\' -- are left as a
single backslash.
Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion."