(or (fboundp 'si:require)
(progn
(fset 'si:require (symbol-function 'require))
- (put 'require 'defun-maybe t)
(defun require (feature &optional filename noerror)
"\
If feature FEATURE is not loaded, load it from FILENAME.
(condition-case nil
(si:require feature filename)
(file-error))
- (si:require feature filename)))))))
+ (si:require feature filename)))
+ ;; for `load-history'.
+ (setq current-load-list (cons 'require current-load-list))
+ (put 'require 'defun-maybe t)))))
;; Emacs 19.29 and later: (plist-get PLIST PROP)
;; (defun-maybe plist-get (plist prop)
therefore, write `(setq foo (remassq key foo))' to be sure of changing
the value of `foo'."
(if (setq key (assq key list))
- (delete key list)
+ (delq key list)
list))
;; XEmacs 19.13 and later: (remassoc KEY LIST)
therefore, write `(setq foo (remassoc key foo))' to be sure of changing
the value of `foo'."
(if (setq key (assoc key list))
- (delete key list)
+ (delq key list)
+ list))
+
+;; XEmacs 19.13 and later: (remrassq VALUE LIST)
+(defun-maybe remrassq (value list)
+ "Delete by side effect any elements of LIST whose cdr is `eq' to VALUE.
+The modified LIST is returned. If the first member of LIST has a car
+that is `eq' to VALUE, there is no way to remove it by side effect;
+therefore, write `(setq foo (remrassq value foo))' to be sure of changing
+the value of `foo'."
+ (if (setq value (rassq value list))
+ (delq value list)
list))
;; XEmacs 19.13 and later: (remrassoc VALUE LIST)
therefore, write `(setq foo (remrassoc value foo))' to be sure of changing
the value of `foo'."
(if (setq value (rassoc value list))
- (delete value list)
+ (delq value list)
list))
;;; Define `functionp' here because "localhook" uses it.
"")
;; the day of month, zero-padded
((eq cur-char ?d)
- (substring time-string 8 10))
+ (format "%02d" (string-to-int (substring time-string 8 10))))
;; a synonym for `%m/%d/%y'
((eq cur-char ?D)
- (format "%02d/%s/%s"
+ (format "%02d/%02d/%s"
(cddr (assoc (substring time-string 4 7)
format-time-month-list))
- (substring time-string 8 10)
+ (string-to-int (substring time-string 8 10))
(substring time-string -2)))
;; the day of month, blank-padded
((eq cur-char ?e)