* 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.
Martin Rudalics [Thu, 8 Sep 2011 06:28:37 +0000 (08:28 +0200)]
Rewrite window/frame auto-deletion code. (Bug#9419) and (Bug#9456)
* window.el (frame-auto-delete): Rename to window-auto-delete.
Make it control auto-deletion of windows and/or frames.
(window-deletable-p): New argument FORCE. Rewrite conditions
for deleting window/frame. (Bug#9419)
(switch-to-prev-buffer, replace-buffer-in-windows, quit-window):
Rewrite handling of case when window/frame can be deleted.
(delete-windows-on): Call window-deletable-p with new FORCE
argument t. (Bug#9456)
Juri Linkov [Wed, 7 Sep 2011 12:17:54 +0000 (15:17 +0300)]
* lisp/progmodes/compile.el (compilation-start): Let-bind `thisenv' to
`compilation-environment'. Set buffer-local
`compilation-environment' to `thisenv' later after (funcall mode).
(Bug#8340)
* lisp/vc/vc-git.el (vc-git-grep): Remove --no-color. (Bug#9408)
(vc-git-grep): Prepend "PAGER=" to `compilation-environment'
instead of replacing its value. (Bug#8340)
Juri Linkov [Wed, 7 Sep 2011 12:00:52 +0000 (15:00 +0300)]
* lisp/progmodes/grep.el (grep-regexp-alist): Calculate column positions
based on text properties put by `grep-filter' instead of matching
escape sequences.
(grep-mode): Set buffer-local `compilation-error-screen-columns'
to the value of `grep-error-screen-columns'.
Paul Eggert [Tue, 6 Sep 2011 20:47:45 +0000 (13:47 -0700)]
isnan: Fix porting problem to Solaris 10 with bundled gcc.
Without this fix, the command to link temacs failed due to an
undefined symbol __builtin_isnan. This is because
/usr/include/iso/math_c99.h #defines isnan(x) to
__builtin_isnan(x), but the bundled gcc, which identifies itself
as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
a __builtin_isnan.
* configure.in (isnan): Remove now-unnecessary check.
* src/floatfns.c (isnan): #undef, and then #define to a clone of
what's in data.c.
(Fisnan): Always define, since it's always available now.
(syms_of_floatfns): Always define isnan at the Lisp level.
Juri Linkov [Mon, 5 Sep 2011 08:20:02 +0000 (11:20 +0300)]
Grep related fixes.
* etc/grep.txt: Add `eval' to the Local Variables section that
emulates `grep-filter'.
* lisp/progmodes/grep.el (grep-filter): Avoid incomplete processing by
keeping point where processing of grep matches begins, and
continue to delete remaining escape sequences from the same point.
(grep-filter): Make leading zero optional in "0?1;31m" because
git-grep emits "\033[1;31m" escape sequences unlike expected
"\033[01;31m" as GNU Grep does.
(grep-process-setup): Replace obsolete "ml=" with newer "sl=".
gnus.el (gnus-home-directory): Add warning about setting in .gnus.el (bug#9405).
gnus-score.el (gnus-summary-increase-score): Doc clarification (bug#9421).
gnus-spec.el (gnus-face-0): Make all the face specs into defcustoms (bug#9425).
gnus-art.el (gnus-treatment-function-alist): Remove CRs as the first thing (bug#9426).
Paul Eggert [Sun, 4 Sep 2011 18:46:51 +0000 (11:46 -0700)]
* window.c: Integer overflow fixes.
(window_scroll_line_based, Frecenter):
Check that an Emacs fixnum is in range before assigning it to 'int'.
(Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
values converted from Emacs fixnums.
(Frecenter): Don't wrap around a line count if it is out of 'int'
range; instead, treat it as an extreme value.
(Fset_window_configuration, compare_window_configurations):
Use ptrdiff_t, not int, for index that might exceed 2 GiB.