]> code.delx.au - gnu-emacs/blobdiff - lisp/allout.el
(compilation-start): In the no-async-subprocesses branch, fontify
[gnu-emacs] / lisp / allout.el
index b93c94cdee288547b00938306e5a655f26e39efa..b2cc486df6ad6ed5238de82299d2200914f81ae6 100644 (file)
@@ -5,7 +5,6 @@
 ;; Author: Ken Manheimer <klm@zope.com>
 ;; Maintainer: Ken Manheimer <klm@zope.com>
 ;; Created: Dec 1991 - first release to usenet
 ;; Author: Ken Manheimer <klm@zope.com>
 ;; Maintainer: Ken Manheimer <klm@zope.com>
 ;; Created: Dec 1991 - first release to usenet
-;; Version: $Id: allout.el,v 1.41 2003/02/24 17:28:28 lektu Exp $||
 ;; Keywords: outlines mode wp languages
 
 ;; This file is part of GNU Emacs.
 ;; Keywords: outlines mode wp languages
 
 ;; This file is part of GNU Emacs.
@@ -82,9 +81,9 @@ outline mode is automatically activated when the buffer-specific
 variable `allout-layout' is non-nil, and whether or not the layout
 dictated by `allout-layout' should be imposed on mode activation.
 
 variable `allout-layout' is non-nil, and whether or not the layout
 dictated by `allout-layout' should be imposed on mode activation.
 
-With value `t', auto-mode-activation and auto-layout are enabled.
+With value t, auto-mode-activation and auto-layout are enabled.
 \(This also depends on `allout-find-file-hook' being installed in
 \(This also depends on `allout-find-file-hook' being installed in
-`find-file-hooks', which is also done by `allout-init'.)
+`find-file-hook', which is also done by `allout-init'.)
 
 With value `ask', auto-mode-activation is enabled, and endorsement for
 performing auto-layout is asked of the user each time.
 
 With value `ask', auto-mode-activation is enabled, and endorsement for
 performing auto-layout is asked of the user each time.
@@ -92,7 +91,7 @@ performing auto-layout is asked of the user each time.
 With value `activate', only auto-mode-activation is enabled,
 auto-layout is not.
 
 With value `activate', only auto-mode-activation is enabled,
 auto-layout is not.
 
-With value `nil', neither auto-mode-activation nor auto-layout are
+With value nil, neither auto-mode-activation nor auto-layout are
 enabled.
 
 See the docstring for `allout-init' for the proper interface to
 enabled.
 
 See the docstring for `allout-init' for the proper interface to
@@ -226,14 +225,14 @@ so topic headers look like comments in the programming language.
 
 String values are used as they stand.
 
 
 String values are used as they stand.
 
-Value `t' means to first check for assoc value in `allout-mode-leaders'
+Value t means to first check for assoc value in `allout-mode-leaders'
 alist, then use comment-start string, if any, then use default \(`.').
 \(See note about use of comment-start strings, below.)
 
 Set to the symbol for either of `allout-mode-leaders' or
 `comment-start' to use only one of them, respectively.
 
 alist, then use comment-start string, if any, then use default \(`.').
 \(See note about use of comment-start strings, below.)
 
 Set to the symbol for either of `allout-mode-leaders' or
 `comment-start' to use only one of them, respectively.
 
-Value `nil' means to always use the default \(`.').
+Value nil means to always use the default \(`.').
 
 comment-start strings that do not end in spaces are tripled, and an
 `_' underscore is tacked on the end, to distinguish them from regular
 
 comment-start strings that do not end in spaces are tripled, and an
 `_' underscore is tacked on the end, to distinguish them from regular
@@ -480,7 +479,7 @@ When active, topic body lines that are indented even with or beyond
 their topic header are reindented to correspond with depth shifts of
 the header.
 
 their topic header are reindented to correspond with depth shifts of
 the header.
 
-A value of `t' enables reindent in non-programming-code buffers, ie
+A value of t enables reindent in non-programming-code buffers, ie
 those that do not have the variable `comment-start' set.  A value of
 `force' enables reindent whether or not `comment-start' is set."
   :type '(choice (const nil) (const t) (const text) (const force))
 those that do not have the variable `comment-start' set.  A value of
 `force' enables reindent whether or not `comment-start' is set."
   :type '(choice (const nil) (const t) (const text) (const force))
@@ -508,7 +507,7 @@ behavior."
 ;;;_  : Version
 ;;;_   = allout-version
 (defvar allout-version
 ;;;_  : Version
 ;;;_   = allout-version
 (defvar allout-version
-  (let ((rcs-rev "$Revision: 1.41 $"))
+  (let ((rcs-rev "$Revision: 1.48 $"))
     (condition-case err
        (save-match-data
          (string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
     (condition-case err
        (save-match-data
          (string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
@@ -727,17 +726,12 @@ See doc string for allout-keybindings-list for format of binding list."
                              (car (cdr cell)))))))
            keymap-list)
     map))
                              (car (cdr cell)))))))
            keymap-list)
     map))
