projects
/
pelican-mode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2442f07
)
A one-sexp function called in one place isn’t needed.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Mon, 7 Aug 2017 11:15:58 +0000
(13:15 +0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Mon, 7 Aug 2017 11:15:58 +0000
(13:15 +0200)
pelican-mode.el
patch
|
blob
|
history
diff --git
a/pelican-mode.el
b/pelican-mode.el
index
85d2be9
..
804f288
100644
(file)
--- a/
pelican-mode.el
+++ b/
pelican-mode.el
@@
-170,7
+170,7
@@
When called from Lisp, VALUE may be any value; except for the
following special values, the unquoted printed representation of
it is used:
following special values, the unquoted printed representation of
it is used:
-- `now' means the current time
; see `pelican-mode-timestamp'
.
+- `now' means the current time.
- `slug' means the file's path relative to the document root sans
extension; see `pelican-mode-default-slug'.
- `slug' means the file's path relative to the document root sans
extension; see `pelican-mode-default-slug'.
@@
-181,7
+181,7
@@
The buffer must be in a format listed in `pelican-mode-formats'
for this function to work correctly."
(interactive "sField: \nsValue: ")
(setq value (pcase value
for this function to work correctly."
(interactive "sField: \nsValue: ")
(setq value (pcase value
- ('now (
pelican-mode-timestamp
))
+ ('now (
format-time-string "%Y-%m-%d %H:%M"
))
('slug (pelican-mode-default-slug))
('"" nil)
(_ value)))
('slug (pelican-mode-default-slug))
('"" nil)
(_ value)))
@@
-266,10
+266,6
@@
has no status."
\f
\f
-(defun pelican-mode-timestamp (&optional time)
- "Generate a pelican-mode-compatible timestamp for TIME."
- (format-time-string "%Y-%m-%d %H:%M" time))
-
(defun pelican-mode-set-fields (&rest fields)
"Insert a Pelican header for an article with metadata FIELDS."
(mapc (apply-partially #'apply #'pelican-mode-set-field)
(defun pelican-mode-set-fields (&rest fields)
"Insert a Pelican header for an article with metadata FIELDS."
(mapc (apply-partially #'apply #'pelican-mode-set-field)