(blink-paren-post-self-insert-function): New function.
(post-self-insert-hook): Use it.
* src/cmds.c (Vblink_paren_function): Remove.
(internal_self_insert): Make it insert N chars at a time.
Don't call blink-paren-function.
(Fself_insert_command): Adjust accordingly.
(syms_of_cmds): Don't declare blink-paren-function.
* lisp/simple.el (read-extended-command): New function with the logic
for `completing-read' moved to Elisp from `execute-extended-command'.
Use `function-called-at-point' in `minibuffer-default-add-function'
to get a command name for M-n (bug#5364, bug#5214).
* src/keyboard.c (Fexecute_extended_command): Move reading a command name
with `completing-read' to a new Elisp function `read-extended-command'.
Call it to read a command to `function' (bug#5364, bug#5214).
This includes both temporarily active regions (mouse drag and
shift-select) and those made with C-SPC and cursor motion.
* lisp/cus-start.el: Change defcustom for select-active-regions.
* lisp/simple.el (deactivate-mark): If select-active-regions is `only',
only set selection for temporarily active regions.
* src/insdel.c (prepare_to_modify_buffer): Handle `only' value of
select-active-regions.
* src/keyboard.c (command_loop_1): Avoid setting selection twice,
since it's done in deactivate-mark as well.
(Vselect_active_regions): Replace `lazy' value with `only',
meaning to only set PRIMARY for temporarily active regions.
Save region text prior to buffer modification.
Set window selection lazily, during `deactivate-mark' or after each
command when the region is temporarily active.
* lisp/cus-start.el: Add custom declaration for select-active-regions.
* lisp/mouse.el (mouse-drag-track): Remove hacks to deal with old
select-active-regions implementation.
(mouse-yank-at-click): Doc fix.
* lisp/simple.el (select-active-regions): Move to keyboard.c.
(deactivate-mark): Used saved-region-selection.
(select-active-region): Function removed.
(activate-mark, set-mark, push-mark-command)
(handle-shift-selection): Don't call it.
(keyboard-quit): Avoid adding the region to the window selection.
* src/insdel.c (prepare_to_modify_buffer): Save active region text to
Vsaved_region_selection.
* src/keyboard.c (Vselect_active_regions): Move from simple.el.
(Vsaved_region_selection, Qx_set_selection, QPRIMARY, Qlazy): New
vars.
(command_loop_1): Set window selection prior to deactivating the
mark.
* src/xselect.c (QPRIMARY): Move to keyboard.c.
* mouse.el (mouse-drag-track): Use select-active-region.
* simple.el (select-active-region): New function.
(push-mark-command, set-mark, activate-mark)
(handle-shift-selection): Use it.
(deactivate-mark): Don't check for size of region.
* lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
Cut/Copy/Paste menu bar items.
* lisp/mouse.el: Bind mouse-2 to mouse-yank-primary.
(mouse-drag-copy-region): Default to nil.
* lisp/simple.el (select-active-regions): Default to t.
(push-mark-command): Don't overwrite primary with empty string.
* lisp/term/x-win.el (x-select-enable-clipboard): Default to t.
(x-initialize-window-system): Don't overwrite Paste menu item.
* lisp/simple.el (compose-mail): Fix doc string to refer to
`compose-mail-user-agent-warnings', instead of to the nonexistent
`compose-mail-check-user-agent'.
Instead of setting `replace' to t and replacing the same string
with itself, don't do certain actions when
kill-do-not-save-duplicates is non-nil and string is equal to car
of kill-ring: don't call menu-bar-update-yank-menu, don't push
interprogram-paste strings to kill-ring, and don't push the input
argument `string' to kill-ring.
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html
* emacs-lisp/smie.el: New file.
* progmodes/prolog.el (prolog-smie-op-levels)
(prolog-smie-indent-rules): New var.
(prolog-mode-variables): Use them to configure SMIE.
(prolog-indent-line, prolog-indent-level): Remove.
* term/tvi970.el (tvi970-set-keypad-mode):
* simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
(normal-erase-is-backspace-mode):
* scroll-bar.el (scroll-bar-mode): Use it and define-minor-mode.
(set-scroll-bar-mode-1): (Re)move to its sole caller.
(get-scroll-bar-mode): New function.
* emacs-lisp/cl-macs.el (eq): Handle a non-variable first arg.
* simple.el (with-wrapper-hook): Move.
(buffer-substring-filters): Mark obsolete.
(filter-buffer-substring-functions): New variable.
(buffer-substring-filters): Use it. Remove unused arg `noprops'.
* simple.el (fundamental-mode): Run fundamental-mode-hook.
* emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
rather than kill-all-local-variables so it runs fundamental-mode-hook.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
that subsequent hooks get a chance to disable it.
because their primitives are implemented in window.c.
* simple.el (scroll-error-top-bottom)
(scroll-up-command, scroll-down-command, scroll-up-line)
(scroll-down-line, scroll-other-window-down)
(beginning-of-buffer-other-window, end-of-buffer-other-window):
* window.el (scroll-error-top-bottom)
(scroll-up-command, scroll-down-command, scroll-up-line)
(scroll-down-line, scroll-other-window-down)
(beginning-of-buffer-other-window, end-of-buffer-other-window):
Move from simple.el to window.el because their primitives are
implemented in window.c.
* window.c: Add Qscroll_command.
Remove Vscroll_preserve_screen_position_commands.
(window_scroll_pixel_based, window_scroll_line_based): Check the
`scroll-command' property on the last command instead of searching
the last command in Vscroll_preserve_screen_position_commands.
(syms_of_window): Initialize and staticpro `Qscroll_command'.
Put Qscroll_command property on Qscroll_up and Qscroll_down.
(scroll-preserve-screen-position): Doc fix.
(Vscroll_preserve_screen_position_commands): Remove variable.
* simple.el (scroll-up-command, scroll-down-command)
(scroll-up-line, scroll-down-line): Put `scroll-command'
property on the these symbols. Remove them from
`scroll-preserve-screen-position-commands'.
* mwheel.el (mwheel-scroll): Put `scroll-command' and
`isearch-scroll' properties on the `mwheel-scroll' symbol.
Remove it from `scroll-preserve-screen-position-commands'.
* isearch.el (isearch-allow-scroll): Doc fix.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html
* simple.el (scroll-error-top-bottom): New defcustom.
(scroll-up-command, scroll-down-command): Use it. Doc fix.
* emulation/pc-select.el (pc-select-override-scroll-error):
Obsolete in favor of `scroll-error-top-bottom'.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html
* window.c (Vscroll_preserve_screen_position_commands): New variable
with the default value as the list of Qscroll_down and Qscroll_up.
(window_scroll_pixel_based, window_scroll_line_based): Search the
last command in the list Vscroll_preserve_screen_position_commands
instead of comparing with Qscroll_up and Qscroll_down.
* mwheel.el (scroll-preserve-screen-position-commands):
Add mwheel-scroll to this list of commands.
* simple.el (scroll-preserve-screen-position-commands):
Add scroll-up-command, scroll-down-command, scroll-up-line,
scroll-down-line to this list of commands.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
* simple.el (scroll-up-command, scroll-down-command): New commands.
Put property isearch-scroll=t on them.
* bindings.el (global-map): Rebind [prior] from `scroll-down' to
`scroll-down-command' and [next] from `scroll-up' to
`scroll-up-command'.
* emulation/cua-base.el: Put property CUA=move on
`scroll-up-command' and `scroll-down-command'.
(cua--init-keymaps): Remap `scroll-up-command' to `cua-scroll-up'
and `scroll-down-command' to `cua-scroll-down'.