emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/allout.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/allout.el
Date: Sat, 16 Jul 2005 15:15:07 -0400

Index: emacs/lisp/allout.el
diff -c emacs/lisp/allout.el:1.55 emacs/lisp/allout.el:1.56
*** emacs/lisp/allout.el:1.55   Wed Jul 13 10:15:39 2005
--- emacs/lisp/allout.el        Sat Jul 16 19:15:06 2005
***************
*** 870,882 ****
  (defvar allout-isearch-prior-pos nil
    "Cue for isearch-dynamic-exposure tracking, used by 
`allout-isearch-expose'.")
  (make-variable-buffer-local 'allout-isearch-prior-pos)
- ;;;_   = allout-isearch-did-quit
- (defvar allout-isearch-did-quit nil
-   "Distinguishes isearch conclusion and cancellation.
- 
- Maintained by `allout-isearch-abort' \(which is wrapped around the real
- isearch-abort), and monitored by `allout-isearch-expose' for action.")
- (make-variable-buffer-local 'allout-isearch-did-quit)
  ;;;_   = allout-override-protect nil
  (defvar allout-override-protect nil
    "Used in `allout-mode' for regulate of concealed-text protection mechanism.
--- 870,875 ----
***************
*** 1343,1350 ****
        (if allout-layout
          (setq do-layout t))
  
!       (if (and allout-isearch-dynamic-expose
!              (not (fboundp 'allout-real-isearch-abort)))
          (allout-enwrap-isearch))
  
        (run-hooks 'allout-mode-hook)
--- 1336,1342 ----
        (if allout-layout
          (setq do-layout t))
  
!       (if allout-isearch-dynamic-expose
          (allout-enwrap-isearch))
  
        (run-hooks 'allout-mode-hook)
***************
*** 2325,2333 ****
        (let* ((this-key-num (cond
                              ((numberp last-command-char)
                               last-command-char)
!                             ;; XXX Only XEmacs has characterp.
!                             ((and (fboundp 'characterp)
!                                   (characterp last-command-char))
                               (char-to-int last-command-char))
                              (t 0)))
               mapped-binding)
--- 2317,2323 ----
        (let* ((this-key-num (cond
                              ((numberp last-command-char)
                               last-command-char)
!                             ((fboundp 'char-to-int)
                               (char-to-int last-command-char))
                              (t 0)))
               mapped-binding)
***************
*** 2363,2369 ****
  
  Called as part of `allout-post-command-business'."
  
!   (let ((isearching (and (boundp 'isearch-mode) isearch-mode)))
      (cond ((and isearching (not allout-pre-was-isearching))
           (allout-isearch-expose 'start))
          ((and isearching allout-pre-was-isearching)
--- 2353,2359 ----
  
  Called as part of `allout-post-command-business'."
  
!   (let ((isearching isearch-mode))
      (cond ((and isearching (not allout-pre-was-isearching))
           (allout-isearch-expose 'start))
          ((and isearching allout-pre-was-isearching)
***************
*** 2371,2378 ****
          ((and (not isearching) allout-pre-was-isearching)
           (allout-isearch-expose 'final))
          ;; Not and wasn't isearching:
!         (t (setq allout-isearch-prior-pos nil)
!            (setq allout-isearch-did-quit nil)))))
  ;;;_   = allout-isearch-was-font-lock
  (defvar allout-isearch-was-font-lock
    (and (boundp 'font-lock-mode) font-lock-mode))
--- 2361,2367 ----
          ((and (not isearching) allout-pre-was-isearching)
           (allout-isearch-expose 'final))
          ;; Not and wasn't isearching:
!         (t (setq allout-isearch-prior-pos nil)))))
  ;;;_   = allout-isearch-was-font-lock
  (defvar allout-isearch-was-font-lock
    (and (boundp 'font-lock-mode) font-lock-mode))
***************
*** 2414,2464 ****
        (setq allout-isearch-prior-pos nil)
      (if (not (eq mode 'final))
        (setq allout-isearch-prior-pos (cons (point) (allout-show-entry)))
!       (if allout-isearch-did-quit
          nil
        (setq allout-isearch-prior-pos nil)
!       (allout-show-children))))
!   (setq allout-isearch-did-quit nil))
  ;;;_   > allout-enwrap-isearch ()
  (defun allout-enwrap-isearch ()
    "Impose `isearch-abort' wrapper for dynamic exposure in isearch.
  
  The function checks to ensure that the rebinding is done only once."
! 
!   (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification)
!   (if (fboundp 'allout-real-isearch-abort)
!       ;;
!       nil
!                                         ; Ensure load of isearch-mode:
!     (if (or (and (fboundp 'isearch-mode)
!                  (fboundp 'isearch-abort))
!             (condition-case error
!                 (load-library "isearch-mode")
!               ('file-error (message
!                           "Skipping isearch-mode provisions - %s '%s'"
!                           (car (cdr error))
!                           (car (cdr (cdr error))))
!                          (sit-for 1)
!                          ;; Inhibit subsequent tries and return nil:
!                          (setq allout-isearch-dynamic-expose nil))))
!         ;; Isearch-mode loaded, encapsulate specific entry points for
!         ;; outline dynamic-exposure business:
!         (progn
!         ;; stash crucial isearch-mode funcs under known, private
!         ;; names, then register wrapper functions under the old
!         ;; names, in their stead:
!           (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort))
!           (fset 'isearch-abort 'allout-isearch-abort)))))
! ;;;_   > allout-isearch-abort ()
! (defun allout-isearch-abort ()
!   "Wrapper for `allout-real-isearch-abort' \(which see), to register
! actual quits."
!   (interactive)
!   (setq allout-isearch-did-quit nil)
!   (condition-case what
!       (allout-real-isearch-abort)
!     ('quit (setq allout-isearch-did-quit t)
!         (signal 'quit nil))))
  
  ;;; Prevent unnecessary font-lock while isearching!
  (defvar isearch-was-font-locking nil)
--- 2403,2418 ----
        (setq allout-isearch-prior-pos nil)
      (if (not (eq mode 'final))
        (setq allout-isearch-prior-pos (cons (point) (allout-show-entry)))
!       (if isearch-mode-end-hook-error
          nil
        (setq allout-isearch-prior-pos nil)
!       (allout-show-children)))))
  ;;;_   > allout-enwrap-isearch ()
  (defun allout-enwrap-isearch ()
    "Impose `isearch-abort' wrapper for dynamic exposure in isearch.
  
  The function checks to ensure that the rebinding is done only once."
!   (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification))
  
  ;;; Prevent unnecessary font-lock while isearching!
  (defvar isearch-was-font-locking nil)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]