diff options
| author | Ken Manheimer | 2010-12-28 14:57:15 -0500 |
|---|---|---|
| committer | Ken Manheimer | 2010-12-28 14:57:15 -0500 |
| commit | 2576c28f3aad6dd01678f673d10c26b82ad40450 (patch) | |
| tree | d1ab2a6bd66c6857c3f8e5eead46d3d6fd272766 | |
| parent | 365525b370a3faa4d2403b4d312c10f760082a66 (diff) | |
| download | emacs-2576c28f3aad6dd01678f673d10c26b82ad40450.tar.gz emacs-2576c28f3aad6dd01678f673d10c26b82ad40450.zip | |
(allout-v18/19-file-var-hack): Obsolete, remove.
(allout-mode): Argument "toggle" => "force".
Refine the docstring.
Remove special provisions for reactivation, besides the 'force' argument.
Consolidate layout provisions coce directly into the activation condition
branch, now that we've removed those provisions.
(allout-unload-function): Explicitly activate the mode before deactivating,
if it's initially deactivated.
(allout-set-buffer-multibyte): Properly prevent byte-compiler warnings for
version of function used only where set-buffer-multibyte is unavailable.
| -rw-r--r-- | lisp/allout.el | 304 |
1 files changed, 131 insertions, 173 deletions
diff --git a/lisp/allout.el b/lisp/allout.el index 3a506482d4f..37650e2ff39 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -238,8 +238,7 @@ See the existing keys for examples." | |||
| 238 | :group 'allout) | 238 | :group 'allout) |
| 239 | 239 | ||
| 240 | ;;;_ = allout-keybindings-list | 240 | ;;;_ = allout-keybindings-list |
| 241 | ;;; You have to reactivate allout-mode -- `(allout-mode t)' -- to | 241 | ;;; You have to reactivate allout-mode to change this var's current setting. |
| 242 | ;;; institute changes to this var. | ||
| 243 | (defvar allout-keybindings-list () | 242 | (defvar allout-keybindings-list () |
| 244 | "*List of `allout-mode' key / function bindings, for `allout-mode-map'. | 243 | "*List of `allout-mode' key / function bindings, for `allout-mode-map'. |
| 245 | String or vector key will be prefaced with `allout-command-prefix', | 244 | String or vector key will be prefaced with `allout-command-prefix', |
| @@ -1506,11 +1505,8 @@ This hook might be invoked multiple times by a single command.") | |||
| 1506 | Used by allout-auto-fill to do the mandated normal-auto-fill-function | 1505 | Used by allout-auto-fill to do the mandated normal-auto-fill-function |
| 1507 | wrapped within allout's automatic fill-prefix setting.") | 1506 | wrapped within allout's automatic fill-prefix setting.") |
| 1508 | (make-variable-buffer-local 'allout-outside-normal-auto-fill-function) | 1507 | (make-variable-buffer-local 'allout-outside-normal-auto-fill-function) |
| 1509 | ;;;_ = file-var-bug hack | 1508 | ;;;_ = prevent redundant activation by desktop mode: |
| 1510 | (defvar allout-v18/19-file-var-hack nil | 1509 | (add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil)) |
| 1511 | "Horrible hack used to prevent invalid multiple triggering of outline | ||
| 1512 | mode from prop-line file-var activation. Used by `allout-mode' function | ||
| 1513 | to track repeats.") | ||
| 1514 | ;;;_ = allout-passphrase-verifier-string | 1510 | ;;;_ = allout-passphrase-verifier-string |
| 1515 | (defvar allout-passphrase-verifier-string nil | 1511 | (defvar allout-passphrase-verifier-string nil |
| 1516 | "Setting used to test solicited encryption passphrases against the one | 1512 | "Setting used to test solicited encryption passphrases against the one |
| @@ -1789,24 +1785,25 @@ the following two lines in your Emacs init file: | |||
| 1789 | '(allout-overlay-insert-in-front-handler))) | 1785 | '(allout-overlay-insert-in-front-handler))) |
| 1790 | (put 'allout-exposure-category 'modification-hooks | 1786 | (put 'allout-exposure-category 'modification-hooks |
| 1791 | '(allout-overlay-interior-modification-handler))) | 1787 | '(allout-overlay-interior-modification-handler))) |
| 1792 | ;;;_ > allout-mode (&optional toggle) | 1788 | ;;;_ > allout-mode (&optional force) |
| 1793 | ;;;_ : Defun: | 1789 | ;;;_ : Defun: |
| 1794 | ;;;###autoload | 1790 | ;;;###autoload |
| 1795 | (defun allout-mode (&optional toggle) | 1791 | (defun allout-mode (&optional force) |
| 1796 | ;;;_ . Doc string: | 1792 | ;;;_ . Doc string: |
| 1797 | "Toggle minor mode for controlling exposure and editing of text outlines. | 1793 | "Toggle minor mode for controlling exposure and editing of text outlines. |
| 1798 | \\<allout-mode-map> | 1794 | \\<allout-mode-map> |
| 1799 | 1795 | ||
| 1800 | Optional prefix argument TOGGLE forces the mode to re-initialize | 1796 | Allout outline mode always runs as a minor mode. |
| 1801 | if it is positive, otherwise it turns the mode off. Allout | ||
| 1802 | outline mode always runs as a minor mode. | ||
| 1803 | 1797 | ||
| 1804 | Allout outline mode provides extensive outline oriented formatting and | 1798 | Optional FORCE non-nil, or command with no universal argument, |
| 1805 | manipulation. It enables structural editing of outlines, as well as | 1799 | means force activation. |
| 1806 | navigation and exposure. It also is specifically aimed at | 1800 | |
| 1807 | accommodating syntax-sensitive text like programming languages. (For | 1801 | Allout outline mode provides extensive outline oriented |
| 1808 | an example, see the allout code itself, which is organized as an allout | 1802 | formatting and manipulation. It enables structural editing of |
| 1809 | outline.) | 1803 | outlines, as well as navigation and exposure. It also is |
| 1804 | specifically aimed at accommodating syntax-sensitive text like | ||
| 1805 | programming languages. \(For example, see the allout code itself, | ||
| 1806 | which is organized as an allout outline.) | ||
| 1810 | 1807 | ||
| 1811 | In addition to typical outline navigation and exposure, allout includes: | 1808 | In addition to typical outline navigation and exposure, allout includes: |
| 1812 | 1809 | ||
| @@ -1814,18 +1811,19 @@ In addition to typical outline navigation and exposure, allout includes: | |||
| 1814 | repositioning, promotion/demotion, cut, and paste | 1811 | repositioning, promotion/demotion, cut, and paste |
| 1815 | - incremental search with dynamic exposure and reconcealment of hidden text | 1812 | - incremental search with dynamic exposure and reconcealment of hidden text |
| 1816 | - adjustable format, so programming code can be developed in outline-structure | 1813 | - adjustable format, so programming code can be developed in outline-structure |
| 1817 | - easy topic encryption and decryption | 1814 | - easy topic encryption and decryption, symmetric or key-pair |
| 1818 | - \"Hot-spot\" operation, for single-keystroke maneuvering and exposure control | 1815 | - \"Hot-spot\" operation, for single-keystroke maneuvering and exposure control |
| 1819 | - integral outline layout, for automatic initial exposure when visiting a file | 1816 | - integral outline layout, for automatic initial exposure when visiting a file |
| 1820 | - independent extensibility, using comprehensive exposure and authoring hooks | 1817 | - independent extensibility, using comprehensive exposure and authoring hooks |
| 1821 | 1818 | ||
| 1822 | and many other features. | 1819 | and many other features. |
| 1823 | 1820 | ||
| 1824 | Below is a description of the key bindings, and then explanation of | 1821 | Below is a description of the key bindings, and then description |
| 1825 | special `allout-mode' features and terminology. See also the outline | 1822 | of special `allout-mode' features and terminology. See also the |
| 1826 | menubar additions for quick reference to many of the features, and see | 1823 | outline menubar additions for quick reference to many of the |
| 1827 | the docstring of the function `allout-init' for instructions on | 1824 | features, and see the docstring of the function `allout-init' for |
| 1828 | priming your emacs session for automatic activation of `allout-mode'. | 1825 | instructions on priming your emacs session for automatic |
| 1826 | activation of `allout-mode'. | ||
| 1829 | 1827 | ||
| 1830 | The bindings are dictated by the customizable `allout-keybindings-list' | 1828 | The bindings are dictated by the customizable `allout-keybindings-list' |
| 1831 | variable. We recommend customizing `allout-command-prefix' to use just | 1829 | variable. We recommend customizing `allout-command-prefix' to use just |
| @@ -1922,13 +1920,13 @@ exposing the plain text of encrypted topics in the file system. | |||
| 1922 | If the content of the topic containing the cursor was encrypted | 1920 | If the content of the topic containing the cursor was encrypted |
| 1923 | for a save, it is automatically decrypted for continued editing. | 1921 | for a save, it is automatically decrypted for continued editing. |
| 1924 | 1922 | ||
| 1925 | PROBLEM: Attempting symmetric decryption with an incorrect key | 1923 | NOTE: A few GnuPG v2 versions improperly preserve incorrect |
| 1926 | not only fails, but for some GnuPG v2 versions the incorrect key | 1924 | symmetric decryption keys, preventing entry of the correct key on |
| 1927 | is apparently retained in the gpg cache and reused, preventing | 1925 | subsequent decryption attempts until the cache times-out. That |
| 1928 | decryption, until the cache finally times out. That can take | 1926 | can take several minutes. \(Decryption of other entries is not |
| 1929 | several minutes. \(Decryption of other entries is not affected.) | 1927 | affected.) Upgrade your EasyPG version, if you can, and you can |
| 1930 | To clear this problem before the cache times out, deliberately | 1928 | deliberately clear your gpg-agent's cache by sending it a '-HUP' |
| 1931 | clear your gpg-agent's cache by sending it a '-HUP' signal. | 1929 | signal. |
| 1932 | 1930 | ||
| 1933 | See `allout-toggle-current-subtree-encryption' function docstring | 1931 | See `allout-toggle-current-subtree-encryption' function docstring |
| 1934 | and `allout-encrypt-unencrypted-on-saves' customization variable | 1932 | and `allout-encrypt-unencrypted-on-saves' customization variable |
| @@ -1966,7 +1964,8 @@ hooks, by which independent code can cooperate with allout | |||
| 1966 | without changes to the allout core. Here are key ones: | 1964 | without changes to the allout core. Here are key ones: |
| 1967 | 1965 | ||
| 1968 | `allout-mode-hook' | 1966 | `allout-mode-hook' |
| 1969 | `allout-mode-deactivate-hook' | 1967 | `allout-mode-deactivate-hook' \(deprecated) |
| 1968 | `allout-mode-off-hook' | ||
| 1970 | `allout-exposure-change-hook' | 1969 | `allout-exposure-change-hook' |
| 1971 | `allout-structure-added-hook' | 1970 | `allout-structure-added-hook' |
| 1972 | `allout-structure-deleted-hook' | 1971 | `allout-structure-deleted-hook' |
| @@ -2055,74 +2054,42 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2055 | ;;;_ . Code | 2054 | ;;;_ . Code |
| 2056 | (interactive "P") | 2055 | (interactive "P") |
| 2057 | 2056 | ||
| 2058 | (let* ((active (and (not (equal major-mode 'outline)) | 2057 | (let ((write-file-hook-var-name (cond ((boundp 'write-file-functions) |
| 2059 | (allout-mode-p))) | 2058 | 'write-file-functions) |
| 2060 | ; Massage universal-arg `toggle' val: | 2059 | ((boundp 'write-file-hooks) |
| 2061 | (toggle (and toggle | 2060 | 'write-file-hooks) |
| 2062 | (or (and (listp toggle)(car toggle)) | 2061 | (t 'local-write-file-hooks))) |
| 2063 | toggle))) | 2062 | (use-layout (if (listp allout-layout) |
| 2064 | ; Activation specifically demanded? | 2063 | allout-layout |
| 2065 | (explicit-activation (and toggle | 2064 | allout-default-layout))) |
| 2066 | (or (symbolp toggle) | ||
| 2067 | (and (wholenump toggle) | ||
| 2068 | (not (zerop toggle)))))) | ||
| 2069 | ;; allout-mode already called once during this complex command? | ||
| 2070 | (same-complex-command (eq allout-v18/19-file-var-hack | ||
| 2071 | (car command-history))) | ||
| 2072 | (write-file-hook-var-name (cond ((boundp 'write-file-functions) | ||
| 2073 | 'write-file-functions) | ||
| 2074 | ((boundp 'write-file-hooks) | ||
| 2075 | 'write-file-hooks) | ||
| 2076 | (t 'local-write-file-hooks))) | ||
| 2077 | do-layout | ||
| 2078 | ) | ||
| 2079 | |||
| 2080 | ; See comments below re v19.18,.19 bug. | ||
| 2081 | (setq allout-v18/19-file-var-hack (car command-history)) | ||
| 2082 | |||
| 2083 | (cond | ||
| 2084 | 2065 | ||
| 2085 | ;; Provision for v19.18, 19.19 bug -- | 2066 | (if (and (allout-mode-p) (not force)) |
| 2086 | ;; Emacs v 19.18, 19.19 file-var code invokes prop-line-designated | 2067 | (progn |
| 2087 | ;; modes twice when file is visited. We have to avoid toggling mode | 2068 | ;; Deactivation: |
| 2088 | ;; off on second invocation, so we detect it as best we can, and | 2069 | |
| 2089 | ;; skip everything. | 2070 | ; Activation not explicitly |
| 2090 | ((and same-complex-command ; Still in same complex command | 2071 | ; requested, and either in |
| 2091 | ; as last time `allout-mode' invoked. | 2072 | ; active state or *de*activation |
| 2092 | active ; Already activated. | 2073 | ; specifically requested: |
| 2093 | (not explicit-activation) ; Prop-line file-vars don't have args. | 2074 | (allout-do-resumptions) |
| 2094 | (string-match "^19.1[89]" ; Bug only known to be in v19.18 and | 2075 | |
| 2095 | emacs-version)); 19.19. | 2076 | (remove-from-invisibility-spec '(allout . t)) |
| 2096 | t) | 2077 | (remove-hook 'pre-command-hook 'allout-pre-command-business t) |
| 2097 | 2078 | (remove-hook 'post-command-hook 'allout-post-command-business t) | |
| 2098 | ;; Deactivation: | 2079 | (remove-hook 'before-change-functions 'allout-before-change-handler t) |
| 2099 | ((and (not explicit-activation) | 2080 | (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) |
| 2100 | (or active toggle)) | 2081 | (remove-hook write-file-hook-var-name 'allout-write-file-hook-handler |
| 2101 | ; Activation not explicitly | 2082 | t) |
| 2102 | ; requested, and either in | 2083 | (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) |
| 2103 | ; active state or *de*activation | 2084 | |
| 2104 | ; specifically requested: | 2085 | (remove-overlays (point-min) (point-max) |
| 2105 | (setq allout-explicitly-deactivated t) | 2086 | 'category 'allout-exposure-category) |
| 2106 | 2087 | ||
| 2107 | (allout-do-resumptions) | 2088 | (setq allout-mode nil) |
| 2108 | 2089 | (run-hooks 'allout-mode-deactivate-hook) | |
| 2109 | (remove-from-invisibility-spec '(allout . t)) | 2090 | (run-hooks 'allout-mode-off-hook)) |
| 2110 | (remove-hook 'pre-command-hook 'allout-pre-command-business t) | 2091 | |
| 2111 | (remove-hook 'post-command-hook 'allout-post-command-business t) | 2092 | ;; Activation: |
| 2112 | (remove-hook 'before-change-functions 'allout-before-change-handler t) | ||
| 2113 | (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) | ||
| 2114 | (remove-hook write-file-hook-var-name 'allout-write-file-hook-handler t) | ||
| 2115 | (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) | ||
| 2116 | |||
| 2117 | (remove-overlays (point-min) (point-max) | ||
| 2118 | 'category 'allout-exposure-category) | ||
| 2119 | |||
| 2120 | (setq allout-mode nil) | ||
| 2121 | (run-hooks 'allout-mode-deactivate-hook)) | ||
| 2122 | |||
| 2123 | ;; Activation: | ||
| 2124 | ((not active) | ||
| 2125 | (setq allout-explicitly-deactivated nil) | ||
| 2126 | (if allout-old-style-prefixes | 2093 | (if allout-old-style-prefixes |
| 2127 | ;; Inhibit all the fancy formatting: | 2094 | ;; Inhibit all the fancy formatting: |
| 2128 | (allout-add-resumptions '(allout-primary-bullet "*"))) | 2095 | (allout-add-resumptions '(allout-primary-bullet "*"))) |
| @@ -2133,13 +2100,12 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2133 | (allout-infer-body-reindent) | 2100 | (allout-infer-body-reindent) |
| 2134 | 2101 | ||
| 2135 | (set-allout-regexp) | 2102 | (set-allout-regexp) |
| 2136 | (allout-add-resumptions | 2103 | (allout-add-resumptions '(allout-encryption-ciphertext-rejection-regexps |
| 2137 | '(allout-encryption-ciphertext-rejection-regexps | 2104 | allout-line-boundary-regexp |
| 2138 | allout-line-boundary-regexp | 2105 | extend) |
| 2139 | extend) | 2106 | '(allout-encryption-ciphertext-rejection-regexps |
| 2140 | '(allout-encryption-ciphertext-rejection-regexps | 2107 | allout-bob-regexp |
| 2141 | allout-bob-regexp | 2108 | extend)) |
| 2142 | extend)) | ||
| 2143 | 2109 | ||
| 2144 | ;; Produce map from current version of allout-keybindings-list: | 2110 | ;; Produce map from current version of allout-keybindings-list: |
| 2145 | (allout-setup-mode-map) | 2111 | (allout-setup-mode-map) |
| @@ -2157,21 +2123,16 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2157 | (allout-add-resumptions '(line-move-ignore-invisible t)) | 2123 | (allout-add-resumptions '(line-move-ignore-invisible t)) |
| 2158 | (add-hook 'pre-command-hook 'allout-pre-command-business nil t) | 2124 | (add-hook 'pre-command-hook 'allout-pre-command-business nil t) |
| 2159 | (add-hook 'post-command-hook 'allout-post-command-business nil t) | 2125 | (add-hook 'post-command-hook 'allout-post-command-business nil t) |
| 2160 | (add-hook 'before-change-functions 'allout-before-change-handler | 2126 | (add-hook 'before-change-functions 'allout-before-change-handler nil t) |
| 2161 | nil t) | ||
| 2162 | (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) | 2127 | (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) |
| 2163 | (add-hook write-file-hook-var-name 'allout-write-file-hook-handler | 2128 | (add-hook write-file-hook-var-name 'allout-write-file-hook-handler |
| 2164 | nil t) | 2129 | nil t) |
| 2165 | (add-hook 'auto-save-hook 'allout-auto-save-hook-handler | 2130 | (add-hook 'auto-save-hook 'allout-auto-save-hook-handler nil t) |
| 2166 | nil t) | ||
| 2167 | 2131 | ||
| 2168 | ;; Stash auto-fill settings and adjust so custom allout auto-fill | 2132 | ;; Stash auto-fill settings and adjust so custom allout auto-fill |
| 2169 | ;; func will be used if auto-fill is active or activated. (The | 2133 | ;; func will be used if auto-fill is active or activated. (The |
| 2170 | ;; custom func respects topic headline, maintains hanging-indents, | 2134 | ;; custom func respects topic headline, maintains hanging-indents, |
| 2171 | ;; etc.) | 2135 | ;; etc.) |
| 2172 | (if (and auto-fill-function (not allout-inhibit-auto-fill)) | ||
| 2173 | ;; allout-auto-fill will use the stashed values and so forth. | ||
| 2174 | (allout-add-resumptions '(auto-fill-function allout-auto-fill))) | ||
| 2175 | (allout-add-resumptions (list 'allout-former-auto-filler | 2136 | (allout-add-resumptions (list 'allout-former-auto-filler |
| 2176 | auto-fill-function) | 2137 | auto-fill-function) |
| 2177 | ;; Register allout-auto-fill to be used if | 2138 | ;; Register allout-auto-fill to be used if |
| @@ -2186,55 +2147,51 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2186 | (list 'paragraph-separate | 2147 | (list 'paragraph-separate |
| 2187 | (concat paragraph-separate "\\|^\\(" | 2148 | (concat paragraph-separate "\\|^\\(" |
| 2188 | allout-regexp "\\)"))) | 2149 | allout-regexp "\\)"))) |
| 2150 | (if (and auto-fill-function (not allout-inhibit-auto-fill)) | ||
| 2151 | ;; allout-auto-fill will use the stashed values and so forth. | ||
| 2152 | (allout-add-resumptions '(auto-fill-function allout-auto-fill))) | ||
| 2153 | |||
| 2189 | (or (assq 'allout-mode minor-mode-alist) | 2154 | (or (assq 'allout-mode minor-mode-alist) |
| 2190 | (setq minor-mode-alist | 2155 | (setq minor-mode-alist |
| 2191 | (cons '(allout-mode " Allout") minor-mode-alist))) | 2156 | (cons '(allout-mode " Allout") minor-mode-alist))) |
| 2192 | 2157 | ||
| 2193 | (allout-setup-menubar) | 2158 | (allout-setup-menubar) |
| 2194 | |||
| 2195 | (if allout-layout | ||
| 2196 | (setq do-layout t)) | ||
| 2197 | |||
| 2198 | (setq allout-mode t) | 2159 | (setq allout-mode t) |
| 2199 | (run-hooks 'allout-mode-hook)) | 2160 | (run-hooks 'allout-mode-hook) |
| 2200 | 2161 | ||
| 2201 | ;; Reactivation: | 2162 | ;; Do auto layout if warranted: |
| 2202 | ((setq do-layout t) | 2163 | (when (and allout-layout |
| 2203 | (allout-infer-body-reindent)) | 2164 | allout-auto-activation |
| 2204 | ) ;; end of activation-mode cases. | 2165 | use-layout |
| 2205 | 2166 | (and (not (eq allout-auto-activation 'activate)) | |
| 2206 | ;; Do auto layout if warranted: | 2167 | (if (eq allout-auto-activation 'ask) |
| 2207 | (let ((use-layout (if (listp allout-layout) | 2168 | (if (y-or-n-p (format "Expose %s with layout '%s'? " |
| 2208 | allout-layout | 2169 | (buffer-name) |
| 2209 | allout-default-layout))) | 2170 | use-layout)) |
| 2210 | (if (and do-layout | 2171 | t |
| 2211 | allout-auto-activation | 2172 | (message "Skipped %s layout." (buffer-name)) |
| 2212 | use-layout | 2173 | nil) |
| 2213 | (and (not (eq allout-auto-activation 'activate)) | 2174 | t))) |
| 2214 | (if (eq allout-auto-activation 'ask) | 2175 | (save-excursion |
| 2215 | (if (y-or-n-p (format "Expose %s with layout '%s'? " | 2176 | (message "Adjusting '%s' exposure..." (buffer-name)) |
| 2216 | (buffer-name) | 2177 | (goto-char 0) |
| 2217 | use-layout)) | 2178 | (allout-this-or-next-heading) |
| 2218 | t | 2179 | (condition-case err |
| 2219 | (message "Skipped %s layout." (buffer-name)) | 2180 | (progn |
| 2220 | nil) | 2181 | (apply 'allout-expose-topic (list use-layout)) |
| 2221 | t))) | 2182 | (message "Adjusting '%s' exposure... done." |
| 2222 | (save-excursion | 2183 | (buffer-name))) |
| 2223 | (message "Adjusting '%s' exposure..." (buffer-name)) | 2184 | ;; Problem applying exposure -- notify user, but don't |
| 2224 | (goto-char 0) | 2185 | ;; interrupt, eg, file visit: |
| 2225 | (allout-this-or-next-heading) | 2186 | (error (message "%s" (car (cdr err))) |
| 2226 | (condition-case err | 2187 | (sit-for 1)))) |
| 2227 | (progn | 2188 | ) ; when allout-layout |
| 2228 | (apply 'allout-expose-topic (list use-layout)) | 2189 | ) ; if (allout-mode-p) |
| 2229 | (message "Adjusting '%s' exposure... done." (buffer-name))) | 2190 | ) ; let (()) |
| 2230 | ;; Problem applying exposure -- notify user, but don't | 2191 | ) ; define-minor-mode |
| 2231 | ;; interrupt, eg, file visit: | 2192 | ;;;_ > allout-minor-mode alias |
| 2232 | (error (message "%s" (car (cdr err))) | 2193 | (defalias 'allout-minor-mode 'allout-mode) |
| 2233 | (sit-for 1)))))) | 2194 | ;;;_ > allout-setup-mode-map ()) |
| 2234 | allout-mode | ||
| 2235 | ) ; let* | ||
| 2236 | ) ; defun | ||
| 2237 | |||
| 2238 | (defun allout-setup-mode-map () | 2195 | (defun allout-setup-mode-map () |
| 2239 | "Establish allout-mode bindings." | 2196 | "Establish allout-mode bindings." |
| 2240 | (setq-default allout-mode-map | 2197 | (setq-default allout-mode-map |
| @@ -2270,7 +2227,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2270 | (save-current-buffer | 2227 | (save-current-buffer |
| 2271 | (dolist (buffer (buffer-list)) | 2228 | (dolist (buffer (buffer-list)) |
| 2272 | (set-buffer buffer) | 2229 | (set-buffer buffer) |
| 2273 | (when allout-mode (allout-mode -1)))) | 2230 | (when (allout-mode-p) (allout-mode)))) |
| 2274 | ;; continue standard unloading | 2231 | ;; continue standard unloading |
| 2275 | nil) | 2232 | nil) |
| 2276 | 2233 | ||
| @@ -3579,7 +3536,7 @@ See `allout-init' for setup instructions." | |||
| 3579 | (if (and allout-auto-activation | 3536 | (if (and allout-auto-activation |
| 3580 | (not (allout-mode-p)) | 3537 | (not (allout-mode-p)) |
| 3581 | allout-layout) | 3538 | allout-layout) |
| 3582 | (allout-mode t))) | 3539 | (allout-mode))) |
| 3583 | 3540 | ||
| 3584 | ;;;_ - Topic Format Assessment | 3541 | ;;;_ - Topic Format Assessment |
| 3585 | ;;;_ > allout-solicit-alternate-bullet (depth &optional current-bullet) | 3542 | ;;;_ > allout-solicit-alternate-bullet (depth &optional current-bullet) |
| @@ -6174,13 +6131,13 @@ rejections due to matches against | |||
| 6174 | `allout-encryption-ciphertext-rejection-regexps', as limited by | 6131 | `allout-encryption-ciphertext-rejection-regexps', as limited by |
| 6175 | `allout-encryption-ciphertext-rejection-ceiling'. | 6132 | `allout-encryption-ciphertext-rejection-ceiling'. |
| 6176 | 6133 | ||
| 6177 | PROBLEM: Attempting symmetric decryption with an incorrect key | 6134 | NOTE: A few GnuPG v2 versions improperly preserve incorrect |
| 6178 | not only fails, but for some GnuPG v2 versions the incorrect key | 6135 | symmetric decryption keys, preventing entry of the correct key on |
| 6179 | is apparently retained in the gpg cache and reused, preventing | 6136 | subsequent decryption attempts until the cache times-out. That |
| 6180 | decryption, until the cache finally times out. That can take | 6137 | can take several minutes. \(Decryption of other entries is not |
| 6181 | several minutes. \(Decryption of other entries is not affected.) | 6138 | affected.) Upgrade your EasyPG version, if you can, and you can |
| 6182 | To clear this problem before the cache times out, deliberately | 6139 | deliberately clear your gpg-agent's cache by sending it a '-HUP' |
| 6183 | clear your gpg-agent's cache by sending it a '-HUP' signal." | 6140 | signal." |
| 6184 | 6141 | ||
| 6185 | (require 'epg) | 6142 | (require 'epg) |
| 6186 | (require 'epa) | 6143 | (require 'epa) |
| @@ -6439,7 +6396,8 @@ setup for auto-startup." | |||
| 6439 | 6396 | ||
| 6440 | (interactive "P") | 6397 | (interactive "P") |
| 6441 | 6398 | ||
| 6442 | (allout-mode t) | 6399 | (if (allout-mode-p) (allout-mode)) ; deactivate so we can re-activate... |
| 6400 | (allout-mode) | ||
| 6443 | 6401 | ||
| 6444 | (save-excursion | 6402 | (save-excursion |
| 6445 | (goto-char (point-min)) | 6403 | (goto-char (point-min)) |
| @@ -6843,13 +6801,13 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6843 | ;; No docstring because xemacs defalias doesn't support it. | 6801 | ;; No docstring because xemacs defalias doesn't support it. |
| 6844 | ) | 6802 | ) |
| 6845 | ;;;_ > allout-set-buffer-multibyte | 6803 | ;;;_ > allout-set-buffer-multibyte |
| 6846 | ;; define as alias first, so byte compiler is happy. | 6804 | (if (fboundp 'set-buffer-multibyte) |
| 6847 | (defalias 'allout-set-buffer-multibyte 'set-buffer-multibyte) | 6805 | (defalias 'allout-set-buffer-multibyte 'set-buffer-multibyte) |
| 6848 | ;; then supplant with definition if underlying alias absent. | 6806 | (with-no-warnings |
| 6849 | (if (not (fboundp 'set-buffer-multibyte)) | 6807 | ;; this definition is used only in older or alternative emacs, where |
| 6850 | (defun allout-set-buffer-multibyte (is-multibyte) | 6808 | ;; the setting is our only recourse. |
| 6851 | (setq enable-multibyte-characters is-multibyte)) | 6809 | (defun allout-set-buffer-multibyte (is-multibyte) |
| 6852 | ) | 6810 | (set enable-multibyte-characters is-multibyte)))) |
| 6853 | ;;;_ > allout-select-safe-coding-system | 6811 | ;;;_ > allout-select-safe-coding-system |
| 6854 | (defalias 'allout-select-safe-coding-system | 6812 | (defalias 'allout-select-safe-coding-system |
| 6855 | (if (fboundp 'select-safe-coding-system) | 6813 | (if (fboundp 'select-safe-coding-system) |