emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112569: * cus-dep.el (defcustom-mh,


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112569: * cus-dep.el (defcustom-mh, defgroup-mh, defface-mh): Add compat aliases
Date: Mon, 13 May 2013 09:21:00 -0700
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112569
fixes bug: http://debbugs.gnu.org/14384
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2013-05-13 09:21:00 -0700
message:
  * cus-dep.el (defcustom-mh, defgroup-mh, defface-mh): Add compat aliases
  as a hack workaround.
modified:
  lisp/ChangeLog
  lisp/cus-dep.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-13 07:24:22 +0000
+++ b/lisp/ChangeLog    2013-05-13 16:21:00 +0000
@@ -1,3 +1,8 @@
+2013-05-13  Glenn Morris  <address@hidden>
+
+       * cus-dep.el (defcustom-mh, defgroup-mh, defface-mh):
+       Add compat aliases as a hack workaround.  (Bug#14384)
+
 2013-05-13  Leo Liu  <address@hidden>
 
        * progmodes/octave.el (octave-indent-comment): Fix indentation for

=== modified file 'lisp/cus-dep.el'
--- a/lisp/cus-dep.el   2013-05-11 23:54:14 +0000
+++ b/lisp/cus-dep.el   2013-05-13 16:21:00 +0000
@@ -38,6 +38,18 @@
 
 (require 'autoload)
 
+;; Hack workaround for bug#14384.
+;; Define defcustom-mh as an alias for defcustom, etc.
+;; Only do this in batch mode to avoid messing up a normal Emacs session.
+;; Alternative would be to load mh-e when making cus-load.
+;; (Would be better to split just the necessary parts of mh-e into a
+;; separate file and only load that.)
+(when (and noninteractive)
+  (mapc (lambda (e) (let ((sym (intern (format "%s-mh" e))))
+                     (or (fboundp sym)
+                         (defalias sym e))))
+       '(defcustom defface defgroup)))
+
 (defun custom-make-dependencies ()
   "Batch function to extract custom dependencies from .el files.
 Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
@@ -82,6 +94,7 @@
                       (let ((expr (read (current-buffer))))
                         (condition-case nil
                             (let ((custom-dont-initialize t))
+                              ;; Why do we need to eval just for the name?
                               (eval expr)
                               (put (nth 1 expr) 'custom-where name))
                           (error nil))))


reply via email to

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