emacs-devel
[Top][All Lists]
Advanced

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

lisp-mode patch


From: Eric M. Ludlam
Subject: lisp-mode patch
Date: Fri, 5 Jan 2001 23:38:20 -0500

The attached patch implements:

2001-01-05  Eric M. Ludlam  <address@hidden>

        * emacs-lisp/lisp-mode.el (eval-defun-hooks): New Variable
        (eval-defun): Call `eval-defun-hooks' after evaluation.

I recommend this (or at least this idea) as a way of letting checkdoc
easily check defuns when hacking.  If someone didn't want to use
checkdoc-minor-mode, they could just add `checkdoc-defun' to the new
hook.

Thoughts?
Eric

*** lisp-mode.el.~1.105.~       Fri Dec  8 20:39:20 2000
--- lisp-mode.el        Fri Jan  5 23:33:54 2001
***************
*** 444,449 ****
--- 444,452 ----
    ;; The result of evaluation has been put onto VALUES.  So return it.
    (car values))
  
+ (defvar eval-defun-hooks nil
+   "List of hooks to be called after a defun is evalled by `eval-defun'.")
+ 
  (defun eval-defun (edebug-it)
    "Evaluate the top-level form containing point, or after point.
  
***************
*** 470,476 ****
           (let ((old-value (make-symbol "t")) new-value value)
             (let ((debug-on-error old-value))
               (setq value (eval-defun-2))
!              (setq new-value debug-on-error))
             (unless (eq old-value new-value)
               (setq debug-on-error new-value))
             value)))))
--- 473,480 ----
           (let ((old-value (make-symbol "t")) new-value value)
             (let ((debug-on-error old-value))
               (setq value (eval-defun-2))
!              (setq new-value debug-on-error)
!              (run-hooks 'eval-defun-hooks))
             (unless (eq old-value new-value)
               (setq debug-on-error new-value))
             value)))))

-- 
          Eric Ludlam:                 address@hidden, address@hidden
   Home: www.ultranet.com/~zappo            Siege: www.siege-engine.com
Emacs: www.ultranet.com/~zappo/fsf.shtml          GNU: www.gnu.org



reply via email to

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