comparison lisp/=gnus.el @ 923:9f3cc03dae67

entered into RCS
author Jim Blandy <jimb@redhat.com>
date Tue, 04 Aug 1992 04:15:43 +0000
parents 224b0d5d1a38
children 2596132752ff
comparison
equal deleted inserted replaced
922:52cd80cb5be1 923:9f3cc03dae67
952 (setq major-mode 'gnus-Group-mode) 952 (setq major-mode 'gnus-Group-mode)
953 (setq mode-name "Newsgroup") 953 (setq mode-name "Newsgroup")
954 (setq mode-line-buffer-identification "GNUS: List of Newsgroups") 954 (setq mode-line-buffer-identification "GNUS: List of Newsgroups")
955 (setq mode-line-process nil) 955 (setq mode-line-process nil)
956 (use-local-map gnus-Group-mode-map) 956 (use-local-map gnus-Group-mode-map)
957 (buffer-flush-undo (current-buffer)) 957 (buffer-disable-undo (current-buffer))
958 (setq buffer-read-only t) ;Disable modification 958 (setq buffer-read-only t) ;Disable modification
959 (run-hooks 'gnus-Group-mode-hook)) 959 (run-hooks 'gnus-Group-mode-hook))
960 960
961 ;;;###autoload 961 ;;;###autoload
962 (defun gnus (&optional confirm) 962 (defun gnus (&optional confirm)
1727 (or (assq 'gnus-show-threads minor-mode-alist) 1727 (or (assq 'gnus-show-threads minor-mode-alist)
1728 (setq minor-mode-alist 1728 (setq minor-mode-alist
1729 (cons (list 'gnus-show-threads " Thread") minor-mode-alist))) 1729 (cons (list 'gnus-show-threads " Thread") minor-mode-alist)))
1730 (gnus-Subject-set-mode-line) 1730 (gnus-Subject-set-mode-line)
1731 (use-local-map gnus-Subject-mode-map) 1731 (use-local-map gnus-Subject-mode-map)
1732 (buffer-flush-undo (current-buffer)) 1732 (buffer-disable-undo (current-buffer))
1733 (setq buffer-read-only t) ;Disable modification 1733 (setq buffer-read-only t) ;Disable modification
1734 (setq truncate-lines t) ;Stop line folding 1734 (setq truncate-lines t) ;Stop line folding
1735 (setq selective-display t) 1735 (setq selective-display t)
1736 (setq selective-display-ellipses t) ;Display `...' 1736 (setq selective-display-ellipses t) ;Display `...'
1737 ;;(setq case-fold-search t) 1737 ;;(setq case-fold-search t)
3214 (require 'rmail) 3214 (require 'rmail)
3215 (let ((artbuf gnus-Article-buffer) 3215 (let ((artbuf gnus-Article-buffer)
3216 (digbuf (get-buffer-create gnus-Digest-buffer)) 3216 (digbuf (get-buffer-create gnus-Digest-buffer))
3217 (mail-header-separator "")) 3217 (mail-header-separator ""))
3218 (set-buffer digbuf) 3218 (set-buffer digbuf)
3219 (buffer-flush-undo (current-buffer)) 3219 (buffer-disable-undo (current-buffer))
3220 (setq buffer-read-only nil) 3220 (setq buffer-read-only nil)
3221 (erase-buffer) 3221 (erase-buffer)
3222 (insert-buffer-substring artbuf) 3222 (insert-buffer-substring artbuf)
3223 (run-hooks 'gnus-Select-digest-hook) 3223 (run-hooks 'gnus-Select-digest-hook)
3224 (gnus-convert-article-to-rmail) 3224 (gnus-convert-article-to-rmail)
3650 (use-local-map gnus-Article-mode-map) 3650 (use-local-map gnus-Article-mode-map)
3651 (make-local-variable 'page-delimiter) 3651 (make-local-variable 'page-delimiter)
3652 (setq page-delimiter gnus-page-delimiter) 3652 (setq page-delimiter gnus-page-delimiter)
3653 (make-local-variable 'mail-header-separator) 3653 (make-local-variable 'mail-header-separator)
3654 (setq mail-header-separator "") ;For caesar function. 3654 (setq mail-header-separator "") ;For caesar function.
3655 (buffer-flush-undo (current-buffer)) 3655 (buffer-disable-undo (current-buffer))
3656 (setq buffer-read-only t) ;Disable modification 3656 (setq buffer-read-only t) ;Disable modification
3657 (run-hooks 'gnus-Article-mode-hook)) 3657 (run-hooks 'gnus-Article-mode-hook))
3658 3658
3659 (defun gnus-Article-setup-buffer () 3659 (defun gnus-Article-setup-buffer ()
3660 "Initialize Article mode buffer." 3660 "Initialize Article mode buffer."
4615 (let ((require-final-newline nil)) 4615 (let ((require-final-newline nil))
4616 (write-region (point-min) (point-max) file-name t 1))) 4616 (write-region (point-min) (point-max) file-name t 1)))
4617 (kill-buffer file-buffer)) 4617 (kill-buffer file-buffer))
4618 (error "Output file does not exist"))) 4618 (error "Output file does not exist")))
4619 (set-buffer tmpbuf) 4619 (set-buffer tmpbuf)
4620 (buffer-flush-undo (current-buffer)) 4620 (buffer-disable-undo (current-buffer))
4621 (erase-buffer) 4621 (erase-buffer)
4622 (insert-buffer-substring artbuf) 4622 (insert-buffer-substring artbuf)
4623 (gnus-convert-article-to-rmail) 4623 (gnus-convert-article-to-rmail)
4624 ;; Decide whether to append to a file or to an Emacs buffer. 4624 ;; Decide whether to append to a file or to an Emacs buffer.
4625 (let ((outbuf (get-file-buffer file-name))) 4625 (let ((outbuf (get-file-buffer file-name)))
4653 (setq file-name (expand-file-name file-name)) 4653 (setq file-name (expand-file-name file-name))
4654 (let ((artbuf (current-buffer)) 4654 (let ((artbuf (current-buffer))
4655 (tmpbuf (get-buffer-create " *GNUS-output*"))) 4655 (tmpbuf (get-buffer-create " *GNUS-output*")))
4656 (save-excursion 4656 (save-excursion
4657 (set-buffer tmpbuf) 4657 (set-buffer tmpbuf)
4658 (buffer-flush-undo (current-buffer)) 4658 (buffer-disable-undo (current-buffer))
4659 (erase-buffer) 4659 (erase-buffer)
4660 (insert-buffer-substring artbuf) 4660 (insert-buffer-substring artbuf)
4661 ;; Append newline at end of the buffer as separator, and then 4661 ;; Append newline at end of the buffer as separator, and then
4662 ;; save it to file. 4662 ;; save it to file.
4663 (goto-char (point-max)) 4663 (goto-char (point-max))
4722 (setq gnus-nntp-server 4722 (setq gnus-nntp-server
4723 (read-string "NNTP server: " gnus-nntp-server)))) 4723 (read-string "NNTP server: " gnus-nntp-server))))
4724 ;; If no server name is given, local host is assumed. 4724 ;; If no server name is given, local host is assumed.
4725 (if (string-equal gnus-nntp-server "") 4725 (if (string-equal gnus-nntp-server "")
4726 (setq gnus-nntp-server (system-name))) 4726 (setq gnus-nntp-server (system-name)))
4727 (cond ((string= gnus-nntp-server) "::") 4727 (cond ((string= gnus-nntp-server "::")
4728 (require 'nnspool) 4728 (require 'nnspool)
4729 (gnus-define-access-method 'nnspool) 4729 (gnus-define-access-method 'nnspool)
4730 (message "Looking up local news spool...")) 4730 (message "Looking up local news spool..."))
4731 ((string-match ":" gnus-nntp-server) 4731 ((string-match ":" gnus-nntp-server)
4732 ;; :DIRECTORY 4732 ;; :DIRECTORY
5699 (quick-mod (nth 5 (file-attributes quick-file)))) 5699 (quick-mod (nth 5 (file-attributes quick-file))))
5700 (save-excursion 5700 (save-excursion
5701 ;; Prepare .newsrc buffer. 5701 ;; Prepare .newsrc buffer.
5702 (set-buffer (find-file-noselect newsrc-file)) 5702 (set-buffer (find-file-noselect newsrc-file))
5703 ;; It is not so good idea turning off undo. 5703 ;; It is not so good idea turning off undo.
5704 ;;(buffer-flush-undo (current-buffer)) 5704 ;;(buffer-disable-undo (current-buffer))
5705 ;; Load quick .newsrc to restore gnus-marked-assoc and 5705 ;; Load quick .newsrc to restore gnus-marked-assoc and
5706 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date. 5706 ;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date.
5707 (condition-case nil 5707 (condition-case nil
5708 (setq quick-loaded (load quick-file t t t)) 5708 (setq quick-loaded (load quick-file t t t))
5709 (error nil)) 5709 (error nil))
5893 ;; Suggested by jason@violet.berkeley.edu. 5893 ;; Suggested by jason@violet.berkeley.edu.
5894 (run-hooks 'gnus-Save-newsrc-hook) 5894 (run-hooks 'gnus-Save-newsrc-hook)
5895 (save-buffer)) 5895 (save-buffer))
5896 ;; Quickly loadable .newsrc. 5896 ;; Quickly loadable .newsrc.
5897 (set-buffer (get-buffer-create " *GNUS-newsrc*")) 5897 (set-buffer (get-buffer-create " *GNUS-newsrc*"))
5898 (buffer-flush-undo (current-buffer)) 5898 (buffer-disable-undo (current-buffer))
5899 (erase-buffer) 5899 (erase-buffer)
5900 (gnus-gnus-to-quick-newsrc-format) 5900 (gnus-gnus-to-quick-newsrc-format)
5901 (let ((make-backup-files nil) 5901 (let ((make-backup-files nil)
5902 (version-control nil) 5902 (version-control nil)
5903 (require-final-newline t)) ;Don't ask even if requested. 5903 (require-final-newline t)) ;Don't ask even if requested.