Martin Rudalics [Sat, 3 Sep 2011 10:55:37 +0000 (12:55 +0200)]
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.
Eli Zaretskii [Sat, 3 Sep 2011 08:44:16 +0000 (11:44 +0300)]
Fix display by Rmail of bidirectional text in MIME email messages.
lisp/mail/rmailmm.el (rmail-mime-insert-tagline): Insert an extra
newline before and after the tag line, so it doesn't interfere
with determining the paragraph direction of bidirectional text.
* lisp/window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted.
(pop-to-buffer): Change interactive spec. Pass second argument
directly to display-buffer.
(display-buffer): Fix interactive spec. Use functionp to
distinguish between a function and a list of functions.
Fix display-buffer interactive spec, and fixes for pop-to-buffer*.
* lisp/window.el (display-buffer): Restore interactive spec.
(display-buffer-same-window, display-buffer-other-window): New
functions.
(pop-to-buffer-1): New function. Use the above.
(pop-to-buffer, pop-to-buffer-same-window): Use it.
(pop-to-buffer-other-window, pop-to-buffer-other-frame): Deleted.
* lisp/view.el (view-buffer-other-window, view-buffer-other-frame):
Just use pop-to-buffer.
Michael Albinus [Wed, 31 Aug 2011 08:18:20 +0000 (10:18 +0200)]
* net/tramp.el (tramp-root-regexp): Remove.
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate)
(tramp-completion-file-name-regexp-url): Don't use leading volume
letter on win32 systems. (Bug#5303, Bug#9311)
(tramp-drop-volume-letter): Simplify definition. Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.
Paul Eggert [Tue, 30 Aug 2011 20:46:59 +0000 (13:46 -0700)]
* configure.in: Remove no-longer used HP patterns.
(opsys): Remove unreachable pattern hppa*-*-linux-gnu*.
Also, remove ia64*-hp-hpux1[1-9]*, as it also sets machine=hp800,
and that can't possibly work now that src/m/hp800.h no longer exists.
Eli Zaretskii [Tue, 30 Aug 2011 17:32:44 +0000 (20:32 +0300)]
Fix bug #9402 with :align-to on TTY frames.
src/xdisp.c (produce_stretch_glyph): No longer static, compiled also
when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
frames. Call tty_append_glyph in the TTY case. (Bug#9402)
src/term.c (tty_append_glyph): New function.
(produce_stretch_glyph): Static function and its prototype deleted.
src/dispextern.h (produce_stretch_glyph, tty_append_glyph): Add
prototypes.
Chong Yidong [Mon, 29 Aug 2011 22:02:21 +0000 (18:02 -0400)]
Update and edit manual sections on major modes.
* doc/emacs/modes.texi (Choosing Modes): auto-mode-case-fold is now t.
* doc/lispref/modes.texi (Basic Major Modes): New node. Callers updated.
(Major Modes): Document fundamental-mode and major-mode.
(Major Mode Basics): Node deleted; text moved to Major Modes.
(Derived Modes): Document derived-mode-p.
Paul Eggert [Mon, 29 Aug 2011 03:34:25 +0000 (20:34 -0700)]
* image.c (parse_image_spec): Check for nonnegative, not for positive,
when checking :margin (Bug#9390).
(IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
Renamed from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
so that the name doesn't mislead. All uses changed.
* help-mode.el (help-mode-map): Add special-mode-map to parent.
(help-mode): Derive help-mode from special-mode. Don't invoke
view-mode from help-mode.
(help-xref-override-view-map): Remove.
(help-make-xrefs): Remove minor-mode-overriding-map-alist since
view-mode is not used anymore.
* doc/lispref/os.texi (Killing Emacs): Note that kill-emacs can be called by
operating system signals. Refer to save-buffers-kill-terminal
instead of save-buffers-kill-emacs.
Alan Mackenzie [Sun, 28 Aug 2011 11:42:33 +0000 (11:42 +0000)]
Fix - typing on a C++ inher-intro or inher-cont line should preserve the
fontification of the inherited class names. Analogously for namespace
names and Java import, extends, etc.
(cc-fonts.el): (c-make-font-lock-BO-decl-search-function): New function.
(c-basic-matchers-after - "Fontify the clauses after various keywords"):
Extract the three keyword lists for the 3 erroneous constructs from the
list of four, and use the new function above in place of an old one.
Eli Zaretskii [Sat, 27 Aug 2011 18:11:49 +0000 (21:11 +0300)]
Fix vertical cursor motion from start of R2L lines in L2R paragraphs.
src/xdisp.c (move_it_to): Don't bail out early when reaching
position beyond to_charpos, if we are scanning backwards.
(move_it_vertically_backward): When DY == 0, make sure we get to
the first character in the line after the newline.
Paul Eggert [Sat, 27 Aug 2011 07:07:32 +0000 (00:07 -0700)]
* ccl.c: Improve and simplify overflow checking (Bug#9196).
(ccl_driver): Do not generate an out-of-range pointer.
(Fccl_execute_on_string): Remove unnecessary check for
integer overflow, noted by Stefan Monnier in
<http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
Remove a FIXME that didn't need fixing.
Simplify the newly-introduced buffer reallocation code.
Juri Linkov [Thu, 25 Aug 2011 20:32:54 +0000 (23:32 +0300)]
* lisp/isearch.el (isearch-edit-string): Let-bind `search-ring' and
`regexp-search-ring' to their global values to protect from
updating by `read-from-minibuffer'.
Juri Linkov [Thu, 25 Aug 2011 19:49:57 +0000 (22:49 +0300)]
* lisp/battery.el (display-battery-mode): If `battery-status-function'
or `battery-mode-line-format' is nil, display the message and set
`display-battery-mode' to nil.
Eli Zaretskii [Thu, 25 Aug 2011 10:45:33 +0000 (13:45 +0300)]
Handle `(space ...)' display spec as paragraph separator.
src/xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
the display spec is of the form `(space ...)'.
(handle_display_spec): Return the value returned by
handle_single_display_spec, not just 1 or zero.
(handle_single_display_spec): If the display spec is of the form
`(space ...)', and specifies display in the text area, return 2
rather than 1.
src/dispextern.h (struct bidi_it): Rename the disp_prop_p member
into disp_prop; all users changed.
src/bidi.c (bidi_fetch_char): If compute_display_string_pos returns
DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
for the text covered by the display property.
lisp/buff-menu.el (Buffer-menu-buffer+size): Remove calls to
bidi-string-mark-left-to-right; they are unnecessary now.
doc/lispref/display.texi (Specified Space): Mention that `space' specs
influence bidi reordering.
(Bidirectional Display): Explain how to use `(space . PROPS)' for
separating fields with bidirectional content.
Juri Linkov [Wed, 24 Aug 2011 18:09:18 +0000 (21:09 +0300)]
More uses of `error' and `warning' faces.
* lisp/battery.el (battery-update): Use the face `error' instead of
`font-lock-warning-face'.
* lisp/ibuffer.el (ibuffer-marked-face): Change default face from
`font-lock-warning-face' to `warning'.
(ibuffer-deletion-face): Change default face from
`font-lock-type-face' to `error'.
* lisp/proced.el (proced-marked): Inherit from `error' instead of
`font-lock-warning-face'.
Eli Zaretskii [Wed, 24 Aug 2011 15:51:56 +0000 (18:51 +0300)]
Fix cursor movement in R2L text within L2R paragraphs.
src/xdisp.c (set_cursor_from_row): Consider candidate row a win if its
glyph represents a newline and point is on that newline. Fixes cursor
positioning on the newline at EOL of R2L text within L2R
paragraph, and vice versa.
(try_cursor_movement): Check continued rows, in addition to
continuation rows. Fixes unwarranted scroll when point enters a
continued line of R2L text within an L2R paragraph, or vice versa.
(cursor_row_p): Consider the case of point being equal to
MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
from the end of a short line to the beginning of a continued line
of R2L text within L2R paragraph.
(RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
composed characters.
Eli Zaretskii [Wed, 24 Aug 2011 11:49:54 +0000 (14:49 +0300)]
Fix current-bidi-paragraph-direction and its doc.
src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
buffers, return left-to-right.
doc/lispref/display.texi (Bidirectional Display): Document return value in
buffers that are not bidi-reordered for display, and in unibyte
buffers.
Juri Linkov [Wed, 24 Aug 2011 09:40:58 +0000 (12:40 +0300)]
"C-s M-p" brings the tip of the search ring.
* lisp/isearch.el (isearch-ring-adjust1): Start visiting previous
search strings from the index 0 (-1 + 1) instead of 1 (0 + 1).
(isearch-repeat, isearch-edit-string): Call `isearch-ring-adjust1'
for empty search string (when the last search string is reused
automatically) to adjust the isearch ring to the last element and
prepare the correct index for further M-p commands.