From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5043 Path: main.gmane.org!not-for-mail From: "St. Suika Fenderson Roberts" Newsgroups: gmane.emacs.gnus.general Subject: SGnus and Emacs 19.29 Date: Sun, 4 Feb 1996 14:37:34 -0600 Message-ID: <199602042037.OAA52706@rs5.tcs.tulane.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035145701 31592 80.91.224.250 (20 Oct 2002 20:28:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:28:21 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.7.3/8.6.9) with SMTP id NAA30286 for ; Sun, 4 Feb 1996 13:16:02 -0800 Original-Received: from rs5.tcs.tulane.edu (rs5.tcs.tulane.edu [129.81.224.56]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 4 Feb 1996 21:36:18 +0100 Original-Received: (wrobert2@localhost) by rs5.tcs.tulane.edu (8.6.12/8.5) id OAA52706; Sun, 4 Feb 1996 14:37:34 -0600 Original-To: ding@ifi.uio.no Content-Description: A MIME message created by the VM mailer. Xref: main.gmane.org gmane.emacs.gnus.general:5043 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5043 I have managed to patch (hack, mangle) nnheader.el so that it is no longer broken under emacs 19.29, this being far easier than getting my sysadmin to upgrade to 19.30. I was wondering if could look at it, perhaps clean it up a bit, and incorperate it into the distrib? Thank you, Suika -- wrobert2@mailhost.tcs.tulane.edu charter member of the John Walter Biles fanfic fanclub. GcV2.1 GU d@ H+++ s-: g(-) p?+ !au a20 w+(++) v(*) C++(++++) UA(I)+(L+++= ) P+>++ L++ 3 E++ N+ K !W M- V- po---(--) Y+ t+(++) 5+ !j R G' tv b+(+++) D B- e= +>++++ u+(*) h!(*) f+ n+++ O[Rt/BGC] Of++ +Os- OY! OvV(15) OM Od--- Oc++ (output of diff -c) ------------------------------cut here------------------------------ *** nnheader.el.old Sun Feb 4 12:18:13 1996 --- nnheader.el Sat Feb 3 14:54:53 1996 *************** *** 454,463 **** (defun nnheader-functionp (form) "Return non-nil if FORM is funcallable." (or (and (symbolp form) (fboundp form)) (and (listp form) (eq (car form) 'lambda)))) ! (fset 'nnheader-find-file-noselect 'find-file-noselect) ! (provide 'nnheader) ;;; nnheader.el ends here --- 454,593 ---- (defun nnheader-functionp (form) "Return non-nil if FORM is funcallable." (or (and (symbolp form) (fboundp form)) (and (listp form) (eq (car form) 'lambda)))) ! ;;; snagged from the Emacs 19.30 files.el ! ;;; modifications by Suika Roberts 96/2/3 ! ! (defun insert-file-contents-literally (filename &optional visit beg end= replace) ! "Like `insert-file-contents', q.v., but only reads in the file. ! A buffer may be modified in several ways after reading into the buffer due ! to advanced Emacs features, such as file-name-handlers, format decoding, ! find-file-hooks, etc. ! This function ensures that none of these modifications will take place." ! (let ((file-name-handler-alist nil) ! (format-alist nil) ! (after-insert-file-functions nil) ! (find-buffer-file-type-function ! (if (fboundp 'find-buffer-file-type) ! (symbol-function 'find-buffer-file-type) ! nil))) ! (unwind-protect ! (progn ! (fset 'find-buffer-file-type (lambda (filename) t)) ! (insert-file-contents filename visit beg end replace)) ! (if find-buffer-file-type-function ! (fset 'find-buffer-file-type find-buffer-file-type-function) ! (fmakunbound 'find-buffer-file-type))))) ! ! (defun nnheader-find-file-noselect (filename &optional nowarn rawfile) ! "Read file FILENAME into a buffer and return the buffer. ! If a buffer exists visiting FILENAME, return that one, but ! verify that the file has not changed since visited or saved. ! The buffer is not selected, just returned to the caller." ! (setq filename ! (abbreviate-file-name ! (expand-file-name filename))) ! (if (file-directory-p filename) ! (if find-file-run-dired ! (dired-noselect (if find-file-visit-truename ! (abbreviate-file-name (file-truename filename)) ! filename)) ! (error "%s is a directory." filename)) ! (let* ((buf (get-file-buffer filename)) ! (truename (abbreviate-file-name (file-truename filename))) ! (number (nthcdr 10 (file-attributes truename))) ! ;; Find any buffer for a file which has same truename. ! (other (and (not buf) (find-buffer-visiting filename))) ! error) ! ;; Let user know if there is a buffer with the same truename. ! (if other ! (progn ! (or nowarn ! (string-equal filename (buffer-file-name other)) ! (message "%s and %s are the same file" ! filename (buffer-file-name other))) ! ;; Optionally also find that buffer. ! (if (or find-file-existing-other-name find-file-visit-truename) ! (setq buf other)))) ! (if buf ! (or nowarn ! (verify-visited-file-modtime buf) ! (cond ((not (file-exists-p filename)) ! (error "File %s no longer exists!" filename)) ! ((yes-or-no-p ! (if (string=3D (file-name-nondirectory filename) ! (buffer-name buf)) ! (format ! (if (buffer-modified-p buf) ! "File %s changed on disk. Discard your edits? " ! "File %s changed on disk. Reread from disk? ") ! (file-name-nondirectory filename)) ! (format ! (if (buffer-modified-p buf) ! "File %s changed on disk. Discard your edits in %s? " ! "File %s changed on disk. Reread from disk into %s? ") ! (file-name-nondirectory filename) ! (buffer-name buf)))) ! (save-excursion ! (set-buffer buf) ! (revert-buffer t t))))) ! (save-excursion ! ;;; The truename stuff makes this obsolete. ! ;;; (let* ((link-name (car (file-attributes filename))) ! ;;; (linked-buf (and (stringp link-name) ! ;;; (get-file-buffer link-name)))) ! ;;; (if (bufferp linked-buf) ! ;;; (message "Symbolic link to file in buffer %s" ! ;;; (buffer-name linked-buf)))) ! (setq buf (create-file-buffer filename)) ! (set-buffer-major-mode buf) ! (set-buffer buf) ! (erase-buffer) ! (if rawfile ! (condition-case () ! (insert-file-contents-literally filename t) ! (file-error ! ;; Unconditionally set error ! (setq error t))) ! (condition-case () ! (insert-file-contents filename t) ! (file-error ! ;; Run find-file-not-found-hooks until one returns non-nil. ! (or (run-hook-with-args-until-success 'find-file-not-found-h= ooks) ! ;; If they fail too, set error. ! (setq error t))))) ! ;; Find the file's truename, and maybe use that as visited name. ! (setq buffer-file-truename truename) ! (setq buffer-file-number number) ! ;; On VMS, we may want to remember which directory in a search list ! ;; the file was found in. ! (and (eq system-type 'vax-vms) ! (let (logical) ! (if (string-match ":" (file-name-directory filename)) ! (setq logical (substring (file-name-directory filename) ! 0 (match-beginning 0)))) ! (not (member logical find-file-not-true-dirname-list))) ! (setq buffer-file-name buffer-file-truename)) ! (if find-file-visit-truename ! (setq buffer-file-name ! (setq filename ! (expand-file-name buffer-file-truename)))) ! ;; Set buffer's default directory to that of the file. ! (setq default-directory (file-name-directory filename)) ! ;; Turn off backup files for certain file names. Since ! ;; this is a permanent local, the major mode won't eliminate it. ! (and (not (funcall backup-enable-predicate buffer-file-name)) ! (progn ! (make-local-variable 'backup-inhibited) ! (setq backup-inhibited t))) ! (if rawfile ! nil ! (after-find-file error (not nowarn))))) ! buf))) ! (provide 'nnheader) ;;; nnheader.el ends here