]> git.eshelyaron.com Git - emacs.git/commitdiff
The user can now specify the time stamp format.
authorSam Steingold <sds@gnu.org>
Tue, 31 Oct 2017 21:01:39 +0000 (17:01 -0400)
committerSam Steingold <sds@gnu.org>
Tue, 31 Oct 2017 21:01:39 +0000 (17:01 -0400)
* lisp/textmodes/remember.el (remember-time-format): New user variable.
(remember-append-to-file): Pass it to `format-time-string' instead of
calling `current-time-string'.

lisp/textmodes/remember.el

index b20ee8fee8418f28ec03bbc296c33226827f8ae0..dafc0b2dca629888dd16c55dcc7b6941efc48ddc 100644 (file)
@@ -402,11 +402,19 @@ exists) might be changed."
   :type 'string
   :group 'remember)
 
+(defcustom remember-time-format "%a %b %d %H:%M:%S %Y"
+  "The format for time stamp, passed to `format-time-string'.
+The default emulates `current-time-string' for backward compatibility."
+  :type 'string
+  :group 'remember
+  :version "27.1")
+
 (defun remember-append-to-file ()
   "Remember, with description DESC, the given TEXT."
   (let* ((text (buffer-string))
          (desc (remember-buffer-desc))
-         (remember-text (concat "\n" remember-leader-text (current-time-string)
+         (remember-text (concat "\n" remember-leader-text
+                                (format-time-string remember-time-format)
                                 " (" desc ")\n\n" text
                                 (save-excursion (goto-char (point-max))
                                                 (if (bolp) nil "\n"))))