diff options
| author | Stefan Monnier | 2009-08-28 04:12:49 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-08-28 04:12:49 +0000 |
| commit | de70529f66f8c7b2ccec01408a442165dd5aa9ea (patch) | |
| tree | 0a292bc6bbd4cb1a3110e0e0ef41e95e4ef14304 | |
| parent | 705e5bd93279627a7b1a542f818a0b3967537438 (diff) | |
| download | emacs-de70529f66f8c7b2ccec01408a442165dd5aa9ea.tar.gz emacs-de70529f66f8c7b2ccec01408a442165dd5aa9ea.zip | |
(edebug-display, edebug-outside-excursion):
Replace uses of default-cursor-in-non-selected-windows
with (default-value 'cursor-in-non-selected-windows). Use with-current-buffer.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 29 |
2 files changed, 19 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4ad119e5a4..ea46d8ebd91 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/edebug.el (edebug-display, edebug-outside-excursion): | ||
| 4 | Replace uses of default-cursor-in-non-selected-windows | ||
| 5 | with (default-value 'cursor-in-non-selected-windows). | ||
| 6 | Use with-current-buffer. | ||
| 7 | |||
| 3 | * mail/feedmail.el: Use CL macros. | 8 | * mail/feedmail.el: Use CL macros. |
| 4 | (feedmail-run-the-queue, feedmail-send-it-immediately): | 9 | (feedmail-run-the-queue, feedmail-send-it-immediately): |
| 5 | * dos-w32.el (find-buffer-file-type): Replace uses of | 10 | * dos-w32.el (find-buffer-file-type): Replace uses of |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 562a9d7a1c1..fe47074bf97 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -352,8 +352,7 @@ Return the result of the last expression in BODY." | |||
| 352 | (edebug:s-r-end (point-max-marker))) | 352 | (edebug:s-r-end (point-max-marker))) |
| 353 | (unwind-protect | 353 | (unwind-protect |
| 354 | (progn ,@body) | 354 | (progn ,@body) |
| 355 | (save-excursion | 355 | (with-current-buffer (marker-buffer edebug:s-r-beg) |
| 356 | (set-buffer (marker-buffer edebug:s-r-beg)) | ||
| 357 | (narrow-to-region edebug:s-r-beg edebug:s-r-end))))) | 356 | (narrow-to-region edebug:s-r-beg edebug:s-r-end))))) |
| 358 | 357 | ||
| 359 | ;;; Display | 358 | ;;; Display |
| @@ -2579,15 +2578,16 @@ MSG is printed after `::::} '." | |||
| 2579 | (edebug-outside-o-a-p overlay-arrow-position) | 2578 | (edebug-outside-o-a-p overlay-arrow-position) |
| 2580 | (edebug-outside-o-a-s overlay-arrow-string) | 2579 | (edebug-outside-o-a-s overlay-arrow-string) |
| 2581 | (edebug-outside-c-i-e-a cursor-in-echo-area) | 2580 | (edebug-outside-c-i-e-a cursor-in-echo-area) |
| 2582 | (edebug-outside-d-c-i-n-s-w default-cursor-in-non-selected-windows)) | 2581 | (edebug-outside-d-c-i-n-s-w |
| 2582 | (default-value 'cursor-in-non-selected-windows))) | ||
| 2583 | (unwind-protect | 2583 | (unwind-protect |
| 2584 | (let ((overlay-arrow-position overlay-arrow-position) | 2584 | (let ((overlay-arrow-position overlay-arrow-position) |
| 2585 | (overlay-arrow-string overlay-arrow-string) | 2585 | (overlay-arrow-string overlay-arrow-string) |
| 2586 | (cursor-in-echo-area nil) | 2586 | (cursor-in-echo-area nil) |
| 2587 | (default-cursor-in-non-selected-windows t) | ||
| 2588 | (unread-command-events unread-command-events) | 2587 | (unread-command-events unread-command-events) |
| 2589 | ;; any others?? | 2588 | ;; any others?? |
| 2590 | ) | 2589 | ) |
| 2590 | (setq-default cursor-in-non-selected-windows t) | ||
| 2591 | (if (not (buffer-name edebug-buffer)) | 2591 | (if (not (buffer-name edebug-buffer)) |
| 2592 | (let ((debug-on-error nil)) | 2592 | (let ((debug-on-error nil)) |
| 2593 | (error "Buffer defining %s not found" edebug-function))) | 2593 | (error "Buffer defining %s not found" edebug-function))) |
| @@ -2782,10 +2782,8 @@ MSG is printed after `::::} '." | |||
| 2782 | ;; Restore edebug-buffer's outside point. | 2782 | ;; Restore edebug-buffer's outside point. |
| 2783 | ;; (edebug-trace "restore edebug-buffer point: %s" | 2783 | ;; (edebug-trace "restore edebug-buffer point: %s" |
| 2784 | ;; edebug-buffer-outside-point) | 2784 | ;; edebug-buffer-outside-point) |
| 2785 | (let ((current-buffer (current-buffer))) | 2785 | (with-current-buffer edebug-buffer |
| 2786 | (set-buffer edebug-buffer) | 2786 | (goto-char edebug-buffer-outside-point)) |
| 2787 | (goto-char edebug-buffer-outside-point) | ||
| 2788 | (set-buffer current-buffer)) | ||
| 2789 | ;; ... nothing more. | 2787 | ;; ... nothing more. |
| 2790 | ) | 2788 | ) |
| 2791 | (with-timeout-unsuspend edebug-with-timeout-suspend) | 2789 | (with-timeout-unsuspend edebug-with-timeout-suspend) |
| @@ -2794,8 +2792,8 @@ MSG is printed after `::::} '." | |||
| 2794 | unread-command-events edebug-outside-unread-command-events | 2792 | unread-command-events edebug-outside-unread-command-events |
| 2795 | overlay-arrow-position edebug-outside-o-a-p | 2793 | overlay-arrow-position edebug-outside-o-a-p |
| 2796 | overlay-arrow-string edebug-outside-o-a-s | 2794 | overlay-arrow-string edebug-outside-o-a-s |
| 2797 | cursor-in-echo-area edebug-outside-c-i-e-a | 2795 | cursor-in-echo-area edebug-outside-c-i-e-a) |
| 2798 | default-cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) | 2796 | (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) |
| 2799 | ))) | 2797 | ))) |
| 2800 | 2798 | ||
| 2801 | 2799 | ||
| @@ -2851,8 +2849,7 @@ MSG is printed after `::::} '." | |||
| 2851 | (let ((edebug-buffer-read-only buffer-read-only) | 2849 | (let ((edebug-buffer-read-only buffer-read-only) |
| 2852 | ;; match-data must be done in the outside buffer | 2850 | ;; match-data must be done in the outside buffer |
| 2853 | (edebug-outside-match-data | 2851 | (edebug-outside-match-data |
| 2854 | (save-excursion ; might be unnecessary now?? | 2852 | (with-current-buffer edebug-outside-buffer ; in case match buffer different |
| 2855 | (set-buffer edebug-outside-buffer) ; in case match buffer different | ||
| 2856 | (match-data))) | 2853 | (match-data))) |
| 2857 | 2854 | ||
| 2858 | ;;(edebug-number-of-recursions (1+ edebug-number-of-recursions)) | 2855 | ;;(edebug-number-of-recursions (1+ edebug-number-of-recursions)) |
| @@ -3605,8 +3602,8 @@ Return the result of the last expression." | |||
| 3605 | (overlay-arrow-position edebug-outside-o-a-p) | 3602 | (overlay-arrow-position edebug-outside-o-a-p) |
| 3606 | (overlay-arrow-string edebug-outside-o-a-s) | 3603 | (overlay-arrow-string edebug-outside-o-a-s) |
| 3607 | (cursor-in-echo-area edebug-outside-c-i-e-a) | 3604 | (cursor-in-echo-area edebug-outside-c-i-e-a) |
| 3608 | (default-cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) | ||
| 3609 | ) | 3605 | ) |
| 3606 | (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) | ||
| 3610 | (unwind-protect | 3607 | (unwind-protect |
| 3611 | (save-excursion ; of edebug-buffer | 3608 | (save-excursion ; of edebug-buffer |
| 3612 | (set-buffer edebug-outside-buffer) | 3609 | (set-buffer edebug-outside-buffer) |
| @@ -3642,14 +3639,16 @@ Return the result of the last expression." | |||
| 3642 | edebug-outside-o-a-p overlay-arrow-position | 3639 | edebug-outside-o-a-p overlay-arrow-position |
| 3643 | edebug-outside-o-a-s overlay-arrow-string | 3640 | edebug-outside-o-a-s overlay-arrow-string |
| 3644 | edebug-outside-c-i-e-a cursor-in-echo-area | 3641 | edebug-outside-c-i-e-a cursor-in-echo-area |
| 3645 | edebug-outside-d-c-i-n-s-w default-cursor-in-non-selected-windows | 3642 | edebug-outside-d-c-i-n-s-w (default-value |
| 3646 | ) | 3643 | 'cursor-in-non-selected-windows) |
| 3644 | ) | ||
| 3647 | 3645 | ||
| 3648 | ;; Restore the outside saved values; don't alter | 3646 | ;; Restore the outside saved values; don't alter |
| 3649 | ;; the outside binding loci. | 3647 | ;; the outside binding loci. |
| 3650 | (setcdr edebug-outside-pre-command-hook pre-command-hook) | 3648 | (setcdr edebug-outside-pre-command-hook pre-command-hook) |
| 3651 | (setcdr edebug-outside-post-command-hook post-command-hook) | 3649 | (setcdr edebug-outside-post-command-hook post-command-hook) |
| 3652 | 3650 | ||
| 3651 | (setq-default cursor-in-non-selected-windows t) | ||
| 3653 | )) ; let | 3652 | )) ; let |
| 3654 | )) | 3653 | )) |
| 3655 | 3654 | ||