[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Default :group in lisp/emacs-lisp/easy-mmode.el.
From: |
Lute Kamstra |
Subject: |
Default :group in lisp/emacs-lisp/easy-mmode.el. |
Date: |
Thu, 31 Mar 2005 12:23:21 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
In define-minor-mode and easy-mmode-define-global-mode, the default
:group value for defcustom calls is calculated by means of
(or (custom-current-group)
(intern (replace-regexp-in-string
"-mode\\'" "" mode-name)))
which is evaluated at compile-time. custom-current-group uses
load-file-name, which is nil at compile-time, so custom-current-group
returns nil at compile-time too. This doesn't seem the intended
behavior. What about the patch below?
Lute.
Index: lisp/emacs-lisp/easy-mmode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/easy-mmode.el,v
retrieving revision 1.55
diff -c -r1.55 easy-mmode.el
*** lisp/emacs-lisp/easy-mmode.el 2 Nov 2004 09:23:34 -0000 1.55
--- lisp/emacs-lisp/easy-mmode.el 31 Mar 2005 10:01:43 -0000
***************
*** 1,6 ****
;;; easy-mmode.el --- easy definition for major and minor modes
! ;; Copyright (C) 1997,2000,01,02,03,2004 Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <address@hidden>
;; Maintainer: Stefan Monnier <address@hidden>
--- 1,7 ----
;;; easy-mmode.el --- easy definition for major and minor modes
! ;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005
! ;; Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <address@hidden>
;; Maintainer: Stefan Monnier <address@hidden>
***************
*** 152,159 ****
(unless group
;; We might as well provide a best-guess default group.
(setq group
! `(:group ',(or (custom-current-group)
! (intern (replace-regexp-in-string
"-mode\\'" "" mode-name))))))
`(progn
--- 153,160 ----
(unless group
;; We might as well provide a best-guess default group.
(setq group
! `(:group (or (custom-current-group)
! ',(intern (replace-regexp-in-string
"-mode\\'" "" mode-name))))))
`(progn
***************
*** 278,285 ****
(unless group
;; We might as well provide a best-guess default group.
(setq group
! `(:group ',(or (custom-current-group)
! (intern (replace-regexp-in-string
"-mode\\'" "" (symbol-name mode)))))))
`(progn
--- 279,286 ----
(unless group
;; We might as well provide a best-guess default group.
(setq group
! `(:group (or (custom-current-group)
! ',(intern (replace-regexp-in-string
"-mode\\'" "" (symbol-name mode)))))))
`(progn
- Default :group in lisp/emacs-lisp/easy-mmode.el.,
Lute Kamstra <=