Now on revision 105651. ------------------------------------------------------------ revno: 105651 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-09-03 22:51:26 +0000 message: nnimap.el (nnimap-open-connection-1): Use the correct port number in the error message. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-02 17:57:45 +0000 +++ lisp/gnus/ChangeLog 2011-09-03 22:51:26 +0000 @@ -1,3 +1,8 @@ +2011-09-03 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-open-connection-1): Use the correct port number in + the error message. + 2011-09-02 Eli Zaretskii * message.el (message-setup-1): Return t (Bug#9392). === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-08-20 00:20:39 +0000 +++ lisp/gnus/nnimap.el 2011-09-03 22:51:26 +0000 @@ -350,7 +350,6 @@ (with-current-buffer (nnimap-make-process-buffer buffer) (let* ((coding-system-for-read 'binary) (coding-system-for-write 'binary) - (port nil) (ports (cond ((memq nnimap-stream '(network plain starttls)) @@ -395,7 +394,7 @@ (if (not stream) (progn (nnheader-report 'nnimap "Unable to contact %s:%s via %s" - nnimap-address port nnimap-stream) + nnimap-address (car ports) nnimap-stream) 'no-connect) (gnus-set-process-query-on-exit-flag stream nil) (if (not (gnus-string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting)) ------------------------------------------------------------ revno: 105650 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-04 00:20:00 +0200 message: * Require libxml/parser.h to avoid compilation warning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-03 21:59:25 +0000 +++ src/ChangeLog 2011-09-03 22:20:00 +0000 @@ -1,5 +1,7 @@ 2011-09-03 Lars Magne Ingebrigtsen + * Require libxml/parser.h to avoid compilation warning. + * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown. * xml.c (parse_region): Don't call xmlCleanupParser after parsing, === modified file 'src/emacs.c' --- src/emacs.c 2011-09-03 21:59:25 +0000 +++ src/emacs.c 2011-09-03 22:20:00 +0000 @@ -82,6 +82,10 @@ #include #endif +#ifdef HAVE_LIBXML2 +#include +#endif + #ifndef O_RDWR #define O_RDWR 2 #endif ------------------------------------------------------------ revno: 105649 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sat 2011-09-03 23:59:25 +0200 message: Fix up xmlCleanupParser sequence. * xml.c (parse_region): Don't call xmlCleanupParser after parsing, since this reportedly can destroy thread storage. * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-30 22:43:43 +0000 +++ src/ChangeLog 2011-09-03 21:59:25 +0000 @@ -1,3 +1,10 @@ +2011-09-03 Lars Magne Ingebrigtsen + + * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown. + + * xml.c (parse_region): Don't call xmlCleanupParser after parsing, + since this reportedly can destroy thread storage. + 2011-08-30 Chong Yidong * syntax.c (find_defun_start): Update all cache variables if === modified file 'src/emacs.c' --- src/emacs.c 2011-08-05 02:19:34 +0000 +++ src/emacs.c 2011-09-03 21:59:25 +0000 @@ -2097,6 +2097,10 @@ #ifdef HAVE_NS ns_term_shutdown (sig); #endif + +#ifdef HAVE_LIBXML2 + xmlCleanupParser (); +#endif } === modified file 'src/xml.c' --- src/xml.c 2011-07-24 14:01:58 +0000 +++ src/xml.c 2011-09-03 21:59:25 +0000 @@ -141,7 +141,6 @@ Fcons (Qnil, Fnreverse (Fcons (r, result)))); xmlFreeDoc (doc); - xmlCleanupParser (); } return result; ------------------------------------------------------------ revno: 105648 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-09-03 16:24:12 -0400 message: Make sendmail-query-once update send-mail-function directly. * mail/sendmail.el (sendmail-query-once-function): Deleted. (sendmail-query-once): Save directly to send-mail-function. Update message-send-mail-function too. * mail/smtpmail.el (smtpmail-try-auth-methods): Clarify prompt. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-03 18:44:37 +0000 +++ lisp/ChangeLog 2011-09-03 20:24:12 +0000 @@ -1,3 +1,11 @@ +2011-09-03 Chong Yidong + + * mail/sendmail.el (sendmail-query-once-function): Deleted. + (sendmail-query-once): Save directly to send-mail-function. + Update message-send-mail-function too. + + * mail/smtpmail.el (smtpmail-try-auth-methods): Clarify prompt. + 2011-09-03 Christoph Scholtes * progmodes/python.el (python-mode-map): Use correct function to === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-08-04 00:58:07 +0000 +++ lisp/mail/sendmail.el 2011-09-03 20:24:12 +0000 @@ -156,51 +156,6 @@ :version "24.1" :group 'sendmail) -(defvar sendmail-query-once-function 'query - "Either a function to send email, or the symbol `query'.") - -;;;###autoload -(defun sendmail-query-once () - "Send an email via `sendmail-query-once-function'. -If `sendmail-query-once-function' is `query', ask the user what -function to use, and then save that choice." - (when (equal sendmail-query-once-function 'query) - (let* ((mail-buffer (current-buffer)) - (default - (cond - ((or (and window-system (eq system-type 'darwin)) - (eq system-type 'windows-nt)) - 'mailclient-send-it) - ((and sendmail-program - (executable-find sendmail-program)) - 'sendmail-send-it))) - (function - (if (or (not default) - ;; We have detected no OS-level mail senders, or we - ;; have already configured smtpmail, so we use the - ;; internal SMTP service. - (and (boundp 'smtpmail-smtp-server) - smtpmail-smtp-server)) - 'smtpmail-send-it - ;; Query the user. - (unwind-protect - (progn - (pop-to-buffer "*Mail Help*") - (erase-buffer) - (insert "Sending mail from Emacs hasn't been set up yet.\n\n" - "Type `y' to configure outgoing SMTP, or `n' to use\n" - "the default mail sender on your system.\n\n" - "To change this again at a later date, customize the\n" - "`send-mail-function' variable.\n") - (goto-char (point-min)) - (if (y-or-n-p "Configure outgoing SMTP in Emacs? ") - 'smtpmail-send-it - default)) - (kill-buffer (current-buffer)) - (set-buffer mail-buffer))))) - (customize-save-variable 'sendmail-query-once-function function))) - (funcall sendmail-query-once-function)) - ;;;###autoload (defcustom mail-header-separator (purecopy "--text follows this line--") "Line used to separate headers from text in messages being composed." @@ -543,6 +498,51 @@ "Additional expressions to highlight in Mail mode.") +;;;###autoload +(defun sendmail-query-once () + "Query for `send-mail-function' and send mail with it. +This also saves the value of `send-mail-function' via Customize." + (let* ((mail-buffer (current-buffer)) + ;; Compute default mail sender, preferring smtpmail if it's + ;; already configured. + (default (cond + ((and (boundp 'smtpmail-smtp-server) + smtpmail-smtp-server) + 'smtpmail-send-it) + ((or (and window-system (eq system-type 'darwin)) + (eq system-type 'windows-nt)) + 'mailclient-send-it) + ((and sendmail-program + (executable-find sendmail-program)) + 'sendmail-send-it))) + (send-function (if (eq default 'smtpmail-send-it) + 'smtpmail-send-it))) + (unless send-function + ;; Query the user. + (with-temp-buffer + (rename-buffer "*Mail Help*" t) + (erase-buffer) + (insert "Emacs has not been set up for sending mail.\n +Type `y' to configure and use Emacs as a mail client, +or `n' to use your system's default mailer.\n +To change your decision later, customize `send-mail-function'.\n") + (goto-char (point-min)) + (display-buffer (current-buffer)) + (if (y-or-n-p "Set up Emacs for sending SMTP mail? ") + ;; FIXME: We should check and correct the From: field too. + (setq send-function 'smtpmail-send-it) + (setq send-function default)))) + (when send-function + (customize-save-variable 'send-mail-function send-function) + ;; HACK: Message mode stupidly has `message-send-mail-function', + ;; so we must update it too or sending again in the current + ;; Emacs session will still call `sendmail-query-once'. + (and (boundp 'message-send-mail-function) + (eq message-send-mail-function 'sendmail-query-once) + (customize-set-variable 'message-send-mail-function + send-function)) + (funcall send-function)))) + (defun sendmail-sync-aliases () (when mail-personal-alias-file (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) === modified file 'lisp/mail/smtpmail.el' --- lisp/mail/smtpmail.el 2011-08-25 00:41:03 +0000 +++ lisp/mail/smtpmail.el 2011-09-03 20:24:12 +0000 @@ -490,7 +490,7 @@ (let* ((mechs (cdr-safe (assoc 'auth supported-extensions))) (mech (car (smtpmail-intersection mechs smtpmail-auth-supported))) (auth-source-creation-prompts - '((user . "SMTP user at %h: ") + '((user . "SMTP user name for %h: ") (secret . "SMTP password for %u@%h: "))) (auth-info (car (auth-source-search ------------------------------------------------------------ revno: 105647 committer: Christoph Scholtes branch nick: trunk timestamp: Sat 2011-09-03 12:44:37 -0600 message: * progmodes/python.el (python-mode-map): Use correct function to start python interpreter from menu-bar (as reported by Geert Kloosterman). (inferior-python-mode-map): Fix typo. (python-shell-map): Removed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-03 17:40:08 +0000 +++ lisp/ChangeLog 2011-09-03 18:44:37 +0000 @@ -1,3 +1,11 @@ +2011-09-03 Christoph Scholtes + + * progmodes/python.el (python-mode-map): Use correct function to + start python interpreter from menu-bar (as reported by Geert + Kloosterman). + (inferior-python-mode-map): Fix typo. + (python-shell-map): Removed. + 2011-09-03 Deniz Dogan * net/rcirc.el (rcirc-print): Simplify code for === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2011-06-25 18:21:00 +0000 +++ lisp/progmodes/python.el 2011-09-03 18:44:37 +0000 @@ -296,7 +296,7 @@ :filter (lambda (&rest junk) (abbrev-table-menu python-mode-abbrev-table))) "-" - ["Start interpreter" python-shell + ["Start interpreter" run-python :help "Run `inferior' Python in separate buffer"] ["Import/reload file" python-load-file :help "Load into inferior Python session"] @@ -328,14 +328,6 @@ ;; eric has items including: (un)indent, (un)comment, restart script, ;; run script, debug script; also things for profiling, unit testing. -(defvar python-shell-map - (let ((map (copy-keymap comint-mode-map))) - (define-key map [tab] 'tab-to-tab-stop) - (define-key map "\C-c-" 'py-up-exception) - (define-key map "\C-c=" 'py-down-exception) - map) - "Keymap used in *Python* shell buffers.") - (defvar python-mode-syntax-table (let ((table (make-syntax-table))) ;; Give punctuation syntax to ASCII that normally has symbol @@ -1345,7 +1337,7 @@ (define-key map "\C-c\C-l" 'python-load-file) (define-key map "\C-c\C-v" 'python-check) ;; Note that we _can_ still use these commands which send to the - ;; Python process even at the prompt iff we have a normal prompt, + ;; Python process even at the prompt if we have a normal prompt, ;; i.e. '>>> ' and not '... '. See the comment before ;; python-send-region. Fixme: uncomment these if we address that. ------------------------------------------------------------ revno: 105646 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Sat 2011-09-03 19:40:08 +0200 message: * lisp/net/rcirc.el (rcirc-print): Simplify code for rcirc-scroll-show-maximum-output. There is no need to walk through all windows to find the right one. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-03 17:16:57 +0000 +++ lisp/ChangeLog 2011-09-03 17:40:08 +0000 @@ -1,3 +1,9 @@ +2011-09-03 Deniz Dogan + + * net/rcirc.el (rcirc-print): Simplify code for + rcirc-scroll-show-maximum-output. There is no need to walk + through all windows to find the right one. + 2011-09-03 Christoph Scholtes * help.el (help-return-method): Doc fix. === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-08-28 06:07:14 +0000 +++ lisp/net/rcirc.el 2011-09-03 17:40:08 +0000 @@ -1556,18 +1556,16 @@ ;; keep window on bottom line if it was already there (when rcirc-scroll-show-maximum-output - (walk-windows (lambda (w) - (when (eq (window-buffer w) (current-buffer)) - (with-current-buffer (window-buffer w) - (when (eq major-mode 'rcirc-mode) - (with-selected-window w - (when (<= (- (window-height) - (count-screen-lines (window-point) - (window-start)) - 1) - 0) - (recenter -1))))))) - nil t)) + (let ((window (get-buffer-window))) + (when window + (with-selected-window window + (when (eq major-mode 'rcirc-mode) + (when (<= (- (window-height) + (count-screen-lines (window-point) + (window-start)) + 1) + 0) + (recenter -1))))))) ;; flush undo (can we do something smarter here?) (buffer-disable-undo) ------------------------------------------------------------ revno: 105645 committer: Christoph Scholtes branch nick: trunk timestamp: Sat 2011-09-03 11:16:57 -0600 message: * help.el (help-return-method): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-03 10:55:37 +0000 +++ lisp/ChangeLog 2011-09-03 17:16:57 +0000 @@ -1,3 +1,7 @@ +2011-09-03 Christoph Scholtes + + * help.el (help-return-method): Doc fix. + 2011-09-03 Martin Rudalics * window.el (window-deletable-p): Don't return a non-nil value === modified file 'lisp/help.el' --- lisp/help.el 2011-08-23 09:31:54 +0000 +++ lisp/help.el 2011-09-03 17:16:57 +0000 @@ -132,7 +132,7 @@ "What to do to \"exit\" the help buffer. This is a list (WINDOW . t) delete the selected window (and possibly its frame, - see `quit-window' and `View-quit'), go to WINDOW. + see `quit-window'), go to WINDOW. (WINDOW . quit-window) do quit-window, then select WINDOW. (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") ------------------------------------------------------------ revno: 105644 committer: martin rudalics branch nick: trunk timestamp: Sat 2011-09-03 12:55:37 +0200 message: Don't delete frame when there's a previous buffer to show (Bug#9419). * window.el (window-deletable-p): Don't return a non-nil value when there's a buffer that was shown in the window before. (Bug#9419) (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set window's previous buffers to nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-03 08:44:16 +0000 +++ lisp/ChangeLog 2011-09-03 10:55:37 +0000 @@ -1,3 +1,11 @@ +2011-09-03 Martin Rudalics + + * window.el (window-deletable-p): Don't return a non-nil value + when there's a buffer that was shown in the window before. + (Bug#9419) + (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set + window's previous buffers to nil. + 2011-09-03 Eli Zaretskii * mail/rmailmm.el (rmail-mime-insert-tagline): Insert an extra === modified file 'lisp/window.el' --- lisp/window.el 2011-09-02 16:38:40 +0000 +++ lisp/window.el 2011-09-03 10:55:37 +0000 @@ -2291,29 +2291,45 @@ (setq window (window-atom-root window)))) (let ((parent (window-parent window)) (frame (window-frame window)) + (buffer (window-buffer window)) (dedicated (and (window-buffer window) (window-dedicated-p window))) (quit-restore (window-parameter window 'quit-restore))) (cond ((frame-root-window-p window) + ;; Don't delete FRAME if `frame-auto-delete' is nil. (when (and (or (eq frame-auto-delete t) (and (eq frame-auto-delete 'automatic) + ;; Delete FRAME only if it's either dedicated + ;; or quit-restore's car is `new-frame' and + ;; WINDOW still displays the same buffer (or dedicated (and (eq (car-safe quit-restore) 'new-frame) (eq (nth 1 quit-restore) (window-buffer window)))))) + ;; Don't delete FRAME if we have another buffer in + ;; WINDOW's previous buffers. Bug#9419. + (or (not (window-prev-buffers window)) + (eq (caar (window-prev-buffers window)) buffer)) + ;; Don't try to delete FRAME when there are no other + ;; visible frames left. (other-visible-frames-p frame)) - ;; WINDOW is the root window of its frame. Return `frame' but - ;; only if WINDOW is (1) either dedicated or quit-restore's car - ;; is `new-frame' and the window still displays the same buffer - ;; and (2) there are other frames left. 'frame)) - ((and (not ignore-window-parameters) - (eq (window-parameter window 'window-side) 'none) - (or (not parent) - (not (eq (window-parameter parent 'window-side) 'none)))) - ;; Can't delete last main window. - nil) - (t)))) + ;; Don't delete WINDOW if we find another buffer in WINDOW's + ;; previous buffers. + ((and (or (not (window-prev-buffers window)) + (eq (caar (window-prev-buffers window)) buffer)) + ;; Delete WINDOW only if it's dedicated or quit-restore's car + ;; is `new-frame' or `new-window' and it still displays the + ;; same buffer. + (or dedicated + (and (memq (car-safe quit-restore) '(new-window new-frame)) + (eq (nth 1 quit-restore) (window-buffer window)))) + ;; Don't delete the last main window. + (or ignore-window-parameters + (not (eq (window-parameter window 'window-side) 'none)) + (and parent + (eq (window-parameter parent 'window-side) 'none)))) + t)))) (defun window-or-subwindow-p (subwindow window) "Return t if SUBWINDOW is either WINDOW or a subwindow of WINDOW." @@ -4714,7 +4730,10 @@ (setq frame (funcall fun)) (setq window (frame-selected-window frame))) (display-buffer-record-window 'pop-up-frame window buffer) - (window--display-buffer-2 buffer window)))) + (window--display-buffer-2 buffer window) + ;; Reset list of WINDOW's previous buffers to nil. + (set-window-prev-buffers window nil) + window))) (defun display-buffer-pop-up-window (buffer alist) "Display BUFFER by popping up a new window. @@ -4737,7 +4756,10 @@ (window--try-to-split-window (get-lru-window frame t))))) (display-buffer-record-window 'pop-up-window window buffer) - (window--display-buffer-2 buffer window)))) + (window--display-buffer-2 buffer window) + ;; Reset list of WINDOW's previous buffers to nil. + (set-window-prev-buffers window nil) + window))) ;; This display action function groups together some lower-level ones: (defun display-buffer-reuse-or-pop-window (buffer alist)