summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2015-02-02 08:40:35 +0100
committerAndreas Politz <politza@hochschule-trier.de>2015-02-02 08:40:35 +0100
commit855078c284d71041cafdf770b612fa108db82fe6 (patch)
tree14038822fede630a14668b994e97ee898e6b5943
parent191c099249fdc9cc8aacafb1457d8b18a9fb997f (diff)
Validate optional argument.
* lisp/pdf-info.el (pdf-info-addannot): Check if file-or-buffer was given.
-rw-r--r--lisp/pdf-info.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/pdf-info.el b/lisp/pdf-info.el
index 2f9da62..22d69ba 100644
--- a/lisp/pdf-info.el
+++ b/lisp/pdf-info.el
@@ -982,6 +982,9 @@ FIXME: -1 = 24
See `pdf-info-getannots' for the kind of value of this function
returns."
(pdf-info-assert-writable-annotations)
+ (when (consp file-or-buffer)
+ (push file-or-buffer markup-edges)
+ (setq file-or-buffer nil))
(apply
'pdf-info-query
'addannot