1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

* cus-dep.el (defcustom-mh, defgroup-mh, defface-mh): Add compat aliases

as a hack workaround.

Fixes: debbugs:14384
This commit is contained in:
Glenn Morris 2013-05-13 09:21:00 -07:00
parent 3766b7428c
commit f4c7dfd296
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-05-13 Glenn Morris <rgm@gnu.org>
* cus-dep.el (defcustom-mh, defgroup-mh, defface-mh):
Add compat aliases as a hack workaround. (Bug#14384)
2013-05-13 Leo Liu <sdl.web@gmail.com>
* progmodes/octave.el (octave-indent-comment): Fix indentation for

View file

@ -38,6 +38,18 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
(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 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
(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))))