Make the user customizable display-buffer variable empty by default.
* lisp/window.el (display-buffer-base-action): Rename from
display-buffer-default-action. Make default value empty.
(display-buffer-overriding-action): Convert to defvar.
(display-buffer-fallback-action): New var.
Add an "mark upgradable packages" command to Package Menu mode.
* lisp/emacs-lisp/package.el (package-alist): Fix risky-local-variable
declaration.
(package--add-to-archive-contents): If there is a duplicate entry
with an older version, remove it.
(package-menu-mark-delete, package-menu-mark-install)
(package-menu-mark-unmark): Make unused args optional.
(package-menu-mark-obsolete-for-deletion): Use
package-menu-get-status instead of a regexp search.
(package-menu-get-status): Use tabulated-list-entry.
(package-menu-mark-upgrades): New command.
(package-menu-mode-map): Bind it to U.
(package-menu-execute): Do installation before deletion.
(package-menu-refresh, package-menu-execute): Use derived-mode-p
instead of checking major-mode.
(package-menu--find-upgrades): New function.
Stefan Monnier [Wed, 14 Sep 2011 21:43:36 +0000 (17:43 -0400)]
* textmodes/bibtex.el (bibtex-complete-string-cleanup)
(bibtex-complete-crossref-cleanup): Adjust to accommodate needs of
bibtex-completion-at-point-function.
(bibtex-completion-at-point-function): Use them.
Stefan Monnier [Wed, 14 Sep 2011 21:20:24 +0000 (17:20 -0400)]
* mpc.el (mpc-constraints-tag-lookup): New function.
(mpc-constraints-restore): Use it to make jumping to "album=Foo" apply
also to browser "album|playlist".
Juri Linkov [Wed, 14 Sep 2011 16:07:42 +0000 (19:07 +0300)]
Share code between `isearch-message' and `isearch-string' in `isearch-fail-pos'.
http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00169.html
* lisp/isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix.
(isearch-edit-string): Use length of `isearch-string' when
`isearch-fail-pos' returns nil.
(isearch-message): Remove duplicate code and call
`isearch-fail-pos' with arg `t'.
Paul Eggert [Wed, 14 Sep 2011 15:47:21 +0000 (08:47 -0700)]
* xselect.c: Use signed conversions more consistently (Bug#9498).
(selection_data_to_lisp_data): Assume incoming selection data are
signed integers, not unsigned. This is to be consistent with
outgoing selection data, which was modified to use signed integers
in as part of the fix to Bug#9196 in response to Jan Djärv's comment
in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
expects long, not unsigned long.
Martin Rudalics [Wed, 14 Sep 2011 09:17:30 +0000 (11:17 +0200)]
Replace display-buffer-window by help-setup window parameter.
* window.el (display-buffer-window): Remove.
(display-buffer-record-window): Use help-setup window parameter
instead of variable display-buffer-window.
(display-buffer-function, special-display-buffer-names)
(special-display-function): Mention help-setup parameter instead
of display-buffer-window in doc-string.
* help.el (help-window-setup): New argument help-window. Use
help-window-setup parameter instead of display-buffer-window.
Reword some messages.
(with-help-window): Pass window used for displaying the buffer
to help-window-setup. Don't set display-buffer-window.
Martin Rudalics [Tue, 13 Sep 2011 18:07:11 +0000 (20:07 +0200)]
Remove most window auto deletions.
* window.el (window-auto-delete): Remove.
(window-deletable-p): Remove argument FORCE. Don't deal with
dedicatedness and previous buffers.
(switch-to-prev-buffer): Don't delete window.
(delete-windows-on): Delete a window's frame if and only if the
window is dedicated.
(replace-buffer-in-windows): Delete buffer's window or frame if
and only if window is dedicated.
(quit-window): Handle quit-restore as before last change.
(bury-buffer): Delete window only if window-deletable-p returns
t.
* dired-aux.el (dired-mark-read-string): Don't use default value on empty input.
(dired-do-chxxx): Treat empty input for "touch" as no -t option.
Omit initial minibuffer contents.
(dired-do-chmod): Signal an error on empty input.
(dired-mark-read-string): Don't return default on empty input.
* cus-edit.el (customize-group, custom-buffer-create)
(customize-browse, custom-buffer-create-other-window): Use
switch-to-buffer or switch-to-buffer-other-window.
* info.el (info, Info-find-node, Info-revert-find-node, Info-next)
(Info-prev, Info-up, Info-speedbar-goto-node)
(info-display-manual): Use switch-to-buffer.
(Info-speedbar-goto-node): Use switch-to-buffer-other-frame.
* lisp/gnus/message.el (message-pop-to-buffer): Default to switch-to-buffer.
(message-mail-other-window, message-mail-other-frame)
(message-news-other-window, message-news-other-frame): Use
switch-to-buffer-other-frame and switch-to-buffer-other-window instead
of setting buffer display varibles.
* mail/sendmail.el (mail): Use switch-to-buffer.
(mail-recover): Use switch-to-buffer-other-window.
* progmodes/gdb-mi.el (gdb-restore-windows, gdb-setup-windows):
Use switch-to-buffer.
Paul Eggert [Sun, 11 Sep 2011 16:52:58 +0000 (09:52 -0700)]
Merge from gnulib, porting to Tru64.
* lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4:
* m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4:
Merge from gnulib. This fixes a compilation error on Tru64 UNIX
aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that
doesn't affect Emacs.
Eli Zaretskii [Sun, 11 Sep 2011 05:52:07 +0000 (01:52 -0400)]
Fix bug #9139 with revisiting non-existent files.
src/fileio.c (Finsert_file_contents): If the file cannot be opened,
set its "size" to -1. This will set the modtime_size field of
the corresponding buffer to -1, which is what
verify-visited-file-modtime expects for files that do not exist.
here ...
* lisp.h: ... from here. push_key_description is no longer
defined in keyboard.c, so its declaration should not be in
lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
logically belongs with push_key_description.
gnus.texi: Remove mentions of `recent', which are now obsolete.
(Interactive): Document `quiet'.
nnimap.el: Redo the charset handling. Let Gnus encode the names, as it does with all other backends, but decode the names immediately after getting them.
gnus-group.el (gnus-group-name-charset): Always return `utf-7' when decoding nnimap groups.
gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the newsrc file. It doesn't seem like an important optimisation any more.
nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to overflows.
gnus.el (gnus-article-mark-lists): Remove `recent'.
(gnus-interactive-exit): Extend to `quiet'.
gnus-sum.el (gnus-offer-save-summaries): Use it.
gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the string.
plstore.el (plstore--get-buffer): Silence compiler warnings by renaming function arguments from `this'.
gnus-sum.el (gnus-newsgroup-recent): Removed.
gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right' has been renamed.
(gnus-lrm-string-p): Include RLM and PDF, too.
gnus-int.el (gnus-open-server): Make the "denied" message clearer (bug#9225).
* lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of
display-buffer.
* lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the
special-display and same-window variables.
(mail-other-window): Use switch-to-buffer-other-window.
(mail-other-frame): USe switch-to-buffer-other-frame.
* lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use
display-buffer-other-frame.
(gdb-display-gdb-buffer): Use pop-to-buffer.
* lisp/progmodes/gud.el (gud-goto-info): Use info-other-window.
* lisp/progmodes/python.el: Don't set same-window-buffer-names.
* lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
* lisp/cus-edit.el (customize-group): New argument.
(customize-group-other-window): Use it.
(customize-face, customize-face-other-window): Likewise.
(custom-buffer-create-other-window): Use pop-to-buffer directly.
* lisp/info.el (info-setup): New function.
(info-other-window, info): Call it.
Tweaks to display-buffer default actions; remove same-window-* autoload forms.
* lisp/window.el (display-buffer-alist): Add entry for buffers
previously handled same-window-*.
(display-buffer-alist, display-buffer-default-action)
(display-buffer-overriding-action): Mark as risky.
(display-buffer-alist): Document action function changes.
(display-buffer--same-window-action)
(display-buffer--other-frame-action): New variables.
(switch-to-buffer, display-buffer-other-frame): Use them.
(display-buffer): Rename reuse-frame entry to reusable-frames.
(display-buffer-reuse-selected-window): Function deleted.
(display-buffer-reuse-window): Handle reusable-frames alist entry.
If it's omitted, check pop-up-frames/display-buffer-reuse-frames.
(display-buffer-special): New function.
(display-buffer--maybe-pop-up-frame-or-window): Rename from
display-buffer-reuse-or-pop-window. Split off special-display
part into display-buffer-special.
(display-buffer-use-some-window): Don't perform any special
pop-up-frames handling.
(pop-to-buffer): Use window-normalize-buffer-to-switch-to.
Eli Zaretskii [Sat, 10 Sep 2011 08:26:12 +0000 (11:26 +0300)]
Add to sendmail.el a new command mail-add-attachment.
etc/NEWS: Document the new command and the alias for mail-insert-file.
lisp/mail/sendmail.el (mml-to-mime, mml-attach-file)
(mm-default-file-encoding): Remove autoload forms, they are
replaced with autoload cookies in mml.el and mm-encode.el.
(mail-add-attachment): New command.
(mail-mode-map): Add a menu-bar item for mail-add-attachment.
(mail-mode): Mention mail-insert-file and mail-add-attachment in
the doc string.
(mml-to-mime, mml-attach-file, mm-default-file-encoding): Declare.
lisp/gnus/mm-encode.el (mm-default-file-encoding): Add autoload cookie.
lisp/gnus/mml.el (mml-to-mime, mml-attach-file): Add autoload cookies.
doc/emacs/sending.texi (Mail Misc): Document mail-add-attachment.
Juri Linkov [Fri, 9 Sep 2011 15:49:00 +0000 (18:49 +0300)]
Add `wdired-isearch-filter-read-only' to lisp/wdired.el.
* lisp/wdired.el (wdired-change-to-wdired-mode): Set buffer-local
`isearch-filter-predicate' to `wdired-isearch-filter-read-only'.
(wdired-isearch-filter-read-only): New function.
Eli Zaretskii [Fri, 9 Sep 2011 08:59:51 +0000 (11:59 +0300)]
Fix bug #9392 with rmail-forward.
lisp/simple.el (mail-encode-mml): New defvar.
lisp/mail/rmail.el (mail-encode-mml): Add a defvar.
(rmail-enable-mime-composing): Default to t.
(rmail-forward): Use MIME method of forwarding only if both
rmail-enable-mime-composing and rmail-enable-mime are non-nil.
Set mail-encode-mml non-nil if the MIME method was used.
lisp/mail/sendmail.el (mml-to-mime): Add autoload form.
(mail-encode-mml): Add a defvar.
(mail-mode): Make mail-encode-mml buffer-local and initialize it
to nil.
(mail-send): If mail-encode-mml is non-nil, run the outgoing
message through mml-to-mime, and reset mail-encode-mml to nil.