projects
/
pelican-mode.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix incorrect copy/pasted doc string.
[pelican-mode.git]
/
pelican-mode.el
diff --git
a/pelican-mode.el
b/pelican-mode.el
index
15db6cf
..
dce4bb8
100644
(file)
--- a/
pelican-mode.el
+++ b/
pelican-mode.el
@@
-103,15
+103,19
@@
(defun pelican-set-field (field value)
"Set FIELD to VALUE."
(defun pelican-set-field (field value)
"Set FIELD to VALUE."
+ (interactive "sField: \nsValue: ")
(save-excursion
(goto-char 0)
(if (re-search-forward (concat "^" (pelican-field field ".+*")) nil t)
(replace-match (pelican-field field value))
(save-excursion
(goto-char 0)
(if (re-search-forward (concat "^" (pelican-field field ".+*")) nil t)
(replace-match (pelican-field field value))
+ (re-search-forward "#")
+ (forward-line 2)
(re-search-forward "^$")
(replace-match (pelican-field field value)))))
(defun pelican-set-title (title)
"Set the title to TITLE."
(re-search-forward "^$")
(replace-match (pelican-field field value)))))
(defun pelican-set-title (title)
"Set the title to TITLE."
+ (interactive "sTitle: ")
(if (pelican-is-markdown)
(pelican-set-field "title" title)
(save-excursion
(if (pelican-is-markdown)
(pelican-set-field "title" title)
(save-excursion
@@
-172,11
+176,6
@@
"Check if this buffer is under a Pelican site."
(not (null (pelican-find-root))))
"Check if this buffer is under a Pelican site."
(not (null (pelican-find-root))))
-(defun pelican-enable-if-site ()
- "Enable `pelican-mode' if this buffer is under a Pelican site."
- (when (pelican-is-in-site)
- (pelican-mode 1)))
-
(defun pelican-make (target)
"Execute TARGET in a Makefile at the root of the site."
(interactive "sMake Pelican target: ")
(defun pelican-make (target)
"Execute TARGET in a Makefile at the root of the site."
(interactive "sMake Pelican target: ")
@@
-217,12
+216,18
@@
"Toggle Pelican mode.
Interactively with no argument, this command toggles the mode.
"Toggle Pelican mode.
Interactively with no argument, this command toggles the mode.
-
to show buffer size and position in mode-line
."
+
for editing Pelican site files
."
:init-value nil
:lighter " Pelican"
:keymap pelican-keymap
:group 'pelican)
:init-value nil
:lighter " Pelican"
:keymap pelican-keymap
:group 'pelican)
+;;;###autoload
+(defun pelican-enable-if-site ()
+ "Enable `pelican-mode' if this buffer is under a Pelican site."
+ (when (pelican-is-in-site)
+ (pelican-mode 1)))
+
;;;###autoload
(add-hook 'markdown-mode-hook 'pelican-enable-if-site)
;;;###autoload
(add-hook 'markdown-mode-hook 'pelican-enable-if-site)