Stefan Monnier
c77d37e227
Rework the last delsel/electric fix.
...
* lisp/delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
* lisp/electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly. Don't require delsel.
2012-10-22 08:43:54 -04:00
Simon Law
b1d39ccce4
* lisp/delsel.el (delete-selection-helper): New function, extracted from
...
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* lisp/electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks.
Fixes: debbugs:11520
2012-10-21 23:15:44 -04:00
Stefan Monnier
5d65606a7e
* lisp/delsel.el (delete-selection-pre-hook): Don't propagate the
...
file-supersession signals.
Fixes: debbugs:12161
2012-08-08 22:18:50 -04:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Paul Eggert
c80e3b4aed
Spelling fixes.
2011-12-04 00:02:42 -08:00
Chong Yidong
06e21633a4
Fix minor mode docstrings for the new meaning of a nil ARG.
...
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0
Nuke arch-tags.
2011-01-15 15:16:57 -08:00
Glenn Morris
5df4f04cd3
Add 2011 to FSF/AIST copyright years.
2011-01-02 15:50:46 -08:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Glenn Morris
ae940284fa
Add 2009 to copyright years.
2009-01-05 03:18:22 +00:00
Glenn Morris
eb3fa2cfcf
Switch to recommended form of GPLv3 permissions notice.
2008-05-06 08:06:51 +00:00
Stefan Monnier
cbee283dd7
Fix up comment convention on the arch-tag lines.
2008-04-10 14:10:46 +00:00
Juanma Barranquero
8c8e195273
(delsel-unload-function): Don't use `remprop'; it is not autoloaded,
...
and we wouldn't want to load CL just to unload delsel.el anyway.
Suggested by Martin Rudalics <rudalics@gmx.at>.
2008-01-24 11:13:45 +00:00
Martin Rudalics
578877a1fd
(delete-selection-pre-hook): Avoid clearing out
...
pre-command-hook when text is read-only.
2008-01-24 09:46:40 +00:00
Miles Bader
59ce725a3b
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
409cc4a3ea
Add 2008 to copyright years.
2008-01-07 02:45:14 +00:00
Richard M. Stallman
f7fdcecd7e
(delete-selection-mode): Doc fix.
2008-01-04 05:39:48 +00:00
Juanma Barranquero
c815b73f62
(delsel-unload-hook): Remove function and variable.
...
(delsel-unload-function): New-style unload function,
adapted from `delsel-unload-hook'.
2007-10-31 00:30:54 +00:00
Juri Linkov
614a773aa3
(delete-selection-pre-hook): Check if mouse-region-match is fbound
...
to not fail on mouseless tty.
2007-10-06 22:19:12 +00:00
Juri Linkov
67755cc483
(delete-selection-pre-hook): Use `mouse-region-match' instead of checking last-command.
2007-08-21 20:04:51 +00:00
Miles Bader
9aecacd08a
Merge from emacs--rel--22
...
Patches applied:
* emacs--rel--22 (patch 70-73)
- Update from CVS
2007-07-25 Glenn Morris <rgm@gnu.org>
* Relicense all FSF files to GPLv3 or later.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
b4aa60262c
Switch license to GPLv3 or later.
2007-07-25 04:50:21 +00:00
Juri Linkov
195d88f474
(delete-selection-pre-hook): Before a yank command,
...
check also whether last-command is one of mouse-save-then-kill,
mouse-secondary-save-then-kill, mouse-set-region, mouse-drag-region.
2007-07-15 19:55:32 +00:00
Glenn Morris
d7a0267c8d
Add 2007 to copyright years.
2007-01-21 03:53:13 +00:00
Thien-Thi Nguyen
aaef169dc6
Update years in copyright notice; nfc.
2006-02-06 15:23:23 +00:00
Juri Linkov
ec08e2f4da
(delete-selection-pre-hook): If overwrite-mode is
...
enabled and the current command is self-insert-command, call it
explicitly with overwrite-mode bound to nil, to not allow it
to delete the character after the selected region.
2005-08-14 06:59:39 +00:00
Thien-Thi Nguyen
0d30b33766
Update years in copyright notice; nfc.
2005-08-06 22:13:43 +00:00
Lute Kamstra
086add1519
Update FSF's address.
2005-07-04 23:32:44 +00:00
Richard M. Stallman
87f14b12a9
(delsel-unload-hook): Set as a variable.
2004-10-17 06:51:48 +00:00
Juri Linkov
8aa3c14796
Don't put delete-selection' property on
insert-parentheses' symbol
...
to take advantage of region handling in `insert-pair' function.
Suggested by Stephan Stahl <stahl@eos.franken.de>
2004-05-01 04:03:28 +00:00
Miles Bader
ab5796a9f9
Add arch taglines
2003-09-01 15:45:59 +00:00
Richard M. Stallman
f605434deb
(delete-active-region): Don't explicitly deactivate mark.
2003-04-03 22:58:49 +00:00
Richard M. Stallman
f13e84fa4b
(delete-selection-pre-hook): Handle and resignal
...
file-supersession errors to interact properly with userlock.el.
2001-11-19 06:21:11 +00:00
Gerd Moellmann
10e922bdd2
(delete-selection-pre-hook): Don't set this-command
...
to `ignore' if the region is empty.
2001-07-31 11:36:30 +00:00
Stefan Monnier
82fdafde11
(delete-selection-mode): Drop unneeded positional args.
2000-11-03 22:13:18 +00:00
Stefan Monnier
ad03cafc90
(delete-selection-mode): Use define-minor-mode.
2000-10-01 00:25:27 +00:00
Dave Love
23652376ac
(delsel-unload-hook): New function.
2000-08-15 14:20:14 +00:00
Dave Love
f947a7faf0
Add finder keywords.
2000-05-24 15:24:37 +00:00
Dave Love
8293d8d772
Revert previous change -- region is significant to skeleton.
1999-12-04 19:35:23 +00:00
Dave Love
f3ee8f62b5
Grok skeleton-pair-insert-maybe.
1999-12-01 14:30:41 +00:00
Dave Love
735cb9a35e
(delete-selection-mode): Doc fix.
1999-04-27 18:52:49 +00:00
Karl Heuer
25f67e4bc9
*** empty log message ***
1999-03-30 21:37:40 +00:00
Karl Heuer
5481e5e87f
(delete-selection-mode): Doc fix.
1999-03-30 21:27:55 +00:00
Dave Love
69b3c6c7ea
Don't require cl. Minor doc fixes.
...
(insert-parentheses): Add 'delete-selection property.
(delete-selection-pre-hook): Simplify slightly.
1998-04-23 18:00:06 +00:00
Richard M. Stallman
16be0abe24
(delete-selection-mode): Put back :initialize keyword.
...
At the end of the file, test this variable, and turn on the mode
if it is non-nil.
1997-08-23 17:04:52 +00:00
Richard M. Stallman
a6b9b0c5eb
(delete-selection-mode): Delete the :initialize keyword.
...
Don't explicitly check the value and call delete-selection-mode.
Don't put on a custom-loads property.
1997-08-04 06:47:28 +00:00
Richard M. Stallman
775f246140
(delete-selection-mode): Add custom-loads property.
1997-07-17 21:59:31 +00:00
Simon Marshall
7853929fc9
Customise. Don't modify pre-command-hook on file load; do in command.
1997-07-15 07:45:25 +00:00
Richard M. Stallman
70e87c4b4d
(delete-selection-mode): Doc fix.
1997-07-06 23:51:30 +00:00