Remove backslash before dot.
+1999-11-07 22:56:46 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-agent.el (gnus-agent-save-group-info): Remove backslash
+ before dot.
+ * gnus-util.el (gnus-write-active-file): Ditto.
+
+1999-11-07 22:31:10 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * nnheader.el (nnheader-replace-duplicate-chars-in-string): New
+ function.
+ * gnus-cache.el (gnus-cache-file-name): Use it.
+ * gnus-agent.el (gnus-agent-group-path): Use it.
+ * nnmail.el (nnmail-group-pathname): Use it.
+
1999-11-07 21:07:55 Shenghuo ZHU <zsh@cs.rochester.edu>
* gnus-start.el (gnus-active-to-gnus-format): Don't insert backslash
1999-11-07 21:07:55 Shenghuo ZHU <zsh@cs.rochester.edu>
* gnus-start.el (gnus-active-to-gnus-format): Don't insert backslash
(concat "^" (regexp-quote group) " ") nil t)
(gnus-delete-line))
(insert (format "%S %d %d y\n" (intern group) (cdr active)
(concat "^" (regexp-quote group) " ") nil t)
(gnus-delete-line))
(insert (format "%S %d %d y\n" (intern group) (cdr active)
+ (car active)))
+ (goto-char (point-max))
+ (while (search-backward "\\." nil t)
+ (delete-char 1))))))
(defun gnus-agent-group-path (group)
"Translate GROUP into a path."
(if nnmail-use-long-file-names
(gnus-group-real-name group)
(defun gnus-agent-group-path (group)
"Translate GROUP into a path."
(if nnmail-use-long-file-names
(gnus-group-real-name group)
- (nnheader-replace-chars-in-string
- (nnheader-translate-file-chars (gnus-group-real-name group))
- ?. ?/)))
+ (nnheader-translate-file-chars
+ (nnheader-replace-chars-in-string
+ (nnheader-replace-duplicate-chars-in-string
+ (nnheader-replace-chars-in-string
+ (gnus-group-real-name group)
+ ?/ ?_)
+ ?. ?_)
+ ?. ?/))))
(nnheader-translate-file-chars
(if (gnus-use-long-file-name 'not-cache)
group
(nnheader-translate-file-chars
(if (gnus-use-long-file-name 'not-cache)
group
- (let ((group (nnheader-replace-chars-in-string group ?/ ?_)))
+ (let ((group (nnheader-replace-duplicate-chars-in-string
+ (nnheader-replace-chars-in-string group ?/ ?_)
+ ?. ?_)))
;; Translate the first colon into a slash.
(when (string-match ":" group)
(aset group (match-beginning 0) ?/))
;; Translate the first colon into a slash.
(when (string-match ":" group)
(aset group (match-beginning 0) ?/))
(or (cdr (symbol-value sym))
(car (symbol-value sym)))
(car (symbol-value sym))))))
(or (cdr (symbol-value sym))
(car (symbol-value sym)))
(car (symbol-value sym))))))
+ hashtb)
+ (goto-char (point-max))
+ (while (search-backward "\\." nil t)
+ (delete-char 1))))
(setq idx (1+ idx)))
string))
(setq idx (1+ idx)))
string))
+(defun nnheader-replace-duplicate-chars-in-string (string from to)
+ "Replace characters in STRING from FROM to TO."
+ (let ((string (substring string 0)) ;Copy string.
+ (len (length string))
+ (idx 0) prev i)
+ ;; Replace all occurrences of FROM with TO.
+ (while (< idx len)
+ (setq i (aref string idx))
+ (when (and (eq prev from) (= i from))
+ (aset string (1- idx) to)
+ (aset string idx to))
+ (setq prev i)
+ (setq idx (1+ idx)))
+ string))
+
(defun nnheader-file-to-group (file &optional top)
"Return a group name based on FILE and TOP."
(nnheader-replace-chars-in-string
(defun nnheader-file-to-group (file &optional top)
"Return a group name based on FILE and TOP."
(nnheader-replace-chars-in-string
"Make pathname for GROUP."
(concat
(let ((dir (file-name-as-directory (expand-file-name dir))))
"Make pathname for GROUP."
(concat
(let ((dir (file-name-as-directory (expand-file-name dir))))
+ (setq group (nnheader-replace-duplicate-chars-in-string
+ (nnheader-replace-chars-in-string group ?/ ?_)
+ ?. ?_))
(setq group (nnheader-translate-file-chars group))
;; If this directory exists, we use it directly.
(if (or nnmail-use-long-file-names
(setq group (nnheader-translate-file-chars group))
;; If this directory exists, we use it directly.
(if (or nnmail-use-long-file-names