Cure byte-compilation errors in org-remember.el
This commit is contained in:
parent
248d3fa76f
commit
f3691be03c
|
@ -277,9 +277,6 @@ opposite case, the default, t, is more useful."
|
||||||
:group 'org-remember
|
:group 'org-remember
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defvar annotation) ; from remember.el, dynamically scoped in `remember-mode'
|
|
||||||
(defvar initial) ; from remember.el, dynamically scoped in `remember-mode'
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-remember-insinuate ()
|
(defun org-remember-insinuate ()
|
||||||
"Setup remember.el for use with Org-mode."
|
"Setup remember.el for use with Org-mode."
|
||||||
|
@ -431,10 +428,10 @@ to be run from that hook to function properly."
|
||||||
;; `initial' and `annotation' are bound in `remember'.
|
;; `initial' and `annotation' are bound in `remember'.
|
||||||
;; But if the property list has them, we prefer those values
|
;; But if the property list has them, we prefer those values
|
||||||
(v-i (or (plist-get org-store-link-plist :initial)
|
(v-i (or (plist-get org-store-link-plist :initial)
|
||||||
(and (boundp 'initial) initial)
|
(and (boundp 'initial) (symbol-value 'initial))
|
||||||
""))
|
""))
|
||||||
(v-a (or (plist-get org-store-link-plist :annotation)
|
(v-a (or (plist-get org-store-link-plist :annotation)
|
||||||
(and (boundp 'annotation) annotation)
|
(and (boundp 'annotation) (symbol-value 'annotation))
|
||||||
""))
|
""))
|
||||||
;; Is the link empty? Then we do not want it...
|
;; Is the link empty? Then we do not want it...
|
||||||
(v-a (if (equal v-a "[[]]") "" v-a))
|
(v-a (if (equal v-a "[[]]") "" v-a))
|
||||||
|
@ -476,7 +473,7 @@ to be run from that hook to function properly."
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert (substitute-command-keys
|
(insert (substitute-command-keys
|
||||||
(format
|
(format
|
||||||
"## %s \"%s\" -> \"* %s\"
|
"## %s \"%s\" -> \"* %s\"
|
||||||
## C-u C-c C-c like C-c C-c, and immediately visit note at target location
|
## C-u C-c C-c like C-c C-c, and immediately visit note at target location
|
||||||
## C-0 C-c C-c \"%s\" -> \"* %s\"
|
## C-0 C-c C-c \"%s\" -> \"* %s\"
|
||||||
## %s to select file and header location interactively.
|
## %s to select file and header location interactively.
|
||||||
|
@ -505,18 +502,20 @@ to be run from that hook to function properly."
|
||||||
filename error)))))))
|
filename error)))))))
|
||||||
;; Simple %-escapes
|
;; Simple %-escapes
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
(let ((init (and (boundp 'initial)
|
||||||
|
(symbol-value 'initial))))
|
||||||
(while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t)
|
(while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t)
|
||||||
(unless (org-remember-escaped-%)
|
(unless (org-remember-escaped-%)
|
||||||
(when (and initial (equal (match-string 0) "%i"))
|
(when (and init (equal (match-string 0) "%i"))
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(let* ((lead (buffer-substring
|
(let* ((lead (buffer-substring
|
||||||
(point-at-bol) (match-beginning 0))))
|
(point-at-bol) (match-beginning 0))))
|
||||||
(setq v-i (mapconcat 'identity
|
(setq v-i (mapconcat 'identity
|
||||||
(org-split-string initial "\n")
|
(org-split-string init "\n")
|
||||||
(concat "\n" lead))))))
|
(concat "\n" lead))))))
|
||||||
(replace-match
|
(replace-match
|
||||||
(or (eval (intern (concat "v-" (match-string 1)))) "")
|
(or (eval (intern (concat "v-" (match-string 1)))) "")
|
||||||
t t)))
|
t t))))
|
||||||
|
|
||||||
;; %() embedded elisp
|
;; %() embedded elisp
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
Loading…
Reference in New Issue