emacs-devel
[Top][All Lists]
Advanced

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

Re: C-h, F1, Backspace, and splash screen


From: Stefan Monnier
Subject: Re: C-h, F1, Backspace, and splash screen
Date: Thu, 28 May 2009 21:32:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

>> Indeed, the answer is the same: it is nowadays generally considered
>> a configuration error (or at least misfeature) for a terminal to use C-h
>> for backspace.

> OK, I'll pass that on to the cygwin people.

> Nevertheless, if you look back at my first post in this thread
> (http://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00569.html), isn't
> there a bug in the way startup.el prepares the splash screen?

Yes, indeed.
I've just installed the patch below which should address this problem.


        Stefan


--- startup.el.~1.530.~ 2009-04-28 14:57:44.000000000 -0400
+++ startup.el  2009-05-28 21:26:50.000000000 -0400
@@ -1824,6 +1824,11 @@
 
   ;; If keys have their default meanings,
   ;; use precomputed string to save lots of time.
+  (let ((c-h-accessible
+         ;; If normal-erase-is-backspace is used on a tty, there's
+         ;; no way to invoke C-h and you have to use F1 instead.
+         (or (not (char-table-p keyboard-translate-table))
+             (eq (aref keyboard-translate-table ?\C-h) ?\C-h))))
   (if (and (eq (key-binding "\C-h") 'help-command)
           (eq (key-binding "\C-xu") 'advertised-undo)
           (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal)
@@ -1831,34 +1836,33 @@
           (eq (key-binding "\C-hi") 'info)
           (eq (key-binding "\C-hr") 'info-emacs-manual)
           (eq (key-binding "\C-h\C-n") 'view-emacs-news))
-      (progn
+        (let ((help (if c-h-accessible "C-h" "<f1>")))
        (insert "
-Get help\t   C-h  (Hold down CTRL and press h)
+Get help\t   " help "  (Hold down CTRL and press h)
 ")
        (insert-button "Emacs manual"
                       'action (lambda (button) (info-emacs-manual))
                       'follow-link t)
-       (insert "          C-h r\t")
+          (insert "       " help " r\t")
        (insert-button "Browse manuals"
                       'action (lambda (button) (Info-directory))
                       'follow-link t)
-       (insert "\t   C-h i
+          (insert "\t   " help " i
 ")
        (insert-button "Emacs tutorial"
                       'action (lambda (button) (help-with-tutorial))
                       'follow-link t)
-       (insert "          C-h t\tUndo changes\t   C-x u
+          (insert "       " help " t\tUndo changes\t   C-x u
 ")
        (insert-button "Buy manuals"
                       'action (lambda (button) (view-order-manuals))
                       'follow-link t)
-       (insert "\t   C-h C-m\tExit Emacs\t   C-x C-c"))
+          (insert "\t   " help " C-m\tExit Emacs\t   C-x C-c"))
 
     (insert (format "
 Get help\t   %s
 "
-                   (let ((where (where-is-internal
-                                 'help-command nil t)))
+                      (let ((where (where-is-internal 'help-command nil t)))
                      (if where
                          (key-description where)
                        "M-x help"))))
@@ -1881,7 +1885,7 @@
                   'action (lambda (button) (view-order-manuals))
                   'follow-link t)
     (insert (substitute-command-keys
-            "\t   \\[view-order-manuals]\tExit Emacs\t   
\\[save-buffers-kill-terminal]")))
+              "\t   \\[view-order-manuals]\tExit Emacs\t   
\\[save-buffers-kill-terminal]"))))
 
   ;; Say how to use the menu bar with the keyboard.
   (insert "\n")




reply via email to

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