(backward-sentence [?\M-a])
(forward-sentence [?\M-e])
+ (newline "\r")
(beginning-of-buffer [?\M-<])
(end-of-buffer [?\M->])
;; C-u 8 * to insert ********.
(delete-backward-char [backspace])
+ (delete-backward-char "\d")
(delete-char [?\C-d])
(backward-kill-word [(meta backspace)])
;;(tutorial-arg (button-get button 'tutorial-arg))
(explain-key-desc (button-get button 'explain-key-desc))
(changed-keys (with-current-buffer tutorial-buffer
- (tutorial--find-changed-keys tutorial--default-keys))))
+ (save-excursion
+ (goto-char (point-min))
+ (tutorial--find-changed-keys
+ tutorial--default-keys)))))
(when changed-keys
(insert
"The following key bindings used in the tutorial had been changed
(when (listp where)
(setq where "list"))
;; Tell where the old binding is now:
- (insert (format " %-11s " where))
+ (insert (format " %-11s "
+ (if (string= "" where)
+ (format "M-x %s" def-fun-txt)
+ where)))
;; Insert a link with more information, for example
;; current binding and keymap or information about
;; cua-mode replacements:
(let ((here (point))
(case-fold-search nil)
(key-desc (key-description key)))
+ (cond ((string= "ESC" key-desc)
+ (setq key-desc "<ESC>"))
+ ((string= "RET" key-desc)
+ (setq key-desc "<Return>"))
+ ((string= "DEL" key-desc)
+ (setq key-desc "<Delback>")))
(while (re-search-forward
- (concat (regexp-quote key-desc)
- "[[:space:]]") nil t)
- (put-text-property (match-beginning 0)
- (match-end 0)
+ (concat "[[:space:]]\\("
+ (regexp-quote key-desc)
+ "\\)[[:space:]]") nil t)
+ (put-text-property (match-beginning 1)
+ (match-end 1)
'tutorial-remark 'only-colored)
- (put-text-property (match-beginning 0)
- (match-end 0)
+ (put-text-property (match-beginning 1)
+ (match-end 1)
'face 'tutorial-warning-face)
(forward-line)
(let ((s (get-lang-string tutorial--lang 'tut-chgdkey))