Bläddra i källkod

Keep compiler happy

Carsten Dominik 16 år sedan
förälder
incheckning
3065dcbd42
2 ändrade filer med 8 tillägg och 4 borttagningar
  1. 4 0
      lisp/org-bbdb.el
  2. 4 4
      lisp/org.el

+ 4 - 0
lisp/org-bbdb.el

@@ -106,12 +106,15 @@
 (declare-function bbdb-current-record "ext:bbdb-com"
 		  (&optional planning-on-modifying))
 (declare-function bbdb-name "ext:bbdb-com" (string elidep))
+(declare-function bbdb-completing-read-record "ext:bbdb-com"
+		  (prompt &optional omit-records))
 (declare-function bbdb-record-getprop "ext:bbdb" (record property))
 (declare-function bbdb-record-name "ext:bbdb" (record))
 (declare-function bbdb-records "ext:bbdb"
           (&optional dont-check-disk already-in-db-buffer))
 (declare-function bbdb-split "ext:bbdb" (string separators))
 (declare-function bbdb-string-trim "ext:bbdb" (string))
+
 (declare-function calendar-leap-year-p "calendar" (year))
 (declare-function diary-ordinal-suffix "diary-lib" (n))
 
@@ -340,6 +343,7 @@ This is used by Org to re-create the anniversary hash table."
 
 (defun org-bbdb-complete-link ()
   "Read a bbdb link with name completion."
+  (require 'bbdb-com)
   (concat "bbdb:"
 	  (bbdb-record-name (car (bbdb-completing-read-record "Name: ")))))
 

+ 4 - 4
lisp/org.el

@@ -7374,7 +7374,7 @@ used as the link location instead of reading one interactively."
 			      (org-remove-angle-brackets (match-string 0)))))
      ((member complete-file '((4) (16)))
       ;; Completing read for file names.
-      (setq link (org-get-file-link complete-file)))
+      (setq link (org-file-complete-link complete-file)))
      (t
       ;; Read link, with completion for stored links.
       (with-output-to-temp-buffer "*Org Links*"
@@ -7484,7 +7484,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
 
 (defun org-file-complete-link (&optional arg)
   "Create a file link using completion."
-  (let (file)
+  (let (file link)
     (setq file (read-file-name "File: "))
     (let ((pwd (file-name-as-directory (expand-file-name ".")))
 	  (pwd1 (file-name-as-directory (abbreviate-file-name
@@ -7500,8 +7500,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
 		      (expand-file-name file))
 	(setq link  (org-make-link
 		     "file:" (match-string 1 (expand-file-name file)))))
-       (t (setq link (org-make-link "file:" file))))))
-  link)
+       (t (setq link (org-make-link "file:" file)))))
+    link))
 
 (defun org-completing-read (&rest args)
   "Completing-read with SPACE being a normal character."