/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.277 by pj, Tue Dec 11 07:34:39 2001 UTC revision 1.278 by rms, Wed Dec 12 09:26:43 2001 UTC
# Line 1294  Only affects hooks run in the current bu Line 1294  Only affects hooks run in the current bu
1294       (let ((delay-mode-hooks t))       (let ((delay-mode-hooks t))
1295         ,@body)))         ,@body)))
1296    
1297    ;; PUBLIC: find if the current mode derives from another.
1298    
1299    (defun derived-mode-p (&rest modes)
1300      "Non-nil if the current major mode is derived from one of MODES.
1301    Uses the `derived-mode-parent' property of the symbol to trace backwards."
1302      (let ((parent major-mode))
1303        (while (and (not (memq parent modes))
1304                    (setq parent (get parent 'derived-mode-parent))))
1305        parent))
1306    
1307  (defmacro with-syntax-table (table &rest body)  (defmacro with-syntax-table (table &rest body)
1308    "Evaluate BODY with syntax table of current buffer set to a copy of TABLE.    "Evaluate BODY with syntax table of current buffer set to a copy of TABLE.
1309  The syntax table of the current buffer is saved, BODY is evaluated, and the  The syntax table of the current buffer is saved, BODY is evaluated, and the

Legend:
Removed from v.1.277  
changed lines
  Added in v.1.278

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26