unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: cursor-in-non-selected-windows in edebug
Date: Wed, 14 Dec 2005 19:06:17 +0200	[thread overview]
Message-ID: <87fyowklsu.fsf@jurta.org> (raw)
In-Reply-To: <E1ElJM6-0003qU-Em@fencepost.gnu.org> (Richard M. Stallman's message of "Sun, 11 Dec 2005 00:02:38 -0500")

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/

  reply	other threads:[~2005-12-14 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-10 10:27 cursor-in-non-selected-windows in edebug Juri Linkov
2005-12-11  5:02 ` Richard M. Stallman
2005-12-14 17:06   ` Juri Linkov [this message]
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=87fyowklsu.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.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).