🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #9697

Re: 5.23 doc error

#9697
From: Jamie Zawinski
Date: Mon, 18 Mar 1991 04:13
180 lines
8278 bytes
> Fixed in 5.27.  This has been wrong for ages but I didn't fix it
> because I thought the mark command bindings were rotten anyway.
> The new bindings may not be any more mnemonic, but they do have
> the saving grace of being easier to type.

And of course it's still wrong if you rebind any keys, because the doc 
string contains the default bindings, instead of using \\[...].

>> Also, doing ^H m in the summary buffer should give me a nice list
>> rather than refering me to ^H m in the INBOX.
> 
> It should, but I haven't figured out how to do it without
> duplicating the doc string.

(fset 'vm-summary-mode
      (let ((fn (copy-sequence (symbol-function 'vm-summary-mode)))
	    (doc (concat "Major mode for VM folder summaries.\n"
			 (and (string-match "\n" (documentation 'vm-mode))
			      (substring (documentation 'vm-mode)
					 (match-end 0))))))
	(if (stringp (nth 2 fn))
	    (setcar (cdr (cdr fn)) doc)
	    (setcdr (cdr (cdr fn)) (cons doc (cdr (cdr fn)))))
	(purecopy fn)))

Now if only you could lose that irrational fear of substitute-command-keys,
here is a correct version of the documentation strings for 'vm-mode and 'vm:

;;; vm-mode doc:
"Major mode for reading mail.

Commands:
   \\[vm-summarize] - summarize folder contents
   \\[vm-discard-cached-data] - discard cached information about the current message

   \\[vm-next-message] - go to next message
   \\[vm-previous-message] - go to previous message
   \\[vm-Next-message] - like `\\[vm-next-message]' but ignores skip-variable settings
   \\[vm-Previous-message] - like `\\[vm-previous-message]' but ignores skip-variable settings
   \\[vm-next-unread-message] - go to next unread message
   \\[vm-previous-unread-message] - go to previous unread message
   \\[vm-goto-message] - go to numbered message (uses prefix arg or prompts in minibuffer)
   \\[vm-goto-message-last-seen] - go to last message seen
   \\[vm-isearch-forward] - incremental search through the folder

   \\[vm-expose-hidden-headers] - display hidden headers
   \\[vm-scroll-forward] - scroll forward a page (if at end of message, then display
      next message)
   \\[vm-scroll-backward] - scroll backward a page
   \\[vm-end-of-message] - go to end of current message

   \\[vm-delete-message] - delete message, prefix arg deletes messages forward (flag as deleted)
   \\[vm-delete-message-backward] - delete message, prefix arg deletes messages backward (flag as deleted)
   \\[vm-undelete-message] - undelete
   \\[vm-kill-subject] - flag for deletion all messages with same subject as the current message

   \\[vm-reply] - reply (only to the sender of the message)
   \\[vm-reply-include-text] - reply with included text for current message
   \\[vm-resend-bounced-message] - extract and resend bounced message
   \\[vm-followup] - followup (reply to all recipients of message)
   \\[vm-followup-include-text] - followup with included text from the current message
   \\[vm-forward-message] - forward the current message
   \\[vm-mail] - send a message
   \\[vm-resend-message] - resend the current message to another user.
   \\[vm-continue-composing-message] - continue composing the most recent message you were composing

   \\[vm-send-digest] - digestify and mail entire folder contents (the folder is not modified)
   \\[vm-burst-digest] - burst a digest into individual messages, and append and assimilate these
       message into the current folder.

   \\[vm-group-messages] - group messages according to some criteria

   \\[vm-get-new-mail] - get any new mail that has arrived in the system mailbox
       (new mail is appended to the disk and buffer copies of the
       primary inbox.)
   \\[vm-visit-folder] - visit another mail folder
   \\[vm-visit-virtual-folder] - visit a virtual folder

   \\[vm-edit-message] - edit the current message

   \\[vm-save-message] - save current message in a folder (appends if folder already exists)
   \\[vm-save-message-sans-headers] - write current message to a file without its headers (appends if exists)
   \\[vm-save-folder] - save entire folder to disk, expunging deleted messages
   \\[vm-auto-archive-messages] - save unfiled messages to their vm-auto-folder-alist specified folders
   \\[vm-expunge-folder] - expunge deleted messages (without saving folder)
   \\[vm-quit] - quit VM, deleted messages are expunged, folder saved to disk
   \\[vm-quit-no-change] - exit VM with no change to the folder

   \\[vm-next-command-uses-marks] - use marks; the next vm command will affect only marked messages
             if it makes sense for the command to do so

   \\[vm-mark-message] - mark the current message
   \\[vm-unmark-message] - unmark the current message
   \\[vm-mark-all-messages] - mark all messsages
   \\[vm-clear-all-marks]   - unmark all messsages

   \\[vm-undo] - undo, special undo that retracts the most recent changes in message
             attributes.  Expunges and saves cannot be undone.

   \\[vm-load-rc] - reload your VM init file, ~/.vm
   \\[vm-help] - help
   \\[shell-command] - run a shell command
   \\[vm-pipe-message-to-command] - run a shell command with the current message as input

   \\[vm-show-copying-restrictions] - view conditions under which you may redistribute VM
   \\[vm-show-no-warranty] - view the details of VM's lack of a warranty

To put it more precisely:
\\{vm-mode-map}
Variables:

   vm-auto-center-summary
   vm-auto-folder-alist
   vm-auto-folder-case-fold-search
   vm-auto-next-message
   vm-berkeley-mail-compatibility
   vm-circular-folders
   vm-confirm-new-folders
   vm-confirm-quit
   vm-crash-box
   vm-delete-after-archiving
   vm-delete-after-bursting
   vm-delete-after-saving
   vm-delete-empty-folders
   vm-digest-center-preamble
   vm-digest-preamble-format
   vm-folder-directory
   vm-folder-read-only
   vm-follow-summary-cursor
   vm-forwarding-subject-format
   vm-gargle-uucp
   vm-group-by
   vm-highlighted-header-regexp
   vm-honor-page-delimiters
   vm-in-reply-to-format
   vm-included-text-attribution-format
   vm-included-text-prefix
   vm-inhibit-startup-message
   vm-invisible-header-regexp
   vm-keep-sent-messages
   vm-mail-window-percentage
   vm-mode-hooks
   vm-move-after-deleting
   vm-move-after-undeleting
   vm-mutable-windows
   vm-preview-lines
   vm-preview-read-messages
   vm-primary-inbox
   vm-retain-message-order
   vm-reply-ignored-addresses
   vm-reply-subject-prefix
   vm-rfc934-forwarding
   vm-search-using-regexps
   vm-skip-deleted-messages
   vm-skip-read-messages
   vm-spool-files
   vm-startup-with-summary
   vm-strip-reply-headers
   vm-summary-format
   vm-virtual-folder-alist
   vm-virtual-mirror
   vm-visible-headers
   vm-visit-when-saving"

;;; vm doc:
"Read mail under Emacs.
Optional first arg FOLDER specifies the folder to visit.  It defaults
to the value of vm-primary-inbox.  The folder buffer is put into VM
mode, a major mode for reading mail.

Visiting the primary inbox causes any contents of the system mailbox to
be moved and appended to the resulting buffer.\\<vm-mode-map>

All the messages can be read by repeatedly pressing \\[vm-scroll-forward].  Use `\\[vm-next-message]' and `\\[vm-previous-message]'
(vm-next-message and vm-previous-message) to move about in the folder.
Messages are marked for deletion with `\\[vm-delete-message]', and saved to another
folder with `\\[vm-save-message]'.  Quitting VM with `\\[vm-quit]' expunges deleted messages
and saves the buffered folder to disk.
Keybindings of vm-mode:
\\{vm-mode-map}"
Technical Details
Message-ID: <9103180413.AA06221@thalidomide>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wendy-fate.uu.net!bug-vm
References: <DANJ1.91Mar17140905@cbnewse.ATT.COM> <DANJ1.91Mar17140905@cbnewse.ATT.COM> <9103180317.AA17614@rodan.UU.NET>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,bd8f13259f7e2e17
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1991-03-18 08:03:25 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wendy-fate.uu.net!bug-vm
From: jwz%thalidomide@lucid.com (Jamie Zawinski)
Newsgroups: gnu.emacs.vm.bug
Subject: Re: 5.23 doc error
Message-ID: <9103180413.AA06221@thalidomide>
Date: 18 Mar 91 04:13:56 GMT
References: <DANJ1.91Mar17140905@cbnewse.ATT.COM>
 <DANJ1.91Mar17140905@cbnewse.ATT.COM>
 <9103180317.AA17614@rodan.UU.NET>
Sender: bug-vm-request@uunet.uu.net
Lines: 180