;;; tutorial.el --- tutorial for Emacs
-;; Copyright (C) 2006-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2016 Free Software Foundation, Inc.
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: help, internal
;; Package: emacs
VALUE should have either of these formats:
- \(cua-mode)
- \(current-binding KEY-FUN DEF-FUN KEY WHERE)
+ (cua-mode)
+ (current-binding KEY-FUN DEF-FUN KEY WHERE)
Where
KEY is a key sequence whose standard binding has been changed
(eq map (symbol-value s))
;; then save this value in mapsym
(setq mapsym s)))))
- (insert "The default Emacs binding for the key "
- (key-description key)
- " is the command `")
- (insert (format "%s" db))
- (insert "'. "
- "However, your customizations have "
+ (insert
+ (format-message
+ "The default Emacs binding for the key %s is the command `%s'. "
+ (key-description key)
+ db))
+ (insert "However, your customizations have "
(if cb
- (format "rebound it to the command `%s'" cb)
+ (format-message "rebound it to the command `%s'" cb)
"unbound it"))
(insert ".")
(when mapsym
(insert " (For the more advanced user:"
- " This binding is in the keymap `"
- (format "%s" mapsym)
- "'.)"))
+ (format-message
+ " This binding is in the keymap `%s'.)" mapsym)))
(if (string= where "")
(unless (keymapp db)
(insert "\n\nYou can use M-x "
""
"the key")
where
- " to get the function `"
- (format "%s" db)
- "'.")))
+ (format-message " to get the function `%s'." db))))
(fill-region (point-min) (point)))))
(help-print-return-message))))
(symbol-name cx)))))))
(defconst tutorial--default-keys
- ;; On window system, `suspend-emacs' is replaced in the default
- ;; keymap
+ ;; On window system, `suspend-emacs' is replaced in the default keymap.
(let* ((suspend-emacs 'suspend-frame)
(default-keys
+ ;; The first few are not mentioned but are basic:
`((ESC-prefix [27])
(Control-X-prefix [?\C-x])
(mode-specific-command-prefix [?\C-c])
REMARK is a list with info about rebinding. It has either of
these formats:
- \(TEXT cua-mode)
- \(TEXT current-binding KEY-FUN DEF-FUN KEY WHERE)
+ (TEXT cua-mode)
+ (TEXT current-binding KEY-FUN DEF-FUN KEY WHERE)
Here TEXT is a link text to show to the user. The
rest of the list is used to show information when
(lookup-key global-map
[menu-bar]))))
(stringp cwhere))
- (format "the `%s' menu" cwhere)
+ (format-message "the `%s' menu" cwhere)
"the menus"))))
(setq where ""))
(setq remark nil)
(start (point))
(case-fold-search nil)
(keybindings-regexp
- (concat "[[:space:]]\\("
+ ;; Accept either [:space:] or [:punct:] before the key
+ ;; binding because the Hebrew tutorial uses directional
+ ;; controls and Hebrew character maqaf, the Hebrew hyphen,
+ ;; immediately before the binding string.
+ (concat "\\(?:[[:space:]]\\|[[:punct:]]\\)\\("
(mapconcat (lambda (kdf) (regexp-quote
(tutorial--key-description
(nth 1 kdf))))