🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Patches for VM 5.32beta for GNU Emacs 19

#8915
From: Jim Blandy
Date: Mon, 08 Feb 1993 05:39
783 lines
31883 bytes
Here are a set of patches to make VM run under the as-of-yet
unreleased GNU Emacs 19.  The patches are based on
ftp.uu.net:/mail/vm/vm-5.32beta.tar.Z.  The patched code is supposed
to work on both Emacs 18 and Emacs 19.

The only problem with these patches is that they don't properly deal
with the timer package VM uses.  VM does a (require 'timer), and Emacs
19 has a "timer.el" package, but they don't seem to be referring to
the same thing.  There is no timer.el distributed with Emacs 18.59;
what is VM expecting to use?  If you can tell me about it, I'd really
like to finish this port.

I'm very interested in whether or not Kyle Jones (or whoever the
current maintainer is) considers this patch good enough for the VM
distribution.  Kyle, please just send me a short message saying "I'll
take it," "I don't like it," "I don't have time to look at it now," or
whatever, so I'll know what to expect.


Mon Feb  8 00:21:18 1993  Jim Blandy  (jimb@totoro.cs.oberlin.edu)

	* vm-misc.el (vm-with-local-vars-disabled): Instead of deciding at
	macro-expansion time which variable to bind, just bind them both
	all the time.  That way, you get compiled files which work under
	both versions of Emacs.

Sun Feb  7 21:55:47 1993  Jim Blandy  (jimb@totoro.cs.oberlin.edu)

	* vm-misc.el (vm-with-local-vars-disabled, vm-disable-undo,
	vm-push-back-char, vm-have-pushed-back-char-p, vm-baud-rate): New
	functions, for compatibility between Emacs 18 and Emacs 19.
	* vm-folder.el (vm-gobble-crash-box): Use
	vm-with-local-vars-disabled, instead of binding inhibit-local-vars.
	(vm): Use vm-with-local-vars-disabled, instead of binding
	inhibit-local-vars, and vm-disable-undo instead of
	buffer-flush-undo.
	* vm-mark.el (vm-next-command-uses-marks): Use vm-push-back-char,
	instead of setting unread-command-char.
	* vm-search.el (vm-isearch): Use vm-baud-rate instead of
	baud-rate, and vm-push-back-char and vm-have-pushed-back-char-p
	instead of fiddling with unread-command-char directly.
	* vm-virtual.el (vm-visit-virtual-folder): Use vm-disable-undo
	instead of buffer-flush-undo.
	(vm-build-virtual-message-list): Use vm-with-local-vars-disabled
	instead of binding inhibit-local-variables.

	* vm-summary.el (vm-compile-format): Change the regular expression
	used to parse format specifiers so that it can handle field widths
	of more than one digit.  This worked in Emacs 18, but Emacs 19
	uses POSIX-conformant regex matching, meaning that the second
	grouping only matches the last digit of the "17" in "%17.15F".

	* vm-vars.el (vm-startup-message-lines): Include the actual
	Biblical text.

