diff options
Diffstat (limited to 'lisp/textmodes/remember.el')
-rw-r--r-- | lisp/textmodes/remember.el | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 31bcb34314d..35eaffa9284 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -319,9 +319,7 @@ With a prefix or a visible region, use the region as INITIAL." (defsubst remember-mail-date (&optional rfc822-p) "Return a simple date. Nothing fancy." - (if rfc822-p - (format-time-string "%a, %e %b %Y %T %z" (current-time)) - (format-time-string "%a %b %e %T %Y" (current-time)))) + (format-time-string (if rfc822-p "%a, %e %b %Y %T %z" "%a %b %e %T %Y"))) (defun remember-buffer-desc () "Using the first line of the current buffer, create a short description." @@ -461,8 +459,7 @@ Used by `remember-store-in-files'." "Store remember data in a file in `remember-data-directory'. The file is named by calling `format-time-string' using `remember-directory-file-name-format' as the format string." - (let ((name (format-time-string - remember-directory-file-name-format (current-time))) + (let ((name (format-time-string remember-directory-file-name-format)) (text (buffer-string))) (with-temp-buffer (insert text) @@ -499,6 +496,8 @@ If this is nil, then `diary-file' will be used instead." :type '(choice (const :tag "diary-file" nil) file) :group 'remember) +(defvar calendar-date-style) ; calendar.el + (defun remember-diary-convert-entry (entry) "Translate MSG to an entry readable by diary." (save-match-data @@ -511,23 +510,17 @@ If this is nil, then `diary-file' will be used instead." ;; which requires calendar. (require 'calendar) (replace-match - (let ((style (if (boundp 'calendar-date-style) - calendar-date-style - ;; Don't complain about obsolescence. - (if (with-no-warnings european-calendar-style) - 'european - 'american)))) - (cond ((eq style 'european) - (concat (match-string 3 entry) "/" - (match-string 2 entry) "/" - (match-string 1 entry))) - ((eq style 'iso) - (concat (match-string 1 entry) "-" + (cond ((eq calendar-date-style 'european) + (concat (match-string 3 entry) "/" + (match-string 2 entry) "/" + (match-string 1 entry))) + ((eq calendar-date-style 'iso) + (concat (match-string 1 entry) "-" (match-string 2 entry) "-" (match-string 3 entry))) - (t (concat (match-string 2 entry) "/" - (match-string 3 entry) "/" - (match-string 1 entry))))) + (t (concat (match-string 2 entry) "/" + (match-string 3 entry) "/" + (match-string 1 entry)))) t t entry)) entry))) |