bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39706: 28.0.50; Search prefix nroff-mode


From: Juri Linkov
Subject: bug#39706: 28.0.50; Search prefix nroff-mode
Date: Fri, 21 Feb 2020 01:51:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

Tags: patch

Often logs files have numeric file extensions such as log.1, log.2, ...
thus visited in nroff-mode.  I don't care about the wrong mode since
they are visited in read-only anyway just for a quick peek.

But the problem is that nroff-mode steals the global prefix M-s
used to run search commands.

nroff-mode inherits from text-mode that puts 'center-line'
on the key 'M-o M-s', so this is what nroff-mode should use as well:

diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 62e8b1f093..99e144d215 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -50,7 +50,8 @@ nroff-mode-map
   (let ((map (make-sparse-keymap))
        (menu-map (make-sparse-keymap)))
     (define-key map "\t"  'tab-to-tab-stop)
-    (define-key map "\es" 'center-line)
+    ;; Should use 'M-o M-s' from text-mode
+    ;; (define-key map "\es" 'center-line)
     (define-key map "\e?" 'nroff-count-text-lines)
     (define-key map "\n"  'nroff-electric-newline)
     (define-key map "\en" 'nroff-forward-text-line)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]