From 26b719c5b80d5fa8040e812e4f864111a57f1f2b Mon Sep 17 00:00:00 2001 From: shuhei-k Date: Thu, 11 Nov 1999 00:28:22 +0000 Subject: [PATCH] checkdoc. --- ChangeLog | 4 ++++ localhook.el | 51 ++++++++++++++++++++++----------------------------- pcustom.el | 15 +++++++-------- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 275f877..5b3955f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-11-11 Shuhei KOBAYASHI + + * localhook.el, pcustom.el: checkdoc. + 1999-11-09 Katsumi Yamaoka * pcustom.el: Warn if the new custom library is not found at the diff --git a/localhook.el b/localhook.el index e565606..8c1bf11 100644 --- a/localhook.el +++ b/localhook.el @@ -32,14 +32,14 @@ ;; run-hooks, run-hook-with-args, ;; run-hook-with-args-until-success, and ;; run-hook-with-args-until-failure. -;; + ;; The following functions which do not exist in 19.28 are used in the ;; original definitions of add-hook, remove-hook, and make-local-hook. ;; ;; local-variable-p, and local-variable-if-set-p. ;; ;; In this file, these functions are replaced with mock versions. -;; + ;; In addition, the following functions which do not exist in v18 are used. ;; ;; default-boundp, byte-code-function-p, functionp, member, and delete. @@ -47,6 +47,7 @@ ;; These functions are provided by poe-18.el. ;; For historians: +;; ;; `add-hook' and `remove-hook' were introduced in v19. ;; ;; Local hook feature and `make-local-hook' were introduced in 19.29. @@ -55,15 +56,13 @@ ;; `run-hook-with-args' was introduced in 19.23 as a lisp function. ;; Two variants of `run-hook-with-args' were introduced in 19.29 as ;; lisp functions. `run-hook' family became C primitives in 19.30. -;; -;; (Needs XEmacs info: it seems XEmacs 21 is synched up with 19.30.) ;;; Code: (provide 'localhook) ; beware of circular dependency. (require 'poe) ; this file is loaded from poe.el. -;;; These two functions are not complete, but work enough for our purpose. +;; These two functions are not complete, but work enough for our purpose. ;; ;; (defun local-variable-p (variable &optional buffer) ;; "Non-nil if VARIABLE has a local binding in buffer BUFFER. @@ -80,12 +79,11 @@ ;; (memq variable (buffer-local-variables buffer))); local but void. ;; ;; docstring is ambiguous; 20.3 returns bool value. ;; t)) + +;;; Hook manipulation functions. -;;; @ Hook manipulation functions. -;;; - -;;; The following three functions are imported from emacs-20.3/lisp/subr.el. -;;; (local-variable-p, and local-variable-if-set-p are replaced.) +;; The following three functions are imported from emacs-20.3/lisp/subr.el. +;; (local-variable-p, and local-variable-if-set-p are expanded.) (defun make-local-hook (hook) "Make the hook HOOK local to the current buffer. The return value is HOOK. @@ -148,7 +146,7 @@ function, it is changed to a list of functions." (or (if (or (consp function) (byte-code-function-p function)) (member function (symbol-value hook)) (memq function (symbol-value hook))) - (set hook + (set hook (if append (append (symbol-value hook) (list function)) (cons function (symbol-value hook))))) @@ -157,7 +155,7 @@ function, it is changed to a list of functions." (or (if (or (consp function) (byte-code-function-p function)) (member function (default-value hook)) (memq function (default-value hook))) - (set-default hook + (set-default hook (if append (append (default-value hook) (list function)) (cons function (default-value hook))))))) @@ -201,19 +199,17 @@ To make a hook variable buffer-local, always use (setq hook-value nil))) (set-default hook hook-value))))) - -;;; @ Hook execution functions. -;;; +;;; Hook execution functions. (defun run-hook-with-args-internal (hook args cond) -;; "Run HOOK with the specified arguments ARGS. -;; HOOK should be a symbol, a hook variable. Its value should be a list of -;; functions. We call those functions, one by one, passing arguments ARGS -;; to each of them, until specified COND is satisfied. If COND is nil, we -;; call those functions until one of them returns a non-nil value, and then -;; we return that value. If COND is t, we call those functions until one -;; of them returns nil, and then we return nil. If COND is not nil and not -;; t, we call all the functions." + "Run HOOK with the specified arguments ARGS. +HOOK should be a symbol, a hook variable. Its value should be a list of +functions. We call those functions, one by one, passing arguments ARGS +to each of them, until specified COND is satisfied. If COND is nil, we +call those functions until one of them returns a non-nil value, and then +we return that value. If COND is t, we call those functions until one +of them returns nil, and then we return nil. If COND is not nil and not +t, we call all the functions." (if (not (boundp hook)) ;; hook is void. (not cond) @@ -251,8 +247,8 @@ To make a hook variable buffer-local, always use (setq ret (apply function args)))) ret)))) -;;; The following four functions are direct translation of their -;;; C definitions of emacs-20.3/src/eval.c. +;; The following four functions are direct translation of their +;; C definitions in emacs-20.3/src/eval.c. (defun run-hooks (&rest hooks) "Run each hook in HOOKS. Major mode functions use this. Each argument should be a symbol, a hook variable. @@ -307,7 +303,4 @@ To make a hook variable buffer-local, use `make-local-hook', not `make-local-variable'." (run-hook-with-args-internal hook args t)) -;;; @ End. -;;; - -;;; localhook.el ends here. +;;; localhook.el ends here diff --git a/pcustom.el b/pcustom.el index aa6a9f1..28a9321 100644 --- a/pcustom.el +++ b/pcustom.el @@ -5,7 +5,6 @@ ;; Author: Mikio Nakajima ;; Shuhei KOBAYASHI -;; Maintainer: Mikio Nakajima ;; Keywords: emulating, custom ;; This file is part of APEL (A Portable Emacs Library). @@ -25,14 +24,13 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. +;;; Commentary: + ;;; Code: (require 'poe) -;; If old compiler is used under v18, `eval-when-compile' and -;; `static-if' are expanded (and evaluated) at *load-time*. (eval-when-compile (require 'static)) -;; XXX: needs better abstraction. (static-if (condition-case nil ;; compile-time check. ;; "new custom" requires widget library. @@ -57,18 +55,19 @@ nil)) ;; you have "new custom". no load-time check. (require 'custom) - ;; your custom is "old custom", or you don't have custom library - ;; at compile-time. + ;; your custom is "old custom", + ;; or you don't have custom library at compile-time. (or (condition-case nil ;; load-time check. ;; load "custom" if exists. (and (require 'custom) (fboundp 'custom-declare-variable)) (error nil)) - ;; your custom is "old custom", or you don't have custom library. + ;; your custom is "old custom", + ;; or you don't have custom library. ;; load emulation version of "new custom". (require 'tinycustom))) (provide 'pcustom) -;; end of pcustom.el +;;; pcustom.el ends here -- 1.7.10.4