BBDB Letter

2005-08-05 Thread Jeff Miller
((eq field 'address-state) (bbdb-address-state bbdb-current-address)) ((eq field 'address-zip-string) (bbdb-address-zip-string bbdb-current-address )) (defun bbdb-record-get-phonefield-string (record field) (let* ((phones (bbdb-record-phones record)) (phns-alist (mapcar (function (lambda (p) (cons (bbdb-phone-location p) p))) phones)) (completion-ignore-case t)) (if (not phones) ;; return nil if there is no phones nil (cond (bbdb-current-phone nil) ;; ... else ;; if there is only one phone ... grab it ((= (length phones) 1) (setq bbdb-current-phone (car phones))) ;; ... else ;; try to find bbdb-letter-phone-default phone ((and bbdb-letter-phone-default (assoc bbdb-letter-phone-default phns-alist)) (while phones (cond ((equal bbdb-letter-phone-default (bbdb-phone-location (car phones))) (setq bbdb-current-phone (car phones)) (setq phones nil)) (t (setq phones (cdr phones)) ;; ... else ;; if nothing was found, ask user (t (setq bbdb-current-phone (cdr (assoc (completing-read (format "Which Phone/Fax of %s: " (bbdb-record-name record)) phns-alist nil t) phns-alist ) ;; ... now, return the field info ... (cond ((eq field 'phone-location) (bbdb-phone-location bbdb-current-phone)) ((eq field 'phone-string) (bbdb-phone-string bbdb-current-phone )) ;; ;; ... this was stolen from bbdb-print ;; but not yet used ... ;; (defun bbdb-print-tex-quote (string) "Quote any unquoted TeX special characters that appear in STRING. In other words, # alone will be replaced by \#, but \^ will be left for TeX to process as an accent." (if string (save-excursion (set-buffer (get-buffer-create " bbdb-print-tex-quote")) (delete-region (point-min) (point-max)) (insert string) (goto-char (point-min)) (while (not (eobp)) (cond ((looking-at "[<>=]+") (replace-match "$\\&$")) ((and (looking-at "[#$%&~_]") (not (eq ?\\ (char-after (1- (point)) (replace-match "\\&")) ((and (looking-at "[{}]") (not (eq ?\\ (char-after (1- (point)) (replace-match "$\\&$")) ((and (looking-at "\\^") (not (eq ?\\ (char-after (1- (point)) (replace-match "^{ }")) (t (forward-char 1 (buffer-string (provide 'bbdb-letter) -- Jeff Miller [EMAIL PROTECTED]

Re: Problem with bbdb-hack-x-face.

2003-06-09 Thread Jeff Miller
(funcall (intern ;; compiler "highlight-headers-hack-x-face-p"))) ;; ick. (and (featurep 'xemacs) kind of makes sense... only call it as a function if it's bound as a function. -- Jeff Mi

Re: Problem with bbdb-hack-x-face.

2003-06-08 Thread Jeff Miller
ot; :type 'boolean :group 'highlight-headers) I suspect that long, long ago, it may actually have been a function -- Jeff Miller [EMAIL PROTECTED] --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thre

Re: important changes

2001-02-20 Thread Jeff Miller
Wes Hardaker writes: > Ronan Waide <[EMAIL PROTECTED]> said: > > Ronan> * Someone asked about xface handling. Lo and behold, there is xface > Ronan> code in here. It stopped working back around Lucid Emacs 19.13, as > Ronan> best I can tell from the comments; > > No, it was working not t