[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 74a5ec0e1e0 5/5: Merge branch 'register_preview'
From: |
Thierry Volpiatto |
Subject: |
master 74a5ec0e1e0 5/5: Merge branch 'register_preview' |
Date: |
Sat, 2 Dec 2023 03:04:37 -0500 (EST) |
branch: master
commit 74a5ec0e1e05b78e5fb86c0c1a8ac6737bf4e2d6
Merge: eec1142acdd cd6e66f955d
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Merge branch 'register_preview'
---
doc/emacs/regs.texi | 5 ++---
etc/NEWS | 5 +++++
lisp/register.el | 5 +++--
test/lisp/register-tests.el | 43 -------------------------------------------
4 files changed, 10 insertions(+), 48 deletions(-)
diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi
index e52f68dd18e..5e5b7ae2b16 100644
--- a/doc/emacs/regs.texi
+++ b/doc/emacs/regs.texi
@@ -16,9 +16,8 @@ jump back to that position once or many times.
we will denote by @var{r}; @var{r} can be a letter (such as @samp{a})
or a number (such as @samp{1}); case matters, so register @samp{a} is
not the same as register @samp{A}. You can also set a register in
-non-alphanumeric characters, for instance @samp{*} or @samp{C-d}.
-Note, it's not possible to set a register in @samp{C-g} or @samp{ESC},
-because these keys are reserved for quitting (@pxref{Quitting}).
+non-alphanumeric characters, for instance @samp{C-d} by using for
+example @key{C-q} @samp{C-d}.
@findex view-register
A register can store a position, a piece of text, a rectangle, a
diff --git a/etc/NEWS b/etc/NEWS
index db8a47fd739..da00ea9dbda 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1140,6 +1140,11 @@ showcases all their customization options.
* Incompatible Lisp Changes in Emacs 30.1
+---
+** 'register-preview-delay' is no longer used.
+Register preview is no more delayed. If you want to disable it use
+'register-use-preview' instead with a boolean value.
+
+++
** 'M-TAB' now invokes 'completion-at-point' also in Text mode.
Text mode no longer binds 'M-TAB' to 'ispell-complete-word', and
diff --git a/lisp/register.el b/lisp/register.el
index 61bef503f91..46ec38821e5 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -93,7 +93,6 @@ of the marked text."
:type '(choice (const :tag "None" nil)
(character :tag "Use register" :value ?+)))
-;; FIXME: This is no more needed, remove it.
(defcustom register-preview-delay 1
"If non-nil, time to wait in seconds before popping up register preview
window.
If nil, do not show register previews, unless `help-char' (or a member of
@@ -101,6 +100,7 @@ If nil, do not show register previews, unless `help-char'
(or a member of
:version "24.4"
:type '(choice number (const :tag "No preview unless requested" nil))
:group 'register)
+(make-obsolete-variable 'register-preview-delay "No longer used." "30.1")
(defcustom register-preview-default-keys (mapcar #'string (number-sequence ?a
?z))
"Default keys for setting a new register."
@@ -131,7 +131,8 @@ See the documentation of the variable `register-alist' for
possible VALUEs."
(defun register-preview-default (r)
"Function that is the default value of the variable
`register-preview-function'."
(format "%s: %s\n"
- (single-key-description (car r))
+ (propertize (string (car r))
+ 'display (single-key-description (car r)))
(register-describe-oneline (car r))))
(defvar register-preview-function #'register-preview-default
diff --git a/test/lisp/register-tests.el b/test/lisp/register-tests.el
deleted file mode 100644
index 6283d1c31e0..00000000000
--- a/test/lisp/register-tests.el
+++ /dev/null
@@ -1,43 +0,0 @@
-;;; register-tests.el --- tests for register.el -*- lexical-binding: t-*-
-
-;; Copyright (C) 2017-2023 Free Software Foundation, Inc.
-
-;; Author: Tino Calancha <tino.calancha@gmail.com>
-;; Keywords:
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-
-;;; Code:
-(require 'ert)
-(require 'cl-lib)
-
-(ert-deftest register-test-bug27634 ()
- "Test for https://debbugs.gnu.org/27634 ."
- (dolist (event (list ?\C-g 'escape ?\C-\[))
- (cl-letf (((symbol-function 'read-key) #'ignore)
- (last-input-event event)
- (register-alist nil))
- (should (equal 'quit
- (condition-case err
- (call-interactively 'point-to-register)
- (quit (car err)))))
- (should-not register-alist))))
-
-(provide 'register-tests)
-;;; register-tests.el ends here