diff options
author | Dave Love <fx@gnu.org> | 2000-10-27 18:32:15 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-10-27 18:32:15 +0000 |
commit | df359f6c5bba555f646c7987f0830e6e97d8c81b (patch) | |
tree | 1b8157d4fbd2b2c206b53de12df52ab02268f42c /lisp/gnus/nnheader.el | |
parent | 1f9cab4bc9679c9cc1e55fb77b916ffbf933cbc0 (diff) | |
download | emacs-df359f6c5bba555f646c7987f0830e6e97d8c81b.tar.gz |
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
Diffstat (limited to 'lisp/gnus/nnheader.el')
-rw-r--r-- | lisp/gnus/nnheader.el | 31 |
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 @@ ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> +;; Maintainer: bugs@gnus.org ;; Keywords: news ;; This file is part of GNU Emacs. @@ -216,7 +217,8 @@ on your system, you could say something like: ;; From. (progn (goto-char p) - (if (search-forward "\nfrom: " nil t) + (if (or (search-forward "\nfrom: " nil t) + (search-forward "\nfrom:" nil t)) (nnheader-header-value) "(nobody)")) ;; Date. (progn @@ -633,11 +635,26 @@ If FULL, translate everything." 2 0)) ;; We translate -- but only the file name. We leave the directory ;; alone. - (if (string-match "/[^/]+\\'" file) - ;; This is needed on NT's and stuff. - (setq leaf (substring file (1+ (match-beginning 0))) - path (substring file 0 (1+ (match-beginning 0)))) - ;; Fall back on this. + (if (and (featurep 'xemacs) + (memq system-type '(win32 w32 mswindows windows-nt))) + ;; This is needed on NT and stuff, because + ;; file-name-nondirectory is not enough to split + ;; file names, containing ':', e.g. + ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE" + ;; + ;; we are trying to correctly split such names: + ;; "d:file.name" -> "a:" "file.name" + ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc" + ;; "d:aaa\\bbb:ccc" -> "d:aaa\\" "bbb:ccc" + ;; etc. + ;; to translate then only the file name part. + (progn + (setq leaf file + path "") + (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file) + (setq leaf (substring file (match-beginning 2)) + path (substring file 0 (match-beginning 2))))) + ;; Emacs DTRT, says andrewi. (setq leaf (file-name-nondirectory file) path (file-name-directory file)))) (setq len (length leaf)) @@ -882,7 +899,7 @@ find-file-hooks, etc. (defalias 'nnheader-cancel-timer 'cancel-timer) (defalias 'nnheader-cancel-function-timers 'cancel-function-timers) -(when (string-match "XEmacs" emacs-version) +(when (featurep 'xemacs) (require 'nnheaderxm)) (run-hooks 'nnheader-load-hook) |