-;;;_   = allout-prior-bindings - being deprecated.
-(defvar allout-prior-bindings nil
-  "Variable for use in V18, with `allout-added-bindings', for
-resurrecting, on mode deactivation, bindings that existed before
-activation.  Being deprecated.")
-;;;_   = allout-added-bindings - being deprecated
-(defvar allout-added-bindings nil
-  "Variable for use in V18, with `allout-prior-bindings', for
-resurrecting, on mode deactivation, bindings that existed before
-activation.  Being deprecated.")
+
 ;;;_  : Menu bar
 ;;;_  : Menu bar
+(defvar allout-mode-exposure-menu)
+(defvar allout-mode-editing-menu)
+(defvar allout-mode-navigation-menu)
+(defvar allout-mode-misc-menu)
 (defun produce-allout-mode-menubar-entries ()
   (require 'easymenu)
   (easy-menu-define allout-mode-exposure-menu
 (defun produce-allout-mode-menubar-entries ()
   (require 'easymenu)
   (easy-menu-define allout-mode-exposure-menu
@@ -893,7 +887,7 @@ It's automatically reset to nil after every buffer modification.")
 (make-variable-buffer-local 'allout-override-protect)
 ;;;_   > allout-unprotected (expr)
 (defmacro allout-unprotected (expr)
 (make-variable-buffer-local 'allout-override-protect)
 ;;;_   > allout-unprotected (expr)
 (defmacro allout-unprotected (expr)
-  "Evaluate EXPRESSION with `allout-override-protect' let-bound `t'."
+  "Evaluate EXPRESSION with `allout-override-protect' let-bound t."
   `(let ((allout-override-protect t))
      ,expr))
 ;;;_   = allout-undo-aggregation
   `(let ((allout-override-protect t))
      ,expr))
 ;;;_   = allout-undo-aggregation
@@ -910,7 +904,7 @@ mode from prop-line file-var activation.  Used by `allout-mode' function
 to track repeats.")
 ;;;_   > allout-write-file-hook ()
 (defun allout-write-file-hook ()
 to track repeats.")
 ;;;_   > allout-write-file-hook ()
 (defun allout-write-file-hook ()
-  "In `allout-mode', run as a `local-write-file-hooks' activity.
+  "In `allout-mode', run as a `write-contents-functions' activity.
 
 Currently just sets `allout-during-write-cue', so outline change-protection
 knows to keep inactive during file write."
 
 Currently just sets `allout-during-write-cue', so outline change-protection
 knows to keep inactive during file write."
@@ -951,7 +945,7 @@ the `allout-layout' variable.  (See `allout-layout' and
 `allout-expose-topic' docstrings for more details on auto layout).
 
 `allout-init' works by setting up (or removing)
 `allout-expose-topic' docstrings for more details on auto layout).
 
 `allout-init' works by setting up (or removing)
-`allout-find-file-hook' in `find-file-hooks', and giving
+`allout-find-file-hook' in `find-file-hook', and giving
 `allout-auto-activation' a suitable setting.
 
 To prime your emacs session for full auto-outline operation, include
 `allout-auto-activation' a suitable setting.
 
 To prime your emacs session for full auto-outline operation, include
@@ -980,16 +974,16 @@ the following two lines in your emacs init file:
        (curr-mode 'allout-auto-activation))
 
     (cond ((not mode)
        (curr-mode 'allout-auto-activation))
 
     (cond ((not mode)
-          (setq find-file-hooks (delq hook find-file-hooks))
+          (setq find-file-hook (delq hook find-file-hook))
           (if (interactive-p)
               (message "Allout outline mode auto-activation inhibited.")))
          ((eq mode 'report)
           (if (interactive-p)
               (message "Allout outline mode auto-activation inhibited.")))
          ((eq mode 'report)
-          (if (memq hook find-file-hooks)
+          (if (memq hook find-file-hook)
               ;; Just punt and use the reports from each of the modes:
               (allout-init (symbol-value curr-mode))
             (allout-init nil)
             (message "Allout outline mode auto-activation inhibited.")))
               ;; Just punt and use the reports from each of the modes:
               (allout-init (symbol-value curr-mode))
             (allout-init nil)
             (message "Allout outline mode auto-activation inhibited.")))
-         (t (add-hook 'find-file-hooks hook)
+         (t (add-hook 'find-file-hook hook)
             (set curr-mode             ; `set', not `setq'!
                  (cond ((eq mode 'activate)
                         (message
             (set curr-mode             ; `set', not `setq'!
                  (cond ((eq mode 'activate)
                         (message
@@ -1049,7 +1043,7 @@ and many other features.
 Below is a description of the bindings, and then explanation of
 special `allout-mode' features and terminology.  See also the outline
 menubar additions for quick reference to many of the features, and see
 Below is a description of the bindings, and then explanation of
 special `allout-mode' features and terminology.  See also the outline
 menubar additions for quick reference to many of the features, and see
-the docstring of the variable `allout-init' for instructions on
+the docstring of the function `allout-init' for instructions on
 priming your emacs session for automatic activation of `allout-mode'.
 
 
 priming your emacs session for automatic activation of `allout-mode'.
 
 
@@ -1079,7 +1073,7 @@ C-c <     allout-shift-out        ... less deep.
 C-c<CR>        allout-rebullet-topic   Reconcile bullets of topic and its offspring
                                - distinctive bullets are not changed, others
                                  alternated according to nesting depth.
 C-c<CR>        allout-rebullet-topic   Reconcile bullets of topic and its offspring
                                - distinctive bullets are not changed, others
                                  alternated according to nesting depth.
-C-c b  allout-rebullet-current-heading Prompt for alternate bullet for
+C-c *  allout-rebullet-current-heading Prompt for alternate bullet for
                                         current topic.
 C-c #  allout-number-siblings  Number bullets of topic and siblings - the
                                offspring are not affected.  With repeat
                                         current topic.
 C-c #  allout-number-siblings  Number bullets of topic and siblings - the
                                offspring are not affected.  With repeat
@@ -1253,19 +1247,6 @@ OPEN:    A topic that is not closed, though its offspring or body may be."
                                       ; active state or *de*activation
                                       ; specifically requested:
       (setq allout-explicitly-deactivated t)
                                       ; active state or *de*activation
                                       ; specifically requested:
       (setq allout-explicitly-deactivated t)
-      (if (string-match "^18\." emacs-version)
-                                      ; Revoke those keys that remain
-                                      ; as we set them:
-         (let ((curr-loc (current-local-map)))
-          (mapcar (function
-                   (lambda (cell)
-                     (if (eq (lookup-key curr-loc (car cell))
-                             (car (cdr cell)))
-                         (define-key curr-loc (car cell)
-                           (assq (car cell) allout-prior-bindings)))))
-                  allout-added-bindings)
-          (allout-resumptions 'allout-added-bindings)
-          (allout-resumptions 'allout-prior-bindings)))
 
       (if allout-old-style-prefixes
          (progn
 
       (if allout-old-style-prefixes
          (progn
@@ -1274,9 +1255,9 @@ OPEN:     A topic that is not closed, though its offspring or body may be."
       (allout-resumptions 'selective-display)
       (if (and (boundp 'before-change-functions) before-change-functions)
          (allout-resumptions 'before-change-functions))
       (allout-resumptions 'selective-display)
       (if (and (boundp 'before-change-functions) before-change-functions)
          (allout-resumptions 'before-change-functions))
-      (setq local-write-file-hooks
-          (delq 'allout-write-file-hook
-                local-write-file-hooks))
+      (setq write-contents-functions
+           (delq 'allout-write-file-hook
+                 write-contents-functions))
       (allout-resumptions 'paragraph-start)
       (allout-resumptions 'paragraph-separate)
       (allout-resumptions (if (string-match "^18" emacs-version)
       (allout-resumptions 'paragraph-start)
       (allout-resumptions 'paragraph-separate)
       (allout-resumptions (if (string-match "^18" emacs-version)
@@ -1316,13 +1297,6 @@ OPEN:    A topic that is not closed, though its offspring or body may be."
                     (cons '(allout-mode . allout-mode-map)
                           minor-mode-map-alist))))
 
                     (cons '(allout-mode . allout-mode-map)
                           minor-mode-map-alist))))
 
-                                      ; V18 minor-mode key bindings:
-                                      ; Stash record of added bindings
-                                      ; for later revocation:
-       (allout-resumptions 'allout-added-bindings
-                           (list allout-keybindings-list))
-       (allout-resumptions 'allout-prior-bindings
-                           (list (current-local-map)))
                                       ; and add them:
        (use-local-map (produce-allout-mode-map allout-keybindings-list
                                                (current-local-map)))
                                       ; and add them:
        (use-local-map (produce-allout-mode-map allout-keybindings-list
                                                (current-local-map)))
@@ -1341,7 +1315,7 @@ OPEN:     A topic that is not closed, though its offspring or body may be."
                                       ; Temporarily set by any outline
                                       ; functions that can be trusted to
                                       ; deal properly with concealed text.
                                       ; Temporarily set by any outline
                                       ; functions that can be trusted to
                                       ; deal properly with concealed text.
-      (add-hook 'local-write-file-hooks 'allout-write-file-hook)
+      (add-hook 'write-contents-functions 'allout-write-file-hook)
                                       ; Custom auto-fill func, to support
                                       ; respect for topic headline,
                                       ; hanging-indents, etc:
                                       ; Custom auto-fill func, to support
                                       ; respect for topic headline,
                                       ; hanging-indents, etc:
@@ -3015,9 +2989,9 @@ Third arg NUMBER-CONTROL can force the prefix to or away from
 numbered form.  It has effect only if `allout-numbered-bullet' is
 non-nil and soliciting was not explicitly invoked (via first arg).
 Its effect, numbering or denumbering, then depends on the setting
 numbered form.  It has effect only if `allout-numbered-bullet' is
 non-nil and soliciting was not explicitly invoked (via first arg).
 Its effect, numbering or denumbering, then depends on the setting
-of the forth arg, INDEX.
+of the fourth arg, INDEX.
 
 
-If NUMBER-CONTROL is non-nil and forth arg INDEX is nil, then the
+If NUMBER-CONTROL is non-nil and fourth arg INDEX is nil, then the
 prefix of the topic is forced to be non-numbered.  Null index and
 non-nil NUMBER-CONTROL forces denumbering.  Non-nil INDEX (and
 non-nil NUMBER-CONTROL) forces a numbered-prefix form.  If non-nil
 prefix of the topic is forced to be non-numbered.  Null index and
 non-nil NUMBER-CONTROL forces denumbering.  Non-nil INDEX (and
 non-nil NUMBER-CONTROL) forces a numbered-prefix form.  If non-nil
@@ -4770,4 +4744,5 @@ so pass them along when appropriate."
 ;;;allout-layout: (0 : -1 -1 0)
 ;;;End:
 
 ;;;allout-layout: (0 : -1 -1 0)
 ;;;End:
 
+;;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c
 ;;; allout.el ends here
 ;;; allout.el ends here