aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-02-05 11:02:10 -0500
committerStefan Monnier2015-02-05 11:02:10 -0500
commitab51cc7dd6ce6199cf4fcef35ae85245d3670c51 (patch)
tree9bbcb4196e3393e9bc35dc29cda651804d4820aa
parent14500c83b8e4ea20efdc3ea32499d2fb2e0d9253 (diff)
downloademacs-ab51cc7dd6ce6199cf4fcef35ae85245d3670c51.tar.gz
emacs-ab51cc7dd6ce6199cf4fcef35ae85245d3670c51.zip
* lisp/delsel.el: Deprecate the `kill' option. Use lexical-binding.
(open-line): Delete like all other commands, instead of killing. (delete-active-region): Don't define any return any value.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/delsel.el17
2 files changed, 12 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 73f155243f5..694a35be61d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,13 +1,17 @@
12015-02-05 Stefan Monnier <monnier@iro.umontreal.ca> 12015-02-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * delsel.el: Deprecate the `kill' option. Use lexical-binding.
4 (open-line): Delete like all other commands, instead of killing.
5 (delete-active-region): Don't define any return any value.
6
3 * progmodes/python.el: Try to preserve compatibility with Emacs-24. 7 * progmodes/python.el: Try to preserve compatibility with Emacs-24.
4 (python-mode): Don't assume eldoc-documentation-function has a non-nil 8 (python-mode): Don't assume eldoc-documentation-function has a non-nil
5 default. 9 default.
6 10
72015-02-04 Sam Steingold <sds@gnu.org> 112015-02-04 Sam Steingold <sds@gnu.org>
8 12
9 * progmodes/python.el (python-indent-calculate-indentation): Avoid 13 * progmodes/python.el (python-indent-calculate-indentation):
10 the error when computing top-level indentation. 14 Avoid the error when computing top-level indentation.
11 15
122015-02-04 Stefan Monnier <monnier@iro.umontreal.ca> 162015-02-04 Stefan Monnier <monnier@iro.umontreal.ca>
13 17
diff --git a/lisp/delsel.el b/lisp/delsel.el
index e6bb3b952b3..740b60345ed 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -1,4 +1,4 @@
1;;; delsel.el --- delete selection if you insert 1;;; delsel.el --- delete selection if you insert -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1992, 1997-1998, 2001-2015 Free Software Foundation, 3;; Copyright (C) 1992, 1997-1998, 2001-2015 Free Software Foundation,
4;; Inc. 4;; Inc.
@@ -35,16 +35,12 @@
35;; property on their symbols; commands which insert text but don't 35;; property on their symbols; commands which insert text but don't
36;; have this property won't delete the selection. It can be one of 36;; have this property won't delete the selection. It can be one of
37;; the values: 37;; the values:
38;; 'yank 38;; `yank'
39;; For commands which do a yank; ensures the region about to be 39;; For commands which do a yank; ensures the region about to be
40;; deleted isn't yanked. 40;; deleted isn't yanked.
41;; 'supersede 41;; `supersede'
42;; Delete the active region and ignore the current command, 42;; Delete the active region and ignore the current command,
43;; i.e. the command will just delete the region. 43;; i.e. the command will just delete the region.
44;; 'kill
45;; `kill-region' is used on the selection, rather than
46;; `delete-region'. (Text selected with the mouse will typically
47;; be yankable anyhow.)
48;; t 44;; t
49;; The normal case: delete the active region prior to executing 45;; The normal case: delete the active region prior to executing
50;; the command which will insert replacement text. 46;; the command which will insert replacement text.
@@ -93,8 +89,7 @@ If KILLP in not-nil, the active region is killed instead of deleted."
93 (cons (current-buffer) 89 (cons (current-buffer)
94 (and (consp buffer-undo-list) (car buffer-undo-list))))) 90 (and (consp buffer-undo-list) (car buffer-undo-list)))))
95 (t 91 (t
96 (funcall region-extract-function 'delete-only))) 92 (funcall region-extract-function 'delete-only))))
97 t)
98 93
99(defun delete-selection-repeat-replace-region (arg) 94(defun delete-selection-repeat-replace-region (arg)
100 "Repeat replacing text of highlighted region with typed text. 95 "Repeat replacing text of highlighted region with typed text.
@@ -167,7 +162,7 @@ With ARG, repeat that many times. `C-u' means until end of buffer."
167 For commands which need to dynamically determine this behavior. 162 For commands which need to dynamically determine this behavior.
168 FUNCTION should take no argument and return one of the above values or nil." 163 FUNCTION should take no argument and return one of the above values or nil."
169 (condition-case data 164 (condition-case data
170 (cond ((eq type 'kill) 165 (cond ((eq type 'kill) ;Deprecated, backward compatibility.
171 (delete-active-region t) 166 (delete-active-region t)
172 (if (and overwrite-mode 167 (if (and overwrite-mode
173 (eq this-command 'self-insert-command)) 168 (eq this-command 'self-insert-command))
@@ -255,7 +250,7 @@ See `delete-selection-helper'."
255(put 'newline-and-indent 'delete-selection t) 250(put 'newline-and-indent 'delete-selection t)
256(put 'newline 'delete-selection t) 251(put 'newline 'delete-selection t)
257(put 'electric-newline-and-maybe-indent 'delete-selection t) 252(put 'electric-newline-and-maybe-indent 'delete-selection t)
258(put 'open-line 'delete-selection 'kill) 253(put 'open-line 'delete-selection t)
259 254
260;; This is very useful for canceling a selection in the minibuffer without 255;; This is very useful for canceling a selection in the minibuffer without
261;; aborting the minibuffer. 256;; aborting the minibuffer.