diff options
| author | Richard M. Stallman | 2005-07-16 19:15:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-07-16 19:15:35 +0000 |
| commit | 4185451dc73f896dd31b4dd7d902b10110ab5dcc (patch) | |
| tree | 49bac855970d832a0c3d42df205610723df8979c | |
| parent | 87e976736525a9cb2ce001d15ce39295c500fbbf (diff) | |
| download | emacs-4185451dc73f896dd31b4dd7d902b10110ab5dcc.tar.gz emacs-4185451dc73f896dd31b4dd7d902b10110ab5dcc.zip | |
(allout-isearch-did-quit): Variable deleted.
(allout-real-isearch-abort): Function name no longer used.
(allout-mode): Do allout-enwrap-isearch whenever feature is wanted.
(allout-isearch-rectification): isearch-mode always exists.
Don't set allout-isearch-did-quit.
(allout-isearch-expose): Check isearch-mode-end-hook-error, not
allout-isearch-did-quit.
(allout-enwrap-isearch): Just add the hook.
(allout-isearch-abort): Function deleted.
(allout-pre-command-business): Avoid warning.
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/allout.el | 60 |
2 files changed, 22 insertions, 54 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2be67ff9b92..b67ad5b7f96 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -6,7 +6,21 @@ | |||
| 6 | (byte-compile-or): Use that. | 6 | (byte-compile-or): Use that. |
| 7 | (byte-compile-if): Guard the else-clause too. | 7 | (byte-compile-if): Guard the else-clause too. |
| 8 | (byte-compile-maybe-guarded): Handle (not (featurep 'emacs)). | 8 | (byte-compile-maybe-guarded): Handle (not (featurep 'emacs)). |
| 9 | Simplify conditions of the form (not (not BASE)). | 9 | |
| 10 | * isearch.el (isearch-mode-end-hook-quit): New variable. | ||
| 11 | (isearch-done): Bind it. | ||
| 12 | (isearch-mode-end-hook): Doc fix. | ||
| 13 | |||
| 14 | * allout.el (allout-isearch-did-quit): Variable deleted. | ||
| 15 | (allout-real-isearch-abort): Function name no longer used. | ||
| 16 | (allout-mode): Do allout-enwrap-isearch whenever feature is wanted. | ||
| 17 | (allout-isearch-rectification): isearch-mode always exists. | ||
| 18 | Don't set allout-isearch-did-quit. | ||
| 19 | (allout-isearch-expose): Check isearch-mode-end-hook-error, not | ||
| 20 | allout-isearch-did-quit. | ||
| 21 | (allout-enwrap-isearch): Just add the hook. | ||
| 22 | (allout-isearch-abort): Function deleted. | ||
| 23 | (allout-pre-command-business): Avoid warning. | ||
| 10 | 24 | ||
| 11 | * progmodes/pascal.el (pascal-outline-map): Use fboundp, not boundp. | 25 | * progmodes/pascal.el (pascal-outline-map): Use fboundp, not boundp. |
| 12 | Correctly avoid warnings. | 26 | Correctly avoid warnings. |
diff --git a/lisp/allout.el b/lisp/allout.el index eb8df2dae5c..2c02397bd1a 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -870,13 +870,6 @@ allout-pre- and -post-command-hooks.") | |||
| 870 | (defvar allout-isearch-prior-pos nil | 870 | (defvar allout-isearch-prior-pos nil |
| 871 | "Cue for isearch-dynamic-exposure tracking, used by `allout-isearch-expose'.") | 871 | "Cue for isearch-dynamic-exposure tracking, used by `allout-isearch-expose'.") |
| 872 | (make-variable-buffer-local 'allout-isearch-prior-pos) | 872 | (make-variable-buffer-local 'allout-isearch-prior-pos) |
| 873 | ;;;_ = allout-isearch-did-quit | ||
| 874 | (defvar allout-isearch-did-quit nil | ||
| 875 | "Distinguishes isearch conclusion and cancellation. | ||
| 876 | |||
| 877 | Maintained by `allout-isearch-abort' \(which is wrapped around the real | ||
| 878 | isearch-abort), and monitored by `allout-isearch-expose' for action.") | ||
| 879 | (make-variable-buffer-local 'allout-isearch-did-quit) | ||
| 880 | ;;;_ = allout-override-protect nil | 873 | ;;;_ = allout-override-protect nil |
| 881 | (defvar allout-override-protect nil | 874 | (defvar allout-override-protect nil |
| 882 | "Used in `allout-mode' for regulate of concealed-text protection mechanism. | 875 | "Used in `allout-mode' for regulate of concealed-text protection mechanism. |
| @@ -1343,8 +1336,7 @@ OPEN: A topic that is not closed, though its offspring or body may be." | |||
| 1343 | (if allout-layout | 1336 | (if allout-layout |
| 1344 | (setq do-layout t)) | 1337 | (setq do-layout t)) |
| 1345 | 1338 | ||
| 1346 | (if (and allout-isearch-dynamic-expose | 1339 | (if allout-isearch-dynamic-expose |
| 1347 | (not (fboundp 'allout-real-isearch-abort))) | ||
| 1348 | (allout-enwrap-isearch)) | 1340 | (allout-enwrap-isearch)) |
| 1349 | 1341 | ||
| 1350 | (run-hooks 'allout-mode-hook) | 1342 | (run-hooks 'allout-mode-hook) |
| @@ -2325,9 +2317,7 @@ return to regular interpretation of self-insert characters." | |||
| 2325 | (let* ((this-key-num (cond | 2317 | (let* ((this-key-num (cond |
| 2326 | ((numberp last-command-char) | 2318 | ((numberp last-command-char) |
| 2327 | last-command-char) | 2319 | last-command-char) |
| 2328 | ;; XXX Only XEmacs has characterp. | 2320 | ((fboundp 'char-to-int) |
| 2329 | ((and (fboundp 'characterp) | ||
| 2330 | (characterp last-command-char)) | ||
| 2331 | (char-to-int last-command-char)) | 2321 | (char-to-int last-command-char)) |
| 2332 | (t 0))) | 2322 | (t 0))) |
| 2333 | mapped-binding) | 2323 | mapped-binding) |
| @@ -2363,7 +2353,7 @@ See `allout-init' for setup instructions." | |||
| 2363 | 2353 | ||
| 2364 | Called as part of `allout-post-command-business'." | 2354 | Called as part of `allout-post-command-business'." |
| 2365 | 2355 | ||
| 2366 | (let ((isearching (and (boundp 'isearch-mode) isearch-mode))) | 2356 | (let ((isearching isearch-mode)) |
| 2367 | (cond ((and isearching (not allout-pre-was-isearching)) | 2357 | (cond ((and isearching (not allout-pre-was-isearching)) |
| 2368 | (allout-isearch-expose 'start)) | 2358 | (allout-isearch-expose 'start)) |
| 2369 | ((and isearching allout-pre-was-isearching) | 2359 | ((and isearching allout-pre-was-isearching) |
| @@ -2371,8 +2361,7 @@ Called as part of `allout-post-command-business'." | |||
| 2371 | ((and (not isearching) allout-pre-was-isearching) | 2361 | ((and (not isearching) allout-pre-was-isearching) |
| 2372 | (allout-isearch-expose 'final)) | 2362 | (allout-isearch-expose 'final)) |
| 2373 | ;; Not and wasn't isearching: | 2363 | ;; Not and wasn't isearching: |
| 2374 | (t (setq allout-isearch-prior-pos nil) | 2364 | (t (setq allout-isearch-prior-pos nil))))) |
| 2375 | (setq allout-isearch-did-quit nil))))) | ||
| 2376 | ;;;_ = allout-isearch-was-font-lock | 2365 | ;;;_ = allout-isearch-was-font-lock |
| 2377 | (defvar allout-isearch-was-font-lock | 2366 | (defvar allout-isearch-was-font-lock |
| 2378 | (and (boundp 'font-lock-mode) font-lock-mode)) | 2367 | (and (boundp 'font-lock-mode) font-lock-mode)) |
| @@ -2414,51 +2403,16 @@ Returns the endpoint of the region." | |||
| 2414 | (setq allout-isearch-prior-pos nil) | 2403 | (setq allout-isearch-prior-pos nil) |
| 2415 | (if (not (eq mode 'final)) | 2404 | (if (not (eq mode 'final)) |
| 2416 | (setq allout-isearch-prior-pos (cons (point) (allout-show-entry))) | 2405 | (setq allout-isearch-prior-pos (cons (point) (allout-show-entry))) |
| 2417 | (if allout-isearch-did-quit | 2406 | (if isearch-mode-end-hook-error |
| 2418 | nil | 2407 | nil |
| 2419 | (setq allout-isearch-prior-pos nil) | 2408 | (setq allout-isearch-prior-pos nil) |
| 2420 | (allout-show-children)))) | 2409 | (allout-show-children))))) |
| 2421 | (setq allout-isearch-did-quit nil)) | ||
| 2422 | ;;;_ > allout-enwrap-isearch () | 2410 | ;;;_ > allout-enwrap-isearch () |
| 2423 | (defun allout-enwrap-isearch () | 2411 | (defun allout-enwrap-isearch () |
| 2424 | "Impose `isearch-abort' wrapper for dynamic exposure in isearch. | 2412 | "Impose `isearch-abort' wrapper for dynamic exposure in isearch. |
| 2425 | 2413 | ||
| 2426 | The function checks to ensure that the rebinding is done only once." | 2414 | The function checks to ensure that the rebinding is done only once." |
| 2427 | 2415 | (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification)) | |
| 2428 | (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification) | ||
| 2429 | (if (fboundp 'allout-real-isearch-abort) | ||
| 2430 | ;; | ||
| 2431 | nil | ||
| 2432 | ; Ensure load of isearch-mode: | ||
| 2433 | (if (or (and (fboundp 'isearch-mode) | ||
| 2434 | (fboundp 'isearch-abort)) | ||
| 2435 | (condition-case error | ||
| 2436 | (load-library "isearch-mode") | ||
| 2437 | ('file-error (message | ||
| 2438 | "Skipping isearch-mode provisions - %s '%s'" | ||
| 2439 | (car (cdr error)) | ||
| 2440 | (car (cdr (cdr error)))) | ||
| 2441 | (sit-for 1) | ||
| 2442 | ;; Inhibit subsequent tries and return nil: | ||
| 2443 | (setq allout-isearch-dynamic-expose nil)))) | ||
| 2444 | ;; Isearch-mode loaded, encapsulate specific entry points for | ||
| 2445 | ;; outline dynamic-exposure business: | ||
| 2446 | (progn | ||
| 2447 | ;; stash crucial isearch-mode funcs under known, private | ||
| 2448 | ;; names, then register wrapper functions under the old | ||
| 2449 | ;; names, in their stead: | ||
| 2450 | (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort)) | ||
| 2451 | (fset 'isearch-abort 'allout-isearch-abort))))) | ||
| 2452 | ;;;_ > allout-isearch-abort () | ||
| 2453 | (defun allout-isearch-abort () | ||
| 2454 | "Wrapper for `allout-real-isearch-abort' \(which see), to register | ||
| 2455 | actual quits." | ||
| 2456 | (interactive) | ||
| 2457 | (setq allout-isearch-did-quit nil) | ||
| 2458 | (condition-case what | ||
| 2459 | (allout-real-isearch-abort) | ||
| 2460 | ('quit (setq allout-isearch-did-quit t) | ||
| 2461 | (signal 'quit nil)))) | ||
| 2462 | 2416 | ||
| 2463 | ;;; Prevent unnecessary font-lock while isearching! | 2417 | ;;; Prevent unnecessary font-lock while isearching! |
| 2464 | (defvar isearch-was-font-locking nil) | 2418 | (defvar isearch-was-font-locking nil) |