aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-10-27 18:32:15 +0000
committerDave Love2000-10-27 18:32:15 +0000
commitdf359f6c5bba555f646c7987f0830e6e97d8c81b (patch)
tree1b8157d4fbd2b2c206b53de12df52ab02268f42c
parent1f9cab4bc9679c9cc1e55fb77b916ffbf933cbc0 (diff)
downloademacs-df359f6c5bba555f646c7987f0830e6e97d8c81b.tar.gz
emacs-df359f6c5bba555f646c7987f0830e6e97d8c81b.zip
2000-09-24 Simon Josefsson <simon@josefsson.org>
* nnheader.el (nnheader-parse-head): Try both "from:" and "from: ". 2000-10-03 Bjorn Torkelsson <torkel@hpc2n.umu.se> * uudecode.el: xemacs cleanup (use featurep ' xemacs) * nnheader.el: ditto
-rw-r--r--lisp/gnus/nnheader.el31
1 files changed, 24 insertions, 7 deletions
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 848d7e47a7a..67bbfa9957e 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -6,6 +6,7 @@
6 6
7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
8;; Lars Magne Ingebrigtsen <larsi@gnus.org> 8;; Lars Magne Ingebrigtsen <larsi@gnus.org>
9;; Maintainer: bugs@gnus.org
9;; Keywords: news 10;; Keywords: news
10 11
11;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -216,7 +217,8 @@ on your system, you could say something like:
216 ;; From. 217 ;; From.
217 (progn 218 (progn
218 (goto-char p) 219 (goto-char p)
219 (if (search-forward "\nfrom: " nil t) 220 (if (or (search-forward "\nfrom: " nil t)
221 (search-forward "\nfrom:" nil t))
220 (nnheader-header-value) "(nobody)")) 222 (nnheader-header-value) "(nobody)"))
221 ;; Date. 223 ;; Date.
222 (progn 224 (progn
@@ -633,11 +635,26 @@ If FULL, translate everything."
633 2 0)) 635 2 0))
634 ;; We translate -- but only the file name. We leave the directory 636 ;; We translate -- but only the file name. We leave the directory
635 ;; alone. 637 ;; alone.
636 (if (string-match "/[^/]+\\'" file) 638 (if (and (featurep 'xemacs)
637 ;; This is needed on NT's and stuff. 639 (memq system-type '(win32 w32 mswindows windows-nt)))
638 (setq leaf (substring file (1+ (match-beginning 0))) 640 ;; This is needed on NT and stuff, because
639 path (substring file 0 (1+ (match-beginning 0)))) 641 ;; file-name-nondirectory is not enough to split
640 ;; Fall back on this. 642 ;; file names, containing ':', e.g.
643 ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE"
644 ;;
645 ;; we are trying to correctly split such names:
646 ;; "d:file.name" -> "a:" "file.name"
647 ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc"
648 ;; "d:aaa\\bbb:ccc" -> "d:aaa\\" "bbb:ccc"
649 ;; etc.
650 ;; to translate then only the file name part.
651 (progn
652 (setq leaf file
653 path "")
654 (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file)
655 (setq leaf (substring file (match-beginning 2))
656 path (substring file 0 (match-beginning 2)))))
657 ;; Emacs DTRT, says andrewi.
641 (setq leaf (file-name-nondirectory file) 658 (setq leaf (file-name-nondirectory file)
642 path (file-name-directory file)))) 659 path (file-name-directory file))))
643 (setq len (length leaf)) 660 (setq len (length leaf))
@@ -882,7 +899,7 @@ find-file-hooks, etc.
882(defalias 'nnheader-cancel-timer 'cancel-timer) 899(defalias 'nnheader-cancel-timer 'cancel-timer)
883(defalias 'nnheader-cancel-function-timers 'cancel-function-timers) 900(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
884 901
885(when (string-match "XEmacs" emacs-version) 902(when (featurep 'xemacs)
886 (require 'nnheaderxm)) 903 (require 'nnheaderxm))
887 904
888(run-hooks 'nnheader-load-hook) 905(run-hooks 'nnheader-load-hook)