annotate lisp/delsel.el @ 19860:c17fd465ea95 libc-970911 libc-970912 libc-970913 libc-970914 libc-970915 libc-970916 libc-970917 libc-970918 libc-970919 libc-970920 libc-970921 libc-970922 libc-970923 libc-970924 libc-970925 libc-970926 libc-970927 libc-970928 libc-970929 libc-970930 libc-971001 libc-971018 libc-971019 libc-971020 libc-971021 libc-971022 libc-971023 libc-971024 libc-971025 libc-971026 libc-971027 libc-971028 libc-971029 libc-971030 libc-971031 libc-971101 libc-971102 libc-971103 libc-971104 libc-971105 libc-971106 libc-971107 libc-971108 libc-971109 libc-971110 libc-971111 libc-971112 libc-971113 libc-971114 libc-971115 libc-971116 libc-971117 libc-971118 libc-971120 libc-971121 libc-971122 libc-971123 libc-971124 libc-971125 libc-971126 libc-971127 libc-971128 libc-971129 libc-971130 libc-971201 libc-971203 libc-971204 libc-971205 libc-971206 libc-971207 libc-971208 libc-971209 libc-971210 libc-971211 libc-971212 libc-971213 libc-971214 libc-971217 libc-971218 libc-971219 libc-971220 libc-971221 libc-971222 libc-971223 libc-971224 libc-971225 libc-971226 libc-971227 libc-971228 libc-971229 libc-971230 libc-971231 libc-980103 libc-980104 libc-980105 libc-980106 libc-980107 libc-980108 libc-980109 libc-980110 libc-980111 libc-980112 libc-980114 libc-980115 libc-980116 libc-980117 libc-980118 libc-980119 libc-980120 libc-980121 libc-980122 libc-980123 libc-980124 libc-980125 libc-980126 libc-980127 libc-980128

typos.
author Jeff Law <law@redhat.com>
date Wed, 10 Sep 1997 21:16:20 +0000
parents 25a37a54148f
children b1ee274d921b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
1 ;;; delsel.el --- delete selection if you insert
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
2
19132
73871027b629 (delete-selection-mode): Delete the :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 18840
diff changeset
3 ;; Copyright (C) 1992, 1997 Free Software Foundation, Inc.
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
4
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
5 ;; Author: Matthieu Devin <devin@lucid.com>
17976
852464ce5d6a Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
6 ;; Maintainer: FSF
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
7 ;; Created: 14 Jul 92
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
9 ;; This file is part of GNU Emacs.
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
14 ;; any later version.
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
19 ;; GNU General Public License for more details.
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
21 ;; You should have received a copy of the GNU General Public License
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
24 ;; Boston, MA 02111-1307, USA.
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
26 ;;; Commentary:
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
28 ;; This file makes the active region be pending delete, meaning that
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
29 ;; text inserted while the region is active will replace the region contents.
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13077
diff changeset
30 ;; This is a popular behavior of personal computers text editors.
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
32 ;;; Code:
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2074
diff changeset
33
18785
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
34 (eval-when-compile
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
35 (require 'cl))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
36
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
37 ;;;###autoload
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
38 (defalias 'pending-delete-mode 'delete-selection-mode)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
39
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
40 ;;;###autoload
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
41 (defun delete-selection-mode (&optional arg)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
42 "Toggle Delete Selection mode.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
43 With prefix ARG, turn Delete Selection mode on if and only if ARG is positive.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
44
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
45 When Delete Selection mode is enabled, Transient Mark mode is also enabled and
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
46 typed text replaces the selection if the selection is active. Otherwise, typed
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
47 text is just inserted at point regardless of any selection."
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
48 (interactive "P")
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
49 (setq delete-selection-mode (if arg
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
50 (> (prefix-numeric-value arg) 0)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
51 (not delete-selection-mode)))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
52 (if (not delete-selection-mode)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
53 (remove-hook 'pre-command-hook 'delete-selection-pre-hook)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
54 (add-hook 'pre-command-hook 'delete-selection-pre-hook)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
55 (transient-mark-mode t)))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
56
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
57 ;;;###autoload
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
58 (defcustom delete-selection-mode nil
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
59 "Toggle Delete Selection mode.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
60 When Delete Selection mode is enabled, Transient Mark mode is also enabled and
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
61 typed text replaces the selection if the selection is active.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
62 You must modify via \\[customize] for this variable to have an effect."
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
63 :set (lambda (symbol value)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
64 (delete-selection-mode (or value 0)))
19488
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
65 :initialize 'custom-initialize-default
18785
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
66 :type 'boolean
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
67 :group 'editing-basics
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
68 :require 'delsel)
2074
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
69
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 (defun delete-active-region (&optional killp)
2074
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
71 (if killp
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
72 (kill-region (point) (mark))
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
73 (delete-region (point) (mark)))
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
74 (setq mark-active nil)
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
75 (run-hooks 'deactivate-mark-hook)
0196b8bce529 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 2073
diff changeset
76 t)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
78 (defun delete-selection-pre-hook ()
18785
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
79 (when (and delete-selection-mode transient-mark-mode mark-active
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
80 (not buffer-read-only))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
81 (let ((type (and (symbolp this-command)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
82 (get this-command 'delete-selection))))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
83 (cond ((eq type 'kill)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
84 (delete-active-region t))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
85 ((eq type 'yank)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
86 ;; Before a yank command,
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
87 ;; make sure we don't yank the same region
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
88 ;; that we are going to delete.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
89 ;; That would make yank a no-op.
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
90 (when (string= (buffer-substring-no-properties (point) (mark))
12790
afe7f3c735a3 (delete-selection-pre-hook): New type value `yank'.
Richard M. Stallman <rms@gnu.org>
parents: 11589
diff changeset
91 (car kill-ring))
18785
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
92 (current-kill 1))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
93 (delete-active-region nil))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
94 ((eq type 'supersede)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
95 (when (delete-active-region nil)
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
96 (setq this-command '(lambda () (interactive)))))
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
97 (type
1a455d8dfa7c Customise. Don't modify pre-command-hook on file load; do in command.
Simon Marshall <simon@gnu.org>
parents: 18641
diff changeset
98 (delete-active-region nil))))))
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
100 (put 'self-insert-command 'delete-selection t)
9533
b589ba0d8960 (self-insert-iso): Add delete-selection property.
Richard M. Stallman <rms@gnu.org>
parents: 2925
diff changeset
101 (put 'self-insert-iso 'delete-selection t)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102
12790
afe7f3c735a3 (delete-selection-pre-hook): New type value `yank'.
Richard M. Stallman <rms@gnu.org>
parents: 11589
diff changeset
103 (put 'yank 'delete-selection 'yank)
13077
65092cab3f43 (clipboard-yank): Add delete-selection property.
Richard M. Stallman <rms@gnu.org>
parents: 12790
diff changeset
104 (put 'clipboard-yank 'delete-selection 'yank)
2925
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
105 (put 'insert-register 'delete-selection t)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
107 (put 'delete-backward-char 'delete-selection 'supersede)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
108 (put 'backward-delete-char-untabify 'delete-selection 'supersede)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
109 (put 'delete-char 'delete-selection 'supersede)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
111 (put 'newline-and-indent 'delete-selection 't)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
112 (put 'newline 'delete-selection t)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
113 (put 'open-line 'delete-selection t)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 ;; This is very useful for cancelling a selection in the minibuffer without
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 ;; aborting the minibuffer.
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 (defun minibuffer-keyboard-quit ()
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 "Abort recursive edit.
2925
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
119 In Delete Selection mode mode, if the mark is active, just deactivate it;
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
120 then it takes a second C-g to abort the minibuffer."
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (interactive)
2925
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
122 (if (and delete-selection-mode transient-mark-mode mark-active)
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
123 (setq deactivate-mark t)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 (abort-recursive-edit)))
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 (define-key minibuffer-local-map "\C-g" 'minibuffer-keyboard-quit)
2903
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
127 (define-key minibuffer-local-ns-map "\C-g" 'minibuffer-keyboard-quit)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
128 (define-key minibuffer-local-completion-map "\C-g" 'minibuffer-keyboard-quit)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
129 (define-key minibuffer-local-must-match-map "\C-g" 'minibuffer-keyboard-quit)
fa41174db2fa Renamed from pending-del.el.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
130 (define-key minibuffer-local-isearch-map "\C-g" 'minibuffer-keyboard-quit)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131
2925
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
132 (provide 'delsel)
2073
b4d5c9926d98 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
19488
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
134 ;; This is the standard way mechanism to put the mode into effect
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
135 ;; if delete-selection-mode has already been set to t
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
136 ;; when this file is loaded.
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
137 (when delete-selection-mode
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
138 (delete-selection-mode t))
25a37a54148f (delete-selection-mode): Put back :initialize keyword.
Richard M. Stallman <rms@gnu.org>
parents: 19132
diff changeset
139
2925
902c32c709f7 Provide delsel.
Richard M. Stallman <rms@gnu.org>
parents: 2903
diff changeset
140 ;;; delsel.el ends here