unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Strange behaviour of track-mouse and make-local-variable
@ 2002-05-26 16:40 Torsten Hilbrich
  2002-05-27 22:56 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Torsten Hilbrich @ 2002-05-26 16:40 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-03-22 on raven, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: de_DE
  value of $LC_MESSAGES: POSIX
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

=========================================================================

Here is a short example what seems to be wrong:

;; first statement
(progn
  (make-local-variable 'track-mouse)
  (if (local-variable-p 'track-mouse)
      (message "okay")
    (error "Error"))

  (with-output-to-temp-buffer "*Help*"
    nil)
  (delete-other-windows))

;; second statement
(if (local-variable-p 'track-mouse)
    (message "okay")
  (error "Error"))

All the statements must be manually evaluated using C-x C-e
(eval-last-sexp), I was unable to reproduce this error using
eval-region yet).  It seems that the return to toplevel before the
second statement is essential to trigger that bug.

Normally I would expect that these statements completes without any
error message, however in my experiments the last statement yields the
error message.

This behaviour can hardly be normal, it is too scary ;-)

If I replace the builtin variable track-mouse by another variable
(tested with 'test) the above error is not triggered.

I also tested the current CVS version (21.3.50.1, updated some minutes
ago) and got the same behaviour in this emacs version.

Regards,

        Torsten

=========================================================================


Recent input:
v a r i a b l e SPC i s SPC s t i l l SPC m a r k e 
d SPC a s SPC l o c a l : M-q <M-return> C-x k <return> 
y e s <return> g <down-mouse-2> <mouse-2> <help-echo> 
<help-echo> t SPC C-u g SPC M-u q <up> <return> <return> 
t t n n n n n n n n n n <up> <return> SPC n n SPC n 
n n n n n n n <help-echo> <down-mouse-1> <mouse-1> 
M-u q g M-x r e p o <tab> r t <tab> <return>

Recent messages:
Auto-saving...
Reading active file from localhost via nntp...
Reading active file via nnml...
nnml: Reading incoming mail from maildir... [3 times]
nnml: Reading incoming mail from file...
nnml: Reading incoming mail (no new mail)...done
Reading active file via nnml...done
Checking new news...done
Auto-saving...
Making completion list...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange behaviour of track-mouse and make-local-variable
  2002-05-26 16:40 Strange behaviour of track-mouse and make-local-variable Torsten Hilbrich
@ 2002-05-27 22:56 ` Richard Stallman
  2002-05-30 19:21   ` Torsten Hilbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2002-05-27 22:56 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Does this change fix it?

*** tooltip.el.~1.23.~	Sun May 12 12:43:49 2002
--- tooltip.el	Mon May 27 16:11:40 2002
***************
*** 299,314 ****
  	  (tooltip-activate-mouse-motions nil))
  	(setq buffers (cdr buffers))))))
  
  
  (defun tooltip-activate-mouse-motions (activatep)
    "Activate/deactivate mouse motion events for the current buffer.
  ACTIVATEP non-nil means activate mouse motion events."
    (if activatep
        (progn
  	(make-local-variable 'track-mouse)
  	(setq track-mouse t))
!     (kill-local-variable 'track-mouse)))
! 
  
  (defun tooltip-mouse-motion (event)
    "Command handler for mouse movement events in `global-map'."
--- 299,319 ----
  	  (tooltip-activate-mouse-motions nil))
  	(setq buffers (cdr buffers))))))
  
+ (defvar tooltip-mouse-motions-active nil
+   "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
  
  (defun tooltip-activate-mouse-motions (activatep)
    "Activate/deactivate mouse motion events for the current buffer.
  ACTIVATEP non-nil means activate mouse motion events."
    (if activatep
        (progn
+ 	(make-local-variable 'tooltip-mouse-motions-active)
+ 	(setq tooltip-mouse-motions-active t)
  	(make-local-variable 'track-mouse)
  	(setq track-mouse t))
!     (when tooltip-mouse-motions-active
!       (kill-local-variable 'tooltip-mouse-motions-active)
!       (kill-local-variable 'track-mouse))))
  
  (defun tooltip-mouse-motion (event)
    "Command handler for mouse movement events in `global-map'."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange behaviour of track-mouse and make-local-variable
  2002-05-27 22:56 ` Richard Stallman
@ 2002-05-30 19:21   ` Torsten Hilbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Torsten Hilbrich @ 2002-05-30 19:21 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

> Does this change fix it?

[patch for tooltip.el]

It fixes the bug I reported.  

I will have to do some more testing with my macro package, however the
code using the tooltips is still in development and it will take some
time.

I will report any other problems as I find them.

Thanks for your reply,

        Torsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-30 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-26 16:40 Strange behaviour of track-mouse and make-local-variable Torsten Hilbrich
2002-05-27 22:56 ` Richard Stallman
2002-05-30 19:21   ` Torsten Hilbrich

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).