From: shuhei Date: Sun, 12 Dec 1999 00:50:09 +0000 (+0000) Subject: Modified comments. X-Git-Tag: apel-shubit-10_0~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c23e42dd02f9e687e11214753fbe935db1197a7e;p=elisp%2Fapel.git Modified comments. (defalias-maybe): Don't update `current-load-list'. --- diff --git a/ChangeLog b/ChangeLog index da89bb8..258df58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-12-12 Shuhei KOBAYASHI + + * poe.el: Modified comments. + + * pym.el (defalias-maybe): Don't update `current-load-list'. + Modified comments. + 1999-12-06 Shuhei KOBAYASHI * pym.el (subr-fboundp): Reverted; but considered as obsolete. diff --git a/poe.el b/poe.el index ef09ad1..d7602eb 100644 --- a/poe.el +++ b/poe.el @@ -78,8 +78,8 @@ ;;; @ C primitives emulation. ;;; -;; (require FEATURE &optional FILENAME NOERROR) -;; Emacs 20.4 and later takes optional 3rd arg NOERROR. +;; Emacs 20.3 and earlier: (require FEATURE &optional FILENAME) +;; Emacs 20.4 and later: (require FEATURE &optional FILENAME NOERROR) (static-condition-case nil ;; compile-time check. (progn @@ -128,6 +128,7 @@ corresponding to the given PROP, or nil if PROP is not one of the properties on the list." (setplist 'plist-get-internal-symbol plist) (get 'plist-get-internal-symbol prop)) + ;; for `load-history'. (setq current-load-list (cons 'plist-get current-load-list)) (put 'plist-get 'defun-maybe t)))) @@ -165,6 +166,7 @@ The PLIST is modified by side effects." (setplist 'plist-put-internal-symbol plist) (put 'plist-put-internal-symbol prop val) (symbol-plist 'plist-put-internal-symbol)) + ;; for `load-history'. (setq current-load-list (cons 'plist-put current-load-list)) (put 'plist-put 'defun-maybe t)))) @@ -648,11 +650,13 @@ On those systems, it is automatically local in every buffer. On other systems, this variable is normally always nil.") ;; Emacs 20.1/XEmacs 20.3(?) and later: (save-current-buffer &rest BODY) +;; ;; v20 defines `save-current-buffer' as a C primitive (in src/editfns.c) ;; and introduces a new bytecode Bsave_current_buffer(_1), replacing an ;; obsolete bytecode Bread_char. To make things worse, Emacs 20.1 and ;; 20.2 have a bug that it will restore the current buffer without ;; confirming that it is alive. +;; ;; This is a source of incompatibility of .elc between v18/v19 and v20. ;; (XEmacs compiler takes care of it if compatibility mode is enabled.) (defmacro-maybe save-current-buffer (&rest body) @@ -854,8 +858,8 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." ((memq system-type '(windows-nt ms-dos)) ;; should we do (require 'filename) at load-time ? ;; (require 'filename) - ;; filename.el requires many modules, so we do not want to load at - ;; compile-time. instead, suppress warnings by this. + ;; filename.el requires many modules, so we do not want to load it + ;; at compile-time. Instead, suppress warnings by these autoloads. (eval-when-compile (autoload 'filename-maybe-truncate-by-size "filename") (autoload 'filename-special-filter "filename")) @@ -930,7 +934,7 @@ Otherwise, FACE-OR-NAME should be a symbol. If there is no such face, nil is returned. Otherwise the associated face object is returned." (car (memq face-or-name (face-list)))) -;; Emacs 20.5 defines this as an alias for `line-beginning-position'. +;; Emacs 21.1 defines this as an alias for `line-beginning-position'. ;; Therefore, optional 2nd arg BUFFER is not portable. (defun-maybe point-at-bol (&optional n buffer) "Return the character position of the first character on the current line. @@ -942,7 +946,7 @@ This function does not move point." (forward-line (1- (or n 1))) (point))) -;; Emacs 20.5 defines this as an alias for `line-end-position'. +;; Emacs 21.1 defines this as an alias for `line-end-position'. ;; Therefore, optional 2nd arg BUFFER is not portable. (defun-maybe point-at-eol (&optional n buffer) "Return the character position of the last character on the current line. diff --git a/pym.el b/pym.el index 3b1cfea..ca6676d 100644 --- a/pym.el +++ b/pym.el @@ -46,6 +46,7 @@ ;;; Code: +;; for `load-history'. (or (boundp 'current-load-list) (setq current-load-list nil)) (require 'static) @@ -62,8 +63,8 @@ See also the function `defun'." (` (or (fboundp (quote (, name))) (prog1 (defun (, name) (,@ everything-else)) - ;; This `defun' will be compiled to `fset', which does - ;; not update `load-history'. + ;; This `defun' will be compiled to `fset', + ;; which does not update `load-history'. ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) @@ -78,6 +79,9 @@ See also the function `defmacro'." (` (or (fboundp (quote (, name))) (prog1 (defmacro (, name) (,@ everything-else)) + ;; This `defmacro' will be compiled to `fset', + ;; which does not update `load-history'. + ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) (put (quote (, name)) 'defmacro-maybe t)))))) @@ -91,6 +95,9 @@ See also the macro `defsubst'." (` (or (fboundp (quote (, name))) (prog1 (defsubst (, name) (,@ everything-else)) + ;; This `defsubst' will be compiled to `fset', + ;; which does not update `load-history'. + ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) (put (quote (, name)) 'defsubst-maybe t)))))) @@ -104,8 +111,7 @@ See also the function `defalias'." (` (or (fboundp (quote (, symbol))) (prog1 (defalias (quote (, symbol)) (, definition)) - (setq current-load-list - (cons (quote (, symbol)) current-load-list)) + ;; `defalias' updates `load-history' internally. (put (quote (, symbol)) 'defalias-maybe t)))))) (defmacro defvar-maybe (name &rest everything-else) @@ -128,6 +134,8 @@ See also the function `defconst'." (` (or (boundp (quote (, name))) (prog1 (defconst (, name) (,@ everything-else)) + ;; byte-compiler will generate code to update + ;; `load-history'. (put (quote (, name)) 'defconst-maybe t)))))) (defmacro defun-maybe-cond (name args &optional doc &rest clauses) @@ -155,6 +163,9 @@ See also the function `defun'." (` (defun (, name) (, args) (,@ (cdr case)))))))) clauses))) + ;; This `defun' will be compiled to `fset', + ;; which does not update `load-history'. + ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) (put (quote (, name)) 'defun-maybe t)))))) @@ -184,6 +195,9 @@ See also the function `defmacro'." (` (defmacro (, name) (, args) (,@ (cdr case)))))))) clauses))) + ;; This `defmacro' will be compiled to `fset', + ;; which does not update `load-history'. + ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) (put (quote (, name)) 'defmacro-maybe t)))))) @@ -213,6 +227,9 @@ See also the macro `defsubst'." (` (defsubst (, name) (, args) (,@ (cdr case)))))))) clauses))) + ;; This `defsubst' will be compiled to `fset', + ;; which does not update `load-history'. + ;; We must update `current-load-list' explicitly. (setq current-load-list (cons (quote (, name)) current-load-list)) (put (quote (, name)) 'defsubst-maybe t))))))