about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-compat.el44
1 files changed, 23 insertions, 21 deletions
diff --git a/lisp/acdw-compat.el b/lisp/acdw-compat.el index 0a1a037..353a1f1 100644 --- a/lisp/acdw-compat.el +++ b/lisp/acdw-compat.el
@@ -27,27 +27,29 @@
27Is it necessary? Who knows!!" 27Is it necessary? Who knows!!"
28 (let (output) 28 (let (output)
29 (dolist (form defines) 29 (dolist (form defines)
30 (let ((test (cond ((memq (car form) 30 ;; this is one part where elisp being a lisp-2 bites us...
31 '(define-global-minor-mode 31 (push (cond ((memq (car form)
32 define-globalized-minor-mode 32 '(;; makes functions
33 define-minor-mode 33 define-global-minor-mode
34 defmacro 34 define-globalized-minor-mode
35 defsubst 35 define-minor-mode
36 defun)) 36 defmacro
37 #'fboundp) 37 defsubst
38 ((memq (car form) 38 defun))
39 '(defcustom 39 `(unless (fboundp ',(cadr form))
40 defvar 40 ,form))
41 defvar 41 ((memq (car form)
42 defvar-local 42 '(;; makes variables
43 defvar-mode-local 43 defcustom
44 defvaralias)) 44 defvar
45 #'boundp)))) 45 defvar
46 (push (if test 46 defvar-local
47 `(unless (,test ',(cadr form)) 47 defvar-mode-local
48 ,form) 48 defvaralias))
49 form) 49 `(unless (boundp ',(cadr form))
50 output))) 50 ,form))
51 (t form))
52 output))
51 `(progn ,@(nreverse output)))) 53 `(progn ,@(nreverse output))))
52 54
53 55