Mercurial > emacs
comparison lisp/mh-e/mh-seq.el @ 67760:9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
hyperlinks such as symbols, Info nodes, or URLs. Use \" quotes for
everything else. Otherwise, you can accidently get links to
nonsense symbols.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Fri, 23 Dec 2005 08:40:31 +0000 |
parents | 6b063593fdad |
children | 7882fc7df359 |
comparison
equal
deleted
inserted
replaced
67759:b7b75914a27d | 67760:9c3504ae6060 |
---|---|
280 (set-buffer (get-buffer mh-show-buffer)) | 280 (set-buffer (get-buffer mh-show-buffer)) |
281 (set (make-local-variable 'tool-bar-map) | 281 (set (make-local-variable 'tool-bar-map) |
282 mh-show-seq-tool-bar-map)))) | 282 mh-show-seq-tool-bar-map)))) |
283 (push 'widen mh-view-ops))) | 283 (push 'widen mh-view-ops))) |
284 (t | 284 (t |
285 (error "No messages in sequence `%s'" (symbol-name sequence)))))) | 285 (error "No messages in sequence \"%s\"" (symbol-name sequence)))))) |
286 | 286 |
287 ;;;###mh-autoload | 287 ;;;###mh-autoload |
288 (defun mh-put-msg-in-seq (range sequence) | 288 (defun mh-put-msg-in-seq (range sequence) |
289 "Add RANGE to SEQUENCE\\<mh-folder-mode-map>. | 289 "Add RANGE to SEQUENCE\\<mh-folder-mode-map>. |
290 | 290 |
300 `mh-interactive-range' to see how RANGE is read in interactive | 300 `mh-interactive-range' to see how RANGE is read in interactive |
301 use." | 301 use." |
302 (interactive (list (mh-interactive-range "Add messages from") | 302 (interactive (list (mh-interactive-range "Add messages from") |
303 (mh-read-seq-default "Add to" nil))) | 303 (mh-read-seq-default "Add to" nil))) |
304 (unless (mh-valid-seq-p sequence) | 304 (unless (mh-valid-seq-p sequence) |
305 (error "Can't put message in invalid sequence `%s'" sequence)) | 305 (error "Can't put message in invalid sequence \"%s\"" sequence)) |
306 (let* ((internal-seq-flag (mh-internal-seq sequence)) | 306 (let* ((internal-seq-flag (mh-internal-seq sequence)) |
307 (original-msgs (mh-seq-msgs (mh-find-seq sequence))) | 307 (original-msgs (mh-seq-msgs (mh-find-seq sequence))) |
308 (folders (list mh-current-folder)) | 308 (folders (list mh-current-folder)) |
309 (msg-list (mh-range-to-msg-list range))) | 309 (msg-list (mh-range-to-msg-list range))) |
310 (mh-add-msgs-to-seq msg-list sequence nil t) | 310 (mh-add-msgs-to-seq msg-list sequence nil t) |
426 (car (mh-seq-containing-msg (mh-get-msg-num t) nil))) | 426 (car (mh-seq-containing-msg (mh-get-msg-num t) nil))) |
427 ((equal input "") default) | 427 ((equal input "") default) |
428 (t (intern input)))) | 428 (t (intern input)))) |
429 (msgs (mh-seq-to-msgs seq))) | 429 (msgs (mh-seq-to-msgs seq))) |
430 (if (and (null msgs) not-empty) | 430 (if (and (null msgs) not-empty) |
431 (error "No messages in sequence `%s'" seq)) | 431 (error "No messages in sequence \"%s\"" seq)) |
432 seq)) | 432 seq)) |
433 | 433 |
434 | 434 |
435 | 435 |
436 ;;; Functions to read ranges with completion... | 436 ;;; Functions to read ranges with completion... |
541 (setq input (concat "last:" (match-string 1 input)))) | 541 (setq input (concat "last:" (match-string 1 input)))) |
542 (cond ((not expand-flag) input) | 542 (cond ((not expand-flag) input) |
543 ((assoc (intern input) seq-list) | 543 ((assoc (intern input) seq-list) |
544 (cdr (assoc (intern input) seq-list))) | 544 (cdr (assoc (intern input) seq-list))) |
545 ((setq msg-list (mh-translate-range folder input)) msg-list) | 545 ((setq msg-list (mh-translate-range folder input)) msg-list) |
546 (t (error "No messages in range `%s'" input))))) | 546 (t (error "No messages in range \"%s\"" input))))) |
547 | 547 |
548 ;;;###mh-autoload | 548 ;;;###mh-autoload |
549 (defun mh-translate-range (folder expr) | 549 (defun mh-translate-range (folder expr) |
550 "In FOLDER, translate the string EXPR to a list of messages numbers." | 550 "In FOLDER, translate the string EXPR to a list of messages numbers." |
551 (save-excursion | 551 (save-excursion |
882 (list (mh-edit-pick-expr (mh-current-message-header-field 'subject)))) | 882 (list (mh-edit-pick-expr (mh-current-message-header-field 'subject)))) |
883 (mh-narrow-to-header-field 'subject pick-expr)) | 883 (mh-narrow-to-header-field 'subject pick-expr)) |
884 | 884 |
885 ;;;###mh-autoload | 885 ;;;###mh-autoload |
886 (defun mh-narrow-to-from (&optional pick-expr) | 886 (defun mh-narrow-to-from (&optional pick-expr) |
887 "Limit to messages with the same `From:' field. | 887 "Limit to messages with the same \"From:\" field. |
888 With a prefix argument, edit PICK-EXPR. | 888 With a prefix argument, edit PICK-EXPR. |
889 | 889 |
890 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 890 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
891 (interactive | 891 (interactive |
892 (list (mh-edit-pick-expr (mh-current-message-header-field 'from)))) | 892 (list (mh-edit-pick-expr (mh-current-message-header-field 'from)))) |
893 (mh-narrow-to-header-field 'from pick-expr)) | 893 (mh-narrow-to-header-field 'from pick-expr)) |
894 | 894 |
895 ;;;###mh-autoload | 895 ;;;###mh-autoload |
896 (defun mh-narrow-to-cc (&optional pick-expr) | 896 (defun mh-narrow-to-cc (&optional pick-expr) |
897 "Limit to messages with the same `Cc:' field. | 897 "Limit to messages with the same \"Cc:\" field. |
898 With a prefix argument, edit PICK-EXPR. | 898 With a prefix argument, edit PICK-EXPR. |
899 | 899 |
900 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 900 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
901 (interactive | 901 (interactive |
902 (list (mh-edit-pick-expr (mh-current-message-header-field 'cc)))) | 902 (list (mh-edit-pick-expr (mh-current-message-header-field 'cc)))) |
903 (mh-narrow-to-header-field 'cc pick-expr)) | 903 (mh-narrow-to-header-field 'cc pick-expr)) |
904 | 904 |
905 ;;;###mh-autoload | 905 ;;;###mh-autoload |
906 (defun mh-narrow-to-to (&optional pick-expr) | 906 (defun mh-narrow-to-to (&optional pick-expr) |
907 "Limit to messages with the same `To:' field. | 907 "Limit to messages with the same \"To:\" field. |
908 With a prefix argument, edit PICK-EXPR. | 908 With a prefix argument, edit PICK-EXPR. |
909 | 909 |
910 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 910 Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
911 (interactive | 911 (interactive |
912 (list (mh-edit-pick-expr (mh-current-message-header-field 'to)))) | 912 (list (mh-edit-pick-expr (mh-current-message-header-field 'to)))) |