*** 1.1	1991/06/03 20:05:17
--- vm-folder.el	1993/02/08 05:26:24
*************** visited folder."
*** 984,1007 ****
      (vm-save-restriction
       (widen)
       (let ((opoint-max (point-max)) crash-buf buffer-read-only
! 	   (old-buffer-modified-p (buffer-modified-p))
!            ;; crash box could contain a letter bomb...
! 	   ;; force user notification of file variables.
! 	   (inhibit-local-variables t))
!        (setq crash-buf (find-file-noselect vm-crash-box))
!        (goto-char (point-max))
!        (insert-buffer-substring crash-buf
! 				1 (1+ (save-excursion
! 					(set-buffer crash-buf)
! 					(widen)
! 					(buffer-size))))
!        (write-region opoint-max (point-max) buffer-file-name t t)
!        ;; make sure primary inbox is private.  384 = octal 600
!        (condition-case () (set-file-modes buffer-file-name 384) (error nil))
!        (set-buffer-modified-p old-buffer-modified-p)
!        (kill-buffer crash-buf)
!        (condition-case () (delete-file vm-crash-box)
! 	 (error nil))))))
  
  (defun vm-compatible-folder-p (file)
    (while (not (string= file (setq file (expand-file-name file)))))
--- 984,1007 ----
      (vm-save-restriction
       (widen)
       (let ((opoint-max (point-max)) crash-buf buffer-read-only
! 	   (old-buffer-modified-p (buffer-modified-p)))
!        ;; crash box could contain a letter bomb...
!        ;; force user notification of file variables.
!        (vm-with-local-vars-disabled 
! 	(setq crash-buf (find-file-noselect vm-crash-box))
! 	(goto-char (point-max))
! 	(insert-buffer-substring crash-buf
! 				 1 (1+ (save-excursion
! 					 (set-buffer crash-buf)
! 					 (widen)
! 					 (buffer-size))))
! 	(write-region opoint-max (point-max) buffer-file-name t t)
! 	;; make sure primary inbox is private.  384 = octal 600
! 	(condition-case () (set-file-modes buffer-file-name 384) (error nil))
! 	(set-buffer-modified-p old-buffer-modified-p)
! 	(kill-buffer crash-buf)
! 	(condition-case () (delete-file vm-crash-box)
! 	  (error nil)))))))
  
  (defun vm-compatible-folder-p (file)
    (while (not (string= file (setq file (expand-file-name file)))))
*************** disk.
*** 1227,1356 ****
  See the documentation for vm-mode for more information."
    (interactive (list nil current-prefix-arg))
    (vm-session-initialization)
!   ;; set inhibit-local-variables non-nil to protect
!   ;; against letter bombs.
!   (let ((inhibit-local-variables t)
! 	(full-startup (not (bufferp folder)))
! 	mail-buffer already-existed)
!     (setq mail-buffer
! 	  (if (bufferp folder)
! 	      (setq already-existed folder)
! 	    (let ((file (or folder (expand-file-name vm-primary-inbox))))
! 	      (if (file-directory-p file)
! 		  ;; MH code perhaps... ?
! 		  (error "%s is a directory" file)
! 		(or (setq already-existed (get-file-buffer file))
! 		    (let ((default-directory
! 			    (or (and vm-folder-directory
! 				     (expand-file-name vm-folder-directory))
! 				default-directory)))
! 		      (find-file-noselect file)))))))
!     (set-buffer mail-buffer)
!     (setq vm-folder-read-only read-only)
!     (vm-sanity-check-modification-flag)
!     (vm-check-for-killed-summary)
!     ;; If the buffer's not modified then we know that there can be no
!     ;; messages in the folder that are not on disk.
!     (or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
!     (let ((first-time (not (eq major-mode 'vm-mode)))
! 	  (auto-save-newer (and buffer-file-name
! 				(file-newer-than-file-p
! 				 (make-auto-save-file-name)
! 				 buffer-file-name)))
! 	  (inhibit-quit t)
! 	  blurb)
!       ;; If this is not a VM mode buffer then some initialization
!       ;; needs to be done 
!       (if first-time
! 	  (progn
! 	    (buffer-flush-undo (current-buffer))
! 	    (abbrev-mode 0)
! 	    (auto-fill-mode 0)
! 	    (vm-mode-internal)))
!       (if (or (and vm-primary-inbox-p
! 		   ;; We demand full-startup and first-time here
! 		   ;; to make sure that vm-mode being in the
! 		   ;; auto-mode-alist doesn't cause an auto
! 		   ;; save file to be ignored.  Otherwise an auto
! 		   ;; save file might be ignored on an "M-x vm"
! 		   ;; if vm-mode were in in the auto-folder-alist.
! 		   full-startup
! 		   first-time
! 		   (not vm-folder-read-only)
! 		   (not auto-save-newer)
! 		   (vm-get-spooled-mail))
! 	      first-time
! 	      ;; If the message list is empty, take a second look: the
! 	      ;; buffer may have been encrypted the first time around.
! 	      ;; This is a concession to users who use crypt.el and put
! 	      ;; vm-mode into auto-mode-alist.
! 	      (null vm-message-list))
! 	  (save-excursion
! 	    (save-window-excursion
! 	      (save-restriction
! 		(delete-windows-on (current-buffer))
! 		(set-buffer mail-buffer)
! 		(and vm-summary-buffer (delete-windows-on vm-summary-buffer))
! 		(set-buffer mail-buffer)
! 		(vm-assimilate-new-messages)
! 		;; Can't allow a folder-empty error here because execution
! 		;; would abort before the code below.
! 		(if (null vm-message-list)
! 		    (and full-startup (message "Folder is empty."))
! 		  (if first-time
! 		      (progn
! 			(vm-check-header-variables)
! 			(vm-gobble-message-order)
! 			(vm-gobble-bookmark)))
! 		  (setq blurb (vm-emit-totals-blurb))
! 		  (vm-thoughtfully-select-message))))))
!       (and full-startup (not blurb)
! 	   (setq blurb (vm-emit-totals-blurb)))
!       (if (and full-startup vm-message-list vm-startup-with-summary)
! 	  (progn
! 	    (vm-summarize)
! 	    (message blurb)))
!       (if vm-mutable-windows
! 	  (if (not (vm-set-window-configuration 'startup))
! 	      (let ((pop-up-windows (and pop-up-windows
! 					 (eq vm-mutable-windows t))))
! 		(switch-to-buffer (current-buffer))
! 		(and vm-summary-buffer (display-buffer vm-summary-buffer))
! 		(if (and (eq vm-startup-with-summary t)
! 			 (eq vm-mutable-windows t)
! 			 vm-summary-buffer)
! 		    (progn
! 		      (select-window (get-buffer-window vm-summary-buffer))
! 		      (delete-other-windows)))
! 		(if (eq vm-mutable-windows t)
! 		    (vm-proportion-windows))))
! 	(switch-to-buffer (current-buffer)))
!       (set-buffer mail-buffer)
!       (vm-preview-current-message)
!       (if (and (numberp vm-flush-interval)
! 	       (condition-case data
! 		   (progn (require 'timer) t)
! 		 (error
! 		  (message "can't support numeric vm-flush-interval without interval timers... sorry.")
! 		  (sleep-for 2)
! 		  nil ))
! 	       (not (get-timer "vm-flush")))
! 	  (start-timer "vm-flush" 'vm-flush-timer-function vm-flush-interval nil))
!       (if (and (not already-existed) auto-save-newer)
! 	  (progn
! 	    (discard-input)
! 	    (if vm-primary-inbox-p
! 		(message "Not checking for new mail... auto save file is newer; consider M-x recover-file")
! 	      (message "Auto save file is newer; consider M-x recover-file"))
! 	    (sit-for 3)))
!       ;; Display copyright and copying info unless
!       ;; user says no.
!       (if (and full-startup
! 	       (not (or vm-inhibit-startup-message vm-startup-message-displayed)))
! 	  (progn
! 	    (vm-display-startup-message)
! 	    (if (not (input-pending-p))
! 		(message blurb)))))))
  
  (defun vm-mode ()
    "Major mode for reading mail.
--- 1227,1355 ----
  See the documentation for vm-mode for more information."
    (interactive (list nil current-prefix-arg))
    (vm-session-initialization)
!   ;; protect against letter bombs.
!   (vm-with-local-vars-disabled
!    (let ((full-startup (not (bufferp folder)))
! 	 mail-buffer already-existed)
!      (setq mail-buffer
! 	   (if (bufferp folder)
! 	       (setq already-existed folder)
! 	     (let ((file (or folder (expand-file-name vm-primary-inbox))))
! 	       (if (file-directory-p file)
! 		   ;; MH code perhaps... ?
! 		   (error "%s is a directory" file)
! 		 (or (setq already-existed (get-file-buffer file))
! 		     (let ((default-directory
! 			     (or (and vm-folder-directory
! 				      (expand-file-name vm-folder-directory))
! 				 default-directory)))
! 		       (find-file-noselect file)))))))
!      (set-buffer mail-buffer)
!      (setq vm-folder-read-only read-only)
!      (vm-sanity-check-modification-flag)
!      (vm-check-for-killed-summary)
!      ;; If the buffer's not modified then we know that there can be no
!      ;; messages in the folder that are not on disk.
!      (or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
!      (let ((first-time (not (eq major-mode 'vm-mode)))
! 	   (auto-save-newer (and buffer-file-name
! 				 (file-newer-than-file-p
! 				  (make-auto-save-file-name)
! 				  buffer-file-name)))
! 	   (inhibit-quit t)
! 	   blurb)
!        ;; If this is not a VM mode buffer then some initialization
!        ;; needs to be done 
!        (if first-time
! 	   (progn
! 	     (vm-disable-undo (current-buffer))
! 	     (abbrev-mode 0)
! 	     (auto-fill-mode 0)
! 	     (vm-mode-internal)))
!        (if (or (and vm-primary-inbox-p
! 		    ;; We demand full-startup and first-time here
! 		    ;; to make sure that vm-mode being in the
! 		    ;; auto-mode-alist doesn't cause an auto
! 		    ;; save file to be ignored.  Otherwise an auto
! 		    ;; save file might be ignored on an "M-x vm"
! 		    ;; if vm-mode were in in the auto-folder-alist.
! 		    full-startup
! 		    first-time
! 		    (not vm-folder-read-only)
! 		    (not auto-save-newer)
! 		    (vm-get-spooled-mail))
! 	       first-time
! 	       ;; If the message list is empty, take a second look: the
! 	       ;; buffer may have been encrypted the first time around.
! 	       ;; This is a concession to users who use crypt.el and put
! 	       ;; vm-mode into auto-mode-alist.
! 	       (null vm-message-list))
! 	   (save-excursion
! 	     (save-window-excursion
! 	       (save-restriction
! 		 (delete-windows-on (current-buffer))
! 		 (set-buffer mail-buffer)
! 		 (and vm-summary-buffer (delete-windows-on vm-summary-buffer))
! 		 (set-buffer mail-buffer)
! 		 (vm-assimilate-new-messages)
! 		 ;; Can't allow a folder-empty error here because execution
! 		 ;; would abort before the code below.
! 		 (if (null vm-message-list)
! 		     (and full-startup (message "Folder is empty."))
! 		   (if first-time
! 		       (progn
! 			 (vm-check-header-variables)
! 			 (vm-gobble-message-order)
! 			 (vm-gobble-bookmark)))
! 		   (setq blurb (vm-emit-totals-blurb))
! 		   (vm-thoughtfully-select-message))))))
!        (and full-startup (not blurb)
! 	    (setq blurb (vm-emit-totals-blurb)))
!        (if (and full-startup vm-message-list vm-startup-with-summary)
! 	   (progn
! 	     (vm-summarize)
! 	     (message blurb)))
!        (if vm-mutable-windows
! 	   (if (not (vm-set-window-configuration 'startup))
! 	       (let ((pop-up-windows (and pop-up-windows
! 					  (eq vm-mutable-windows t))))
! 		 (switch-to-buffer (current-buffer))
! 		 (and vm-summary-buffer (display-buffer vm-summary-buffer))
! 		 (if (and (eq vm-startup-with-summary t)
! 			  (eq vm-mutable-windows t)
! 			  vm-summary-buffer)
! 		     (progn
! 		       (select-window (get-buffer-window vm-summary-buffer))
! 		       (delete-other-windows)))
! 		 (if (eq vm-mutable-windows t)
! 		     (vm-proportion-windows))))
! 	 (switch-to-buffer (current-buffer)))
!        (set-buffer mail-buffer)
!        (vm-preview-current-message)
!        (if (and (numberp vm-flush-interval)
! 		(condition-case data
! 		    (progn (require 'timer) t)
! 		  (error
! 		   (message "can't support numeric vm-flush-interval without interval timers... sorry.")
! 		   (sleep-for 2)
! 		   nil ))
! 		(not (get-timer "vm-flush")))
! 	   (start-timer "vm-flush" 'vm-flush-timer-function vm-flush-interval nil))
!        (if (and (not already-existed) auto-save-newer)
! 	   (progn
! 	     (discard-input)
! 	     (if vm-primary-inbox-p
! 		 (message "Not checking for new mail... auto save file is newer; consider M-x recover-file")
! 	       (message "Auto save file is newer; consider M-x recover-file"))
! 	     (sit-for 3)))
!        ;; Display copyright and copying info unless
!        ;; user says no.
!        (if (and full-startup
! 		(not (or vm-inhibit-startup-message vm-startup-message-displayed)))
! 	   (progn
! 	     (vm-display-startup-message)
! 	     (if (not (input-pending-p))
! 		 (message blurb))))))))
  
  (defun vm-mode ()
    "Major mode for reading mail.
*** 1.1	1991/04/21 21:19:13
--- vm-mark.el	1993/02/08 02:13:59
*************** previous N-1 messages."
*** 100,106 ****
  on the marked messages in the current folder."
    (interactive)
    (message "Next command uses marks...")
!   (setq unread-command-char (read-char)))
  
  (defun vm-marked-messages ()
    (let (list (mp vm-message-list))
--- 100,106 ----
  on the marked messages in the current folder."
    (interactive)
    (message "Next command uses marks...")
!   (vm-push-back-char (read-char)))
  
  (defun vm-marked-messages ()
    (let (list (mp vm-message-list))
*** 1.1	1991/04/10 20:32:56
--- vm-misc.el	1993/02/08 05:26:24
***************
*** 268,270 ****
--- 268,349 ----
  	((vectorp object) (apply 'vector (mapcar 'vm-copy object)))
  	((stringp object) (copy-sequence object))
  	(t object)))
+ 
+ 
+ ;;;; Compatibility functions for different versions of GNU Emacs.
+ 
+ (defmacro vm-with-local-vars-disabled (&rest forms)
+   "Disable evaluation of file local variables, and evaluate FORMS.
+ After evaluating FORMS, restore file local variable evaluation to its
+ former state.
+ VM usually uses this to protect against letter bombs.
+ On some versions of Emacs, this works by binding
+ inhibit-local-variables; on others, that variable has been renamed
+ enable-local-variables, and its sense has been reversed.  This
+ function does the right thing in both circumstances."
+   ;; We could just check which of these variables seems to be bound at
+   ;; macro-expansion time, and then tailor the code accordingly.
+   ;; However, that would mean that any byte-compiled code would only
+   ;; be correct for the version of Emacs used to compile it.  So we'll
+   ;; just punt, and bind both variables.
+   (apply 'list
+ 	 'let
+ 	 (list (list 'enable-local-variables nil)
+ 	       (list 'inhibit-local-variables t))
+ 	 forms))
+ 
+ (defun vm-disable-undo (buffer)
+   "Make BUFFER stop keeping undo information.
+ Some versions of Emacs use a function called buffer-flush-undo to do
+ this; others call it buffer-disable-undo.  This function automatically
+ does the right thing."
+   (cond
+    ((fboundp 'buffer-disable-undo) (buffer-disable-undo buffer))
+    ((fboundp 'buffer-flush-undo) (buffer-flush-undo buffer))
+    (t
+     (error "can't figure out how to disable undo recordkeeping"))))
+ 
+ (defun vm-push-back-char (char)
+   "Arrange for CHAR to be read as the next character of input.
+ Return CHAR.
+ Some versions of Emacs have a variable called unread-command-char to
+ do this; others, which support non-character events, have renamed the
+ variable unread-command-event, and changed the quiescent value from -1
+ to nil; still others allow you to push back whole lists of events, and
+ have a variable called unread-command-events (note the plural).  This
+ function sees which are available and tries to do the right thing."
+   (cond
+    ((boundp 'unread-command-events) (setq unread-command-events (list char)))
+    ((boundp 'unread-command-event) (setq unread-command-event char))
+    ((boundp 'unread-command-char) (setq unread-command-char char))
+    (t
+     (error "can't figure out how to push back characters"))))
+ 
+ (defun vm-have-pushed-back-char-p ()
+   "Return non-nil if there are currently any events pushed back.
+ See also vm-push-back-char.
+ Some versions of Emacs have a variable called unread-command-char to
+ implement push-back; others, which support non-character events, have
+ renamed the variable unread-command-event, and changed the quiescent
+ value from -1 to nil; still others allow you to push back whole lists
+ of events, and have a variable called unread-command-events (note the
+ plural).  This function sees which are available and tries to do the
+ right thing."
+   (cond
+    ((boundp 'unread-command-events) unread-command-events)
+    ((boundp 'unread-command-event) unread-command-event)
+    ((boundp 'unread-command-char) (not (eq unread-command-char -1)))
+    (t
+     (error "can't figure out how to check for pushed back characters"))))
+ 
+ (defun vm-baud-rate ()
+   "Return the baud rate of the terminal.
+ Some versions of Emacs have a variable called `baud-rate' which holds
+ this information; others have a function called `baud-rate' which
+ returns it.  This function tries to figure out which is available and
+ do the right thing."
+   (cond
+    ((boundp 'baud-rate) baud-rate)
+    ((fboundp 'baud-rate) (baud-rate))
+    (t
+     (error "can't figure out how to get the baud rate"))))
*** 1.1	1991/04/21 21:12:37
--- vm-search.el	1993/02/08 02:13:59
***************
*** 37,43 ****
  	(barrier (point))
  	adjusted
  	(invalid-regexp nil)
! 	(slow-terminal-mode (and (<= (baud-rate) search-slow-speed)
  				 (> (window-height)
  				    (* 4 search-slow-window-lines))))
  	(other-end nil)    ;Start of last match if fwd, end if backwd.
--- 37,43 ----
  	(barrier (point))
  	adjusted
  	(invalid-regexp nil)
! 	(slow-terminal-mode (and (<= (vm-baud-rate) search-slow-speed)
  				 (> (window-height)
  				    (* 4 search-slow-window-lines))))
  	(other-end nil)    ;Start of last match if fwd, end if backwd.
***************
*** 54,60 ****
      (save-window-excursion
       (catch 'search-done
         (while t
! 	 (or (>= unread-command-char 0)
  	     (progn
  	       (or (input-pending-p)
  		   (vm-isearch-message))
--- 54,60 ----
      (save-window-excursion
       (catch 'search-done
         (while t
! 	 (or (vm-have-pushed-back-char-p)
  	     (progn
  	       (or (input-pending-p)
  		   (vm-isearch-message))
***************
*** 84,90 ****
  	   ;; Meta character means exit search.
  	   (cond ((and (>= char 128)
  		       search-exit-option)
! 		  (setq unread-command-char char)
  		  (throw 'search-done t))
  		 ((eq char search-exit-char)
  		  ;; Esc means exit search normally.
--- 84,90 ----
  	   ;; Meta character means exit search.
  	   (cond ((and (>= char 128)
  		       search-exit-option)
! 		  (vm-push-back-char char)
  		  (throw 'search-done t))
  		 ((eq char search-exit-char)
  		  ;; Esc means exit search normally.
***************
*** 160,166 ****
  			       (/= char search-quote-char)
  			       (or (= char ?\177)
  				   (and (< char ? ) (/= char ?\t) (/= char ?\r))))
! 			  (setq unread-command-char char)
  			  (throw 'search-done t))
  			 (t
  			  ;; Any other character => add it to the
--- 160,166 ----
  			       (/= char search-quote-char)
  			       (or (= char ?\177)
  				   (and (< char ? ) (/= char ?\t) (/= char ?\r))))
! 			  (vm-push-back-char char)
  			  (throw 'search-done t))
  			 (t
  			  ;; Any other character => add it to the
***************
*** 301,307 ****
  	(if success
  	    (setq other-end
  		  (if forward (match-beginning 0) (match-end 0)))))
!     (quit (setq unread-command-char ?\C-g)
  	  (setq success nil))
      (invalid-regexp (setq invalid-regexp (car (cdr lossage)))
  		    (if (string-match "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
--- 301,307 ----
  	(if success
  	    (setq other-end
  		  (if forward (match-beginning 0) (match-end 0)))))
!     (quit (vm-push-back-char ?\C-g)
  	  (setq success nil))
      (invalid-regexp (setq invalid-regexp (car (cdr lossage)))
  		    (if (string-match "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
***************
*** 337,343 ****
      (if (eq char search-yank-word-char)
  	(setq message (if forward "VM Word search: " "VM Word search backward: "))
        ;; Otherwise let that 1 char be part of the search string.
!       (setq unread-command-char char))
      (setq function
  	  (if (eq char search-yank-word-char)
  	      (if forward 'word-search-forward 'word-search-backward)
--- 337,343 ----
      (if (eq char search-yank-word-char)
  	(setq message (if forward "VM Word search: " "VM Word search backward: "))
        ;; Otherwise let that 1 char be part of the search string.
!       (vm-push-back-char char))
      (setq function
  	  (if (eq char search-yank-word-char)
  	      (if forward 'word-search-forward 'word-search-backward)
*** 1.1	1991/10/22 04:04:31
--- vm-summary.el	1993/02/08 02:13:59
*************** mandatory."
*** 260,266 ****
  	sexp sexp-fmt conv-spec last-match-end case-fold-search)
      (store-match-data nil)
      (while (string-match
! "%\\(-\\)?\\([0-9]\\)*\\(\\.\\([0-9]+\\)\\)?\\([aAcdfFhilmMnstTwyz*%]\\)"
  	    format (match-end 0))
        (setq conv-spec (aref format (match-beginning 5)))
        (if (memq conv-spec '(?a ?A ?c ?d ?f ?F ?h ?i ?l ?M
--- 260,266 ----
  	sexp sexp-fmt conv-spec last-match-end case-fold-search)
      (store-match-data nil)
      (while (string-match
! "%\\(-\\)?\\([0-9]+\\)?\\(\\.\\([0-9]+\\)\\)?\\([aAcdfFhilmMnstTwyz*%]\\)"
  	    format (match-end 0))
        (setq conv-spec (aref format (match-beginning 5)))
        (if (memq conv-spec '(?a ?A ?c ?d ?f ?F ?h ?i ?l ?M
*** 1.1	1992/03/02 04:50:11
--- vm-vars.el	1993/02/08 02:13:59
*************** specified by vm-edit-message-mode.")
*** 748,754 ****
  (defconst vm-startup-message-lines
        '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
  	"This is prerelease software.  Giving out copies of it means DEATH!"
! 	"See Revelations 6:8 for full details"
  	"VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
  	"In Stereo (where available)"))
  ;    '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
--- 748,758 ----
  (defconst vm-startup-message-lines
        '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
  	"This is prerelease software.  Giving out copies of it means DEATH!"
!         "(See Revelations 6:8 for full details:"
!           "\"And I looked, and behold a pale horse:"
!           "and his name that sat on him was Death, and Hell followed with him."
!           "And power was given unto them over the fourth part of the earth, to kill with"
!           "sword, and with hunger, and with death, and with the beasts of the earth.\""
  	"VM comes with ABSOLUTELY NO WARRANTY; type \\[vm-show-no-warranty] for full details"
  	"In Stereo (where available)"))
  ;    '("Mail bug reports to bug-vm@uunet.uu.net or post them to gnu.emacs.vm.bug"
*** 1.1	1991/04/10 18:29:11
--- vm-virtual.el	1993/02/08 05:26:24
***************
*** 42,48 ****
  		vm-summary-buffer vm-mail-buffer
  		vm-numbering-redo-start-point t
  		vm-summary-redo-start-point t)
! 	  (buffer-flush-undo (current-buffer))
  	  (abbrev-mode 0)
  	  (auto-fill-mode 0)
  	  (vm-build-virtual-message-list
--- 42,48 ----
  		vm-summary-buffer vm-mail-buffer
  		vm-numbering-redo-start-point t
  		vm-summary-redo-start-point t)
! 	  (vm-disable-undo (current-buffer))
  	  (abbrev-mode 0)
  	  (auto-fill-mode 0)
  	  (vm-build-virtual-message-list
***************
*** 56,124 ****
  	 (vm-display-startup-message))))
  
  (defun vm-build-virtual-message-list (def read-only)
!   (let ((clauses (cdr def))
! 	;; letter bomb protection
! 	(inhibit-local-variables t)
! 	(vbuffer (current-buffer))
! 	(inhibit-quit t)
! 	message-list folders folder selector-list selector arg
! 	buffers-used)
!     (save-excursion
!       (while clauses
! 	(setq folders (car (car clauses))
! 	      selector-list (cdr (car clauses)))
! 	(while selector-list
! 	  (setq selector
! 		(intern
! 		 (concat "vm-vs-" (symbol-name (car (car selector-list))))))
! 	  (if (cdr (car selector-list))
! 	      (setq arg (car (cdr (car selector-list))))
! 	    (setq arg nil))
! 	  (while folders
! 	    (setq folder (car folders))
! 	    (while
! 		(not
! 		 (equal folder
! 			(setq folder
! 			      (expand-file-name folder vm-folder-directory)))))
! 	    (if (file-directory-p folder)
! 		(setq folders (nconc (cdr folders)
! 				     (vm-delete-directories
! 				      (directory-files folder t nil))))
! 	      (set-buffer (or (get-file-buffer folder)
! 			      (find-file-noselect folder)))
! 	      (if (not (memq vbuffer vm-virtual-buffers))
! 		  (setq vm-virtual-buffers (cons vbuffer vm-virtual-buffers)
! 			buffers-used (cons (current-buffer) buffers-used)))
! 	      (if (not (eq major-mode 'vm-mode))
! 		  (vm-mode))
! 	      (setq mp vm-message-list)
! 	      (while mp
! 		(if (if arg
! 			(funcall selector (car mp) arg)
! 		      (funcall selector (car mp)))
! 		    (progn
! 		      (setq message-list (cons (copy-sequence (car mp))
! 					       message-list))
! 		      (if vm-virtual-mirror
! 			  (vm-set-virtual-messages-of
! 			   (car mp)
! 			   (cons (car message-list)
! 				 (vm-virtual-messages-of (car mp))))
! 			(vm-set-attributes-of
! 			 (car message-list)
! 			 (make-vector vm-attributes-vector-length nil)))
! 		      (vm-set-softdata-of
! 		       (car message-list)
! 		       (copy-sequence (vm-softdata-of
! 				       (car message-list))))
! 		      (vm-set-mark-of (car message-list) nil)))
! 		(setq mp (cdr mp)))
! 	      (setq folders (cdr folders))))
! 	  (setq selector-list (cdr selector-list)))
! 	(setq clauses (cdr clauses))))
!     (setq vm-message-list (nreverse message-list)
! 	  vm-real-buffers buffers-used)))
  
  (defun vm-delete-directories (list)
    (vm-delete 'file-directory-p list))
--- 56,124 ----
  	 (vm-display-startup-message))))
  
  (defun vm-build-virtual-message-list (def read-only)
!   ;; letter bomb protection
!   (vm-with-local-vars-disabled
!    (let ((clauses (cdr def))
! 	 (vbuffer (current-buffer))
! 	 (inhibit-quit t)
! 	 message-list folders folder selector-list selector arg
! 	 buffers-used)
!      (save-excursion
!        (while clauses
! 	 (setq folders (car (car clauses))
! 	       selector-list (cdr (car clauses)))
! 	 (while selector-list
! 	   (setq selector
! 		 (intern
! 		  (concat "vm-vs-" (symbol-name (car (car selector-list))))))
! 	   (if (cdr (car selector-list))
! 	       (setq arg (car (cdr (car selector-list))))
! 	     (setq arg nil))
! 	   (while folders
! 	     (setq folder (car folders))
! 	     (while
! 		 (not
! 		  (equal folder
! 			 (setq folder
! 			       (expand-file-name folder vm-folder-directory)))))
! 	     (if (file-directory-p folder)
! 		 (setq folders (nconc (cdr folders)
! 				      (vm-delete-directories
! 				       (directory-files folder t nil))))
! 	       (set-buffer (or (get-file-buffer folder)
! 			       (find-file-noselect folder)))
! 	       (if (not (memq vbuffer vm-virtual-buffers))
! 		   (setq vm-virtual-buffers (cons vbuffer vm-virtual-buffers)
! 			 buffers-used (cons (current-buffer) buffers-used)))
! 	       (if (not (eq major-mode 'vm-mode))
! 		   (vm-mode))
! 	       (setq mp vm-message-list)
! 	       (while mp
! 		 (if (if arg
! 			 (funcall selector (car mp) arg)
! 		       (funcall selector (car mp)))
! 		     (progn
! 		       (setq message-list (cons (copy-sequence (car mp))
! 						message-list))
! 		       (if vm-virtual-mirror
! 			   (vm-set-virtual-messages-of
! 			    (car mp)
! 			    (cons (car message-list)
! 				  (vm-virtual-messages-of (car mp))))
! 			 (vm-set-attributes-of
! 			  (car message-list)
! 			  (make-vector vm-attributes-vector-length nil)))
! 		       (vm-set-softdata-of
! 			(car message-list)
! 			(copy-sequence (vm-softdata-of
! 					(car message-list))))
! 		       (vm-set-mark-of (car message-list) nil)))
! 		 (setq mp (cdr mp)))
! 	       (setq folders (cdr folders))))
! 	   (setq selector-list (cdr selector-list)))
! 	 (setq clauses (cdr clauses))))
!      (setq vm-message-list (nreverse message-list)
! 	   vm-real-buffers buffers-used))))
  
  (defun vm-delete-directories (list)
    (vm-delete 'file-directory-p list))
Technical Details
Message-ID: <9302080539.AA17892@totoro.cs.oberlin.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vm

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,ee62171f4103d3be,start
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1993-02-06 22:21:35 PST
x-gateway: rodan.UU.NET from bug-vm to gnu.emacs.vm.bug; Mon, 8 Feb 1993 01:31:11 EST
Date: Mon, 8 Feb 1993 00:39:20 -0500
From: jimb@totoro.cs.oberlin.edu (Jim Blandy)
Message-ID: <9302080539.AA17892@totoro.cs.oberlin.edu>
Subject: Patches for VM 5.32beta for GNU Emacs 19
X-Windows: It could be worse, but it'll take time.
Newsgroups: gnu.emacs.vm.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!wendy-fate.uu.net!bug-vm
Sender: bug-vm-request@uunet.uu.net
Lines: 783