From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Newsgroups: gmane.emacs.bugs 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 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317633173 29757 80.91.229.12 (3 Oct 2011 09:12:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2011 09:12:53 +0000 (UTC) To: 9659@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 03 11:12:49 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RAeZs-0004LB-RR for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Oct 2011 11:12:49 +0200 Original-Received: from localhost ([::1]:60772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeZp-0006c5-I0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Oct 2011 05:12:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeZl-0006bZ-HZ for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:12:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAeZk-0007vY-5s for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:12:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeZk-0007vU-2s for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:12:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RAeb4-0001lk-6v for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Oct 2011 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9659 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13176332016736 (code B ref -1); Mon, 03 Oct 2011 09:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2011 09:13:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAeaP-0001ka-C8 for submit@debbugs.gnu.org; Mon, 03 Oct 2011 05:13:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAeaM-0001kT-KH for submit@debbugs.gnu.org; Mon, 03 Oct 2011 05:13:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAeZ0-0007rJ-F8 for submit@debbugs.gnu.org; Mon, 03 Oct 2011 05:11:55 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:47107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeZ0-0007rE-Cy for submit@debbugs.gnu.org; Mon, 03 Oct 2011 05:11:54 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeYy-0006aF-Qq for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:11:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAeYx-0007qc-0g for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:11:52 -0400 Original-Received: from mail2.siscog.pt ([195.22.30.41]:22089 helo=lximaps01.siscog.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAeYv-0007ps-VR for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 05:11:50 -0400 Original-Received: from BELMONTE (belmonte.siscog.com [194.100.100.149]) by lximaps01.siscog.com (Postfix) with ESMTP id 172536D2A2 for ; Mon, 3 Oct 2011 10:11:34 +0100 (WEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 03 Oct 2011 05:14:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52104 Archived-At: 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: 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 C-h f t e x t SPC m o d RET C-x o 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 RET C-x o 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 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 M-x r e p o r t SPC b u 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 m a c s 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)