diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/calendar/dotemacs.tex | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/calendar/dotemacs.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/calendar/dotemacs.tex | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/calendar/dotemacs.tex b/Master/texmf-dist/doc/latex/calendar/dotemacs.tex new file mode 100644 index 00000000000..e46fb2c9908 --- /dev/null +++ b/Master/texmf-dist/doc/latex/calendar/dotemacs.tex @@ -0,0 +1,60 @@ +;; Essential add-on for BBDB +(defun bbdb-create-external () + "Prompt for and create a record. Hacked from bbdb-read-new-record." + (interactive) + (let ((name (bbdb-read-string "Name: ")) +(company (bbdb-read-string "Company: ")) +(net (bbdb-split (bbdb-read-string "Network Address: ") ",")) +(addrs + (let (L L-tail str addr) + (while + (not +(string= + "" + (setq str + (bbdb-read-string +"Address Description [RET when no more addrs]: ")))) + (setq addr (make-vector bbdb-address-length nil)) + (bbdb-record-edit-address addr str) + (if L + (progn (setcdr L-tail (cons addr nil)) +(setq L-tail (cdr L-tail))) + (setq L (cons addr nil) + L-tail L))) + L)) +(phones + (let (L L-tail str) + (while + (not +(string= + "" + (setq str + (bbdb-read-string +"Phone Location [RET when no more phones]: ")))) + (let* ((phonelist + (bbdb-error-retry + (bbdb-parse-phone-number + (read-string +"Phone: " +(and + bbdb-default-area-code + (format "(%03d) " bbdb-default-area-code)))))) + (phone (apply 'vector str + (if (= 3 (length phonelist)) + (nconc phonelist '(0)) + phonelist)))) + (if L + (progn (setcdr L-tail (cons phone nil)) + (setq L-tail (cdr L-tail))) + (setq L (cons phone nil) + L-tail L)))) + L)) +(notes (bbdb-read-string "Additional Comments: " "[M][F]"))) + (if (string= company "") (setq company nil)) + (if (string= name "") (setq name nil)) + (if (string= notes "") (setq notes nil)) + (bbdb-display-records + (list + (bbdb-create-internal name company net addrs phones notes))))) + +(global-set-key [f12] 'bbdb-create-external) |