home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.sources
- Path: sparky!uunet!cis.ohio-state.edu!d0sb10.fnal.gov!SNYDER
- From: SNYDER@d0sb10.fnal.gov (scott snyder)
- Subject: better subprocess support for vms emacs (4/4)
- Message-ID: <920730000129.28a0007c@D0SB10.FNAL.GOV>
- Sender: daemon@cis.ohio-state.edu
- Organization: Source only Discussion and requests in gnu.emacs.help.
- Distribution: gnu
- Date: Wed, 29 Jul 1992 19:01:29 GMT
- Lines: 789
-
- -+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+
- X ;; Sort each VERSION-NUMBER-LIST,
- X ;; and remove the versions not to be deleted.
- X (let ((fval file-version-assoc-list))
- X (while fval
- X`09(let* ((sorted-v-list (cons 'q (sort (cdr (car fval)) '<)))
- X`09 (v-count (length sorted-v-list)))
- X`09 (if (> v-count (+ early-retention late-retention))
- X`09 (rplacd (nthcdr early-retention sorted-v-list)
- X`09`09 (nthcdr (- v-count late-retention)
- X`09`09`09 sorted-v-list)))
- X`09 (rplacd (car fval)
- X`09`09 (cdr sorted-v-list)))
- X`09(setq fval (cdr fval))))
- X ;; Look at each file. If it is a numeric backup file,
- X ;; find it in a VERSION-NUMBER-LIST and maybe flag it for deletion.
- X (dired-map-dired-file-lines 'dired-trample-file-versions)))
- X
- X(defun dired-collect-file-versions (ignore fn)
- X "If it looks like fn has versions, we make a list of the versions.
- XWe may want to flag some for deletion."
- X (let* ((base-versions
- X`09 (concat (file-name-nondirectory fn) ".`7E"))
- X`09 (bv-length (length base-versions))
- X`09 (possibilities (file-name-all-completions
- X`09`09`09 base-versions
- X`09`09`09 (file-name-directory fn)))
- X`09 (versions (mapcar 'backup-extract-version possibilities)))
- X (if versions
- X`09 (setq file-version-assoc-list (cons (cons fn versions)
- X`09`09`09`09`09 file-version-assoc-list)))))
- X
- X(defun dired-trample-file-versions (ignore fn)
- X (let* ((start-vn (string-match "\\.`7E`5B0-9`5D+`7E$" fn))
- X`09 base-version-list)
- X (and start-vn
- X`09 (setq base-version-list`09; there was a base version to which
- X`09 (assoc (substring fn 0 start-vn)`09; this looks like a
- X`09`09 file-version-assoc-list))`09; subversion
- X`09 (not (memq (string-to-int (substring fn (+ 2 start-vn)))
- X`09`09 base-version-list))`09; this one doesn't make the cut
- X`09 (dired-flag-this-line-for-DEATH))))
- X
- X(defun dired-flag-this-line-for-DEATH ()
- X (beginning-of-line)
- X (delete-char 1)
- X (insert "D"))
- X
- X(defun dired-flag-backup-files ()
- X "Flag all backup files (names ending with `7E) for deletion."
- X (interactive)
- X (save-excursion
- X (let ((buffer-read-only nil))
- X (goto-char (point-min))
- X (while (not (eobp))
- X (and (not (looking-at " d"))
- X`09 (not (eolp))
- X`09 (if (fboundp 'backup-file-name-p)
- X`09`09(let ((fn (dired-get-filename t t)))
- X`09`09 (if fn (backup-file-name-p fn)))
- X`09 (end-of-line)
- X`09 (forward-char -1)
- X`09 (looking-at "`7E"))
- X`09 (progn (beginning-of-line)
- X`09`09 (delete-char 1)
- X`09`09 (insert "D")))
- X (forward-line 1)))))
- X
- X(defun dired-flag-backup-and-auto-save-files ()
- X "Flag all backup and temporary files for deletion.
- XBackup files have names ending in `7E. Auto save file names usually
- Xstart with #."
- X (interactive)
- X (dired-flag-backup-files)
- X (dired-flag-auto-save-files))
- X`0C
- X(defun dired-rename-file (to-file)
- X "Rename this file to TO-FILE."
- X (interactive
- X (list (read-file-name (format "Rename %s to: "
- X`09`09`09`09 (file-name-nondirectory (dired-get-filename)))
- X`09`09`09 nil (dired-get-filename))))
- X (setq to-file (expand-file-name to-file))
- X (rename-file (dired-get-filename) to-file)
- X (let ((buffer-read-only nil))
- X (beginning-of-line)
- X (delete-region (point) (progn (forward-line 1) (point)))
- X (setq to-file (expand-file-name to-file))
- X (dired-add-entry (file-name-directory to-file)
- X`09`09 (file-name-nondirectory to-file))))
- X
- X(defun dired-copy-file (to-file)
- X "Copy this file to TO-FILE."
- X (interactive "FCopy to: ")
- X (copy-file (dired-get-filename) to-file)
- X (setq to-file (expand-file-name to-file))
- X (dired-add-entry (file-name-directory to-file)
- X`09`09 (file-name-nondirectory to-file)))
- X
- X(defun dired-add-entry (directory filename)
- X ;; If tree dired is implemented, this function will have to do
- X ;; something smarter with the directory. Currently, just check
- X ;; default directory, if same, add the new entry at point. With tree
- X ;; dired, should call 'dired-current-directory' or similar. Note
- X ;; that this adds the entry 'out of order' if files sorted by time,
- X ;; etc.
- X (if (string-equal directory default-directory)
- X (let ((buffer-read-only nil))
- X`09(beginning-of-line)
- X`09(call-process "ls" nil t nil
- X`09`09 "-d" dired-listing-switches (concat directory filename))
- X`09(forward-line -1)
- X`09(insert " ")
- X`09(dired-move-to-filename)
- X`09(let* ((beg (point))
- X`09 (end (progn (end-of-line) (point))))
- X`09 (setq filename (buffer-substring beg end))
- X`09 (delete-region beg end)
- X`09 (insert (file-name-nondirectory filename)))
- X`09(beginning-of-line))))
- X`0C
- X(defun dired-compress ()
- X "Compress this file."
- X (interactive)
- X (let* ((buffer-read-only nil)
- X`09 (from-file (dired-get-filename))
- X`09 (to-file (concat from-file ".Z")))
- X (if (string-match "\\.Z$" from-file)
- X`09(error "%s is already compressed!" from-file))
- X (message "Compressing %s..." from-file)
- X (call-process "compress" nil nil nil "-f" from-file)
- X (message "Compressing %s... done" from-file)
- X (dired-redisplay to-file)))
- X
- X(defun dired-uncompress ()
- X "Uncompress this file."
- X (interactive)
- X (let* ((buffer-read-only nil)
- X`09 (from-file (dired-get-filename))
- X`09 (to-file (substring from-file 0 -2)))
- X (if (string-match "\\.Z$" from-file) nil
- X`09(error "%s is not compressed!" from-file))
- X (message "Uncompressing %s..." from-file)
- X (call-process "uncompress" nil nil nil from-file)
- X (message "Uncompressing %s... done" from-file)
- X (dired-redisplay to-file)))
- X
- X(defun dired-byte-recompile ()
- X "Byte recompile this file."
- X (interactive)
- X (let* ((buffer-read-only nil)
- X`09 (from-file (dired-get-filename))
- X`09 (to-file (substring from-file 0 -3)))
- X (if (string-match "\\.el$" from-file) nil
- X`09(error "%s is uncompilable!" from-file))
- X (byte-compile-file from-file)))
- X
- X(defun dired-chmod (mode)
- X "Change mode of this file."
- X (interactive "sChange to Mode: ")
- X (let ((buffer-read-only nil)
- X`09(file (dired-get-filename)))
- X (call-process "/bin/chmod" nil nil nil mode file)
- X (dired-redisplay file)))
- X
- X(defun dired-chgrp (group)
- X "Change group of this file."
- X (interactive "sChange to Group: ")
- X (let ((buffer-read-only nil)
- X`09(file (dired-get-filename)))
- X (call-process "/bin/chgrp" nil nil nil group file)
- X (dired-redisplay file)))
- X
- X(defun dired-chown (owner)
- X "Change Owner of this file."
- X (interactive "sChange to Owner: ")
- X (let ((buffer-read-only nil)
- X`09(file (dired-get-filename)))
- X (call-process "/etc/chown" nil nil nil owner file)
- X (dired-redisplay file)))
- X
- X(defun dired-redisplay (file) "Redisplay this line."
- X (beginning-of-line)
- X (delete-region (point) (progn (forward-line 1) (point)))
- X (if file (dired-add-entry (file-name-directory file)
- X`09`09`09 (file-name-nondirectory file)))
- X (dired-move-to-filename))
- X`0C
- X(defun dired-do-deletions ()
- X "In dired, delete the files flagged for deletion."
- X (interactive)
- X (let (delete-list answer)
- X (save-excursion
- X (goto-char 1)
- X (while (re-search-forward "`5ED" nil t)
- X (setq delete-list
- X`09 (cons (cons (dired-get-filename t) (1- (point)))
- X`09`09 delete-list))))
- X (if (null delete-list)
- X`09(message "(No deletions requested)")
- X (save-window-excursion
- X (switch-to-buffer " *Deletions*")
- X (erase-buffer)
- X (setq fill-column 70)
- X (let ((l (reverse delete-list)))
- X`09 ;; Files should be in forward order for this loop.
- X`09 (while l
- X`09 (if (> (current-column) 59)
- X`09 (insert ?\n)
- X`09 (or (bobp)
- X`09`09 (indent-to (* (/ (+ (current-column) 19) 20) 20) 1)))
- X`09 (insert (car (car l)))
- X`09 (setq l (cdr l))))
- X (goto-char (point-min))
- X (setq answer (yes-or-no-p "Delete these files? ")))
- X (if answer
- X`09 (let ((l delete-list)
- X`09`09failures)
- X`09 ;; Files better be in reverse order for this loop!
- X`09 ;; That way as changes are made in the buffer
- X`09 ;; they do not shift the lines still to be changed.
- X`09 (while l
- X`09 (goto-char (cdr (car l)))
- X`09 (let ((buffer-read-only nil))
- X`09`09(condition-case ()
- X`09`09 (let ((fn (concat default-directory (car (car l)))))
- X`09`09 (if (file-directory-p fn)
- X`09`09`09 (progn
- X`09`09`09 (call-process "rmdir" nil nil nil fn)
- X`09`09`09 (if (file-exists-p fn) (delete-file fn)))
- X`09`09`09(delete-file fn))
- X`09`09 (delete-region (point)
- X`09`09`09`09 (progn (forward-line 1) (point))))
- X`09`09 (error (delete-char 1)
- X`09`09`09 (insert " ")
- X`09`09`09 (setq failures (cons (car (car l)) failures)))))
- X`09 (setq l (cdr l)))
- X`09 (if failures
- X`09`09(message "Deletions failed: %s"
- X`09`09`09 (prin1-to-string failures))))))))
- X
- X(provide 'dired)
- $ CALL UNPACK DIRED.EL;10 841372101
- $ create 'f'
- XPatches to calc 2.02 to get the gnuplot interface working on vms
- Xwith my patched emacs. You'll need to define the symbol `60gnuplot' to
- Xstart up gnuplot.
- X
- X*** calc-graph.el-orig`09Mon May 18 22:50:34 1992
- X--- calc-graph.el`09Mon May 18 22:50:33 1992
- X***************
- X*** 1,6 ****
- X--- 1,7 ----
- X ;; Calculator for GNU Emacs, part II `5Bcalc-graph.el`5D
- X ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- X ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
- X+ ;; hacked for vms - sss
- X `20
- X ;; This file is part of GNU Emacs.
- X `20
- X***************
- X*** 32,38 ****
- X ;;; Graphics
- X `20
- X ;;; Note that some of the following initial values also occur in calc.el.
- X! (defvar calc-gnuplot-tempfile "/tmp/calc")
- X `20
- X (defvar calc-gnuplot-default-device "default")
- X (defvar calc-gnuplot-default-output "STDOUT")
- X--- 33,42 ----
- X ;;; Graphics
- X `20
- X ;;; Note that some of the following initial values also occur in calc.el.
- X! (defvar calc-gnuplot-tempfile`20
- X! (if (eq system-type 'vax-vms)
- X! "sys$scratch:calc"
- X! "/tmp/calc")) ; sss
- X `20
- X (defvar calc-gnuplot-default-device "default")
- X (defvar calc-gnuplot-default-output "STDOUT")
- X***************
- X*** 59,64 ****
- X--- 63,72 ----
- X (defvar calc-graph-data-cache nil)
- X (defvar calc-graph-data-cache-limit 10)
- X `20
- X+ (if (and (eq system-type 'vax-vms)
- X+ `09 (string= calc-gnuplot-default-output "/dev/null"))
- X+ (setq calc-gnuplot-default-output "nla0:")) ; sss
- X+`20
- X (defun calc-graph-fast (many)
- X (interactive "P")
- X (let ((calc-graph-no-auto-view t))
- X***************
- X*** 343,349 ****
- X `09 (if (or (equal device "") (equal device "default"))
- X `09 (setq device (if printing
- X `09`09`09 "postscript"
- X! `09`09`09 (if (or (eq window-system 'x) (getenv "DISPLAY"))
- X `09`09`09`09"x11"
- X `09`09`09 (if (>= calc-gnuplot-version 3)
- X `09`09`09`09 "dumb" "postscript")))))
- X--- 351,360 ----
- X `09 (if (or (equal device "") (equal device "default"))
- X `09 (setq device (if printing
- X `09`09`09 "postscript"
- X! `09`09`09 (if (or (eq window-system 'x)
- X! `09`09`09`09 (getenv (if (eq system-type 'vax-vms)
- X! `09`09`09`09`09`09"DECW$DISPLAY"
- X! `09`09`09`09`09 "DISPLAY"))) ; sss
- X `09`09`09`09"x11"
- X `09`09`09 (if (>= calc-gnuplot-version 3)
- X `09`09`09`09 "dumb" "postscript")))))
- X***************
- X*** 1458,1463 ****
- X--- 1469,1477 ----
- X `09`09`09 calc-gnuplot-buffer
- X `09`09`09 calc-gnuplot-name
- X `09`09`09 args))
- X+ `09 (if (eq system-type 'vax-vms)
- X+ `09`09 (setq calc-graph-no-wait
- X+ `09`09`09(not process-connection-type))) ; sss
- X `09 (process-kill-without-query calc-gnuplot-process))
- X `09 (file-error
- X `09 (error "Sorry, can't find \"%s\" on your system."
- $ CALL UNPACK CALC.DIFFS;2 1178037821
- $ create 'f'
- XThese are diffs for GNUS 3.14.1 to make it work on vms with my patched emacs
- V.
- X
- XThese patches also include Felix Lee's faster newgroup checking code, and
- Xa faster article threader which I wrote.
- X
- XI also put the following stuff in my .emacs:
- X
- X(autoload 'gnus "gnus" "Read network news." t)
- X(autoload 'gnus-post-news "gnuspost" "Post a new news." t)
- X(setq gnus-nntp-server "fnnews")
- X(setq gnus-nntp-service 119)
- X(setq gnus-startup-file "home:`5Bnews`5Dnewsrc")
- X(setq gnus-default-article-saver 'gnus-Subject-save-in-file)
- X(setq gnus-article-save-directory "/home/news.")
- X(setq gnus-your-organization "SUNY Stony Brook High Energy Physics")
- X(setq gnus-novice-user nil)
- X(setq gnus-local-timezone "CDT")
- X
- X
- X*** gnus.el-orig`09Mon May 18 22:50:49 1992
- X--- gnus.el`09Sun Jun 7 00:51:12 1992
- X***************
- X*** 1132,1138 ****
- X "Insert startup message in current buffer."
- X ;; Insert the message.
- X (insert "
- X! GNUS Version 3.14.1
- X `20
- X NNTP-based News Reader for GNU Emacs
- X `20
- X--- 1132,1138 ----
- X "Insert startup message in current buffer."
- X ;; Insert the message.
- X (insert "
- X! GNUS Version 3.14.1 (sss hacked vers)
- X `20
- X NNTP-based News Reader for GNU Emacs
- X `20
- X***************
- X*** 4443,4449 ****
- X (let ((default
- X `09 (expand-file-name
- X `09 (concat (if gnus-use-long-file-name
- X! `09`09 (capitalize newsgroup)
- X `09`09 (gnus-newsgroup-directory-form newsgroup))
- X `09`09 "/" (int-to-string (nntp-header-number headers)))
- X `09 (or gnus-article-save-directory "`7E/News"))))
- X--- 4443,4451 ----
- X (let ((default
- X `09 (expand-file-name
- X `09 (concat (if gnus-use-long-file-name
- X! `09`09 (capitalize (if (eq system-type 'vax-vms)
- X! `09`09`09`09 (gnus-dots-to-underscores newsgroup)
- X! `09`09`09`09 newsgroup))
- X `09`09 (gnus-newsgroup-directory-form newsgroup))
- X `09`09 "/" (int-to-string (nntp-header-number headers)))
- X `09 (or gnus-article-save-directory "`7E/News"))))
- X***************
- X*** 5523,5536 ****
- X (fset (car defs) (car (cdr defs)))
- X )))
- X `20
- X (defun gnus-make-threads (newsgroup-headers)
- X "Make conversation threads tree from NEWSGROUP-HEADERS."
- X! (let ((headers newsgroup-headers)
- X! `09(h nil)
- X `09(d nil)
- X `09(roots nil)
- X! `09(dependencies nil))
- X! ;; Make message dependency alist.
- X (while headers
- X (setq h (car headers))
- X (setq headers (cdr headers))
- X--- 5525,5620 ----
- X (fset (car defs) (car (cdr defs)))
- X )))
- X `20
- X+ ;(defun gnus-make-threads (newsgroup-headers)
- X+ ; "Make conversation threads tree from NEWSGROUP-HEADERS."
- X+ ; (let ((headers newsgroup-headers)
- X+ ;`09(h nil)
- X+ ;`09(d nil)
- X+ ;`09(roots nil)
- X+ ;`09(dependencies nil))
- X+ ; ;; Make message dependency alist.
- X+ ; (while headers
- X+ ; (setq h (car headers))
- X+ ; (setq headers (cdr headers))
- X+ ; ;; Ignore invalid headers.
- X+ ; (if (vectorp h)`09`09`09;Depends on nntp.el.
- X+ ;`09 (progn
- X+ ;`09 ;; Ignore broken references, e.g "<123@a.b.c".
- X+ ;`09 (setq d (and (nntp-header-references h)
- X+ ;`09`09`09 (string-match "\\(<`5B`5E<>`5D+>\\)`5B`5E>`5D*$"
- X+ ;`09`09`09`09 (nntp-header-references h))
- X+ ;;;`09`09`09 (gnus-find-header-by-id
- X+ ;;;`09`09`09 newsgroup-headers
- X+ ;;;`09`09`09 (substring (nntp-header-references h)
- X+ ;;;`09`09`09`09 (match-beginning 1) (match-end 1)))
- X+ ;`09`09`09 ;; In fact if the variable newsgroup-headers
- X+ ;`09`09`09 ;; is not 'equal' to the variable
- X+ ;`09`09`09 ;; gnus-newsgroup-headers, the following
- X+ ;`09`09`09 ;; function call may return bogus value.
- X+ ;`09`09`09 (gnus-get-header-by-id
- X+ ;`09`09`09 (substring (nntp-header-references h)
- X+ ;`09`09`09`09 (match-beginning 1) (match-end 1)))
- X+ ;`09`09`09 ))
- X+ ;`09 ;; Check subject equality.
- X+ ;`09 (or gnus-thread-ignore-subject
- X+ ;`09`09(null d)
- X+ ;`09`09(string-equal (gnus-simplify-subject
- X+ ;`09`09`09 (nntp-header-subject h) 're)
- X+ ;`09`09`09 (gnus-simplify-subject
- X+ ;`09`09`09 (nntp-header-subject d) 're))
- X+ ;`09`09;; H should be a thread root.
- X+ ;`09`09(setq d nil))
- X+ ;`09 ;; H depends on D.
- X+ ;`09 (setq dependencies
- X+ ;`09`09 (cons (cons h d) dependencies))
- X+ ;`09 ;; H is a thread root.
- X+ ;`09 (if (null d)
- X+ ;`09`09(setq roots (cons h roots)))
- X+ ;`09 ))
- X+ ; )
- X+ ; ;; Make complete threads from the roots.
- X+ ; ;; Note: dependencies are in reverse order, but
- X+ ; ;; gnus-make-threads-1 processes it in reverse order again. So,
- X+ ; ;; we don't have to worry about it.
- X+ ; (mapcar
- X+ ; (function
- X+ ; (lambda (root)
- X+ ;`09(gnus-make-threads-1 root dependencies))) (nreverse roots))
- X+ ; ))
- X+`20
- X+ ;(defun gnus-make-threads-1 (parent dependencies)
- X+ ; (let ((children nil)
- X+ ;`09(d nil)
- X+ ;`09(depends dependencies))
- X+ ; ;; Find children.
- X+ ; (while depends
- X+ ; (setq d (car depends))
- X+ ; (setq depends (cdr depends))
- X+ ; (and (cdr d)
- X+ ;`09 (eq (nntp-header-id parent) (nntp-header-id (cdr d)))
- X+ ;`09 (setq children (cons (car d) children))))
- X+ ; ;; Go down.
- X+ ; (cons parent
- X+ ;`09 (mapcar
- X+ ;`09 (function
- X+ ;`09 (lambda (child)
- X+ ;`09 (gnus-make-threads-1 child dependencies))) children))
- X+ ; ))
- X+`20
- X+ ;; faster threading fns - sss
- X+`20
- X (defun gnus-make-threads (newsgroup-headers)
- X "Make conversation threads tree from NEWSGROUP-HEADERS."
- X! (let ((tab (gnus-make-hashtable))
- X `09(d nil)
- X+ `09(dlist nil)
- X `09(roots nil)
- X! `09(headers newsgroup-headers))
- X!`20
- X! (mapcar (function (lambda (h)
- X! `09`09`09(gnus-sethash (nntp-header-id h) (list h) tab)))
- X! `09 newsgroup-headers)
- X!`20
- X (while headers
- X (setq h (car headers))
- X (setq headers (cdr headers))
- X***************
- X*** 5538,5558 ****
- X (if (vectorp h)`09`09`09;Depends on nntp.el.
- X `09 (progn
- X `09 ;; Ignore broken references, e.g "<123@a.b.c".
- X! `09 (setq d (and (nntp-header-references h)
- X! `09`09`09 (string-match "\\(<`5B`5E<>`5D+>\\)`5B`5E>`5D*$"
- X! `09`09`09`09 (nntp-header-references h))
- X! ;;`09`09`09 (gnus-find-header-by-id
- X! ;;`09`09`09 newsgroup-headers
- X! ;;`09`09`09 (substring (nntp-header-references h)
- X! ;;`09`09`09`09 (match-beginning 1) (match-end 1)))
- X! `09`09`09 ;; In fact if the variable newsgroup-headers
- X! `09`09`09 ;; is not 'equal' to the variable
- X! `09`09`09 ;; gnus-newsgroup-headers, the following
- X! `09`09`09 ;; function call may return bogus value.
- X! `09`09`09 (gnus-get-header-by-id
- X! `09`09`09 (substring (nntp-header-references h)
- X! `09`09`09`09 (match-beginning 1) (match-end 1)))
- X! `09`09`09 ))
- X `09 ;; Check subject equality.
- X `09 (or gnus-thread-ignore-subject
- X `09`09(null d)
- X--- 5622,5635 ----
- X (if (vectorp h)`09`09`09;Depends on nntp.el.
- X `09 (progn
- X `09 ;; Ignore broken references, e.g "<123@a.b.c".
- X! `09 (setq dlist (and (nntp-header-references h)
- X! `09`09`09 (string-match "\\(<`5B`5E<>`5D+>\\)`5B`5E>`5D*$"
- X! `09`09`09`09`09 (nntp-header-references h))
- X! `09`09`09 (gnus-gethash
- X! `09`09`09 (substring (nntp-header-references h)
- X! `09`09`09`09`09 (match-beginning 1) (match-end 1))
- X! `09`09`09 tab)))
- X! `09 (setq d (car dlist))
- X `09 ;; Check subject equality.
- X `09 (or gnus-thread-ignore-subject
- X `09`09(null d)
- X***************
- X*** 5562,5573 ****
- X `09`09`09 (nntp-header-subject d) 're))
- X `09`09;; H should be a thread root.
- X `09`09(setq d nil))
- X! `09 ;; H depends on D.
- X! `09 (setq dependencies
- X! `09`09 (cons (cons h d) dependencies))
- X! `09 ;; H is a thread root.
- X! `09 (if (null d)
- X! `09`09(setq roots (cons h roots)))
- X `09 ))
- X )
- X ;; Make complete threads from the roots.
- X--- 5639,5649 ----
- X `09`09`09 (nntp-header-subject d) 're))
- X `09`09;; H should be a thread root.
- X `09`09(setq d nil))
- X! `09 (if d
- X! `09`09;; H depends on D.
- X! `09`09(setcdr dlist (cons h (cdr dlist)))
- X! `09 ;; H is a thread root.
- X! `09 (setq roots (cons h roots)))
- X `09 ))
- X )
- X ;; Make complete threads from the roots.
- X***************
- X*** 5577,5604 ****
- X (mapcar
- X (function
- X (lambda (root)
- X! `09(gnus-make-threads-1 root dependencies))) (nreverse roots))
- X ))
- X `20
- X- (defun gnus-make-threads-1 (parent dependencies)
- X- (let ((children nil)
- X- `09(d nil)
- X- `09(depends dependencies))
- X- ;; Find children.
- X- (while depends
- X- (setq d (car depends))
- X- (setq depends (cdr depends))
- X- (and (cdr d)
- X- `09 (eq (nntp-header-id parent) (nntp-header-id (cdr d)))
- X- `09 (setq children (cons (car d) children))))
- X- ;; Go down.
- X- (cons parent
- X- `09 (mapcar
- X- `09 (function
- X- `09 (lambda (child)
- X- `09 (gnus-make-threads-1 child dependencies))) children))
- X- ))
- X `20
- X (defun gnus-narrow-to-page (&optional arg)
- X "Make text outside current page invisible except for page delimiter.
- X A numeric arg specifies to move forward or backward by that many pages,
- X--- 5653,5688 ----
- X (mapcar
- X (function
- X (lambda (root)
- X! `09(gnus-make-threads-1 root tab))) (nreverse roots))
- X ))
- X `20
- X `20
- X+ ;(defun gnus-make-threads-1 (parent tab)
- X+ ; (let ((depends (cdr (gnus-gethash (nntp-header-id parent) tab)))
- X+ ;`09(children nil))
- X+ ;
- X+ ; (while depends
- X+ ; (setq children (cons (car depends) children))
- X+ ; (setq depends (cdr depends)))
- X+ ;
- X+ ; (cons parent
- X+ ;`09 (mapcar
- X+ ;`09 (function
- X+ ;`09 (lambda (child)
- X+ ;`09 (gnus-make-threads-1 child tab))) children))
- X+ ;))
- X+`20
- X+`20
- X+ (defun gnus-make-threads-1 (parent tab)
- X+ (cons parent
- X+ `09(mapcar
- X+ `09 (function
- X+ `09 (lambda (child)
- X+ `09 (gnus-make-threads-1 child tab)))
- X+ `09 (nreverse (cdr (gnus-gethash (nntp-header-id parent) tab)))
- X+ `09 ))
- X+ )
- X+`20
- X (defun gnus-narrow-to-page (&optional arg)
- X "Make text outside current page invisible except for page delimiter.
- X A numeric arg specifies to move forward or backward by that many pages,
- X***************
- X*** 5720,5730 ****
- X `09`09`09`09 (list newsgroup t))
- X `09`09`09 (car (car gnus-newsrc-assoc)))))
- X `20
- X (defun gnus-find-new-newsgroups ()
- X "Looking for new newsgroups and return names.
- X `60-n' option of options line in .newsrc file is recognized."
- X (let ((group nil)
- X! `09(new-newsgroups nil))
- X (mapatoms
- X (function
- X (lambda (sym)
- X--- 5804,5858 ----
- X `09`09`09`09 (list newsgroup t))
- X `09`09`09 (car (car gnus-newsrc-assoc)))))
- X `20
- X+ ;(defun gnus-find-new-newsgroups ()
- X+ ; "Looking for new newsgroups and return names.
- X+ ;`60-n' option of options line in .newsrc file is recognized."
- X+ ; (let ((group nil)
- X+ ;`09(new-newsgroups nil))
- X+ ; (mapatoms
- X+ ; (function
- X+ ; (lambda (sym)
- X+ ;`09(setq group (symbol-name sym))
- X+ ;`09;; Taking account of `60-n' option.
- X+ ;`09(and (or (null gnus-newsrc-options-n-no)
- X+ ;`09`09 (not (string-match gnus-newsrc-options-n-no group))
- X+ ;`09`09 (and gnus-newsrc-options-n-yes
- X+ ;`09`09 (string-match gnus-newsrc-options-n-yes group)))
- X+ ;`09 (null (assoc group gnus-killed-assoc)) ;Ignore killed.
- X+ ;`09 (null (assoc group gnus-newsrc-assoc)) ;Really new.
- X+ ;`09 ;; Find new newsgroup.
- X+ ;`09 (setq new-newsgroups
- X+ ;`09`09 (cons group new-newsgroups)))
- X+ ;`09))
- X+ ; gnus-active-hashtb)
- X+ ; ;; Return new newsgroups.
- X+ ; new-newsgroups
- X+ ; ))
- X+`20
- X+ ;; Secondly, replace the lousy gnus newgroup checking. Drop the
- X+ ;; following into your .emacs file and you'll get a significant speedup.
- X+ ;; I dropped this into gnus.el on our system and byte compiled it so that
- X+ ;; everyone else also benefits from the improvement. I can be a nice guy
- X+ ;; sometimes :-)
- X+ ;; From: flee@cs.psu.edu (Felix Lee)
- X+ ;; Newsgroups: gnu.emacs.gnus
- X+ ;; Subject: Re: Why gnus is SLOW to start
- X+ ;; Date: 14 Mar 91 03:15:11 GMT
- X+ ;;
- X (defun gnus-find-new-newsgroups ()
- X "Looking for new newsgroups and return names.
- X `60-n' option of options line in .newsrc file is recognized."
- X (let ((group nil)
- X! `09(new-newsgroups nil)
- X! `09(known-groups (gnus-make-hashtable)))
- X! ;; Build a table of known newsgroups.
- X! (mapcar
- X! (function (lambda (group) (gnus-sethash (car group) t known-groups)))
- X! gnus-killed-assoc)
- X! (mapcar
- X! (function (lambda (group) (gnus-sethash (car group) t known-groups)))
- X! gnus-newsrc-assoc)
- X! ;; Compare the active file against what's known.
- X (mapatoms
- X (function
- X (lambda (sym)
- X***************
- X*** 5734,5741 ****
- X `09`09 (not (string-match gnus-newsrc-options-n-no group))
- X `09`09 (and gnus-newsrc-options-n-yes
- X `09`09 (string-match gnus-newsrc-options-n-yes group)))
- X! `09 (null (assoc group gnus-killed-assoc)) ;Ignore killed.
- X! `09 (null (assoc group gnus-newsrc-assoc)) ;Really new.
- X `09 ;; Find new newsgroup.
- X `09 (setq new-newsgroups
- X `09`09 (cons group new-newsgroups)))
- X--- 5862,5868 ----
- X `09`09 (not (string-match gnus-newsrc-options-n-no group))
- X `09`09 (and gnus-newsrc-options-n-yes
- X `09`09 (string-match gnus-newsrc-options-n-yes group)))
- X! `09 (null (gnus-gethash group known-groups))
- X `09 ;; Find new newsgroup.
- X `09 (setq new-newsgroups
- X `09`09 (cons group new-newsgroups)))
- X***************
- X*** 6150,6159 ****
- X `09 (message "Reading %s... Done" newsrc-file)))
- X )))
- X `20
- X (defun gnus-make-newsrc-file (file)
- X "Make server dependent file name by catenating FILE and server host name
- V."
- X (let* ((file (expand-file-name file nil))
- X! `09 (real-file (concat file "-" gnus-nntp-server)))
- X (if (file-exists-p real-file)
- X `09real-file file)
- X ))
- X--- 6277,6298 ----
- X `09 (message "Reading %s... Done" newsrc-file)))
- X )))
- X `20
- X+ (defun gnus-dots-to-underscores (s)
- X+ (let ((i 0)
- X+ `09(ss (copy-sequence s)))
- X+ (while (< i (length ss))
- X+ (if (eq (aref ss i) ?.)
- X+ `09 (aset ss i ?_))
- X+ (setq i (1+ i)))
- X+ ss))
- X+`20
- X (defun gnus-make-newsrc-file (file)
- X "Make server dependent file name by catenating FILE and server host name
- V."
- X (let* ((file (expand-file-name file nil))
- X! `09 (real-file (concat file "-" (if (eq system-type 'vax-vms)
- X! `09`09`09`09`09 (gnus-dots-to-underscores
- X! `09`09`09`09`09 gnus-nntp-server)
- X! `09`09`09`09 gnus-nntp-server))))
- X (if (file-exists-p real-file)
- X `09real-file file)
- X ))
- X***************
- X*** 6306,6312 ****
- X `09 (message "Saving %s..." gnus-current-startup-file)
- X `09 (let ((make-backup-files t)
- X `09`09 (version-control nil)
- X! `09`09 (require-final-newline t)) ;Don't ask even if requested.
- X `09 ;; Make backup file of master newsrc.
- X `09 ;; You can stop or change version control of backup file.
- X `09 ;; Suggested by jason@violet.berkeley.edu.
- X--- 6445,6453 ----
- X `09 (message "Saving %s..." gnus-current-startup-file)
- X `09 (let ((make-backup-files t)
- X `09`09 (version-control nil)
- X! `09`09 (require-final-newline t) ;Don't ask even if requested.
- X! `09`09 (vms-stmlf-recfm t)) ; otherwise lines get broken after 512
- X! `09`09`09`09 ; chars on vms
- X `09 ;; Make backup file of master newsrc.
- X `09 ;; You can stop or change version control of backup file.
- X `09 ;; Suggested by jason@violet.berkeley.edu.
- X*** gnuspost.el-orig`09Mon May 18 22:50:51 1992
- X--- gnuspost.el`09Mon May 18 22:50:51 1992
- X***************
- X*** 593,598 ****
- X--- 593,601 ----
- X `09(setq domain (substring domain 1)))
- X (if (null gnus-local-domain)
- X `09(setq gnus-local-domain domain))
- X+ (if (and (eq system-type 'vax-vms) ; sss
- X+ `09 (eq (elt host 0) ?_))
- X+ `09(setq host (substring host 1)))
- X ;; Support GENERICFROM as same as standard Bnews system.
- X ;; Suggested by ohm@kaba.junet and vixie@decwrl.dec.com.
- X (cond ((null genericfrom)
- $ CALL UNPACK GNUS.DIFFS;3 677996035
- $ v=f$verify(v)
- $ EXIT
-