emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/mh-e/mh-acros.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/mh-e/mh-acros.el [lexbind]
Date: Sat, 04 Sep 2004 05:41:28 -0400

Index: emacs/lisp/mh-e/mh-acros.el
diff -c emacs/lisp/mh-e/mh-acros.el:1.5.4.1 emacs/lisp/mh-e/mh-acros.el:1.5.4.2
*** emacs/lisp/mh-e/mh-acros.el:1.5.4.1 Sat Sep  4 09:23:51 2004
--- emacs/lisp/mh-e/mh-acros.el Sat Sep  4 09:26:23 2004
***************
*** 51,62 ****
  \(setf (gethash ...) ...) that uses functions in `cl' at run time.  This macro
  recognizes that and loads `cl' where appropriate."
    (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash)
!       `(progn
!          (require 'cl)
!          ;; Autoloads of CL functions go here...
!          (autoload 'cl-puthash "cl")
!          (autoload 'values "cl")
!          (autoload 'copy-tree "cl"))
      `(eval-when-compile (require 'cl))))
  
  ;;; Macros to generate correct code for different emacs variants
--- 51,57 ----
  \(setf (gethash ...) ...) that uses functions in `cl' at run time.  This macro
  recognizes that and loads `cl' where appropriate."
    (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash)
!       `(require 'cl)
      `(eval-when-compile (require 'cl))))
  
  ;;; Macros to generate correct code for different emacs variants
***************
*** 121,135 ****
      `(progn
         (defun* ,constructor (&key ,@(mapcar* #'(lambda (x y) (list x y))
                                               field-names field-init-forms))
!          (list ,@field-names))
         (defun ,predicate (arg)
!          (and (consp arg) (eql (length arg) ,(length fields))))
!        ,@(loop for x from 0
                 for y in field-names
                 collect `(defmacro ,(intern (format "%s%s" conc-name y)) (z)
                            (list 'nth ,x z)))
         (quote ,struct-name))))
  
  
  (provide 'mh-acros)
  
--- 116,136 ----
      `(progn
         (defun* ,constructor (&key ,@(mapcar* #'(lambda (x y) (list x y))
                                               field-names field-init-forms))
!          (list (quote ,struct-name) ,@field-names))
         (defun ,predicate (arg)
!          (and (consp arg) (eq (car arg) (quote ,struct-name))))
!        ,@(loop for x from 1
                 for y in field-names
                 collect `(defmacro ,(intern (format "%s%s" conc-name y)) (z)
                            (list 'nth ,x z)))
         (quote ,struct-name))))
  
+ (defadvice require (around mh-prefer-el activate)
+   "Modify `require' to load uncompiled MH-E files."
+   (or (featurep (ad-get-arg 0))
+       (and (string-match "^mh-" (symbol-name (ad-get-arg 0)))
+            (load (format "%s.el" (ad-get-arg 0)) t t))
+       ad-do-it))
  
  (provide 'mh-acros)
  




reply via email to

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