bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9659: 24.0.50; turn-on function of `define-globalized-minor-mode' do


From: João Távora
Subject: bug#9659: 24.0.50; turn-on function of `define-globalized-minor-mode' doesn't see some hook-set vars
Date: Mon, 03 Oct 2011 10:11:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

I don't know if this is expected behaviour, but in recent emacs versions the
following strategy to selectively deactivate a minor mode in some major
mode combinations does not work anymore. This used to work fine in emacs
22 and 23.

1. Start emacs -Q
2. Evaluate the following  

    (defvar dummy-mode-dont-turn-on nil
      "Set this buffer-locally to false to prevent dummy-mode")
    (make-variable-buffer-local 'dummy-mode-dont-turn-on)
     
     
    (define-minor-mode dummy-mode "A dummy minor mode" nil " dummy")
     
    (define-globalized-minor-mode dummy-global-mode dummy-mode 
dummy-mode-turn-on-maybe)
     
    (defun dummy-mode-turn-on-maybe () (unless dummy-mode-dont-turn-on
                                     (dummy-mode)))
     
    (add-hook 'text-mode-hook #'(lambda () (setq dummy-mode-dont-turn-on
    t)))
    (add-hook 'help-mode-hook #'(lambda () (setq dummy-mode-dont-turn-on
    t)))

3. M-x dummy-global-mode
4. Switch to a help-mode buffer. Verify dummy-mode is correctly *not*
turned on
5. Switch to a text-mode buffer. Verify dummy mode is incorrectly turned on   

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-02 on YAMALOK
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --cflags  -m32 -O2 -g0 
-march=prescott -mtune=prescott -pipe -IC:/gnuwin32/emacs/include 
-IC:/gnuwin32/emacs/lib -IC:/gnuwin32/src --ldflags  -s '

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  delete-selection-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  autopair-mode: t
  autopair-global-mode: t
  global-hl-line-mode: t
  recentf-mode: t
  show-paren-mode: t
  ido-everywhere: t
  global-hs-mode: t
  eldoc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <down-mouse-1> 
<drag-mouse-1> <help-echo> <down-mouse-1> <mouse-1> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<help-echo> <mouse-movement> <mouse-1> <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<down-mouse-1> <help-echo> <mouse-1> <help-echo> <down-mouse-1> 
<help-echo> <mouse-movement> <mouse-1> <help-echo> 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> C-h 
m x o C-n C-x o C-n C-x C-g C-x o C-_ C-x o C-n C-n 
C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-n 
C-n C-n C-p C-x o C-p C-x 1 M-< C-s s e t - v a r i 
a b C-p C-n C-s b u f f e r - l o c a l C-p C-n <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> C-h f t e x t SPC 
m o d <tab> RET C-x o <tab> RET C-x 1 C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-h f h e l p SPC m o d <tab> RET 
C-x o <tab> RET C-x 1 C-n C-n C-n C-n C-n C-n C-n C-x 
b C-s RET C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-f 
C-f C-f C-f C-f C-f C-f C-h f RET C-x o <tab> RET C-x 
1 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-s h o o k s C-p C-n C-h f 
C-g <help-echo> <down-mouse-1> <mouse-1> M-x r e p 
o r t SPC b u <tab> <help-echo> C-n C-n C-n C-n C-n 
C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-k C-k 
C-k C-k C-k C-k C-k C-SPC M-> M-w M-x r e p o r t SPC 
e m c a <tab> <backspace> <backspace> <backspace> m 
a c s <tab> RET

Recent messages:
Type C-x 1 to delete the help window.
mouse-2, RET: find function's definition
Type C-x 1 to delete the help window, C-M-v to scroll help.
mouse-2, RET: find function's definition
Type C-x 1 to delete the help window, C-M-v to scroll help.
mouse-2, RET: find function's definition
Mark saved where search started
Quit
Back to top level.
Mark set

Load-path shadows:
z:/siscog/sc-slime/slime/hyperspec hides 
z:/siscog/sc-slime/cl-hyperspec/hyperspec
z:/siscog/sc-slime/cl-shell/completion hides z:/Vendor/ntemacs24/lisp/completion
z:/holy/share/emacs/common/site-lisp/package hides 
z:/Vendor/ntemacs24/lisp/emacs-lisp/package
z:/Vendor/ntemacs24/lisp/nxml/xmltok hides 
z:/holy/share/emacs/common/site-lisp/10hacks/xmltok
z:/Vendor/ntemacs24/lisp/progmodes/flymake hides 
z:/holy/share/emacs/common/site-lisp/10hacks/flymake
z:/Vendor/ntemacs24/lisp/linum hides 
z:/holy/share/emacs/common/site-lisp/20misc/linum
z:/holy/share/emacs/common/site-lisp/20misc/markdown-mode hides 
z:/holy/share/emacs/common/site-lisp/50ruby/markdown-mode

Features:
(shadow sort mail-extr gnus-msg vc-svn emacsbug delsel w32-fullscreen
skeleton make-mode nxml-uchnm rng-xsd xsd-regexp rng-cmpct css-mode
conf-mode face-remap url-util url-parse url-vars vc-annotate animate
bridge shell info debug ffap cl-specs edebug color cua-rect rect
ibuf-ext cltl2 ps-print ps-def lpr fi-manual allegro-manual-data
slime-indentation slime-banner warnings slime-fancy slime-fontifying-fu
slime-package-fu slime-references slime-scratch slime-presentations
slime-fuzzy slime-fancy-inspector slime-c-p-c slime-editing-commands
slime-autodoc slime-parse slime-repl slime hyperspec browse-url
smerge-mode find-func dired-aux diff-mode sh-script cygwin-mount
ange-ftp newcomment executable multi-isearch crm vc-git tramp
tramp-compat auth-source eieio byte-opt bytecomp byte-compile
tramp-loaddefs hippie-exp cus-edit cus-start cus-load pp ack grep cedet
yasnippet dropdown-list help-mode yaml-mode woman man assoc
highlight-regexp ruby-mode flymake perl-find-library cperl-mode
sgml-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln
nxml-rap nxml-util nxml-glyph nxml-enc xmltok time markdown-mode
noutline outline imenu cua-base autopair hl-line windmove uniquify
recentf tree-widget paren ido hideshowvis hideshow vc vc-dispatcher
sass-mode haml-mode derived gnus-cite gnus-art mm-uu mml2015 epg-config
mm-view mml-smime smime password-cache dig mailcap nnir gnus-sum
macroexp nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-int message format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus-range gnus gnus-ems
nnheader gnus-util time-date mail-utils mm-util mail-prsvr wid-edit
etags em-cmpl em-term term ehelp electric em-prompt esh-var esh-io
esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module
esh-mode esh-util server vc-ediff ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff dired-details+ advice
help-fns advice-preload dired-details dired-x dired view thingatpt
compile comint ring rcompile cc-mode cc-fonts easymenu cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt edmacro kmacro
ibuffer package reporter heretic-project easy-mmode holy cl tooltip
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp
w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button
faces cus-face files text-properties overlay md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)





reply via email to

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