* progmodes/python.el: Add Ipython support (Bug#5390).
(python-shell-prompt-alist)
(python-shell-continuation-prompt-alist): New options.
(python--set-prompt-regexp): New function.
(inferior-python-mode, run-python, python-shell): Require
ansi-color. Use python--set-prompt-regexp to set the comint
prompt based on the Python interpreter.
(python--prompt-regexp): New var.
(python-check-comint-prompt)
(python-comint-output-filter-function): Use it.
(run-python): Use a pipe (Bug#5694).
with with-help-window.
* window.c (syms_of_window): New variable
temp-buffer-show-specifiers.
(temp_output_buffer_show): Call display-buffer with second
argument set to temp-buffer-show-specifiers and reset the latter
after the call.
* print.c (Fwith_output_to_temp_buffer): In doc-string explain how
to set up temp-buffer-show-specifiers.
* help.el (with-help-window): In doc-string say how to set up
temp-buffer-show-specifiers.
* isearch.el (isearch-help-for-help, isearch-describe-bindings)
(isearch-describe-key, isearch-describe-mode): Replace bindings
for same-window-buffer-names and same-window-regexps by binding
temp-buffer-show-specifiers instead.
* international/mule-diag.el (mule-diag):
* calc/calc-help.el (calc-describe-key, calc-full-help):
* printing.el (pr-show-setup):
* progmodes/python.el (python-describe-symbol):
* textmodes/table.el (*table--cell-describe-mode)
(*table--cell-describe-bindings):
* tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--detailed-help):
* progmodes/vhdl-mode.el (vhdl-doc-variable, vhdl-doc-mode):
* play/yow.el (apropos-zippy): Use with-help-window.
* apropos.el (apropos-command): Remove the message calculation part.
(apropos-print): Use with-help-window
* woman.el (woman-mini-help): Remove the message calculation part.
(woman-display-extended-fonts): Use with-help-window.
* display.texi (Temporary Displays): Describe
temp-buffer-show-specifiers.
* lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete.
(font-lock-fontify-syntactic-keywords-region): Move handling of
font-lock-syntactically-fontified to...
(font-lock-default-fontify-region): ...here.
Let syntax-propertize-function take precedence.
(font-lock-fontify-syntactically-region): Cal syntax-propertize.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.
* lisp/emacs-lisp/syntax.el (syntax-propertize-function)
(syntax-propertize-chunk-size, syntax-propertize--done)
(syntax-propertize-extend-region-functions): New vars.
(syntax-propertize-wholelines, syntax-propertize-multiline)
(syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
(syntax-propertize): New functions.
(syntax-propertize-rules): New macro.
(syntax-ppss-flush-cache): Set syntax-propertize--done.
(syntax-ppss): Call syntax-propertize.
* lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties)
(ada-after-change-function, ada-initialize-syntax-table-properties)
(ada-handle-syntax-table-properties): Only define when
syntax-propertize is not available.
(ada-mode): Use syntax-propertize-function.
* lisp/progmodes/autoconf.el (autoconf-mode):
Use syntax-propertize-function.
(autoconf-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cfengine.el (cfengine-mode):
Use syntax-propertize-function.
(cfengine-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.
* lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
(fortran--font-lock-syntactic-keywords): New var.
(fortran-line-length): Update syntax-propertize-function and
fortran--font-lock-syntactic-keywords.
* lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
replaces gdb-script-font-lock-syntactic-keywords.
(gdb-script-mode): Use it.
* lisp/progmodes/js.el (js--regexp-literal): Define while compiling.
(js-syntax-propertize-function): New var; replaces
js-font-lock-syntactic-keywords.
(js-mode): Use it.
* lisp/progmodes/make-mode.el (makefile-syntax-propertize-function):
New var; replaces makefile-font-lock-syntactic-keywords.
(makefile-mode): Use it.
(makefile-imake-mode): Adjust.
* lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
replaces mixal-font-lock-syntactic-keywords.
(mixal-mode): Use it.
* lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
to replace octave-font-lock-close-quotes.
(octave-syntax-propertize-function): New function to replace
octave-font-lock-syntactic-keywords.
(octave-mode): Use it.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
replace perl-font-lock-syntactic-keywords.
(perl-syntax-propertize-special-constructs): New fun to replace
perl-font-lock-special-syntactic-constructs.
(perl-font-lock-syntactic-face-function): New fun.
(perl-mode): Use it.
* lisp/progmodes/python.el (python-syntax-propertize-function): New var to
replace python-font-lock-syntactic-keywords.
(python-mode): Use it.
(python-quote-syntax): Simplify and adjust to new use.
* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
Define while compiling.
(ruby-here-doc-end-re, ruby-here-doc-beg-match)
(ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
(syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
(ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
(ruby-here-doc-end-syntax): Only define when
syntax-propertize is not available.
(ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
New functions.
(ruby-in-ppss-context-p): Update to new syntax of heredocs.
(electric-indent-chars): Silence bytecompiler.
(ruby-mode): Use prog-mode, syntax-propertize-function, and
electric-indent-chars.
* lisp/progmodes/sh-script.el (sh-st-symbol): Remove.
(sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
(sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
(sh-font-lock-quoted-subshell): Assume we've already matched $(.
(sh-font-lock-paren): Set syntax-multiline.
(sh-font-lock-syntactic-keywords): Remove.
(sh-syntax-propertize-function): New function to replace it.
(sh-mode): Use it.
* lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to
replace simula-font-lock-syntactic-keywords.
(simula-mode): Use it.
* lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to
replace tcl-font-lock-syntactic-keywords.
(tcl-mode): Use it.
* lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
if available.
(vhdl-fontify-buffer): Adjust.
* lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.
* lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
since we don't use it.
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
replace sgml-font-lock-syntactic-keywords.
(sgml-mode): Use it.
* lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
Use syntax-propertize-function.
* lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
to replace texinfo-font-lock-syntactic-keywords.
(texinfo-mode): Use it.
* test/indent/octave.m: Remove some `fixindent' not needed any more.
Based on a patch by Fabian Ezequiel Gallina.
(python-shell-prompt-alist)
(python-shell-continuation-prompt-alist): New options.
(python--set-prompt-regexp): New function.
(inferior-python-mode, run-python, python-shell): Require
ansi-color. Use python--set-prompt-regexp to set the comint
prompt based on the Python interpreter.
(python--prompt-regexp): New var.
(python-check-comint-prompt)
(python-comint-output-filter-function): Use it.
(run-python): Use a pipe (Bug#5694).
(python-send-region): Send a different Python command if Ipython is in use.
(python-check-version): Use a Python command to find the version.
* window.h (struct window): Add new members normal_lines,
normal_cols, new_total, new_normal, inhibit_recombine. Remove
members resize_proportionally, orig_total_lines and
orig_top_line.
(WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
(MIN_SAFE_WINDOW_HEIGHT): Move here from window.c.
(delete_window, set_window_height, set_window_width)
(change_window_height, window_internal_width): Remove externs.
(window_box_text_cols): Rename to window_body_cols.
(Fwindow_full_width_p, Fdelete_window, Fsplit_window): Remove
EXFUNs.
(delete_all_subwindows): Make argument a Lisp_Object.
(resize_frame_windows, window_body_lines): Add externs.
* window.c (Qwindow_deletable_p, Qdelete_window)
(Qresize_root_window, Qresize_root_window_vertically)
(Qset, Qabove, Qbelow, Qnest, Qgroup, Qresize): Add declarations
and staticpro them.
(Qwindow_size_fixed, window_min_height, window_min_width)
(window_deletion_count): Remove declarations.
(Vwindow_splits): New variable.
(Fwindow_height, Fwindow_width, Fwindow_full_width_p)
(Fdelete_window, Fother_window, Fget_lru_window)
(Fget_largest_window, Fdelete_other_windows)
(Fdelete_windows_on, window_fixed_size_p, Fsplit_window)
(Fenlarge_window, Fshrink_window, Fadjust_window_trailing_edge)
(Fwindow_tree): Move to window.el.
(shrink_windows, window_min_size_1, window_min_size_2)
(window_min_size, size_window, window_height, window_width)
(window_fixed_size_p, enlarge_window)
(adjust_window_trailing_edge, shrink_window_lowest_first)
(window_tree): Remove functions, their functionality partially
taken over by functions in window.el.
(Fwindow_total_size, Fwindow_new_total_size)
(Fwindow_normal_size, Fwindow_new_normal_size)
(Fwindow_left_column, Fwindow_top_line, window_body_lines)
(window_body_cols, Fwindow_body_size, recombine_windows)
(resize_root_window, Fdelete_other_windows_internal)
(Fresize_window_total, Fresize_window_normal)
(resize_window_check, resize_window_apply, Fresize_window_apply)
(resize_frame_windows, Fsplit_window_internal)
(Fdelete_window_internal, Sresize_mini_window_internal): New
functions.
(make_dummy_parent): Rename to make_parent_window and handle
changed members of struct window.
(make_window, replace_window): Handle changed members of struct
window.
(Fset_window_dedicated_p): Rewrite doc-string.
(delete_window): Replace by delete_deletable_window.
(window_loop): Don't handle GET_LRU_WINDOW,
DELETE_OTHER_WINDOWS, DELETE_BUFFER_WINDOWS and
GET_LARGEST_WINDOW any more. Call delete_deletable_window
instead of delete_window.
(Fget_buffer_window): Rename second argument to all_frames,
rewrite doc-string.
(MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT)
(WINDOW_TOTAL_SIZE): Move to window.h.
(compare_window_configurations): Rewrite.
(keys_of_window): Move all non-scroll-related bindings to
window.el.
* frame.c (set_menu_bar_lines_1): Do not handle orig_top_line
and orig_total_lines any more.
(delete_frame): Pass root window to delete_all_subwindows.
* buffer.c (Frecord_buffer, Funrecord_buffer): New functions.
(switch_to_buffer_1): Remove.
(Fswitch_to_buffer, Fbury_buffer): Move to window.el.
* indent.c (compute_motion, Fcompute_motion): Use
window_body_cols instead of window_box_text_cols.
* dispnew.c (adjust_frame_glyphs_initially): Don't use
set_window_height but set heights directly.
(change_frame_size_1): Use resize_frame_windows.
* xdisp.c (init_xdisp): Don't use set_window_height but set
heights directly.
* xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Use
resize_frame_windows instead of change_window_heights and run
run_window_configuration_change_hook.
* w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
instead of change_window_heights and run
run_window_configuration_change_hook.
* files.el (read-buffer-to-switch)
(switch-to-buffer-other-window, switch-to-buffer-other-frame):
Move to window.el.
* window.el (display-buffer): New customization group.
(special-display-buffer-names, special-display-regexps)
(same-window-buffer-names, same-window-regexps, pop-up-frames)
(display-buffer-reuse-frames, pop-up-windows)
(split-window-preferred-function, split-height-threshold)
(split-width-threshold, even-window-heights): Move or add to
display-buffer customization group.
(window-size-fixed): Move down in code, rewrite doc-string.
(window-right, window-left, window-child, window-internal-p)
(window-any-p, normalize-live-buffer, normalize-live-frame)
(normalize-any-window, normalize-live-window)
(window-iso-combined-p, walk-window-tree-1, walk-window-tree)
(window-in-direction-2, window-in-direction, window-tree-1)
(window-size-ignore, window-sizable, window-sizable-p)
(window-min-size, window-min-size-1, window-size-fixed-p)
(window-size-fixed-1, window-min-delta, window-min-delta-1)
(window-max-delta, window-max-delta-1, window-resizable)
(window-resizable-p, window-total-height, window-height)
(window-full-height-p, window-total-width, window-body-height)
(window-body-width, window-width, resize-window-reset)
(resize-window-reset-1, resize-window, resize-subwindows-skip-p)
(resize-subwindows-normal, resize-subwindows)
(resize-other-windows, resize-this-window, resize-mini-window)
(resize-root-window, resize-root-window-vertically)
(window-deletable-p, window-or-subwindow-p)
(kill-or-unrecord-buffer, quit-restore-window)
(window-split-min-size, window-children-count)
(split-window-quit-restore): New functions.
(ignore-window-parameters, display-buffer-window-and-buffer)
(resize-window-safe-window): New variables.
(window-safe-min-height, window-safe-min-width): New constants.
(window-min-height, window-min-width, window-full-width-p)
(get-lru-window, get-largest-window)
(adjust-window-trailing-edge, window-tree, other-window)
(replace-buffer-in-windows, split-window): Move here from
window.c.
(window-current-scroll-bars): Use normalize-live-window.
(get-window-with-predicate): Use window-list-1.
(get-buffer-window-list): Use normalize-live-buffer and
window-list-1.
(count-windows): Use window-list-1.
(enlarge-window, shrink-window): Use resize-window.
(maximize-window, minimize-window, frame-root-window-p)
(composite-window-p, composite-root-window-p)
(composite-main-window-p, composite-support-window-p)
(composite-root-window, composite-major-window)
(composite-main-sibling, composite-lowest-child-role)
(compound-window-p, compound-main-window-p)
(compound-root-window, group-window-p, group-window-main-p)
(group-root-window, make-compound-window, make-window-group)
(make-support-window): New functions for composite windows.
(one-window-p): Rewrite doc-string.
(delete-window, delete-other-windows, delete-windows-on)
(bury-buffer, switch-to-buffer): Move here from buffer.c.
(split-window-vertically, split-window-horizontally): Call
split-window-quit-restore.
(bw-get-tree, bw-get-tree-1, bw-find-tree-sub)
(bw-find-tree-sub-1, bw-l, bw-t, bw-r, bw-b, bw-dir, bw-eqdir)
(bw-refresh-edges, bw-balance-sub): Replace by new balance
windows functions.
(balance-windows, balance-windows-1, balance-windows-2): New
functions for balancing windows.
(bw-adjust-window): Rename to balance-windows-area-adjust.
(balance-windows-area): Call balance-windows-area-adjust.
(pop-up-windows): New values `selected' and `root'.
(window-splittable-p): Rename to window-sensibly-splittable-p.
(split-window-sensibly): Call window-sensibly-splittable-p.
(window--display-buffer-1, window--display-buffer-2): Remove.
(display-buffer-window-and-buffer)
(window--display-buffer-in-window, window--reuse-window)
(window--pop-up-window, window--pop-up-frame)
(window--raise-window-frame): New helper functions for
display-buffer.
(display-buffer): Rewrite using the new helper functions.
(read-buffer-to-switch, switch-to-buffer-other-window)
(switch-to-buffer-other-frame): Move here from files.el.
(set-window-text-height, fit-window-to-buffer): Use
normalize-live-window and resize-window.
(shrink-window-if-larger-than-buffer): Use normalize-live-window
and window-iso-combined-p.
(temp-buffer-max-height, temp-buffer-resize-mode): Move here
from help.el.
(resize-temp-buffer-window): Move here from help.el and use
window-iso-combined-p.
(ctl-x-map): Move bindings for non-scrolling commands here from
window.c.
* cus-start.el (all): Remove window-min-height and
window-min-width entries. Add recenter-redisplay and
window-splits entries.
* calendar/calendar.el (calendar-basic-setup): Call
window-sensibly-splittable-p instead of window-splittable-p.
* dired.el (dired-pop-to-buffer): Call
window-sensibly-splittable-p instead of window-splittable-p.
* help-mode.el (help-mode-finish): Remove help-window and
view-return-to-alist handling code.
* help.el (help-window): Remove variable.
(help-window-point-marker): Fix doc-string.
(temp-buffer-max-height, temp-buffer-resize-mode)
(resize-temp-buffer-window): Move to window.el.
(help-window-display-message): Fix doc-string and handling of
optional argument.
(help-window-setup-finish): Remove.
(help-window-setup): Remove handling of list-of-frames and
list-of-window-tuples. These are handled by the quit-restore
window mechanism now.
(with-help-window): Remove setup of list-of-frames and
list-of-window-tuples. Reset display-buffer-window-and-buffer
and call help-window-setup when the buffr display mechanism
called by with-output-to-temp-buffer has set it.
* view.el (view-exits-all-viewing-windows): Fix doc-string.
(view-return-to-alist): Remove variable.
(view-file-other-window): Remove second argument in call of
view-buffer-other-window.
(view-file-other-frame): Remove second argument in call of
view-buffer-other-frame.
(view-buffer): Remove the undo-window mechanism and fix call of
view-mode-enter.
(view-buffer-other-window, view-buffer-other-frame): Remove
second argument and return-to mechanism and fix call of
view-mode-enter.
(view-return-to-alist-update): Remove function.
(view-mode-enter): Rename second argument to quit-restore and
replace view-return-to-alist mechanism by quit-restore
parameter. Rewrite doc-string.
(view-mode-exit): Rename arguments and replace
view-return-to-alist mechanism by calling quit-restore-window.
(View-exit, View-exit-and-edit, View-leave, View-quit)
(View-quit-all, View-kill-and-leave): Call view-mode-exit with
appropriate argument(s).
(view-end-message): Instead of checking view-return-to-alist
look at quit-restore window parameter.
* progmodes/ebrowse.el (ebrowse-view-file-other-frame): Adjust
call of view-mode-enter to the latter's new definition.
* progmodes/python.el (view-return-to-alist): Remove defvar.
(python-describe-symbol): Don't set view-return-to-alist any
more.
* windows.texi: Adapt node references accordingly. Add new
sections Window Sizes, Composite Windows, Compound Windows and
Window Groups.
(Basic Windows): Clarify distinction of live and internal
windows. Add descriptions of window-live-p, window-internal-p,
window-any-p, normalize-any-window and normalize-live-window.
(Frames and Windows): Move here from frames.texi. Describe
window-list and window-tree here. Explain window trees and
desribe frame-root-window here. Add descriptions for
window-parent, window-vchild, window-hchild, window-child,
window-iso-combined-p, window-next, window-prev.
(Window Sizes): New section. Clarify distinction of window body
and total sizes. Add descriptions for window-total-size,
window-total-height, window-total-width, window-full-height-p,
window-top-line, window-left-column, window-body-size,
window-body-height, window-body-width and window-size-fixed-p.
Move descriptions of window-height, window-width,
window-min-height, window-min-width and window-size-fixed here.
(Resizing Windows): Explain that resizing windows doesn't delete
windows. Describe window-resizable, resize-window,
maximize-window, minimize-window.
(Splitting Windows): Describe new behavior of split-window.
Describe new variable window-splits.
(Deleting Windows): Describe behavior for composite windows.
Describe frame-selected-window and set-frame-selected-window
here.
(Cyclic Window Ordering): Describe window-list-1. Move
description of get-lru-window, get-largest-window and
get-window-with-predicate here.
(Buffers and Windows): Say that window-buffer works on internal
windows too. Move up buffer-display-time. Describe
replace-buffer-in-windows here.
(Switching Buffers): Rename from Displaying Buffers in Windows.
(Displaying Buffers): Rename from Choosing a Window for Display.
Describe new values recognized for pop-up-windows. Describe how
window-splits affects splitting. Describe new command
quit-restore-window.
(Dedicated Windows): Clarify effect of killing a buffer shown in
dedicated windows.
(Window Parameters): Describe ignore-window-parameters variable
and quit-restore parameter.
(Composite Windows, Compound Windows, Window Groups): New
sections.
* elisp.texi (Top): Move frames chapter before windows chapter.
In windows chapter add new sections Window Sizes, Composite
Windows, Compound Windows and Window Groups. Frames and Windows
section moves from frames.texi to windows.texi.
* locals.texi (Standard Buffer-Local Variables): Have
window-size-fixed reference Window Sizes section.
* frames.texi: Adapt node references accordingly. Move Frames and
Windows section to windows.texi.
(Cursor Parameters, Input Focus): Add xrefs to selected window.
* buffers.texi: Adapt node references accordingly.
* positions.texi: Adapt node references accordingly.
(completion-at-point): New command.
* indent.el (indent-for-tab-command): Handle the new `complete' behavior.
* progmodes/python.el (python-mode-map): Use completion-at-point.
(python-completion-at-point): Rename from python-partial-symbol and
adjust for use in completion-at-point-functions.
(python-mode): Setup completion-at-point for Python completion.
* emacs-lisp/lisp.el (lisp-completion-at-point): New function
extracted from lisp-complete-symbol.
(lisp-complete-symbol): Use it.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use define-derived-mode,
setup completion-at-point for Elisp completion.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Use completion-at-point.
* ielm.el (ielm-map): Use completion-at-point.
(inferior-emacs-lisp-mode): Setup completion-at-point for Elisp completion.
* progmodes/sym-comp.el: Move to...
* obsolete/sym-comp.el: Move from progmodes.