- (progn
- (bbdb-record-putprop record 'attribution attr)
- (bbdb-change-record record nil))
- )))
-
-(defun mu-cite/get-bbdb-prefix-register-method ()
- (let ((addr (mu-cite/get-value 'address)))
- (or (mu-cite/get-bbdb-attr addr)
- (let ((return
- (read-string "Citation name? "
- (or (mu-cite/get-value 'x-attribution)
- (mu-cite/get-value 'full-name))
- 'mu-cite/minibuffer-history)
- ))
+ (progn
+ (bbdb-record-putprop record 'attribution attr)
+ (bbdb-change-record record nil)))))
+
+
+;;; @ methods
+;;;
+
+;;;###autoload
+(defun mu-bbdb-get-prefix-method ()
+ "A mu-cite method to return a prefix from BBDB or \">\".
+If an `attribution' value is found in BBDB, the value is returned.
+Otherwise \">\" is returned.
+
+Notice that please use (mu-cite-get-value 'bbdb-prefix)
+instead of call the function directly."
+ (or (mu-bbdb-get-attr (mu-cite-get-value 'address))
+ ">"))
+
+;;;###autoload
+(defun mu-bbdb-get-prefix-register-method ()
+ "A mu-cite method to return a prefix from BBDB or register it.
+If an `attribution' value is found in BBDB, the value is returned.
+Otherwise the function requests a prefix from a user. The prefix will
+be registered to BBDB if the user wants it.
+
+Notice that please use (mu-cite-get-value 'bbdb-prefix-register)
+instead of call the function directly."
+ (let ((addr (mu-cite-get-value 'address)))
+ (or (mu-bbdb-get-attr addr)
+ (let* ((minibuffer-allow-text-properties nil)
+ (return
+ (mu-cite-remove-text-properties
+ (read-string "Citation name? "
+ (or (mu-cite-get-value 'x-attribution)
+ (mu-cite-get-value 'full-name))
+ 'mu-bbdb-history))))