Changes committed gnus/lisp (5 files)
"Miles Bader" <[email protected]>
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog gmm-utils.el mailcap.el sieve-manage.el smime.el Merge from emacs--devo--0, emacs--rel--22 Patches applied: * emacs--devo--0 (patch 1125, 1127-1128, 1130-1131, 1137-1138, 1141, 1143) - Merge from gnus--devo--0 - Update from CVS * emacs--rel--22 (patch 257, 259) - Merge from gnus--rel--5.10 2008-05-04 Juri Linkov <[email protected]> * lisp/mailcap.el (mailcap-replace-in-string): New compatibility alias. (mailcap-file-default-commands): Use mailcap-replace-in-string instead of replace-regexp-in-string, and mailcap-delete-duplicates instead of delete-dups. Use [ \t\n]* for whitespace in regexp. 2008-05-02 Juanma Barranquero <[email protected]> * lisp/gmm-utils.el (gmm, gmm-verbose, gmm-lazy, gmm-customize-mode) (gmm-image-load-path-for-library): Fix typos in docstrings. (gmm-message): Reflow docstring. 2008-04-25 Juanma Barranquero <[email protected]> * lisp/smime.el (smime-sign-region, smime-encrypt-region) (smime-decrypt-region): Remove redundant calls to `generate-new-buffer-name'. 2008-04-24 Stefan Monnier <[email protected]> * lisp/sieve-manage.el (sieve-string-bytes): Remove. (sieve-manage-putscript): Use length instead: `string-bytes' gives the correct byte-length only if the process's coding-system is the same as the one used internally by Emacs to represent strings. Revision: [email protected]/gnus--devo--0--patch-488 Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1846 gnus/lisp/ChangeLog:7.1847 --- ChangeLog:7.1846 Sat May 3 11:51:40 2008 +++ ChangeLog Mon May 5 03:31:53 2008 @@ -1,3 +1,10 @@ +2008-05-04 Juri Linkov <[email protected]> + + * mailcap.el (mailcap-replace-in-string): New compatibility alias. + (mailcap-file-default-commands): Use mailcap-replace-in-string + instead of replace-regexp-in-string, and mailcap-delete-duplicates + instead of delete-dups. Use [ \t\n]* for whitespace in regexp. + 2008-05-03 Reiner Steib <[email protected]> * gnus-sum.el (gnus-propagate-marks): Fix custom version. @@ -18,11 +25,23 @@ (gnus-use-marks): Define gnus-use-marks. (gnus-propagate-marks): Rename variable to something more sensible. +2008-05-02 Juanma Barranquero <[email protected]> + + * gmm-utils.el (gmm, gmm-verbose, gmm-lazy, gmm-customize-mode) + (gmm-image-load-path-for-library): Fix typos in docstrings. + (gmm-message): Reflow docstring. + 2008-04-28 Teodor Zlatanov <[email protected]> * mail-source.el (mail-source-set-1, mail-source-bind): Moved auth-source code out of the macro to clean it up and fix bugs. +2008-04-25 Juanma Barranquero <[email protected]> + + * smime.el (smime-sign-region, smime-encrypt-region) + (smime-decrypt-region): + Remove redundant calls to `generate-new-buffer-name'. + 2008-04-26 Teodor Zlatanov <[email protected]> * gnus-registry.el (gnus-registry-split-fancy-with-parent): Don't split @@ -52,6 +71,13 @@ (auth-source-user-or-password-sftp) (auth-source-user-or-password-smtp): Remove server parameter. +2008-04-24 Stefan Monnier <[email protected]> + + * sieve-manage.el (sieve-string-bytes): Remove. + (sieve-manage-putscript): Use length instead: `string-bytes' gives the + correct byte-length only if the process's coding-system is the same as + the one used internally by Emacs to represent strings. + 2008-04-24 Luca Capello <[email protected]> (tiny change) * mm-encode.el (mm-safer-encoding): Add optional argument `type'. @@ -113,7 +139,7 @@ 2008-04-09 Teodor Zlatanov <[email protected]> * auth-source.el: Added docs. - (auth-sources): Modified format to support server. + (auth-sources): Modify format to support server. (auth-source-pick, auth-source-user-or-password) (auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) @@ -1662,7 +1688,7 @@ * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): Add "alpine". (gnus-treat-body-boundary): Don't test window-system. -2007-10-28 Leo <[email protected]> (tiny change) +2007-10-28 Leo <[email protected]> (tiny change) * gnus-art.el (gnus-treat-emphasize): Don't test window-system. @@ -12334,7 +12360,7 @@ (spam-stat-buffer-words-with-scores): Don't narrow and change syntax table here. Reported by Andrew Cohen <[email protected]>. -2004-01-20 Hubert Chan <[email protected]>: +2004-01-20 Hubert Chan <[email protected]> * spam.el (spam-use-spamassassin, spam-use-spamassassin-headers) (spam-install-hooks, spam-spamassassin, spam-spamassassin-path) @@ -12474,8 +12500,7 @@ 2004-01-12 Kai Grossjohann <[email protected]> - * message.el (message-expand-name): Use EUDC if the user uses - that. + * message.el (message-expand-name): Use EUDC if the user uses that. 2004-01-12 Jesper Harder <[email protected]> Index: gmm-utils.el diff -u gnus/lisp/gmm-utils.el:7.36 gnus/lisp/gmm-utils.el:7.37 --- gmm-utils.el:7.36 Sun Jan 20 06:23:57 2008 +++ gmm-utils.el Mon May 5 03:31:53 2008 @@ -33,7 +33,7 @@ (require 'wid-edit) (defgroup gmm nil - "Utility functions for Gnus, Message and MML" + "Utility functions for Gnus, Message and MML." :prefix "gmm-" :version "22.1" ;; Gnus 5.10.9 :group 'lisp) @@ -43,7 +43,7 @@ (defcustom gmm-verbose 7 "Integer that says how verbose gmm should be. The higher the number, the more messages will flash to say what -it done. At zero, it will be totally mute; at five, it will +it did. At zero, it will be totally mute; at five, it will display most important messages; and at ten, it will keep on jabbering all the time." :type 'integer @@ -67,9 +67,11 @@ "If LEVEL is lower than `gmm-verbose' print ARGS using `message'. Guideline for numbers: -1 - error messages, 3 - non-serious error messages, 5 - messages for things -that take a long time, 7 - not very important messages on stuff, 9 - messages -inside loops." +1 - error messages +3 - non-serious error messages +5 - messages for things that take a long time +7 - not very important messages on stuff +9 - messages inside loops." (if (<= level gmm-verbose) (apply 'message args) ;; We have to do this format thingy here even if the result isn't @@ -99,7 +101,7 @@ (define-widget 'gmm-lazy 'default "Base widget for recursive datastructures. -This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." +This is a copy of the `lazy' widget in Emacs 22.1 provided for compatibility." :format "%{%t%}: %v" :convert-widget 'widget-value-convert-widget :value-create (lambda (widget) @@ -321,11 +323,11 @@ Then this function returns a list of directories which contains first the directory in which IMAGE was found, followed by the -value of `load-path'. If PATH is given, it is used instead of +value of `load-path'. If PATH is given, it is used instead of `load-path'. If NO-ERROR is non-nil and a suitable path can't be found, don't -signal an error. Instead, return a list of directories as before, +signal an error. Instead, return a list of directories as before, except that nil appears in place of the image directory. Here is an example that uses a common idiom to provide @@ -362,7 +364,7 @@ (setq image-directory-load-path dir)) ;; If `image-directory-load-path' isn't Emacs' image directory, - ;; it's probably a user preference, so use it. Then use a + ;; it's probably a user preference, so use it. Then use a ;; relative setting if possible; otherwise, use ;; `image-directory-load-path'. (cond @@ -406,7 +408,7 @@ (defun gmm-customize-mode (&optional mode) "Customize customization group for MODE. -If mode is nil, use `major-mode' of the curent buffer." +If mode is nil, use `major-mode' of the current buffer." (interactive) (customize-group (or mode Index: mailcap.el diff -u gnus/lisp/mailcap.el:7.15 gnus/lisp/mailcap.el:7.16 --- mailcap.el:7.15 Thu Apr 24 06:19:20 2008 +++ mailcap.el Mon May 5 03:31:53 2008 @@ -42,6 +42,19 @@ (autoload 'mm-delete-duplicates "mm-util") 'mm-delete-duplicates)) +;; `mailcap-replace-in-string' is an alias like `gnus-replace-in-string'. +(eval-and-compile + (cond + ((fboundp 'replace-regexp-in-string) + (defun mailcap-replace-in-string (string regexp newtext &optional literal) + "Replace all matches for REGEXP with NEWTEXT in STRING. +If LITERAL is non-nil, insert NEWTEXT literally. Return a new +string containing the replacements. +This is a compatibility function for different Emacsen." + (replace-regexp-in-string regexp newtext string nil literal))) + ((fboundp 'replace-in-string) + (defalias 'mailcap-replace-in-string 'replace-in-string)))) + (defgroup mailcap nil "Definition of viewers for MIME types." :version "21.1" @@ -1017,15 +1030,17 @@ (mailcap-parse-mimetypes) (let* ((all-mime-type ;; All unique MIME types from file extensions - (delete-dups (mapcar (lambda (file) - (mailcap-extension-to-mime - (file-name-extension file t))) - files))) + (mailcap-delete-duplicates + (mapcar (lambda (file) + (mailcap-extension-to-mime + (file-name-extension file t))) + files))) (all-mime-info ;; All MIME info lists - (delete-dups (mapcar (lambda (mime-type) - (mailcap-mime-info mime-type 'all)) - all-mime-type))) + (mailcap-delete-duplicates + (mapcar (lambda (mime-type) + (mailcap-mime-info mime-type 'all)) + all-mime-type))) (common-mime-info ;; Intersection of mime-infos from different mime-types; ;; or just the first MIME info for a single MIME type @@ -1040,18 +1055,17 @@ (car all-mime-info))) (commands ;; Command strings from `viewer' field of the MIME info - (delete-dups + (mailcap-delete-duplicates (delq nil (mapcar (lambda (mime-info) (let ((command (cdr (assoc 'viewer mime-info)))) (if (stringp command) - (replace-regexp-in-string + (mailcap-replace-in-string ;; Replace mailcap's `%s' placeholder ;; with dired's `?' placeholder - "%s" "?" - (replace-regexp-in-string + (mailcap-replace-in-string ;; Remove the final filename placeholder - "\s*\\('\\)?%s\\1?\s*\\'" "" command nil t) - nil t)))) + command "[ \t\n]*\\('\\)?%s\\1?[ \t\n]*\\'" "" t) + "%s" "?" t)))) common-mime-info))))) commands)) Index: sieve-manage.el diff -u gnus/lisp/sieve-manage.el:7.20 gnus/lisp/sieve-manage.el:7.21 --- sieve-manage.el:7.20 Thu Apr 24 06:19:20 2008 +++ sieve-manage.el Mon May 5 03:31:53 2008 @@ -570,15 +570,14 @@ (sieve-manage-send (format "HAVESPACE \"%s\" %s" name size)) (sieve-manage-parse-okno))) -(eval-and-compile - (if (fboundp 'string-bytes) - (defalias 'sieve-string-bytes 'string-bytes) - (defalias 'sieve-string-bytes 'length))) - (defun sieve-manage-putscript (name content &optional buffer) (with-current-buffer (or buffer (current-buffer)) (sieve-manage-send (format "PUTSCRIPT \"%s\" {%d+}%s%s" name - (sieve-string-bytes content) + ;; Here we assume that the coding-system will + ;; replace each char with a single byte. + ;; This is always the case if `content' is + ;; a unibyte string. + (length content) sieve-manage-client-eol content)) (sieve-manage-parse-okno))) Index: smime.el diff -u gnus/lisp/smime.el:7.33 gnus/lisp/smime.el:7.34 --- smime.el:7.33 Thu Apr 24 06:19:21 2008 +++ smime.el Mon May 5 03:31:53 2008 @@ -305,7 +305,7 @@ (smime-new-details-buffer) (let* ((certfiles (and (cdr-safe keyfile) (cadr keyfile))) (keyfile (or (car-safe keyfile) keyfile)) - (buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) + (buffer (generate-new-buffer " *smime*")) (passphrase (smime-ask-passphrase (expand-file-name keyfile))) (tmpfile (smime-make-temp-file "smime"))) (if passphrase @@ -340,7 +340,7 @@ have proper MIME tags. CERTFILES is a list of filenames, each file is expected to contain of a PEM encoded certificate." (smime-new-details-buffer) - (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) + (let ((buffer (generate-new-buffer " *smime*")) (tmpfile (smime-make-temp-file "smime"))) (prog1 (when (prog1 @@ -439,7 +439,7 @@ Any details (stderr on success, stdout and stderr on error) are left in the buffer specified by `smime-details-buffer'." (smime-new-details-buffer) - (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*"))) + (let ((buffer (generate-new-buffer " *smime*")) CAs (passphrase (smime-ask-passphrase (expand-file-name keyfile))) (tmpfile (smime-make-temp-file "smime"))) (if passphrase