Changes committed gnus/lisp (ChangeLog mm-util.el mml.el)
"Katsumi Yamaoka" <[email protected]> Thu, 18 Dec 2008 23:48:15 +0100
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog mm-util.el mml.el * mm-util.el (mm-substring-no-properties): New function. (mm-string-to-multibyte): Doc fix. * mml.el (mml-attach-file): Use mm-substring-no-properties. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1945 gnus/lisp/ChangeLog:7.1946 --- ChangeLog:7.1945 Thu Dec 18 22:08:33 2008 +++ ChangeLog Thu Dec 18 23:48:14 2008 @@ -1,3 +1,10 @@ +2008-12-18 Katsumi Yamaoka <[email protected]> + + * mm-util.el (mm-substring-no-properties): New function. + (mm-string-to-multibyte): Doc fix. + + * mml.el (mml-attach-file): Use mm-substring-no-properties. + 2008-12-18 Reiner Steib <[email protected]> * mml.el (mml-attach-file): Strip text properties from file name. Index: mm-util.el diff -u gnus/lisp/mm-util.el:7.83 gnus/lisp/mm-util.el:7.84 --- mm-util.el:7.83 Mon Dec 15 20:44:47 2008 +++ mm-util.el Thu Dec 18 23:48:14 2008 @@ -118,7 +118,19 @@ (and (consp elem) (stringp (car elem)) (string-match (car elem) buffer-name) - (throw 'return (cdr elem)))))))))))) + (throw 'return (cdr elem))))))))) + (substring-no-properties + . (lambda (string &optional from to) + "Return a substring of STRING, without text properties. +It starts at index FROM and ending before TO. +TO may be nil or omitted; then the substring runs to the end of STRING. +If FROM is nil or omitted, the substring starts at the beginning of STRING. +If FROM or TO is negative, it counts from the end. + +With one argument, just copy STRING without its properties." + (setq string (substring string (or from 0) to)) + (set-text-properties 0 (length string) nil string) + string))))) (eval-and-compile (if (featurep 'xemacs) @@ -156,7 +168,7 @@ 'string-to-multibyte) (t (lambda (string) - "Return a multibyte string with the same individual chars as string." + "Return a multibyte string with the same individual chars as STRING." (mapconcat (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) string ""))))) Index: mml.el diff -u gnus/lisp/mml.el:7.72 gnus/lisp/mml.el:7.73 --- mml.el:7.72 Thu Dec 18 22:08:33 2008 +++ mml.el Thu Dec 18 23:48:14 2008 @@ -1291,7 +1291,7 @@ 'type type ;; icicles redefines read-file-name and returns a ;; string w/ text properties :-/ - 'filename (substring-no-properties file) + 'filename (mm-substring-no-properties file) 'disposition (or disposition "attachment") 'description description)))