aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-06-23 00:37:31 -0700
committerPaul Eggert2011-06-23 00:37:31 -0700
commit7efb4e0e62ed3e11e20d15821342c322b4101ae7 (patch)
tree5959727f87d23f06389a138ed5dcb555d4eefbff /lisp
parentff5844ad0bc84ea05e1f57827a040a31f54b8a9c (diff)
parent4e3232657c0fe231e594fb75bea2daee2388b978 (diff)
downloademacs-7efb4e0e62ed3e11e20d15821342c322b4101ae7.tar.gz
emacs-7efb4e0e62ed3e11e20d15821342c322b4101ae7.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/erc/ChangeLog9
-rw-r--r--lisp/erc/erc.el39
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/nnimap.el6
-rw-r--r--lisp/mail/rmailmm.el12
-rw-r--r--lisp/mail/sendmail.el14
-rw-r--r--lisp/minibuffer.el35
8 files changed, 88 insertions, 47 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66336413e27..b29a5989791 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12011-06-22 Leo Liu <sdl.web@gmail.com>
2
3 * minibuffer.el (completing-read-function)
4 (completing-read-default): Move from minibuf.c
5
62011-06-22 Richard Stallman <rms@gnu.org>
7
8 * mail/sendmail.el (mail-bury): If Rmail is in use, return nicely
9 to Rmail even if not started by a special Rmail command.
10
11 * mail/rmailmm.el (rmail-insert-mime-forwarded-message):
12 Copy the buffer currently showing just one message.
13
12011-06-22 Roland Winkler <winkler@gnu.org> 142011-06-22 Roland Winkler <winkler@gnu.org>
2 15
3 * textmodes/bibtex.el (bibtex-entry-update): Use mapc. 16 * textmodes/bibtex.el (bibtex-entry-update): Use mapc.
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index f1c0b2d1c65..3d9b0c8646f 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,12 @@
12011-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * erc.el (erc-ssl): Made into a synonym for erc-tls, which
4 provides a superset of the same functionality.
5 (erc-open-ssl-stream): Removed.
6 (erc-open-tls-stream): Use `open-network-stream' instead of
7 `open-tls-stream' directly to be able to use the built-in TLS
8 support.
9
12011-05-28 Stefan Monnier <monnier@iro.umontreal.ca> 102011-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 11
3 * erc-pcomplete.el (erc-pcompletions-at-point): Mark the completion 12 * erc-pcomplete.el (erc-pcompletions-at-point): Mark the completion
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a8c592696ad..36097cf0c12 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2164,34 +2164,7 @@ be invoked for the values of the other parameters."
2164 2164
2165;;;###autoload 2165;;;###autoload
2166(defalias 'erc-select 'erc) 2166(defalias 'erc-select 'erc)
2167 2167(defalias 'erc-ssl 'erc-tls)
2168(defun erc-ssl (&rest r)
2169 "Interactively select SSL connection parameters and run ERC.
2170Arguments are the same as for `erc'."
2171 (interactive (erc-select-read-args))
2172 (let ((erc-server-connect-function 'erc-open-ssl-stream))
2173 (apply 'erc r)))
2174
2175(defalias 'erc-select-ssl 'erc-ssl)
2176
2177(declare-function open-ssl-stream "ext:ssl" (name buffer host service))
2178
2179(defun erc-open-ssl-stream (name buffer host port)
2180 "Open an SSL stream to an IRC server.
2181The process will be given the name NAME, its target buffer will be
2182BUFFER. HOST and PORT specify the connection target."
2183 (when (condition-case nil
2184 (require 'ssl)
2185 (error (message "You don't have ssl.el. %s"
2186 "Try using `erc-tls' instead.")
2187 nil))
2188 (let ((proc (open-ssl-stream name buffer host port)))
2189 ;; Ugly hack, but it works for now. Problem is it is
2190 ;; very hard to detect when ssl is established, because s_client
2191 ;; doesn't give any CONNECTIONESTABLISHED kind of message, and
2192 ;; most IRC servers send nothing and wait for you to identify.
2193 (sit-for 5)
2194 proc)))
2195 2168
2196(defun erc-tls (&rest r) 2169(defun erc-tls (&rest r)
2197 "Interactively select TLS connection parameters and run ERC. 2170 "Interactively select TLS connection parameters and run ERC.
@@ -2200,18 +2173,12 @@ Arguments are the same as for `erc'."
2200 (let ((erc-server-connect-function 'erc-open-tls-stream)) 2173 (let ((erc-server-connect-function 'erc-open-tls-stream))
2201 (apply 'erc r))) 2174 (apply 'erc r)))
2202 2175
2203(declare-function open-tls-stream "tls" (name buffer host port))
2204
2205(defun erc-open-tls-stream (name buffer host port) 2176(defun erc-open-tls-stream (name buffer host port)
2206 "Open an TLS stream to an IRC server. 2177 "Open an TLS stream to an IRC server.
2207The process will be given the name NAME, its target buffer will be 2178The process will be given the name NAME, its target buffer will be
2208BUFFER. HOST and PORT specify the connection target." 2179BUFFER. HOST and PORT specify the connection target."
2209 (when (condition-case nil 2180 (open-network-stream name buffer host port
2210 (require 'tls) 2181 :type 'tls))
2211 (error (message "You don't have tls.el. %s"
2212 "Try using `erc-ssl' instead.")
2213 nil))
2214 (open-tls-stream name buffer host port)))
2215 2182
2216;;; Displaying error messages 2183;;; Displaying error messages
2217 2184
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5a6ad584438..f0b8c205c9e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,10 @@
12011-06-22 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * auth-source.el (auth-source-netrc-create): Don't query the bits that
4 we already know.
5 (auth-source-forget-all-cached): Clear auth-source-netrc-cache, too.
6 (auth-source-netrc-create): Don't prompt for the stuff we already know.
7
12011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 82011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 9
3 * auth-source.el (auth-source-netrc-create): Don't print all tokens in 10 * auth-source.el (auth-source-netrc-create): Don't print all tokens in
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 1bbd76f345e..2cfc88987f6 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -420,9 +420,9 @@ textual parts.")
420 (nnimap-login (car credentials) (cadr credentials)))) 420 (nnimap-login (car credentials) (cadr credentials))))
421 (if (car login-result) 421 (if (car login-result)
422 (progn 422 (progn
423 ;; Save the credentials if a save function exists 423 ;; Save the credentials if a save function exists
424 ;; (such a function will only be passed if a new 424 ;; (such a function will only be passed if a new
425 ;; token was created). 425 ;; token was created).
426 (when (functionp (nth 2 credentials)) 426 (when (functionp (nth 2 credentials))
427 (funcall (nth 2 credentials))) 427 (funcall (nth 2 credentials)))
428 ;; See if CAPABILITY is set as part of login 428 ;; See if CAPABILITY is set as part of login
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 96132739b20..a02d388a6f7 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -1333,12 +1333,16 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'."
1333(setq rmail-show-mime-function 'rmail-show-mime) 1333(setq rmail-show-mime-function 'rmail-show-mime)
1334 1334
1335(defun rmail-insert-mime-forwarded-message (forward-buffer) 1335(defun rmail-insert-mime-forwarded-message (forward-buffer)
1336 "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)." 1336 "Insert the message in FORWARD-BUFFER as a forwarded message.
1337 (let ((rmail-mime-mbox-buffer 1337This is the usual value of `rmail-insert-mime-forwarded-message-function'."
1338 (with-current-buffer forward-buffer rmail-view-buffer))) 1338 (let ((message-buffer
1339 (with-current-buffer forward-buffer
1340 (if rmail-buffer-swapped
1341 forward-buffer
1342 rmail-view-buffer))))
1339 (save-restriction 1343 (save-restriction
1340 (narrow-to-region (point) (point)) 1344 (narrow-to-region (point) (point))
1341 (message-forward-make-body-mime rmail-mime-mbox-buffer)))) 1345 (message-forward-make-body-mime message-buffer))))
1342 1346
1343(setq rmail-insert-mime-forwarded-message-function 1347(setq rmail-insert-mime-forwarded-message-function
1344 'rmail-insert-mime-forwarded-message) 1348 'rmail-insert-mime-forwarded-message)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index f4ef9b91903..c1405ec5ff3 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -806,10 +806,18 @@ Prefix arg means don't delete this window."
806 806
807(defun mail-bury (&optional arg) 807(defun mail-bury (&optional arg)
808 "Bury this mail buffer." 808 "Bury this mail buffer."
809 (let ((newbuf (other-buffer (current-buffer)))) 809 (let ((newbuf (other-buffer (current-buffer)))
810 (return-action mail-return-action)
811 some-rmail)
810 (bury-buffer (current-buffer)) 812 (bury-buffer (current-buffer))
811 (if (and (null arg) mail-return-action) 813 ;; If there is an Rmail buffer, return to it nicely
812 (apply (car mail-return-action) (cdr mail-return-action)) 814 ;; even if this message was not started by an Rmail command.
815 (unless return-action
816 (dolist (buffer (buffer-list))
817 (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
818 (setq return-action `(rmail-mail-return ,newbuf)))))
819 (if (and (null arg) return-action)
820 (apply (car return-action) (cdr return-action))
813 (switch-to-buffer newbuf)))) 821 (switch-to-buffer newbuf))))
814 822
815(defcustom mail-send-hook nil 823(defcustom mail-send-hook nil
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index a7ffc8d061a..32ddfe99707 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2710,7 +2710,40 @@ filter out additional entries (because TABLE migth not obey PRED)."
2710 (let ((newstr (completion-initials-expand string table pred))) 2710 (let ((newstr (completion-initials-expand string table pred)))
2711 (when newstr 2711 (when newstr
2712 (completion-pcm-try-completion newstr table pred (length newstr))))) 2712 (completion-pcm-try-completion newstr table pred (length newstr)))))
2713 2713
2714(defvar completing-read-function 'completing-read-default
2715 "The function called by `completing-read' to do its work.
2716It should accept the same arguments as `completing-read'.")
2717
2718(defun completing-read-default (prompt collection &optional predicate
2719 require-match initial-input
2720 hist def inherit-input-method)
2721 "Default method for reading from the minibuffer with completion.
2722See `completing-read' for the meaning of the arguments."
2723
2724 (when (consp initial-input)
2725 (setq initial-input
2726 (cons (car initial-input)
2727 ;; `completing-read' uses 0-based index while
2728 ;; `read-from-minibuffer' uses 1-based index.
2729 (1+ (cdr initial-input)))))
2730
2731 (let* ((minibuffer-completion-table collection)
2732 (minibuffer-completion-predicate predicate)
2733 (minibuffer-completion-confirm (unless (eq require-match t)
2734 require-match))
2735 (keymap (if require-match
2736 (if (memq minibuffer-completing-file-name '(nil lambda))
2737 minibuffer-local-must-match-map
2738 minibuffer-local-filename-must-match-map)
2739 (if (memq minibuffer-completing-file-name '(nil lambda))
2740 minibuffer-local-completion-map
2741 minibuffer-local-filename-completion-map)))
2742 (result (read-from-minibuffer prompt initial-input keymap
2743 nil hist def inherit-input-method)))
2744 (when (and (equal result "") def)
2745 (setq result (if (consp def) (car def) def)))
2746 result))
2714 2747
2715;; Miscellaneous 2748;; Miscellaneous
2716 2749