GNU bug report logs - #4148
mode: for a minor mode should turn on, not toggle the mode

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sat, 15 Aug 2009 07:15:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 4148 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 4148 <at> debbugs.gnu.org
Subject: Re: bug#4148: mode: for a minor mode should turn on, not toggle the mode
Date: Sun, 16 Aug 2009 18:49:53 -0700 (PDT)
Chong Yidong <cyd <at> stupidchicken.com> writes:

  > Dan Nicolaescu <dann <at> ics.uci.edu> writes:
  > 
  > > Thanks, it seems to work fine.
  > >
  > > After this gets checked in, we can re-add (mode . bug-reference) to
  > > emacs/.dir-locals.el
  > >
  > > Any chance this patch can get onto the next release branch?
  > 
  > I'm having trouble coming up with a test-case for testing this patch.
  > Do you have one?

Here's one:

$ cat foo.el
(add-hook 'change-log-mode-hook (lambda () (bug-reference-mode 1)))

$ cat emacs/.dir-locals.el

((nil . ((tab-width . 8)
         (fill-column . 70)))
 (c-mode . ((c-file-style . "GNU")))
 (text-mode . ((mode . auto-fill)))
 (change-log-mode . ((add-log-time-zone-rule . t)
                     (fill-column . 74)
                     (bug-reference-url-format
                      . "http://debbugs.gnu.org/cgi/bugreport.cgi?bug=%s")
                     (mode . bug-reference))))

;; arch-tag: fb93c160-e9fe-4184-aad1-e4f5daa11cbd


$ emacs -Q -l foo.el
C-x C-f emacs/lisp/ChangeLog

C-h v bug-reference-mode RET

before your patch bug-reference-mode is nil, after it's t




This bug report was last modified 15 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.