1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Prefer defvar-local in allout

* lisp/allout.el (allout-just-did-undo, allout-mode)
(allout-layout, allout-regexp, allout-bullets-string)
(allout-bullets-string-len, allout-depth-specific-regexp)
(allout-depth-one-regexp, allout-line-boundary-regexp)
(allout-bob-regexp, allout-header-subtraction)
(allout-plain-bullets-string-len, allout-mode-prior-settings)
(allout-outside-normal-auto-fill-function)
(allout-encryption-plaintext-sanitization-regexps)
(allout-encryption-ciphertext-rejection-regexps)
(allout-explicitly-deactivated, allout-recent-prefix-beginning)
(allout-recent-prefix-end, allout-recent-depth)
(allout-recent-end-of-subtree, allout-post-goto-bullet)
(allout-command-counter, allout-this-command-hid-text):
* lisp/allout-widgets.el (allout-widgets-mode)
(allout-widgets-tally, allout-widgets-mode-inhibit)
(allout-inhibit-body-modification-hook)
(allout-widgets-changes-record)
(allout-widgets-undo-exposure-record)
(allout-escaped-prefix-regexp, allout-item-icon-keymap)
(allout-item-body-keymap, allout-cue-span-keymap)
(allout-widgets-last-decoration-timing)
(allout-container-item-widget): Prefer defvar-local.
This commit is contained in:
Stefan Kangas 2021-01-31 14:35:44 +01:00
parent 035ef9f5ae
commit 4d635ceffb
2 changed files with 39 additions and 76 deletions

View file

