changeset 103304:2ebd7d8c8506

(normal-no-mouse-startup-screen): Use F1 rather than C-h if C-h is remapped to something else like DEL.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 29 May 2009 01:31:40 +0000
parents 220750e4fe9a
children ba9d933971ca
files lisp/ChangeLog lisp/startup.el
diffstat 2 files changed, 64 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 28 20:36:03 2009 +0000
+++ b/lisp/ChangeLog	Fri May 29 01:31:40 2009 +0000
@@ -1,7 +1,11 @@
+2009-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* startup.el (normal-no-mouse-startup-screen): Use F1 rather than C-h
+	if C-h is remapped to something else like DEL.
+
 2009-05-26  Chong Yidong  <cyd@stupidchicken.com>
 
-	* edmacro.el (edmacro-parse-keys): Fix 2008-08-19
-	change (Bug#3387).
+	* edmacro.el (edmacro-parse-keys): Fix 2008-08-19 change (Bug#3387).
 
 	* view.el (view-recenter): Allow recenter to compute window height
 	normally.
@@ -12,8 +16,8 @@
 
 2009-05-26  Kenichi Handa  <handa@m17n.org>
 
-	* textmodes/table.el (table--unibyte-char-to-multibyte): Function
-	deleted.
+	* textmodes/table.el (table--unibyte-char-to-multibyte):
+	Delete function.
 	(*table--cell-self-insert-command, *table--cell-quoted-insert):
 	Don't call table--unibyte-char-to-multibyte (Bug#3372).
 
@@ -47,8 +51,8 @@
 	(grep-apply-setting): New function.
 	(grep-highlight-matches, grep-command, grep-template)
 	(grep-use-null-device, grep-find-command, grep-find-template):
-	Clarify role of grep-compute-defaults in docstrings.  Use
-	grep-apply-setting to apply changes (Bug#3343).
+	Clarify role of grep-compute-defaults in docstrings.
+	Use grep-apply-setting to apply changes (Bug#3343).
 
 2009-05-21  Glenn Morris  <rgm@gnu.org>
 
--- a/lisp/startup.el	Thu May 28 20:36:03 2009 +0000
+++ b/lisp/startup.el	Fri May 29 01:31:40 2009 +0000
@@ -1824,64 +1824,68 @@
 
   ;; If keys have their default meanings,
   ;; use precomputed string to save lots of time.
-  (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)
-	   (eq (key-binding "\C-ht") 'help-with-tutorial)
-	   (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
-	(insert "
-Get help\t   C-h  (Hold down CTRL and press h)
+  (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)
+             (eq (key-binding "\C-ht") 'help-with-tutorial)
+             (eq (key-binding "\C-hi") 'info)
+             (eq (key-binding "\C-hr") 'info-emacs-manual)
+             (eq (key-binding "\C-h\C-n") 'view-emacs-news))
+        (let ((help (if c-h-accessible "C-h" "<f1>")))
+          (insert "
+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-button "Browse manuals"
-		       'action (lambda (button) (Info-directory))
-		       'follow-link t)
-	(insert "\t   C-h i
+          (insert-button "Emacs manual"
+                         'action (lambda (button) (info-emacs-manual))
+                         'follow-link t)
+          (insert "	   " help " r\t")
+          (insert-button "Browse manuals"
+                         'action (lambda (button) (Info-directory))
+                         'follow-link t)
+          (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-button "Emacs tutorial"
+                         'action (lambda (button) (help-with-tutorial))
+                         'follow-link t)
+          (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-button "Buy manuals"
+                         'action (lambda (button) (view-order-manuals))
+                         'follow-link t)
+          (insert "\t   " help " C-m\tExit Emacs\t   C-x C-c"))
 
-    (insert (format "
+      (insert (format "
 Get help\t   %s
 "
-		    (let ((where (where-is-internal
-				  'help-command nil t)))
-		      (if where
-			  (key-description where)
-			"M-x help"))))
-    (insert-button "Emacs manual"
-		   'action (lambda (button) (info-emacs-manual))
-		   'follow-link t)
-    (insert (substitute-command-keys"\t   \\[info-emacs-manual]\t"))
-    (insert-button "Browse manuals"
-		   'action (lambda (button) (Info-directory))
-		   'follow-link t)
-    (insert (substitute-command-keys "\t   \\[info]
+                      (let ((where (where-is-internal 'help-command nil t)))
+                        (if where
+                            (key-description where)
+                          "M-x help"))))
+      (insert-button "Emacs manual"
+                     'action (lambda (button) (info-emacs-manual))
+                     'follow-link t)
+      (insert (substitute-command-keys"\t   \\[info-emacs-manual]\t"))
+      (insert-button "Browse manuals"
+                     'action (lambda (button) (Info-directory))
+                     'follow-link t)
+      (insert (substitute-command-keys "\t   \\[info]
 "))
-    (insert-button "Emacs tutorial"
-		   'action (lambda (button) (help-with-tutorial))
-		   'follow-link t)
-    (insert (substitute-command-keys
-	     "\t   \\[help-with-tutorial]\tUndo changes\t   \\[advertised-undo]
+      (insert-button "Emacs tutorial"
+                     'action (lambda (button) (help-with-tutorial))
+                     'follow-link t)
+      (insert (substitute-command-keys
+               "\t   \\[help-with-tutorial]\tUndo changes\t   \\[advertised-undo]
 "))
-    (insert-button "Buy manuals"
-		   'action (lambda (button) (view-order-manuals))
-		   'follow-link t)
-    (insert (substitute-command-keys
-	     "\t   \\[view-order-manuals]\tExit Emacs\t   \\[save-buffers-kill-terminal]")))
+      (insert-button "Buy manuals"
+                     'action (lambda (button) (view-order-manuals))
+                     'follow-link t)
+      (insert (substitute-command-keys
+	       "\t   \\[view-order-manuals]\tExit Emacs\t   \\[save-buffers-kill-terminal]"))))
 
   ;; Say how to use the menu bar with the keyboard.
   (insert "\n")