Ensure that X selection convertors properly encode returned strings.
Though not itself a regression, this bug was exposed by the support
for MULTIPLE selections, which is new to Emacs 24 (see Bug#11315).
* lisp/select.el (xselect--encode-string): New function, split from
xselect-convert-to-string.
(xselect-convert-to-string): Use it.
(xselect-convert-to-filename, xselect-convert-to-os)
(xselect-convert-to-host, xselect-convert-to-user): Ensure that
returned strings are properly encoded.
Eli Zaretskii [Mon, 23 Apr 2012 16:22:23 +0000 (19:22 +0300)]
Avoid assertion violation when scrolling minibuffer windows.
src/xdisp.c (pos_visible_p): If the window start position is beyond
ZV, start the display from buffer beginning. Prevents assertion
violation in init_iterator when the minibuffer window is scrolled
via the scroll bar.
src/window.c (window_scroll_pixel_based): Likewise.
* doc/lispref/elisp.texi, doc/lispref/vol1.texi, doc/lispref/vol2.texi:
Bump VERSION and DATE (in case we forgoet to do it later).
I don't know what VERSION means, but it should be bigger than before.
Note that README no longer mentions these.
* doc/misc/faq.texi (Major packages and programs): Remove section.
There is no point listing 6 packages (cf etc/MORE.STUFF).
(Finding Emacs and related packages): Move "Spell-checkers" here.
Paul Eggert [Fri, 20 Apr 2012 19:17:59 +0000 (12:17 -0700)]
Fix logic for returning to and yanking from Rmail buffer.
* mail/rmail.el (rmail-start-mail):
Pass (rmail-mail-return...) for the return-action.
Pass (rmail-yank-current-message...) for the yank-action.
(rmail-yank-current-message): New function.
(rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer.
(rmail-reply): Likewise.
(rmail-forward): Pass the Rmail buffer, not nil, for replybuffer.
* mail/sendmail.el (mail-bury): Choose the first rmail-mode
buffer, not the last. Reject temp buffers. Use the rmail-mode
buffer, not newbuf.
Eli Zaretskii [Fri, 20 Apr 2012 10:09:40 +0000 (13:09 +0300)]
Fix bug #11279 with sending command blocks to GDB.
lisp/progmodes/gdb-mi.el (gdb-control-level): New variable.
(gdb): Make it buffer-local and init to zero.
(gdb-control-commands-regexp): New variable.
(gdb-send): Don't wrap in "-interpreter-exec console" if
gdb-control-level is positive. Increment gdb-control-level
whenever the command matches gdb-control-commands-regexp, and
decrement it each time the command is "end". (Bug#11279)
Dan Nicolaescu [Fri, 20 Apr 2012 07:32:35 +0000 (15:32 +0800)]
Fix sysfs battery display.
* battery.el (battery-echo-area-format): Display remaining time
for sysfs backend too (Bug#11269).
(battery-linux-sysfs): Fix conditional for the charge.
Fixes for pty handling in gdb-mi.el and process.c.
* lisp/progmodes/gdb-mi.el (gdb): Revert 2012-04-19 change.
(gdb-inferior-io--init-proc): New function.
(gdb-init-1): Use it.
(gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
responsible for allocating a new pty and hooking it to gdb when
the old pty gets an EIO due to process exit.
(gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers.
(gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
(gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
* src/process.c (wait_reading_process_output): If EIO occurs on a pty,
set the status to "failed" and ensure that sentinel is run.
* doc/lispref/processes.texi (Asynchronous Processes): Mention nil
argument to start-process.
Delete the gdb-inferior pty when the gdb process exits.
* lisp/progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New
function to call delete-process on the gdb-inferior buffer's pty.
(gdb-reset): Use it, instead of relying on kill-buffer to kill the
pty process.
(gdb-update): New arg to suppress talking to the gdb process.
(gdb-done-or-error): Use it.
(gdb-stopped-functions): Rename from gdb-stopped-hooks.
(gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for
sentinel not being called.
* doc/lispref/minibuf.texi: Standardize metasyntactic variables
("history", etc).
Use Texinfo-recommended form of quote+punctuation.
(Intro to Minibuffers): First minibuffer is #1, not #0.
Mention minibuffer-inactive-mode.
(Text from Minibuffer): Copyedits.
(Minibuffer History, Programmed Completion): Fix @var usage.
Eli Zaretskii [Tue, 17 Apr 2012 15:25:17 +0000 (18:25 +0300)]
Fix bug #11261 with cursor movement in a continued line when header line is present.
src/xdisp.c (string_buffer_position_lim): Limit starting position to BEGV.
(set_cursor_from_row): If called for a mode-line or header-line
row, return zero immediately.
(try_cursor_movement): If inside continuation line, don't back up
farther than the first row after the header line, if any. Don't
consider the header-line row as "partially visible", even if
MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero.
* doc/lispref/processes.texi (Process Information, Input to Processes)
(Signals to Processes, Output from Processes, Process Buffers)
(Filter Functions, Decoding Output): Copyedits.
* mule.texi (Select Input Method, Coding Systems, Recognize Coding):
Copyedits.
(Coding Systems): Mac OS X apparently uses newlines for EOL.
(Recognize Coding): Remove old auto-coding-regexp-alist example.
auto-coding-functions does not override coding: tags.
Remove rmail-decode-mime-charset; it no longer has any effect.
* doc/emacs/mule.texi (International): Copyedits.
(International Chars): Update C-x = example output.
(Disabling Multibyte): Rename from "Enabling Multibyte".
Clarify what "unibyte: t" does, and mode-line description.
(Unibyte Mode): Update for "Disabling Multibyte" node name change.
Use Texinfo recommended convention for quotes+punctuation.
* doc/emacs/custom.texi (Specifying File Variables):
Fix "unibyte" description.
Update for "Disabling Multibyte" node name change.
* doc/emacs/emacs.texi: Update for "Disabling Multibyte" node name change.
* doc/lispref/loading.texi (Loading Non-ASCII):
"unibyte:" can also be at the end.
gnus-art.el (article-wash-html): Fix non-ASCII characters when washing HTML (bug#7410).
gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't have a group name.
gnus-start.el (gnus-read-newsrc-el-file): Protect against broken .newsrc.el files.