@ -78,9 +78,8 @@
;;; during file load, so the involved code must reside above that ;;; during file load, so the involved code must reside above that
;;; definition in the file. ;;; definition in the file.
;;;_ = allout-widgets-mode ;;;_ = allout-widgets-mode
(defvar allout-widgets-mode nil (defvar-local allout-widgets-mode nil
"Allout mode enhanced with graphical widgets.") "Allout mode enhanced with graphical widgets.")
(make-variable-buffer-local 'allout-widgets-mode)
;;;_ : USER CUSTOMIZATION VARIABLES and incidental functions: ;;;_ : USER CUSTOMIZATION VARIABLES and incidental functions:
;;;_ > defgroup allout-widgets ;;;_ > defgroup allout-widgets
@ -243,14 +242,13 @@ decreases as obsolete widgets are garbage collected."
:version "24.1" :version "24.1"
:type 'boolean :type 'boolean
:group 'allout-widgets-developer) :group 'allout-widgets-developer)
(defvar allout-widgets-tally nil (defvar-local allout-widgets-tally nil
"Hash-table of existing allout widgets, for debugging. "Hash-table of existing allout widgets, for debugging.
Table is maintained only if `allout-widgets-maintain-tally' is non-nil. Table is maintained only if `allout-widgets-maintain-tally' is non-nil.
The table contents will be out of sync if any widgets are created The table contents will be out of sync if any widgets are created
or deleted while this variable is nil.") or deleted while this variable is nil.")
(make-variable-buffer-local 'allout-widgets-tally)
(defvar allout-widgets-mode-inhibit) ; defined below (defvar allout-widgets-mode-inhibit) ; defined below
;;;_ > allout-widgets-tally-string ;;;_ > allout-widgets-tally-string
(defun allout-widgets-tally-string () (defun allout-widgets-tally-string ()
@ -295,7 +293,7 @@ to publicize it by making it a customization variable)."
(message "%s" msg) (message "%s" msg)
msg)) msg))
;;;_ = allout-widgets-mode-inhibit ;;;_ = allout-widgets-mode-inhibit
(defvar allout-widgets-mode-inhibit nil (defvar-local allout-widgets-mode-inhibit nil
"Inhibit `allout-widgets-mode' from activating widgets. "Inhibit `allout-widgets-mode' from activating widgets.
This also inhibits automatic adjustment of widgets to track allout outline This also inhibits automatic adjustment of widgets to track allout outline
@ -310,15 +308,13 @@ buffers where this is set to enable and disable widget
enhancements, directly.") enhancements, directly.")
;;;###autoload ;;;###autoload
(put 'allout-widgets-mode-inhibit 'safe-local-variable 'booleanp) (put 'allout-widgets-mode-inhibit 'safe-local-variable 'booleanp)
(make-variable-buffer-local 'allout-widgets-mode-inhibit)
;;;_ = allout-inhibit-body-modification-hook ;;;_ = allout-inhibit-body-modification-hook
(defvar allout-inhibit-body-modification-hook nil (defvar-local allout-inhibit-body-modification-hook nil
"Override de-escaping of text-prefixes in item bodies during specific changes. "Override de-escaping of text-prefixes in item bodies during specific changes.
This is used by `allout-buffer-modification-handler' to signal such changes This is used by `allout-buffer-modification-handler' to signal such changes
to `allout-body-modification-handler', and is always reset by to `allout-body-modification-handler', and is always reset by
`allout-post-command-business'.") `allout-post-command-business'.")
(make-variable-buffer-local 'allout-inhibit-body-modification-hook)
;;;_ = allout-widgets-icons-cache ;;;_ = allout-widgets-icons-cache
(defvar allout-widgets-icons-cache nil (defvar allout-widgets-icons-cache nil
"Cache allout icon images, as an association list. "Cache allout icon images, as an association list.
@ -358,7 +354,7 @@ See \\[describe-mode] for many more options."
The structure includes the guides lines, bullet, and bullet cue.") The structure includes the guides lines, bullet, and bullet cue.")
;;;_ = allout-widgets-changes-record ;;;_ = allout-widgets-changes-record
(defvar allout-widgets-changes-record nil (defvar-local allout-widgets-changes-record nil
"Record outline changes for processing by post-command hook. "Record outline changes for processing by post-command hook.
Entries on the list are lists whose first element is a symbol indicating Entries on the list are lists whose first element is a symbol indicating
@ -369,14 +365,12 @@ type. For example:
The changes are recorded in reverse order, with new values pushed The changes are recorded in reverse order, with new values pushed
onto the front.") onto the front.")
(make-variable-buffer-local 'allout-widgets-changes-record)
;;;_ = allout-widgets-undo-exposure-record ;;;_ = allout-widgets-undo-exposure-record
(defvar allout-widgets-undo-exposure-record nil (defvar-local allout-widgets-undo-exposure-record nil
"Record outline undo traces for processing by post-command hook. "Record outline undo traces for processing by post-command hook.
The changes are recorded in reverse order, with new values pushed The changes are recorded in reverse order, with new values pushed
onto the front.") onto the front.")
(make-variable-buffer-local 'allout-widgets-undo-exposure-record)
;;;_ = allout-widgets-last-hook-error ;;;_ = allout-widgets-last-hook-error
(defvar allout-widgets-last-hook-error nil (defvar allout-widgets-last-hook-error nil
"String holding last error string, for debugging purposes.") "String holding last error string, for debugging purposes.")
@ -393,13 +387,12 @@ onto the front.")
"Maintained true during `allout-widgets-exposure-undo-processor'") "Maintained true during `allout-widgets-exposure-undo-processor'")
;;;_ , Widget-specific outline text format ;;;_ , Widget-specific outline text format
;;;_ = allout-escaped-prefix-regexp ;;;_ = allout-escaped-prefix-regexp
(defvar allout-escaped-prefix-regexp "" (defvar-local allout-escaped-prefix-regexp ""
"Regular expression for body text that would look like an item prefix if "Regular expression for body text that would look like an item prefix if
not altered with an escape sequence.") not altered with an escape sequence.")
(make-variable-buffer-local 'allout-escaped-prefix-regexp)
;;;_ , Widget element formatting ;;;_ , Widget element formatting
;;;_ = allout-item-icon-keymap ;;;_ = allout-item-icon-keymap
(defvar allout-item-icon-keymap (defvar-local allout-item-icon-keymap
(let ((km (make-sparse-keymap)) (let ((km (make-sparse-keymap))
(as-parent (if (current-local-map) (as-parent (if (current-local-map)
(make-composed-keymap (current-local-map) (make-composed-keymap (current-local-map)
@ -420,9 +413,8 @@ not altered with an escape sequence.")
km) km)
"General tree-node key bindings.") "General tree-node key bindings.")
(make-variable-buffer-local 'allout-item-icon-keymap)
;;;_ = allout-item-body-keymap ;;;_ = allout-item-body-keymap
(defvar allout-item-body-keymap (defvar-local allout-item-body-keymap
(let ((km (make-sparse-keymap)) (let ((km (make-sparse-keymap))
(as-parent (if (current-local-map) (as-parent (if (current-local-map)
(make-composed-keymap (current-local-map) (make-composed-keymap (current-local-map)
@ -432,17 +424,15 @@ not altered with an escape sequence.")
(set-keymap-parent km as-parent) (set-keymap-parent km as-parent)
km) km)
"General key bindings for the text content of outline items.") "General key bindings for the text content of outline items.")
(make-variable-buffer-local 'allout-item-body-keymap)
;;;_ = allout-body-span-category ;;;_ = allout-body-span-category
(defvar allout-body-span-category nil (defvar allout-body-span-category nil
"Symbol carrying allout body-text overlay properties.") "Symbol carrying allout body-text overlay properties.")
;;;_ = allout-cue-span-keymap ;;;_ = allout-cue-span-keymap
(defvar allout-cue-span-keymap (defvar-local allout-cue-span-keymap
(let ((km (make-sparse-keymap))) (let ((km (make-sparse-keymap)))
(set-keymap-parent km allout-item-icon-keymap) (set-keymap-parent km allout-item-icon-keymap)
km) km)
"Keymap used in the item cue area - the space between the icon and headline.") "Keymap used in the item cue area - the space between the icon and headline.")
(make-variable-buffer-local 'allout-cue-span-keymap)
;;;_ = allout-escapes-category ;;;_ = allout-escapes-category
(defvar allout-escapes-category nil (defvar allout-escapes-category nil
"Symbol for category of text property used to hide escapes of prefix-like "Symbol for category of text property used to hide escapes of prefix-like
@ -477,7 +467,7 @@ including things like:
(defvar allout-trailing-category nil (defvar allout-trailing-category nil
"Symbol carrying common properties of an overlay's trailing newline.") "Symbol carrying common properties of an overlay's trailing newline.")
;;;_ , Developer ;;;_ , Developer
(defvar allout-widgets-last-decoration-timing nil (defvar-local allout-widgets-last-decoration-timing nil
"Timing details for the last cooperative decoration action. "Timing details for the last cooperative decoration action.
This is maintained when `allout-widgets-time-decoration-activity' is set. This is maintained when `allout-widgets-time-decoration-activity' is set.
@ -488,7 +478,6 @@ The value is a list containing two elements:
When active, the value is revised each time automatic decoration activity When active, the value is revised each time automatic decoration activity
happens in the buffer.") happens in the buffer.")
(make-variable-buffer-local 'allout-widgets-last-decoration-timing)
;;;_ . mode hookup ;;;_ . mode hookup
;;;_ > define-minor-mode allout-widgets-mode (arg) ;;;_ > define-minor-mode allout-widgets-mode (arg)
;;;###autoload ;;;###autoload
@ -693,12 +682,11 @@ outline hot-spot navigation (see `allout-mode')."
(allout-get-or-create-item-widget)))))) (allout-get-or-create-item-widget))))))
;;;_ . settings context ;;;_ . settings context
;;;_ = allout-container-item ;;;_ = allout-container-item
(defvar allout-container-item-widget nil (defvar-local allout-container-item-widget nil
"A widget for the current outline's overarching container as an item. "A widget for the current outline's overarching container as an item.
The item has settings (of the file/connection) and maybe a body, but no The item has settings (of the file/connection) and maybe a body, but no
icon/bullet.") icon/bullet.")
(make-variable-buffer-local 'allout-container-item-widget)
;;;_ . Hooks and hook helpers ;;;_ . Hooks and hook helpers
;;;_ , major command-loop business: ;;;_ , major command-loop business:
;;;_ > allout-widgets-pre-command-business (&optional recursing) ;;;_ > allout-widgets-pre-command-business (&optional recursing)

View file

@ -830,9 +830,8 @@ such topics are encrypted.)"
The value of `buffer-saved-size' at the time of decryption is used, The value of `buffer-saved-size' at the time of decryption is used,
for restoring when all encryptions are established.") for restoring when all encryptions are established.")
(defvar allout-just-did-undo nil (defvar-local allout-just-did-undo nil
"True just after undo commands, until allout-post-command-business.") "True just after undo commands, until allout-post-command-business.")
(make-variable-buffer-local 'allout-just-did-undo)
;;;_ + Developer ;;;_ + Developer
;;;_ = allout-developer group ;;;_ = allout-developer group
@ -874,10 +873,10 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
msg)) msg))
;;;_ : Mode activation (defined here because it's referenced early) ;;;_ : Mode activation (defined here because it's referenced early)
;;;_ = allout-mode ;;;_ = allout-mode
(defvar allout-mode nil "Allout outline mode minor-mode flag.") (defvar-local allout-mode nil
(make-variable-buffer-local 'allout-mode) "Allout outline mode minor-mode flag.")
;;;_ = allout-layout nil ;;;_ = allout-layout nil
(defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring. (defvar-local allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring.
"Buffer-specific setting for allout layout. "Buffer-specific setting for allout layout.
In buffers where this is non-nil (and if `allout-auto-activation' In buffers where this is non-nil (and if `allout-auto-activation'
@ -903,34 +902,30 @@ followed by the equivalent of `(allout-expose-topic 0 : -1 -1 0)'.
`allout-default-layout' describes the specification format. `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.") case the value of `allout-default-layout' is used.")
(make-variable-buffer-local 'allout-layout)
;;;###autoload ;;;###autoload
(put 'allout-layout 'safe-local-variable (put 'allout-layout 'safe-local-variable
(lambda (x) (or (numberp x) (listp x) (memq x '(: * + -))))) (lambda (x) (or (numberp x) (listp x) (memq x '(: * + -)))))
;;;_ : Topic header format ;;;_ : Topic header format
;;;_ = allout-regexp ;;;_ = allout-regexp
(defvar allout-regexp "" (defvar-local allout-regexp ""
"Regular expression to match the beginning of a heading line. "Regular expression to match the beginning of a heading line.
Any line whose beginning matches this regexp is considered a Any line whose beginning matches this regexp is considered a
heading. This var is set according to the user configuration vars heading. This var is set according to the user configuration vars
by `allout-set-regexp'.") by `allout-set-regexp'.")
(make-variable-buffer-local 'allout-regexp)
;;;_ = allout-bullets-string ;;;_ = allout-bullets-string
(defvar allout-bullets-string "" (defvar-local allout-bullets-string ""
"A string dictating the valid set of outline topic bullets. "A string dictating the valid set of outline topic bullets.
This var should *not* be set by the user -- it is set by `allout-set-regexp', This var should *not* be set by the user -- it is set by `allout-set-regexp',
and is produced from the elements of `allout-plain-bullets-string' and is produced from the elements of `allout-plain-bullets-string'
and `allout-distinctive-bullets-string'.") and `allout-distinctive-bullets-string'.")
(make-variable-buffer-local 'allout-bullets-string)
;;;_ = allout-bullets-string-len ;;;_ = allout-bullets-string-len
(defvar allout-bullets-string-len 0 (defvar-local allout-bullets-string-len 0
"Length of current buffers' `allout-plain-bullets-string'.") "Length of current buffers' `allout-plain-bullets-string'.")
(make-variable-buffer-local 'allout-bullets-string-len)
;;;_ = allout-depth-specific-regexp ;;;_ = allout-depth-specific-regexp
(defvar allout-depth-specific-regexp "" (defvar-local allout-depth-specific-regexp ""
"Regular expression to match a heading line prefix for a particular depth. "Regular expression to match a heading line prefix for a particular depth.
This expression is used to search for depth-specific topic This expression is used to search for depth-specific topic
@ -941,34 +936,28 @@ This var is set according to the user configuration vars by
`allout-set-regexp'. It is prepared with format strings for two `allout-set-regexp'. It is prepared with format strings for two
decimal numbers, which should each be one less than the depth of the decimal numbers, which should each be one less than the depth of the
topic prefix to be matched.") topic prefix to be matched.")
(make-variable-buffer-local 'allout-depth-specific-regexp)
;;;_ = allout-depth-one-regexp ;;;_ = allout-depth-one-regexp
(defvar allout-depth-one-regexp "" (defvar-local allout-depth-one-regexp ""
"Regular expression to match a heading line prefix for depth one. "Regular expression to match a heading line prefix for depth one.
This var is set according to the user configuration vars by This var is set according to the user configuration vars by
`allout-set-regexp'. It is prepared with format strings for two `allout-set-regexp'. It is prepared with format strings for two
decimal numbers, which should each be one less than the depth of the decimal numbers, which should each be one less than the depth of the
topic prefix to be matched.") topic prefix to be matched.")
(make-variable-buffer-local 'allout-depth-one-regexp)
;;;_ = allout-line-boundary-regexp ;;;_ = allout-line-boundary-regexp
(defvar allout-line-boundary-regexp () (defvar-local allout-line-boundary-regexp ()
"`allout-regexp' prepended with a newline for the search target. "`allout-regexp' prepended with a newline for the search target.
This is properly set by `allout-set-regexp'.") This is properly set by `allout-set-regexp'.")
(make-variable-buffer-local 'allout-line-boundary-regexp)
;;;_ = allout-bob-regexp ;;;_ = allout-bob-regexp
(defvar allout-bob-regexp () (defvar-local allout-bob-regexp ()
"Like `allout-line-boundary-regexp', for headers at beginning of buffer.") "Like `allout-line-boundary-regexp', for headers at beginning of buffer.")
(make-variable-buffer-local 'allout-bob-regexp)
;;;_ = allout-header-subtraction ;;;_ = allout-header-subtraction
(defvar allout-header-subtraction (1- (length allout-header-prefix)) (defvar-local allout-header-subtraction (1- (length allout-header-prefix))
"Allout-header prefix length to subtract when computing topic depth.") "Allout-header prefix length to subtract when computing topic depth.")
(make-variable-buffer-local 'allout-header-subtraction)
;;;_ = allout-plain-bullets-string-len ;;;_ = allout-plain-bullets-string-len
(defvar allout-plain-bullets-string-len (length allout-plain-bullets-string) (defvar-local allout-plain-bullets-string-len (length allout-plain-bullets-string)
"Length of `allout-plain-bullets-string', updated by `allout-set-regexp'.") "Length of `allout-plain-bullets-string', updated by `allout-set-regexp'.")
(make-variable-buffer-local 'allout-plain-bullets-string-len)
;;;_ = allout-doublecheck-at-and-shallower ;;;_ = allout-doublecheck-at-and-shallower
(defconst allout-doublecheck-at-and-shallower 3 (defconst allout-doublecheck-at-and-shallower 3
@ -1279,11 +1268,10 @@ Also refresh various data structures that hinge on the regexp."
["Set New Exposure" allout-expose-topic t]))) ["Set New Exposure" allout-expose-topic t])))
;;;_ : Allout Modal-Variables Utilities ;;;_ : Allout Modal-Variables Utilities
;;;_ = allout-mode-prior-settings ;;;_ = allout-mode-prior-settings
(defvar allout-mode-prior-settings nil (defvar-local allout-mode-prior-settings nil
"Internal `allout-mode' use; settings to be resumed on mode deactivation. "Internal `allout-mode' use; settings to be resumed on mode deactivation.
See `allout-add-resumptions' and `allout-do-resumptions'.") See `allout-add-resumptions' and `allout-do-resumptions'.")
(make-variable-buffer-local 'allout-mode-prior-settings)
;;;_ > allout-add-resumptions (&rest pairs) ;;;_ > allout-add-resumptions (&rest pairs)
(defun allout-add-resumptions (&rest pairs) (defun allout-add-resumptions (&rest pairs)
"Set name/value PAIRS. "Set name/value PAIRS.
@ -1466,16 +1454,15 @@ that was affected by the undo.."
:version "24.3") :version "24.3")
;;;_ = allout-outside-normal-auto-fill-function ;;;_ = allout-outside-normal-auto-fill-function
(defvar allout-outside-normal-auto-fill-function nil (defvar-local allout-outside-normal-auto-fill-function nil
"Value of `normal-auto-fill-function' outside of allout mode. "Value of `normal-auto-fill-function' outside of allout mode.
Used by `allout-auto-fill' to do the mandated `normal-auto-fill-function' Used by `allout-auto-fill' to do the mandated `normal-auto-fill-function'
wrapped within allout's automatic `fill-prefix' setting.") wrapped within allout's automatic `fill-prefix' setting.")
(make-variable-buffer-local 'allout-outside-normal-auto-fill-function)
;;;_ = prevent redundant activation by desktop mode: ;;;_ = prevent redundant activation by desktop mode:
(add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil)) (add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil))
;;;_ = allout-after-save-decrypt ;;;_ = allout-after-save-decrypt
(defvar allout-after-save-decrypt nil (defvar-local allout-after-save-decrypt nil
"Internal variable, is nil or has the value of two points: "Internal variable, is nil or has the value of two points:
- the location of a topic to be decrypted after saving is done - the location of a topic to be decrypted after saving is done
@ -1483,9 +1470,8 @@ wrapped within allout's automatic `fill-prefix' setting.")
This is used to decrypt the topic that was currently being edited, if it This is used to decrypt the topic that was currently being edited, if it
was encrypted automatically as part of a file write or autosave.") was encrypted automatically as part of a file write or autosave.")
(make-variable-buffer-local 'allout-after-save-decrypt)
;;;_ = allout-encryption-plaintext-sanitization-regexps ;;;_ = allout-encryption-plaintext-sanitization-regexps
(defvar allout-encryption-plaintext-sanitization-regexps nil (defvar-local allout-encryption-plaintext-sanitization-regexps nil
"List of regexps whose matches are removed from plaintext before encryption. "List of regexps whose matches are removed from plaintext before encryption.
This is for the sake of removing artifacts, like escapes, that are added on This is for the sake of removing artifacts, like escapes, that are added on
@ -1498,9 +1484,8 @@ Each value can be a regexp or a list with a regexp followed by a
substitution string. If it's just a regexp, all its matches are removed substitution string. If it's just a regexp, all its matches are removed
before the text is encrypted. If it's a regexp and a substitution, the before the text is encrypted. If it's a regexp and a substitution, the
substitution is used against the regexp matches, a la `replace-match'.") substitution is used against the regexp matches, a la `replace-match'.")
(make-variable-buffer-local 'allout-encryption-plaintext-sanitization-regexps)
;;;_ = allout-encryption-ciphertext-rejection-regexps ;;;_ = allout-encryption-ciphertext-rejection-regexps
(defvar allout-encryption-ciphertext-rejection-regexps nil (defvar-local allout-encryption-ciphertext-rejection-regexps nil
"Variable for regexps matching plaintext to remove before encryption. "Variable for regexps matching plaintext to remove before encryption.
This is used to detect strings in encryption results that would This is used to detect strings in encryption results that would
@ -1513,13 +1498,11 @@ Encryptions that result in matches will be retried, up to
`allout-encryption-ciphertext-rejection-ceiling' times, after which `allout-encryption-ciphertext-rejection-ceiling' times, after which
an error is raised.") an error is raised.")
(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-regexps)
;;;_ = allout-encryption-ciphertext-rejection-ceiling ;;;_ = allout-encryption-ciphertext-rejection-ceiling
(defvar allout-encryption-ciphertext-rejection-ceiling 5 (defvar-local allout-encryption-ciphertext-rejection-ceiling 5
"Limit on number of times encryption ciphertext is rejected. "Limit on number of times encryption ciphertext is rejected.
See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.") See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-ceiling)
;;;_ > allout-mode-p () ;;;_ > allout-mode-p ()
;; Must define this macro above any uses, or byte compilation will lack ;; Must define this macro above any uses, or byte compilation will lack
;; proper def, if file isn't loaded -- eg, during emacs build! ;; proper def, if file isn't loaded -- eg, during emacs build!
@ -1607,10 +1590,9 @@ non-nil in a lasting way.")
;;;_ #2 Mode environment and activation ;;;_ #2 Mode environment and activation
;;;_ = allout-explicitly-deactivated ;;;_ = allout-explicitly-deactivated
(defvar allout-explicitly-deactivated nil (defvar-local allout-explicitly-deactivated nil
"If t, `allout-mode's last deactivation was deliberate. "If t, `allout-mode's last deactivation was deliberate.
So `allout-post-command-business' should not reactivate it...") So `allout-post-command-business' should not reactivate it...")
(make-variable-buffer-local 'allout-explicitly-deactivated)
;;;_ > allout-setup-menubar () ;;;_ > allout-setup-menubar ()
(defun allout-setup-menubar () (defun allout-setup-menubar ()
"Populate the current buffer's menubar with `allout-mode' stuff." "Populate the current buffer's menubar with `allout-mode' stuff."
@ -2119,21 +2101,17 @@ function can also be used as an `isearch-mode-end-hook'."
;; for just-established data. This optimization can provide ;; for just-established data. This optimization can provide
;; significant speed improvement, but it must be employed carefully. ;; significant speed improvement, but it must be employed carefully.
;;;_ = allout-recent-prefix-beginning ;;;_ = allout-recent-prefix-beginning
(defvar allout-recent-prefix-beginning 0 (defvar-local allout-recent-prefix-beginning 0
"Buffer point of the start of the last topic prefix encountered.") "Buffer point of the start of the last topic prefix encountered.")
(make-variable-buffer-local 'allout-recent-prefix-beginning)
;;;_ = allout-recent-prefix-end ;;;_ = allout-recent-prefix-end
(defvar allout-recent-prefix-end 0 (defvar-local allout-recent-prefix-end 0
"Buffer point of the end of the last topic prefix encountered.") "Buffer point of the end of the last topic prefix encountered.")
(make-variable-buffer-local 'allout-recent-prefix-end)
;;;_ = allout-recent-depth ;;;_ = allout-recent-depth
(defvar allout-recent-depth 0 (defvar-local allout-recent-depth 0
"Depth of the last topic prefix encountered.") "Depth of the last topic prefix encountered.")
(make-variable-buffer-local 'allout-recent-depth)
;;;_ = allout-recent-end-of-subtree ;;;_ = allout-recent-end-of-subtree
(defvar allout-recent-end-of-subtree 0 (defvar-local allout-recent-end-of-subtree 0
"Buffer point last returned by `allout-end-of-current-subtree'.") "Buffer point last returned by `allout-end-of-current-subtree'.")
(make-variable-buffer-local 'allout-recent-end-of-subtree)
;;;_ > allout-prefix-data () ;;;_ > allout-prefix-data ()
(defsubst allout-prefix-data () (defsubst allout-prefix-data ()
"Register allout-prefix state data. "Register allout-prefix state data.
@ -3213,7 +3191,7 @@ Returns resulting position, else nil if none found."
;;;_ - Fundamental ;;;_ - Fundamental
;;;_ = allout-post-goto-bullet ;;;_ = allout-post-goto-bullet
(defvar allout-post-goto-bullet nil (defvar-local allout-post-goto-bullet nil
"Outline internal var, for `allout-pre-command-business' hot-spot operation. "Outline internal var, for `allout-pre-command-business' hot-spot operation.
When set, tells post-processing to reposition on topic bullet, and When set, tells post-processing to reposition on topic bullet, and
@ -3221,18 +3199,15 @@ then unset it. Set by `allout-pre-command-business' when implementing
hot-spot operation, where literal characters typed over a topic bullet hot-spot operation, where literal characters typed over a topic bullet
are mapped to the command of the corresponding control-key on the are mapped to the command of the corresponding control-key on the
`allout-mode-map-value'.") `allout-mode-map-value'.")
(make-variable-buffer-local 'allout-post-goto-bullet)
;;;_ = allout-command-counter ;;;_ = allout-command-counter
(defvar allout-command-counter 0 (defvar-local allout-command-counter 0
"Counter that monotonically increases in allout-mode buffers. "Counter that monotonically increases in allout-mode buffers.
Set by `allout-pre-command-business', to support allout addons in Set by `allout-pre-command-business', to support allout addons in
coordinating with allout activity.") coordinating with allout activity.")
(make-variable-buffer-local 'allout-command-counter)
;;;_ = allout-this-command-hid-text ;;;_ = allout-this-command-hid-text
(defvar allout-this-command-hid-text nil (defvar-local allout-this-command-hid-text nil
"True if the most recent allout-mode command hid any text.") "True if the most recent allout-mode command hid any text.")
(make-variable-buffer-local 'allout-this-command-hid-text)
;;;_ > allout-post-command-business () ;;;_ > allout-post-command-business ()
(defun allout-post-command-business () (defun allout-post-command-business ()
"Outline `post-command-hook' function. "Outline `post-command-hook' function.