Commit d2abc29a authored by Julien Danjou's avatar Julien Danjou Committed by Katsumi Yamaoka
Browse files

gnus.el (gnus-expand-group-parameter): Only return and act on what was matched.

parent 4628bef1
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
   
2010-10-06 Julien Danjou <julien@danjou.info> 2010-10-06 Julien Danjou <julien@danjou.info>
   
* gnus.el (gnus-expand-group-parameter): Only return and act on what
was matched.
* sieve-manage.el: Update example in `Commentary'. * sieve-manage.el: Update example in `Commentary'.
   
* sieve.el (sieve-open-server): Use sieve-manage-authenticate. * sieve.el (sieve-open-server): Use sieve-manage-authenticate.
......
...@@ -3815,12 +3815,13 @@ You should probably use `gnus-find-method-for-group' instead." ...@@ -3815,12 +3815,13 @@ You should probably use `gnus-find-method-for-group' instead."
(defun gnus-expand-group-parameter (match value group) (defun gnus-expand-group-parameter (match value group)
"Use MATCH to expand VALUE in GROUP." "Use MATCH to expand VALUE in GROUP."
(with-temp-buffer (let ((start (string-match match group)))
(insert group) (if start
(goto-char (point-min)) (let ((matched-string (substring group start (match-end 0))))
(while (re-search-forward match nil t) ;; Build match groups
(replace-match value)) (string-match match matched-string)
(buffer-string))) (replace-match value nil nil matched-string))
group)))
(defun gnus-expand-group-parameters (match parameters group) (defun gnus-expand-group-parameters (match parameters group)
"Go through PARAMETERS and expand them according to the match data." "Go through PARAMETERS and expand them according to the match data."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment