emacs-devel
[Top][All Lists]
Advanced

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

cursor-in-non-selected-windows in edebug


From: Juri Linkov
Subject: cursor-in-non-selected-windows in edebug
Date: Sat, 10 Dec 2005 12:27:45 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

I use cursor-in-non-selected-windows=nil, because it is difficult to
quickly locate a window with the active cursor, and I never needed its
default behavior, with only one exception.  In edebug, displaying a
cursor in non-selected windows is necessary to follow point movements
in another window.

After looking for a way to enable it in edebug, I noticed the inviting
comment that says "any others??" just after binding
`cursor-in-echo-area' to nil in `edebug-display'.  The patch below
accepts this invitation and binds `cursor-in-non-selected-windows'
to t in the same places.  But unlike `cursor-in-echo-area' it needs
special treatment because `cursor-in-non-selected-windows' is
automatically buffer-local.  I believe no one might want to have
`cursor-in-non-selected-windows' disabled while edebug is active
even when its value is set to nil.

Index: lisp/emacs-lisp/edebug.el
===================================================================
RCS file: /cvsroot/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   10 Dec 2005 10:27:34 -0000
***************
*** 2516,2521 ****
--- 2519,2525 ----
  (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-c-i-n-s-w) ; outside cursor-in-non-selected-windows
  
  (defvar edebug-eval-list nil) ;; List of expressions to evaluate.
  
***************
*** 2557,2569 ****
  
        (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))
              (let ((debug-on-error nil))
                (error "Buffer defining %s not found" edebug-function)))
--- 2561,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-c-i-n-s-w (default-value 
'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)
              ;; any others??
              )
+         (setq-default cursor-in-non-selected-windows t)
          (if (not (buffer-name edebug-buffer))
              (let ((debug-on-error nil))
                (error "Buffer defining %s not found" edebug-function)))
***************
*** 2768,2773 ****
--- 2774,2780 ----
         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)
+       (setq-default cursor-in-non-selected-windows edebug-outside-c-i-n-s-w)
        )))
  
  
***************
*** 3581,3586 ****
--- 3588,3594 ----
           (overlay-arrow-string edebug-outside-o-a-s)
           (cursor-in-echo-area edebug-outside-c-i-e-a)
           )
+        (setq-default cursor-in-non-selected-windows edebug-outside-c-i-n-s-w)
         (unwind-protect
           (save-excursion              ; of edebug-buffer
             (set-buffer edebug-outside-buffer)
***************
*** 3618,3624 ****
--- 3626,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-c-i-n-s-w (default-value 
'cursor-in-non-selected-windows)
          )
+        (setq-default cursor-in-non-selected-windows t)
  
         ;; Restore the outside saved values; don't alter
         ;; the outside binding loci.
  
-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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