[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cursor-in-non-selected-windows in edebug
From: |
Juri Linkov |
Subject: |
Re: cursor-in-non-selected-windows in edebug |
Date: |
Wed, 14 Dec 2005 19:06:17 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
I realized that a simpler way to do this is to use
default-cursor-in-non-selected-windows rather than
(default-value 'cursor-in-non-selected-windows) and
(setq-default cursor-in-non-selected-windows ...)
default-cursor-in-non-selected-windows is a global variable,
so it is safe to let-bind it during switching buffers.
I wonder why this variable is not documented in the Emacs Lisp manual?
Some similar pairs are documented, but some are not. For instance,
there is a pair of case-fold-search and default-case-fold-search in the
Emacs Lisp manual, but there is only cursor-in-non-selected-windows
without default-cursor-in-non-selected-windows, and cursor-type
without default-cursor-type and other.
Below is a new patch that uses default-cursor-in-non-selected-windows:
Index: lisp/emacs-lisp/edebug.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/edebug.el,v
retrieving revision 3.84
diff -c -r3.84 edebug.el
*** lisp/emacs-lisp/edebug.el 6 Dec 2005 22:10:07 -0000 3.84
--- lisp/emacs-lisp/edebug.el 14 Dec 2005 17:05:38 -0000
***************
*** 2516,2521 ****
--- 2521,2527 ----
(defvar edebug-outside-o-a-p) ; outside overlay-arrow-position
(defvar edebug-outside-o-a-s) ; outside overlay-arrow-string
(defvar edebug-outside-c-i-e-a) ; outside cursor-in-echo-area
+ (defvar edebug-outside-d-c-i-n-s-w) ; outside
default-cursor-in-non-selected-windows
(defvar edebug-eval-list nil) ;; List of expressions to evaluate.
***************
*** 2557,2567 ****
(edebug-outside-o-a-p overlay-arrow-position)
(edebug-outside-o-a-s overlay-arrow-string)
! (edebug-outside-c-i-e-a cursor-in-echo-area))
(unwind-protect
(let ((overlay-arrow-position overlay-arrow-position)
(overlay-arrow-string overlay-arrow-string)
(cursor-in-echo-area nil)
;; any others??
)
(if (not (buffer-name edebug-buffer))
--- 2563,2575 ----
(edebug-outside-o-a-p overlay-arrow-position)
(edebug-outside-o-a-s overlay-arrow-string)
! (edebug-outside-c-i-e-a cursor-in-echo-area)
! (edebug-outside-d-c-i-n-s-w default-cursor-in-non-selected-windows))
(unwind-protect
(let ((overlay-arrow-position overlay-arrow-position)
(overlay-arrow-string overlay-arrow-string)
(cursor-in-echo-area nil)
+ (default-cursor-in-non-selected-windows t)
;; any others??
)
(if (not (buffer-name edebug-buffer))
***************
*** 2767,2773 ****
(setq
overlay-arrow-position edebug-outside-o-a-p
overlay-arrow-string edebug-outside-o-a-s
! cursor-in-echo-area edebug-outside-c-i-e-a)
)))
--- 2775,2782 ----
(setq
overlay-arrow-position edebug-outside-o-a-p
overlay-arrow-string edebug-outside-o-a-s
! cursor-in-echo-area edebug-outside-c-i-e-a
! default-cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
)))
***************
*** 3580,3585 ****
--- 3589,3595 ----
(overlay-arrow-position edebug-outside-o-a-p)
(overlay-arrow-string edebug-outside-o-a-s)
(cursor-in-echo-area edebug-outside-c-i-e-a)
+ (default-cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w)
)
(unwind-protect
(save-excursion ; of edebug-buffer
***************
*** 3618,3623 ****
--- 3628,3634 ----
edebug-outside-o-a-p overlay-arrow-position
edebug-outside-o-a-s overlay-arrow-string
edebug-outside-c-i-e-a cursor-in-echo-area
+ edebug-outside-d-c-i-n-s-w default-cursor-in-non-selected-windows
)
;; Restore the outside saved values; don't alter
--
Juri Linkov
http://www.jurta.org/emacs/