X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fsubr.el;h=fa38653b174fddb8bde985423724b663f20a9eec;hb=1a5e6d5283da6884ea5174abb431256f120c1b0c;hp=f306b44cb6f951cdcce66b83334e241fbe4a183c;hpb=2fd9701a4f902054649dde9143a3f77809afee8f;p=chise%2Fxemacs-chise.git- diff --git a/lisp/subr.el b/lisp/subr.el index f306b44..fa38653 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -319,12 +319,6 @@ other hooks, such as major mode hooks, can do the job." The value of this variable may be buffer-local. The buffer about to be killed is current when this hook is run.") -;; called by Frecord_buffer() -(defvar record-buffer-hook nil - "Function or functions to be called when a buffer is recorded. -The value of this variable may be buffer-local. -The buffer being recorded is passed as an argument to the hook.") - ;; in C in FSFmacs (defvar kill-emacs-hook nil "Function or functions to be called when `kill-emacs' is called, @@ -728,6 +722,12 @@ If FUNCTION is not interactive, nil will be returned." (t (error "Non-funcallable object: %s" function)))) +(defun function-allows-args (function n) + "Return whether FUNCTION can be called with N arguments." + (and (<= (function-min-args function) n) + (or (null (function-max-args function)) + (<= n (function-max-args function))))) + ;; This function used to be an alias to `buffer-substring', except ;; that FSF Emacs 20.4 added a BUFFER argument in an incompatible way. ;; The new FSF's semantics makes more sense, but we try to support