From: Juri Linkov <juri@jurta.org>
Subject: cursor-in-non-selected-windows in edebug
Date: Sat, 10 Dec 2005 12:27:45 +0200 [thread overview]
Message-ID: <873bl1ibc0.fsf@jurta.org> (raw)
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/
next reply other threads:[~2005-12-10 10:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 10:27 Juri Linkov [this message]
2005-12-11 5:02 ` cursor-in-non-selected-windows in edebug Richard M. Stallman
2005-12-14 17:06 ` Juri Linkov
2005-12-15 2:08 ` Richard M. Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873bl1ibc0.fsf@jurta.org \
--to=juri@jurta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).