comparison lisp/subr.el @ 406:b8cc9ab3f761 r21-2-33

Import from CVS: tag r21-2-33
author cvs
date Mon, 13 Aug 2007 11:17:09 +0200
parents 2f8bb876ab1d
children 697ef44129c6
comparison
equal deleted inserted replaced
405:0e08f63c74d2 406:b8cc9ab3f761
316 ;; called by Fkill_buffer() 316 ;; called by Fkill_buffer()
317 (defvar kill-buffer-hook nil 317 (defvar kill-buffer-hook nil
318 "Function or functions to be called when a buffer is killed. 318 "Function or functions to be called when a buffer is killed.
319 The value of this variable may be buffer-local. 319 The value of this variable may be buffer-local.
320 The buffer about to be killed is current when this hook is run.") 320 The buffer about to be killed is current when this hook is run.")
321
322 ;; called by Frecord_buffer()
323 (defvar record-buffer-hook nil
324 "Function or functions to be called when a buffer is recorded.
325 The value of this variable may be buffer-local.
326 The buffer being recorded is passed as an argument to the hook.")
327 321
328 ;; in C in FSFmacs 322 ;; in C in FSFmacs
329 (defvar kill-emacs-hook nil 323 (defvar kill-emacs-hook nil
330 "Function or functions to be called when `kill-emacs' is called, 324 "Function or functions to be called when `kill-emacs' is called,
331 just before emacs is actually killed.") 325 just before emacs is actually killed.")
726 (and (eq (car-safe spec) 'interactive) 720 (and (eq (car-safe spec) 'interactive)
727 spec))) 721 spec)))
728 (t 722 (t
729 (error "Non-funcallable object: %s" function)))) 723 (error "Non-funcallable object: %s" function))))
730 724
725 (defun function-allows-args (function n)
726 "Return whether FUNCTION can be called with N arguments."
727 (and (<= (function-min-args function) n)
728 (or (null (function-max-args function))
729 (<= n (function-max-args function)))))
730
731 ;; This function used to be an alias to `buffer-substring', except 731 ;; This function used to be an alias to `buffer-substring', except
732 ;; that FSF Emacs 20.4 added a BUFFER argument in an incompatible way. 732 ;; that FSF Emacs 20.4 added a BUFFER argument in an incompatible way.
733 ;; The new FSF's semantics makes more sense, but we try to support 733 ;; The new FSF's semantics makes more sense, but we try to support
734 ;; both for backward compatibility. 734 ;; both for backward compatibility.
735 (defun buffer-string (&optional buffer old-end old-buffer) 735 (defun buffer-string (&optional buffer old-end old-buffer)