* SGnus and Emacs 19.29
@ 1996-02-04 20:37 St. Suika Fenderson Roberts
1996-02-05 4:55 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: St. Suika Fenderson Roberts @ 1996-02-04 20:37 UTC (permalink / raw)
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= (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-hooks)
! ;; 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SGnus and Emacs 19.29
1996-02-04 20:37 SGnus and Emacs 19.29 St. Suika Fenderson Roberts
@ 1996-02-05 4:55 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-05 4:55 UTC (permalink / raw)
"St. Suika Fenderson Roberts" <wrobert2@mailhost.tcs.tulane.edu> writes:
> 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?
September Gnus breaks in many subtle ways running under Emacs 19.29.
So, sorry, I don't want to support older Emacs versions.
--
"Yes. The journey through the human heart
would have to wait until some other time."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-02-05 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-04 20:37 SGnus and Emacs 19.29 St. Suika Fenderson Roberts
1996-02-05 4:55 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).