1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

1323 Commits

Author SHA1 Message Date
Stefan Monnier
8f4e9110ca * lisp/simple.el (blink-paren-function): Move from C to here.
(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.
2010-09-01 16:41:17 +02:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Juri Linkov
7133b7ee62 Move reading an extended command to Elisp (bug#5364, bug#5214).
* 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).
2010-08-23 00:27:59 +01:00
Chong Yidong
b0126eac41 Merge changes from emacs-23 branch. 2010-08-22 16:02:16 -04:00
Stefan Monnier
4b9c0a498d * lisp/simple.el (blink-matching-open): Obey forward-sexp-function. 2010-08-19 11:37:40 +02:00
Stefan Monnier
b2a15250f6 * lisp/simple.el (prog-mode-map): New var.
(prog-indent-sexp): New command.
2010-08-19 01:25:36 +02:00
Chong Yidong
7c23dd4468 Let all active regions set the primary selection.
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.
2010-08-15 22:33:17 -04:00
Chong Yidong
a4aae1a532 * simple.el (kill-region): Doc fix (Bug#6787). 2010-08-14 19:21:40 -04:00
Chong Yidong
7815fe1985 Merge changes from emacs-23 branch 2010-08-08 17:12:29 -04:00
Chong Yidong
1bcb9e6575 Fix last change. 2010-08-07 16:10:30 -04:00
Chong Yidong
9852377f78 Change `select-active-region' mechanics.
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.
2010-08-07 15:39:04 -04:00
Eli Zaretskii
4c5130d6d1 simple.el (delete-forward-char): Doc fix. 2010-08-07 13:11:07 +03:00
Stefan Monnier
c613687be4 * lisp/simple.el (exchange-dot-and-mark): Mark obsolete, finally. 2010-08-04 20:04:29 +02:00
Chong Yidong
91023c68af Revert 2010-07-14 change to deactivate mark; minor cleanups.
* 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.
2010-07-17 16:21:51 -04:00
Chong Yidong
2490cbbcb7 Change x-select-enable-primary to nil.
* lisp/mouse.el (mouse-drag-copy-region):
* lisp/simple.el (select-active-regions): Likewise.

* lisp/term/x-win.el (x-select-enable-primary): Change default to nil.
(x-select-enable-clipboard): Add :version keyword.
2010-07-16 22:49:48 -04:00
Chong Yidong
fea9cabd27 Merge changes from emacs-23 branch. 2010-07-16 11:42:15 -04:00
Chong Yidong
f9d71b4284 Change clipboard/primary selection to X application standards.
* 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.
2010-07-14 14:03:39 -04:00
Chong Yidong
5cbce271a6 * simple.el (push-mark-command): Set selection for select-active-regions. 2010-07-14 12:11:39 -04:00
Adrian Robert
79cb9c05a1 term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew Dempsky; bug#5084). Remove incorrect binding for S-tab. (ns-alternatives-map): Change S-tab binding to backtab (bug#6616). * simple.el (normal-erase-is-backspace-setup-frame): Set mode on under ns. 2010-07-13 13:41:49 +03:00
Chong Yidong
e5b826aed0 Fix last fix. 2010-07-10 18:41:55 -04:00
Chong Yidong
c876b2638b * simple.el (use-region-p): Doc fix (Bug#6607). 2010-07-10 15:32:53 -04:00
Chong Yidong
b922967396 * bindings.el (global-map): Bind delete and DEL, the former to
delete-forward-char.

* mouse.el (mouse-region-delete-keys): Deleted.
(mouse-show-mark): Simplify.

* simple.el (delete-active-region): New option.
(delete-backward-char): Implement in Lisp.
(delete-forward-char): New command.

* src/cmds.c (Fdelete_backward_char): Move into Lisp.
2010-06-27 21:01:11 -04:00
Karl Fogel
2c79f05378 Backport from trunk: doc fix.
* 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'.
2010-06-22 20:07:20 -07:00
Karl Fogel
7f0b7b3e87 * 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'.
2010-06-21 19:26:46 -04:00
Juri Linkov
0665f66133 * lisp/simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.
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
2010-06-04 21:38:11 +03:00
Eli Zaretskii
3f2e77354e Fix C-e when bidi reordering is in effect.
simple.el (move-end-of-line): Make sure we are at line beginning
 before backing up to end of previous line.
2010-05-19 20:16:07 +03:00
Stefan Monnier
5ad4bef575 Provide a simple generic indentation engine and use it for Prolog.
* 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.
2010-05-17 15:27:26 -04:00
Stefan Monnier
10dcc5612a * simple.el (prog-mode): New (abstract) major mode.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
* progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
2010-05-14 12:41:01 -04:00
Stefan Monnier
f3ee9200b8 * files.el (auto-save-mode): Move to simple.el to fix bootstrap.
* simple.el (auto-save-mode): Move from files.el.
* minibuffer.el (completion--common-suffix): Fix copy&paste error.
2010-05-07 08:49:14 -04:00
Stefan Monnier
80ac5d4d34 Use define-minor-mode in more cases.
* 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.
2010-05-04 23:45:21 -04:00
Stefan Monnier
8f92b8ad07 New hook filter-buffer-substring-functions.
* 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'.
2010-05-02 01:56:30 -04:00
Stefan Monnier
56924d996f Make it possible to locally disable a globally enabled mode.
* 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.
2010-04-28 11:18:37 -04:00
Juri Linkov
74f806a116 Move scrolling commands from simple.el to window.el
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.
2010-04-16 04:41:58 +03:00
Juri Linkov
ad40eec53f Check both isearch-scroll' and scroll-command' properties.
* isearch.el (isearch-lookup-scroll-key): Check both
`isearch-scroll' and `scroll-command' properties.
(scroll-up, scroll-down): Remove `isearch-scroll' property.

* mwheel.el (mwheel-scroll): Remove `isearch-scroll' property.

* simple.el (scroll-up-command, scroll-down-command)
(scroll-up-line, scroll-down-line): Remove `isearch-scroll' property.
2010-04-16 04:24:00 +03:00
Juri Linkov
a4b000fb3d Add the `scroll-command' property.
* 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.
2010-04-16 02:51:12 +03:00
Stefan Monnier
38111a5adc (non-essential): New var. 2010-04-14 11:24:17 -04:00
Juri Linkov
7b05466ff6 Add variable scroll-error-top-bottom.
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'.
2010-04-14 03:43:54 +03:00
Juri Linkov
9013a7f82e Add variable `scroll-preserve-screen-position-commands'.
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.
2010-04-14 03:11:21 +03:00
Juri Linkov
5a97d2da2c Scrolling commands which scroll a line instead of full screen..
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html

* simple.el (scroll-up-line, scroll-down-line): New commands.
Put property isearch-scroll=t on them.

* emulation/ws-mode.el (scroll-down-line, scroll-up-line):
Remove commands.
2010-04-06 02:44:24 +03:00
Juri Linkov
79ce172a46 Scrolling commands which does not signal errors at top/bottom.
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'.
2010-04-06 02:38:53 +03:00
Juri Linkov
1cd095c67c * simple.el (next-line, previous-line): Re-throw a signal
with `signal' instead of using `ding'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html
2010-03-31 18:16:12 +03:00
Juri Linkov
67189e6238 * simple.el (keyboard-escape-quit): Raise deselecting the active
region higher than exiting the minibuffer.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html
2010-03-31 18:02:53 +03:00
Stefan Monnier
85626eefd2 * simple.el (append-to-buffer): Simplify. 2010-03-30 22:53:53 -04:00
Chong Yidong
9d30a9f45e * simple.el (append-to-buffer): Fix last change. 2010-03-25 01:53:30 -04:00
Chong Yidong
d0fba1745f Fix 2009-11-13 change to append-to-buffer (Bug#5749).
* simple.el (append-to-buffer): Ensure that point is preserved if
BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
(Bug#5749)
2010-03-24 12:18:13 -04:00
Chong Yidong
e8ab39085d * simple.el (save-interprogram-paste-before-kill): Doc fix. 2010-02-16 09:40:45 -05:00
Juanma Barranquero
fa5f7c5f63 Fix typos in docstrings.
* outline.el (outline-head-from-level):
* simple.el (with-wrapper-hook):
* cedet/ede.el (ede-run-target, project-delete-target)
  (project-dist-files, ede-name, ede-documentation, ede-parent-project)
  (ede-adebug-project, ede-adebug-project-parent)
  (ede-adebug-project-root):
* emacs-lisp/elint.el (elint-extra-errors, elint-current-buffer)
  (elint-defun, elint-buffer-env, elint-top-form-logged)
  (elint-unbound-variable):
* textmodes/reftex-toc.el (reftex-toc-newhead-from-alist):
2010-02-14 18:28:10 +01:00
Glenn Morris
3602064247 Improve docs of some transposition functions.
* simple.el (transpose-subr): Give it a doc-string.

* textmodes/paragraphs.el (transpose-paragraphs, transpose-sentences):
Doc fixes.
2010-02-13 11:29:25 -08:00
Glenn Morris
ea92f9f3e2 * simple.el (visual-line-mode): Capitalize lighter.
See http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00088.html
2010-02-03 21:02:56 -08:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00