Cure byte-compilation errors in org-remember.el

This commit is contained in:
John Wiegley 2012-05-08 03:25:21 -05:00
parent 248d3fa76f
commit f3691be03c
1 changed files with 21 additions and 22 deletions

View File

@ -277,9 +277,6 @@ opposite case, the default, t, is more useful."
:group 'org-remember
:type 'boolean)
(defvar annotation) ; from remember.el, dynamically scoped in `remember-mode'
(defvar initial) ; from remember.el, dynamically scoped in `remember-mode'
;;;###autoload
(defun org-remember-insinuate ()
"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'.
;; But if the property list has them, we prefer those values
(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)
(and (boundp 'annotation) annotation)
(and (boundp 'annotation) (symbol-value 'annotation))
""))
;; Is the link empty? Then we do not want it...
(v-a (if (equal v-a "[[]]") "" v-a))
@ -505,18 +502,20 @@ to be run from that hook to function properly."
filename error)))))))
;; Simple %-escapes
(goto-char (point-min))
(let ((init (and (boundp 'initial)
(symbol-value 'initial))))
(while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t)
(unless (org-remember-escaped-%)
(when (and initial (equal (match-string 0) "%i"))
(when (and init (equal (match-string 0) "%i"))
(save-match-data
(let* ((lead (buffer-substring
(point-at-bol) (match-beginning 0))))
(setq v-i (mapconcat 'identity
(org-split-string initial "\n")
(org-split-string init "\n")
(concat "\n" lead))))))
(replace-match
(or (eval (intern (concat "v-" (match-string 1)))) "")
t t)))
t t))))
;; %() embedded elisp
(goto-char (point-min))