2021-03-21 01:26:37 +00:00
|
|
|
;;; tutorial.el --- tutorial for Emacs -*- lexical-binding: t -*-
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2022-01-01 07:45:51 +00:00
|
|
|
;; Copyright (C) 2006-2022 Free Software Foundation, Inc.
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2019-05-25 20:43:06 +00:00
|
|
|
;; Maintainer: emacs-devel@gnu.org
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Keywords: help, internal
|
2010-08-29 16:17:13 +00:00
|
|
|
;; Package: emacs
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2006-10-30 14:30:59 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; Code for running the Emacs tutorial.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'help-mode) ;; for function help-buffer
|
|
|
|
|
2006-11-20 20:43:36 +00:00
|
|
|
(defface tutorial-warning-face
|
2006-12-21 17:26:00 +00:00
|
|
|
'((t :inherit font-lock-warning-face))
|
2006-11-20 20:43:36 +00:00
|
|
|
"Face used to highlight warnings in the tutorial."
|
2006-12-21 17:26:00 +00:00
|
|
|
:group 'help)
|
2006-11-20 20:43:36 +00:00
|
|
|
|
Prefer defvar-local in remaining libraries
* lisp/align.el (align-mode-rules-list)
(align-mode-exclude-rules-list):
* lisp/bookmark.el (bookmark-current-bookmark)
(bookmark-annotation-name)
(bookmark--annotation-from-bookmark-list):
* lisp/calc/calc-embed.el (calc-embedded-all-active)
(calc-embedded-some-active):
* lisp/comint.el (comint-password-function):
* lisp/completion.el (completion-syntax-table):
* lisp/dframe.el (dframe-track-mouse-function)
(dframe-help-echo-function, dframe-mouse-click-function)
(dframe-mouse-position-function, dframe-timer)
(dframe-attached-frame, dframe-controlled):
* lisp/ehelp.el (electric-help-orig-major-mode):
* lisp/eshell/esh-util.el (eshell-path-env):
* lisp/expand.el (expand-pos, expand-index, expand-point):
* lisp/face-remap.el (text-scale-mode-remapping)
(text-scale-mode-lighter, text-scale-mode-amount)
(text-scale-remap-header-line, buffer-face-mode-remapping):
* lisp/ffap.el (ffap-menu-alist):
* lisp/files-x.el (connection-local-variables-alist):
* lisp/foldout.el (foldout-fold-list, foldout-mode-line-string):
* lisp/follow.el (follow-start-end-invalid):
* lisp/forms.el (forms--mode-setup):
* lisp/gnus/message.el (message-cross-post-old-target)
(message-options):
* lisp/help-mode.el (help-xref-stack, help-xref-forward-stack)
(help-xref-stack-item, help-xref-stack-forward-item):
* lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay):
* lisp/hilit-chg.el (hilit-chg-string):
* lisp/ido.el (ido-eoinput):
* lisp/imenu.el (imenu-generic-expression)
(imenu-create-index-function, imenu-default-goto-function)
(imenu-prev-index-position-function)
(imenu-extract-index-name-function, imenu-name-lookup-function)
(imenu-syntax-alist, imenu-case-fold-search):
* lisp/jka-compr.el (jka-compr-really-do-compress):
* lisp/language/ethio-util.el (ethio-prefer-ascii-space):
* lisp/leim/quail/hangul.el (hangul-input-method-help-text):
* lisp/leim/quail/japanese.el (quail-japanese-package-saved):
* lisp/linum.el (linum-overlays, linum-available):
* lisp/man.el (Man-original-frame, Man-arguments, Man--sections)
(Man--refpages, Man-page-list, Man-current-page)
(Man-page-mode-string):
* lisp/pcomplete.el (pcomplete-current-completions)
(pcomplete-last-completion-length)
(pcomplete-last-completion-stub, pcomplete-last-completion-raw)
(pcomplete-last-window-config, pcomplete-window-restore-timer):
* lisp/reveal.el (reveal-open-spots, reveal-last-tick):
* lisp/ruler-mode.el (ruler-mode):
* lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save):
* lisp/server.el (server-buffer-clients, server-existing-buffer):
* lisp/tab-line.el (tab-line-exclude):
* lisp/tar-mode.el (tar-data-buffer, tar-data-swapped):
* lisp/thumbs.el (thumbs-current-tmp-filename)
(thumbs-current-image-filename, thumbs-extra-images)
(thumbs-image-num, thumbs-buffer, thumbs-marked-list):
* lisp/tutorial.el (tutorial--point-before-chkeys)
(tutorial--point-after-chkeys, tutorial--lang):
* lisp/url/url-vars.el (url-current-object)
(url-current-mime-headers, url-current-lastloc):
* lisp/view.el (view-mode, view-old-buffer-read-only)
(view-old-Helper-return-blurb, view-page-size)
(view-half-page-size, view-last-regexp, view-return-to-alist)
(view-exit-action, view-overlay):
* lisp/wid-edit.el (widget-global-map, widget-field-new)
(widget-field-list, widget-field-last, widget-field-was):
* lisp/woman.el (woman-imenu-done): Prefer defvar-local.
2021-02-02 08:55:40 +00:00
|
|
|
(defvar-local tutorial--point-before-chkeys 0
|
2006-10-30 14:52:56 +00:00
|
|
|
"Point before display of key changes.")
|
|
|
|
|
Prefer defvar-local in remaining libraries
* lisp/align.el (align-mode-rules-list)
(align-mode-exclude-rules-list):
* lisp/bookmark.el (bookmark-current-bookmark)
(bookmark-annotation-name)
(bookmark--annotation-from-bookmark-list):
* lisp/calc/calc-embed.el (calc-embedded-all-active)
(calc-embedded-some-active):
* lisp/comint.el (comint-password-function):
* lisp/completion.el (completion-syntax-table):
* lisp/dframe.el (dframe-track-mouse-function)
(dframe-help-echo-function, dframe-mouse-click-function)
(dframe-mouse-position-function, dframe-timer)
(dframe-attached-frame, dframe-controlled):
* lisp/ehelp.el (electric-help-orig-major-mode):
* lisp/eshell/esh-util.el (eshell-path-env):
* lisp/expand.el (expand-pos, expand-index, expand-point):
* lisp/face-remap.el (text-scale-mode-remapping)
(text-scale-mode-lighter, text-scale-mode-amount)
(text-scale-remap-header-line, buffer-face-mode-remapping):
* lisp/ffap.el (ffap-menu-alist):
* lisp/files-x.el (connection-local-variables-alist):
* lisp/foldout.el (foldout-fold-list, foldout-mode-line-string):
* lisp/follow.el (follow-start-end-invalid):
* lisp/forms.el (forms--mode-setup):
* lisp/gnus/message.el (message-cross-post-old-target)
(message-options):
* lisp/help-mode.el (help-xref-stack, help-xref-forward-stack)
(help-xref-stack-item, help-xref-stack-forward-item):
* lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay):
* lisp/hilit-chg.el (hilit-chg-string):
* lisp/ido.el (ido-eoinput):
* lisp/imenu.el (imenu-generic-expression)
(imenu-create-index-function, imenu-default-goto-function)
(imenu-prev-index-position-function)
(imenu-extract-index-name-function, imenu-name-lookup-function)
(imenu-syntax-alist, imenu-case-fold-search):
* lisp/jka-compr.el (jka-compr-really-do-compress):
* lisp/language/ethio-util.el (ethio-prefer-ascii-space):
* lisp/leim/quail/hangul.el (hangul-input-method-help-text):
* lisp/leim/quail/japanese.el (quail-japanese-package-saved):
* lisp/linum.el (linum-overlays, linum-available):
* lisp/man.el (Man-original-frame, Man-arguments, Man--sections)
(Man--refpages, Man-page-list, Man-current-page)
(Man-page-mode-string):
* lisp/pcomplete.el (pcomplete-current-completions)
(pcomplete-last-completion-length)
(pcomplete-last-completion-stub, pcomplete-last-completion-raw)
(pcomplete-last-window-config, pcomplete-window-restore-timer):
* lisp/reveal.el (reveal-open-spots, reveal-last-tick):
* lisp/ruler-mode.el (ruler-mode):
* lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save):
* lisp/server.el (server-buffer-clients, server-existing-buffer):
* lisp/tab-line.el (tab-line-exclude):
* lisp/tar-mode.el (tar-data-buffer, tar-data-swapped):
* lisp/thumbs.el (thumbs-current-tmp-filename)
(thumbs-current-image-filename, thumbs-extra-images)
(thumbs-image-num, thumbs-buffer, thumbs-marked-list):
* lisp/tutorial.el (tutorial--point-before-chkeys)
(tutorial--point-after-chkeys, tutorial--lang):
* lisp/url/url-vars.el (url-current-object)
(url-current-mime-headers, url-current-lastloc):
* lisp/view.el (view-mode, view-old-buffer-read-only)
(view-old-Helper-return-blurb, view-page-size)
(view-half-page-size, view-last-regexp, view-return-to-alist)
(view-exit-action, view-overlay):
* lisp/wid-edit.el (widget-global-map, widget-field-new)
(widget-field-list, widget-field-last, widget-field-was):
* lisp/woman.el (woman-imenu-done): Prefer defvar-local.
2021-02-02 08:55:40 +00:00
|
|
|
(defvar-local tutorial--point-after-chkeys 0
|
2006-10-30 14:52:56 +00:00
|
|
|
"Point after display of key changes.")
|
|
|
|
|
Prefer defvar-local in remaining libraries
* lisp/align.el (align-mode-rules-list)
(align-mode-exclude-rules-list):
* lisp/bookmark.el (bookmark-current-bookmark)
(bookmark-annotation-name)
(bookmark--annotation-from-bookmark-list):
* lisp/calc/calc-embed.el (calc-embedded-all-active)
(calc-embedded-some-active):
* lisp/comint.el (comint-password-function):
* lisp/completion.el (completion-syntax-table):
* lisp/dframe.el (dframe-track-mouse-function)
(dframe-help-echo-function, dframe-mouse-click-function)
(dframe-mouse-position-function, dframe-timer)
(dframe-attached-frame, dframe-controlled):
* lisp/ehelp.el (electric-help-orig-major-mode):
* lisp/eshell/esh-util.el (eshell-path-env):
* lisp/expand.el (expand-pos, expand-index, expand-point):
* lisp/face-remap.el (text-scale-mode-remapping)
(text-scale-mode-lighter, text-scale-mode-amount)
(text-scale-remap-header-line, buffer-face-mode-remapping):
* lisp/ffap.el (ffap-menu-alist):
* lisp/files-x.el (connection-local-variables-alist):
* lisp/foldout.el (foldout-fold-list, foldout-mode-line-string):
* lisp/follow.el (follow-start-end-invalid):
* lisp/forms.el (forms--mode-setup):
* lisp/gnus/message.el (message-cross-post-old-target)
(message-options):
* lisp/help-mode.el (help-xref-stack, help-xref-forward-stack)
(help-xref-stack-item, help-xref-stack-forward-item):
* lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay):
* lisp/hilit-chg.el (hilit-chg-string):
* lisp/ido.el (ido-eoinput):
* lisp/imenu.el (imenu-generic-expression)
(imenu-create-index-function, imenu-default-goto-function)
(imenu-prev-index-position-function)
(imenu-extract-index-name-function, imenu-name-lookup-function)
(imenu-syntax-alist, imenu-case-fold-search):
* lisp/jka-compr.el (jka-compr-really-do-compress):
* lisp/language/ethio-util.el (ethio-prefer-ascii-space):
* lisp/leim/quail/hangul.el (hangul-input-method-help-text):
* lisp/leim/quail/japanese.el (quail-japanese-package-saved):
* lisp/linum.el (linum-overlays, linum-available):
* lisp/man.el (Man-original-frame, Man-arguments, Man--sections)
(Man--refpages, Man-page-list, Man-current-page)
(Man-page-mode-string):
* lisp/pcomplete.el (pcomplete-current-completions)
(pcomplete-last-completion-length)
(pcomplete-last-completion-stub, pcomplete-last-completion-raw)
(pcomplete-last-window-config, pcomplete-window-restore-timer):
* lisp/reveal.el (reveal-open-spots, reveal-last-tick):
* lisp/ruler-mode.el (ruler-mode):
* lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save):
* lisp/server.el (server-buffer-clients, server-existing-buffer):
* lisp/tab-line.el (tab-line-exclude):
* lisp/tar-mode.el (tar-data-buffer, tar-data-swapped):
* lisp/thumbs.el (thumbs-current-tmp-filename)
(thumbs-current-image-filename, thumbs-extra-images)
(thumbs-image-num, thumbs-buffer, thumbs-marked-list):
* lisp/tutorial.el (tutorial--point-before-chkeys)
(tutorial--point-after-chkeys, tutorial--lang):
* lisp/url/url-vars.el (url-current-object)
(url-current-mime-headers, url-current-lastloc):
* lisp/view.el (view-mode, view-old-buffer-read-only)
(view-old-Helper-return-blurb, view-page-size)
(view-half-page-size, view-last-regexp, view-return-to-alist)
(view-exit-action, view-overlay):
* lisp/wid-edit.el (widget-global-map, widget-field-new)
(widget-field-list, widget-field-last, widget-field-was):
* lisp/woman.el (woman-imenu-done): Prefer defvar-local.
2021-02-02 08:55:40 +00:00
|
|
|
(defvar-local tutorial--lang nil
|
2006-10-30 14:52:56 +00:00
|
|
|
"Tutorial language.")
|
|
|
|
|
2020-12-12 12:46:33 +00:00
|
|
|
(defvar tutorial--buffer nil
|
|
|
|
"The selected tutorial buffer.")
|
|
|
|
|
2006-10-30 14:56:44 +00:00
|
|
|
(defun tutorial--describe-nonstandard-key (value)
|
|
|
|
"Give more information about a changed key binding.
|
|
|
|
This is used in `help-with-tutorial'. The information includes
|
|
|
|
the key sequence that no longer has a default binding, the
|
|
|
|
default binding and the current binding. It also tells in what
|
|
|
|
keymap the new binding has been done and how to access the
|
|
|
|
function in the default binding from the keyboard.
|
|
|
|
|
|
|
|
For `cua-mode' key bindings that try to combine CUA key bindings
|
|
|
|
with default Emacs bindings information about this is shown.
|
|
|
|
|
|
|
|
VALUE should have either of these formats:
|
|
|
|
|
2015-09-17 23:08:20 +00:00
|
|
|
(cua-mode)
|
|
|
|
(current-binding KEY-FUN DEF-FUN KEY WHERE)
|
2006-10-30 14:56:44 +00:00
|
|
|
|
|
|
|
Where
|
|
|
|
KEY is a key sequence whose standard binding has been changed
|
|
|
|
KEY-FUN is the actual binding for KEY
|
|
|
|
DEF-FUN is the standard binding of KEY
|
|
|
|
WHERE is a text describing the key sequences to which DEF-FUN is
|
|
|
|
bound now (or, if it is remapped, a key sequence
|
|
|
|
for the function it is remapped to)"
|
|
|
|
(with-output-to-temp-buffer (help-buffer)
|
|
|
|
(help-setup-xref (list #'tutorial--describe-nonstandard-key value)
|
2009-10-02 03:48:36 +00:00
|
|
|
(called-interactively-p 'interactive))
|
2006-10-30 14:56:44 +00:00
|
|
|
(with-current-buffer (help-buffer)
|
|
|
|
(insert
|
|
|
|
"Your Emacs customizations override the default binding for this key:"
|
|
|
|
"\n\n")
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(cond
|
|
|
|
((eq (car value) 'cua-mode)
|
|
|
|
(insert
|
|
|
|
"CUA mode is enabled.
|
|
|
|
|
|
|
|
When CUA mode is enabled, you can use C-z, C-x, C-c, and C-v to
|
|
|
|
undo, cut, copy, and paste in addition to the normal Emacs
|
|
|
|
bindings. The C-x and C-c keys only do cut and copy when the
|
|
|
|
region is active, so in most cases, they do not conflict with the
|
|
|
|
normal function of these prefix keys.
|
|
|
|
|
|
|
|
If you really need to perform a command which starts with one of
|
|
|
|
the prefix keys even when the region is active, you have three
|
|
|
|
options:
|
|
|
|
- press the prefix key twice very quickly (within 0.2 seconds),
|
|
|
|
- press the prefix key and the following key within 0.2 seconds, or
|
|
|
|
- use the SHIFT key with the prefix key, i.e. C-S-x or C-S-c."))
|
|
|
|
((eq (car value) 'current-binding)
|
|
|
|
(let ((cb (nth 1 value))
|
|
|
|
(db (nth 2 value))
|
|
|
|
(key (nth 3 value))
|
|
|
|
(where (nth 4 value))
|
|
|
|
map
|
|
|
|
(maps (current-active-maps))
|
|
|
|
mapsym)
|
|
|
|
;; Look at the currently active keymaps and try to find
|
|
|
|
;; first the keymap where the current binding occurs:
|
|
|
|
(while maps
|
|
|
|
(let* ((m (car maps))
|
|
|
|
(mb (lookup-key m key t)))
|
|
|
|
(setq maps (cdr maps))
|
|
|
|
(when (eq mb cb)
|
|
|
|
(setq map m)
|
|
|
|
(setq maps nil))))
|
|
|
|
;; Now, if a keymap was found we must found the symbol
|
|
|
|
;; name for it to display to the user. This can not
|
|
|
|
;; always be found since all keymaps does not have a
|
|
|
|
;; symbol pointing to them, but here they should have
|
|
|
|
;; that:
|
|
|
|
(when map
|
|
|
|
(mapatoms (lambda (s)
|
|
|
|
(and
|
|
|
|
;; If not already found
|
|
|
|
(not mapsym)
|
|
|
|
;; and if s is a keymap
|
|
|
|
(and (boundp s)
|
|
|
|
(keymapp (symbol-value s)))
|
|
|
|
;; and not the local symbol map
|
|
|
|
(not (eq s 'map))
|
|
|
|
;; and the value of s is map
|
|
|
|
(eq map (symbol-value s))
|
|
|
|
;; then save this value in mapsym
|
|
|
|
(setq mapsym s)))))
|
2015-08-19 16:40:33 +00:00
|
|
|
(insert
|
2015-09-17 19:02:55 +00:00
|
|
|
(format-message
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
"The default Emacs binding for the key %s is the command `%s'. "
|
2015-08-19 16:40:33 +00:00
|
|
|
(key-description key)
|
|
|
|
db))
|
|
|
|
(insert "However, your customizations have "
|
2009-07-08 02:37:11 +00:00
|
|
|
(if cb
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
(format-message "rebound it to the command `%s'" cb)
|
2009-07-08 02:37:11 +00:00
|
|
|
"unbound it"))
|
|
|
|
(insert ".")
|
2006-10-30 14:56:44 +00:00
|
|
|
(when mapsym
|
|
|
|
(insert " (For the more advanced user:"
|
More-conservative ‘format’ quote restyling
Instead of restyling curved quotes for every call to ‘format’,
create a new function ‘format-message’ that does the restyling,
and using the new function instead of ‘format’ only in contexts
where this seems appropriate.
Problem reported by Dmitry Gutov and Andreas Schwab in:
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00826.html
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00827.html
* doc/lispref/commands.texi (Using Interactive):
* doc/lispref/control.texi (Signaling Errors, Signaling Errors):
* doc/lispref/display.texi (Displaying Messages, Progress):
* doc/lispref/elisp.texi:
* doc/lispref/help.texi (Keys in Documentation):
* doc/lispref/minibuf.texi (Minibuffer Misc):
* doc/lispref/strings.texi (Formatting Strings):
* etc/NEWS:
Document the changes.
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/apropos.el (apropos-library):
* lisp/calc/calc-ext.el (calc-record-message)
(calc-user-function-list):
* lisp/calc/calc-help.el (calc-describe-key, calc-full-help):
* lisp/calc/calc-lang.el (math-read-big-balance):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--add-diary-entry):
* lisp/cedet/mode-local.el (mode-local-print-binding)
(mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-completion-message):
* lisp/cedet/semantic/edit.el (semantic-parse-changes-failed):
* lisp/cedet/semantic/wisent/comp.el (wisent-log):
* lisp/cedet/srecode/insert.el (srecode-insert-show-error-report):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dframe.el (dframe-message):
* lisp/dired-aux.el (dired-query):
* lisp/emacs-lisp/byte-opt.el (byte-compile-log-lap-1):
* lisp/emacs-lisp/bytecomp.el (byte-compile-log)
(byte-compile-log-file, byte-compile-warn, byte-compile-form):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
(cconv-analyze-form):
* lisp/emacs-lisp/check-declare.el (check-declare-warn):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet):
* lisp/emacs-lisp/edebug.el (edebug-format):
* lisp/emacs-lisp/eieio-core.el (eieio-oref):
* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message)
(eldoc-message):
* lisp/emacs-lisp/elint.el (elint-file, elint-log):
* lisp/emacs-lisp/find-func.el (find-function-library):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring):
* lisp/emacs-lisp/package.el (package-compute-transaction)
(package-install-button-action, package-delete-button-action)
(package-menu--list-to-prompt):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emacs-lisp/warnings.el (lwarn, warn):
* lisp/emulation/viper-cmd.el:
(viper-toggle-parse-sexp-ignore-comments)
(viper-kill-buffer, viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/facemenu.el (facemenu-add-new-face):
* lisp/faces.el (face-documentation, read-face-name)
(face-read-string, read-face-font, describe-face):
* lisp/files.el (find-alternate-file, hack-local-variables)
(hack-one-local-variable--obsolete, write-file)
(basic-save-buffer, delete-directory):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--obsolete)
(help-fns--interactive-only, describe-function-1)
(describe-variable):
* lisp/help.el (describe-mode):
* lisp/info-xref.el (info-xref-output):
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
* lisp/international/kkc.el (kkc-error):
* lisp/international/mule-cmds.el:
(select-safe-coding-system-interactively)
(select-safe-coding-system, describe-input-method):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/international/quail.el (quail-error):
* lisp/minibuffer.el (minibuffer-message):
* lisp/mpc.el (mpc--debug):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-message):
* lisp/net/gnutls.el (gnutls-message-maybe):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/nsm.el (nsm-query-user):
* lisp/net/rlogin.el (rlogin):
* lisp/net/soap-client.el (soap-warning):
* lisp/net/tramp.el (tramp-debug-message):
* lisp/nxml/nxml-outln.el (nxml-report-outline-error):
* lisp/nxml/nxml-parse.el (nxml-parse-error):
* lisp/nxml/rng-cmpct.el (rng-c-error):
* lisp/nxml/rng-match.el (rng-compile-error):
* lisp/nxml/rng-uri.el (rng-uri-error):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/org/org-ctags.el:
(org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/proced.el (proced-log):
* lisp/progmodes/ebnf2ps.el (ebnf-log):
* lisp/progmodes/flymake.el (flymake-log):
* lisp/progmodes/vhdl-mode.el (vhdl-warning-when-idle):
* lisp/replace.el (occur-1):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, define-alternatives):
* lisp/startup.el (command-line):
* lisp/subr.el (error, user-error, add-to-list):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* src/callint.c (Fcall_interactively):
* src/editfns.c (Fmessage, Fmessage_box):
Restyle the quotes of format strings intended for use as a
diagnostic, when restyling seems appropriate.
* lisp/subr.el (format-message): New function.
* src/doc.c (Finternal__text_restyle): New function.
(syms_of_doc): Define it.
2015-08-24 05:38:02 +00:00
|
|
|
(format-message
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
" This binding is in the keymap `%s'.)" mapsym)))
|
2006-10-30 14:56:44 +00:00
|
|
|
(if (string= where "")
|
|
|
|
(unless (keymapp db)
|
|
|
|
(insert "\n\nYou can use M-x "
|
|
|
|
(format "%s" db)
|
|
|
|
" RET instead."))
|
2007-01-03 12:05:49 +00:00
|
|
|
(insert "\n\nWith your current key bindings"
|
2007-02-28 03:19:55 +00:00
|
|
|
" you can use "
|
2013-08-11 00:07:48 +00:00
|
|
|
(if (string-match-p "^the .*menus?$" where)
|
2007-02-28 03:19:55 +00:00
|
|
|
""
|
2007-06-07 06:59:46 +00:00
|
|
|
"the key")
|
2006-10-30 14:56:44 +00:00
|
|
|
where
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
(format-message " to get the function `%s'." db))))
|
2006-10-30 14:56:44 +00:00
|
|
|
(fill-region (point-min) (point)))))
|
2009-08-21 07:24:26 +00:00
|
|
|
(help-print-return-message))))
|
2006-10-30 14:56:44 +00:00
|
|
|
|
|
|
|
(defun tutorial--sort-keys (left right)
|
|
|
|
"Sort predicate for use with `tutorial--default-keys'.
|
|
|
|
This is a predicate function to `sort'.
|
|
|
|
|
|
|
|
The sorting is for presentation purpose only and is done on the
|
|
|
|
key sequence.
|
|
|
|
|
|
|
|
LEFT and RIGHT are the elements to compare."
|
|
|
|
(let ((x (append (cadr left) nil))
|
|
|
|
(y (append (cadr right) nil)))
|
|
|
|
;; Skip the front part of the key sequences if they are equal:
|
|
|
|
(while (and x y
|
|
|
|
(listp x) (listp y)
|
|
|
|
(equal (car x) (car y)))
|
|
|
|
(setq x (cdr x))
|
|
|
|
(setq y (cdr y)))
|
2011-11-26 08:26:37 +00:00
|
|
|
;; Try to make a comparison that is useful for presentation (this
|
2006-10-30 14:56:44 +00:00
|
|
|
;; could be made nicer perhaps):
|
|
|
|
(let ((cx (car x))
|
|
|
|
(cy (car y)))
|
|
|
|
;;(message "x=%s, y=%s;;;; cx=%s, cy=%s" x y cx cy)
|
|
|
|
(cond
|
|
|
|
;; Lists? Then call this again
|
|
|
|
((and cx cy
|
|
|
|
(listp cx)
|
|
|
|
(listp cy))
|
|
|
|
(tutorial--sort-keys cx cy))
|
|
|
|
;; Are both numbers? Then just compare them
|
|
|
|
((and (wholenump cx)
|
|
|
|
(wholenump cy))
|
|
|
|
(> cx cy))
|
|
|
|
;; Is one of them a number? Let that be bigger then.
|
|
|
|
((wholenump cx)
|
|
|
|
t)
|
|
|
|
((wholenump cy)
|
|
|
|
nil)
|
|
|
|
;; Are both symbols? Compare the names then.
|
|
|
|
((and (symbolp cx)
|
|
|
|
(symbolp cy))
|
|
|
|
(string< (symbol-name cy)
|
2006-12-21 17:26:00 +00:00
|
|
|
(symbol-name cx)))))))
|
2006-10-30 14:56:44 +00:00
|
|
|
|
2006-10-30 14:52:56 +00:00
|
|
|
(defconst tutorial--default-keys
|
2014-09-02 06:48:20 +00:00
|
|
|
;; On window system, `suspend-emacs' is replaced in the default keymap.
|
2007-10-06 22:17:16 +00:00
|
|
|
(let* ((suspend-emacs 'suspend-frame)
|
2006-10-30 14:52:56 +00:00
|
|
|
(default-keys
|
2014-09-02 06:48:20 +00:00
|
|
|
;; The first few are not mentioned but are basic:
|
2006-12-21 17:26:00 +00:00
|
|
|
`((ESC-prefix [27])
|
2006-10-30 14:52:56 +00:00
|
|
|
(Control-X-prefix [?\C-x])
|
|
|
|
(mode-specific-command-prefix [?\C-c])
|
2007-09-22 23:55:29 +00:00
|
|
|
(save-buffers-kill-terminal [?\C-x ?\C-c])
|
2006-10-30 14:52:56 +00:00
|
|
|
|
|
|
|
;; * SUMMARY
|
2010-04-14 00:33:32 +00:00
|
|
|
(scroll-up-command [?\C-v])
|
|
|
|
(scroll-down-command [?\M-v])
|
2008-03-09 16:18:07 +00:00
|
|
|
(recenter-top-bottom [?\C-l])
|
2006-10-30 14:52:56 +00:00
|
|
|
|
|
|
|
;; * BASIC CURSOR CONTROL
|
|
|
|
(forward-char [?\C-f])
|
|
|
|
(backward-char [?\C-b])
|
|
|
|
(forward-word [?\M-f])
|
|
|
|
(backward-word [?\M-b])
|
|
|
|
(next-line [?\C-n])
|
|
|
|
(previous-line [?\C-p])
|
|
|
|
(move-beginning-of-line [?\C-a])
|
|
|
|
(move-end-of-line [?\C-e])
|
|
|
|
(backward-sentence [?\M-a])
|
|
|
|
(forward-sentence [?\M-e])
|
2006-11-21 16:11:30 +00:00
|
|
|
(newline "\r")
|
2006-10-30 14:52:56 +00:00
|
|
|
(beginning-of-buffer [?\M-<])
|
|
|
|
(end-of-buffer [?\M->])
|
|
|
|
(universal-argument [?\C-u])
|
|
|
|
|
|
|
|
;; * WHEN EMACS IS HUNG
|
|
|
|
(keyboard-quit [?\C-g])
|
|
|
|
|
|
|
|
;; * DISABLED COMMANDS
|
|
|
|
(downcase-region [?\C-x ?\C-l])
|
|
|
|
|
|
|
|
;; * WINDOWS
|
|
|
|
(delete-other-windows [?\C-x ?1])
|
|
|
|
;; C-u 0 C-l
|
|
|
|
;; Type CONTROL-h k CONTROL-f.
|
|
|
|
|
|
|
|
;; * INSERTING AND DELETING
|
|
|
|
;; C-u 8 * to insert ********.
|
2006-11-21 16:11:30 +00:00
|
|
|
(delete-backward-char "\d")
|
2011-08-20 22:41:41 +00:00
|
|
|
(delete-char [?\C-d])
|
2007-01-28 07:08:51 +00:00
|
|
|
(backward-kill-word [?\M-\d])
|
2006-10-30 14:52:56 +00:00
|
|
|
(kill-word [?\M-d])
|
|
|
|
(kill-line [?\C-k])
|
|
|
|
(kill-sentence [?\M-k])
|
|
|
|
(set-mark-command [?\C-@])
|
|
|
|
(set-mark-command [?\C- ])
|
|
|
|
(kill-region [?\C-w])
|
|
|
|
(yank [?\C-y])
|
|
|
|
(yank-pop [?\M-y])
|
|
|
|
|
|
|
|
;; * UNDO
|
2009-09-11 00:58:59 +00:00
|
|
|
(undo [?\C-x ?u])
|
2006-10-30 14:52:56 +00:00
|
|
|
|
|
|
|
;; * FILES
|
|
|
|
(find-file [?\C-x ?\C-f])
|
|
|
|
(save-buffer [?\C-x ?\C-s])
|
|
|
|
|
|
|
|
;; * BUFFERS
|
|
|
|
(list-buffers [?\C-x ?\C-b])
|
|
|
|
(switch-to-buffer [?\C-x ?b])
|
|
|
|
(save-some-buffers [?\C-x ?s])
|
|
|
|
|
|
|
|
;; * EXTENDING THE COMMAND SET
|
|
|
|
;; C-x Character eXtend. Followed by one character.
|
|
|
|
(execute-extended-command [?\M-x])
|
|
|
|
;; C-x C-f Find file
|
|
|
|
;; C-x C-s Save file
|
|
|
|
;; C-x s Save some buffers
|
|
|
|
;; C-x C-b List buffers
|
|
|
|
;; C-x b Switch buffer
|
|
|
|
;; C-x C-c Quit Emacs
|
|
|
|
;; C-x 1 Delete all but one window
|
|
|
|
;; C-x u Undo
|
|
|
|
|
|
|
|
;; * MODE LINE
|
|
|
|
(describe-mode [?\C-h ?m])
|
|
|
|
(set-fill-column [?\C-x ?f])
|
2007-10-18 00:07:24 +00:00
|
|
|
(fill-paragraph [?\M-q])
|
2006-10-30 14:52:56 +00:00
|
|
|
|
|
|
|
;; * SEARCHING
|
|
|
|
(isearch-forward [?\C-s])
|
|
|
|
(isearch-backward [?\C-r])
|
|
|
|
|
|
|
|
;; * MULTIPLE WINDOWS
|
2011-10-30 01:56:03 +00:00
|
|
|
(split-window-below [?\C-x ?2])
|
2006-10-30 14:52:56 +00:00
|
|
|
(scroll-other-window [?\C-\M-v])
|
|
|
|
(other-window [?\C-x ?o])
|
|
|
|
(find-file-other-window [?\C-x ?4 ?\C-f])
|
|
|
|
|
|
|
|
;; * RECURSIVE EDITING LEVELS
|
|
|
|
(keyboard-escape-quit [27 27 27])
|
|
|
|
|
|
|
|
;; * GETTING MORE HELP
|
|
|
|
;; The most basic HELP feature is C-h c
|
|
|
|
(describe-key-briefly [?\C-h ?c])
|
|
|
|
(describe-key [?\C-h ?k])
|
|
|
|
|
|
|
|
;; * MORE FEATURES
|
|
|
|
;; F10
|
|
|
|
|
|
|
|
;; * CONCLUSION
|
|
|
|
;;(iconify-or-deiconify-frame [?\C-z])
|
2006-12-21 17:26:00 +00:00
|
|
|
(,suspend-emacs [?\C-z]))))
|
2006-10-30 14:52:56 +00:00
|
|
|
(sort default-keys 'tutorial--sort-keys))
|
|
|
|
"Default Emacs key bindings that the tutorial depends on.")
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
(defun tutorial--detailed-help (button)
|
|
|
|
"Give detailed help about changed keys."
|
|
|
|
(with-output-to-temp-buffer (help-buffer)
|
|
|
|
(help-setup-xref (list #'tutorial--detailed-help button)
|
2009-10-02 03:48:36 +00:00
|
|
|
(called-interactively-p 'interactive))
|
2006-10-30 14:30:59 +00:00
|
|
|
(with-current-buffer (help-buffer)
|
|
|
|
(let* ((tutorial-buffer (button-get button 'tutorial-buffer))
|
|
|
|
(explain-key-desc (button-get button 'explain-key-desc))
|
|
|
|
(changed-keys (with-current-buffer tutorial-buffer
|
2006-11-21 16:11:30 +00:00
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(tutorial--find-changed-keys
|
|
|
|
tutorial--default-keys)))))
|
2006-10-30 14:30:59 +00:00
|
|
|
(when changed-keys
|
|
|
|
(insert
|
2007-01-30 23:47:57 +00:00
|
|
|
"The following key bindings used in the tutorial have been changed
|
|
|
|
from the Emacs default:\n\n" )
|
|
|
|
(let ((frm " %-14s %-27s %-16s\n"))
|
|
|
|
(insert (format frm
|
|
|
|
"Standard Key" "Command" "In Your Emacs")))
|
2006-10-30 14:30:59 +00:00
|
|
|
(dolist (tk changed-keys)
|
|
|
|
(let* ((def-fun (nth 1 tk))
|
|
|
|
(key (nth 0 tk))
|
|
|
|
(def-fun-txt (nth 2 tk))
|
|
|
|
(where (nth 3 tk))
|
|
|
|
(remark (nth 4 tk))
|
|
|
|
(key-txt (key-description key))
|
2013-08-11 00:07:48 +00:00
|
|
|
(key-fun (with-current-buffer tutorial-buffer (key-binding key))))
|
2006-10-30 14:30:59 +00:00
|
|
|
(unless (eq def-fun key-fun)
|
|
|
|
;; Insert key binding description:
|
|
|
|
(when (string= key-txt explain-key-desc)
|
2006-11-20 20:43:36 +00:00
|
|
|
(put-text-property 0 (length key-txt)
|
|
|
|
'face 'tutorial-warning-face key-txt))
|
2006-10-30 14:30:59 +00:00
|
|
|
(insert " " key-txt " ")
|
2007-01-30 23:47:57 +00:00
|
|
|
(indent-to 18)
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Insert a link describing the old binding:
|
|
|
|
(insert-button def-fun-txt
|
|
|
|
'value def-fun
|
|
|
|
'action
|
2007-01-30 23:47:57 +00:00
|
|
|
(lambda (button) (interactive)
|
2006-10-30 14:30:59 +00:00
|
|
|
(describe-function
|
|
|
|
(button-get button 'value)))
|
|
|
|
'follow-link t)
|
2007-01-30 23:47:57 +00:00
|
|
|
(indent-to 45)
|
2006-10-30 14:30:59 +00:00
|
|
|
(when (listp where)
|
|
|
|
(setq where "list"))
|
|
|
|
;; Tell where the old binding is now:
|
2007-01-30 23:47:57 +00:00
|
|
|
(insert (format " %-16s "
|
2006-11-21 16:11:30 +00:00
|
|
|
(if (string= "" where)
|
|
|
|
(format "M-x %s" def-fun-txt)
|
|
|
|
where)))
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Insert a link with more information, for example
|
|
|
|
;; current binding and keymap or information about
|
|
|
|
;; cua-mode replacements:
|
|
|
|
(insert-button (car remark)
|
|
|
|
'action
|
2007-01-30 23:47:57 +00:00
|
|
|
(lambda (b) (interactive)
|
2006-10-30 14:30:59 +00:00
|
|
|
(let ((value (button-get b 'value)))
|
|
|
|
(tutorial--describe-nonstandard-key value)))
|
|
|
|
'value (cdr remark)
|
|
|
|
'follow-link t)
|
|
|
|
(insert "\n")))))
|
|
|
|
|
|
|
|
(insert "
|
2006-12-21 17:26:00 +00:00
|
|
|
It is OK to change key bindings, but changed bindings do not
|
2006-12-22 15:17:24 +00:00
|
|
|
correspond to what the tutorial says.\n\n")
|
2009-08-21 07:24:26 +00:00
|
|
|
(help-print-return-message)))))
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
(defun tutorial--find-changed-keys (default-keys)
|
2006-12-22 15:17:24 +00:00
|
|
|
"Find the key bindings used in the tutorial that have changed.
|
|
|
|
Return a list with elements of the form
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2006-12-22 15:17:24 +00:00
|
|
|
'(KEY DEF-FUN DEF-FUN-TXT WHERE REMARK QUIET)
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2006-12-22 15:17:24 +00:00
|
|
|
where
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
KEY is a key sequence whose standard binding has been changed
|
|
|
|
DEF-FUN is the standard binding of KEY
|
|
|
|
DEF-FUN-TXT is a short descriptive text for DEF-FUN
|
|
|
|
WHERE is a text describing the key sequences to which DEF-FUN is
|
|
|
|
bound now (or, if it is remapped, a key sequence
|
|
|
|
for the function it is remapped to)
|
2007-06-07 06:59:46 +00:00
|
|
|
REMARK is a list with info about rebinding. It has either of
|
2007-05-16 13:19:02 +00:00
|
|
|
these formats:
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2015-09-17 23:08:20 +00:00
|
|
|
(TEXT cua-mode)
|
|
|
|
(TEXT current-binding KEY-FUN DEF-FUN KEY WHERE)
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
Here TEXT is a link text to show to the user. The
|
|
|
|
rest of the list is used to show information when
|
|
|
|
the user clicks the link.
|
|
|
|
|
2006-12-22 15:17:24 +00:00
|
|
|
KEY-FUN is the actual binding for KEY.
|
|
|
|
QUIET is t if this changed keybinding should be handled quietly.
|
|
|
|
This is used by `tutorial--display-changes'."
|
2006-10-30 14:52:56 +00:00
|
|
|
(let (changed-keys remark)
|
2007-01-28 07:08:51 +00:00
|
|
|
;; Look up the bindings in a Fundamental mode buffer
|
|
|
|
;; so we do not get fooled by some other major mode.
|
|
|
|
(with-temp-buffer
|
|
|
|
(fundamental-mode)
|
|
|
|
(dolist (kdf default-keys)
|
|
|
|
;; The variables below corresponds to those with the same names
|
|
|
|
;; described in the doc string.
|
|
|
|
(let* ((key (nth 1 kdf))
|
|
|
|
(def-fun (nth 0 kdf))
|
|
|
|
(def-fun-txt (format "%s" def-fun))
|
|
|
|
(rem-fun (command-remapping def-fun))
|
2007-07-15 18:40:19 +00:00
|
|
|
;; Handle prefix definitions specially
|
|
|
|
;; so that a mode that rebinds some subcommands
|
|
|
|
;; won't make it appear that the whole prefix is gone.
|
2021-11-15 05:52:38 +00:00
|
|
|
(key-fun (if (keymapp def-fun)
|
|
|
|
(lookup-key global-map key)
|
|
|
|
(key-binding key)))
|
2007-06-07 06:59:46 +00:00
|
|
|
(where (where-is-internal (if rem-fun rem-fun def-fun)))
|
|
|
|
cwhere)
|
2007-07-15 18:40:19 +00:00
|
|
|
|
2007-01-28 07:08:51 +00:00
|
|
|
(if where
|
|
|
|
(progn
|
2007-06-07 06:59:46 +00:00
|
|
|
(setq cwhere (car where)
|
|
|
|
where (key-description cwhere))
|
2007-01-28 07:08:51 +00:00
|
|
|
(when (and (< 10 (length where))
|
|
|
|
(string= (substring where 0 (length "<menu-bar>"))
|
|
|
|
"<menu-bar>"))
|
2007-06-07 06:59:46 +00:00
|
|
|
(setq where
|
|
|
|
(if (and (vectorp cwhere)
|
|
|
|
(setq cwhere (elt cwhere 1))
|
|
|
|
(setq cwhere
|
|
|
|
(cadr
|
|
|
|
(assoc cwhere
|
|
|
|
(lookup-key global-map
|
|
|
|
[menu-bar]))))
|
|
|
|
(stringp cwhere))
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
(format-message "the `%s' menu" cwhere)
|
2007-06-07 06:59:46 +00:00
|
|
|
"the menus"))))
|
2007-01-28 07:08:51 +00:00
|
|
|
(setq where ""))
|
|
|
|
(setq remark nil)
|
|
|
|
(unless
|
|
|
|
(cond ((eq key-fun def-fun)
|
|
|
|
;; No rebinding, return t
|
|
|
|
t)
|
|
|
|
((and key-fun
|
|
|
|
(eq key-fun (command-remapping def-fun)))
|
|
|
|
;; Just a remapping, return t
|
|
|
|
t)
|
|
|
|
;; cua-mode specials:
|
|
|
|
((and cua-mode
|
|
|
|
(or (and
|
|
|
|
(equal key [?\C-v])
|
|
|
|
(eq key-fun 'cua-paste))
|
|
|
|
(and
|
|
|
|
(equal key [?\C-z])
|
|
|
|
(eq key-fun 'undo))))
|
|
|
|
(setq remark (list "cua-mode, more info" 'cua-mode))
|
|
|
|
nil)
|
|
|
|
((and cua-mode
|
|
|
|
(or (and (eq def-fun 'ESC-prefix)
|
|
|
|
(equal key-fun
|
2018-11-05 00:22:15 +00:00
|
|
|
'(keymap
|
|
|
|
(118 . cua-repeat-replace-region)))
|
2007-01-28 07:08:51 +00:00
|
|
|
(setq def-fun-txt "\"ESC prefix\""))
|
|
|
|
(and (eq def-fun 'mode-specific-command-prefix)
|
|
|
|
(equal key-fun
|
|
|
|
'(keymap
|
|
|
|
(timeout . copy-region-as-kill)))
|
|
|
|
(setq def-fun-txt "\"C-c prefix\""))
|
|
|
|
(and (eq def-fun 'Control-X-prefix)
|
|
|
|
(equal key-fun
|
|
|
|
'(keymap (timeout . kill-region)))
|
|
|
|
(setq def-fun-txt "\"C-x prefix\""))))
|
|
|
|
(setq remark (list "cua-mode replacement" 'cua-mode))
|
|
|
|
(setq where "Same key")
|
|
|
|
nil)
|
|
|
|
;; viper-mode specials:
|
|
|
|
((and (boundp 'viper-mode-string)
|
|
|
|
(boundp 'viper-current-state)
|
|
|
|
(eq viper-current-state 'vi-state)
|
|
|
|
(or (and (eq def-fun 'isearch-forward)
|
|
|
|
(eq key-fun 'viper-isearch-forward))
|
|
|
|
(and (eq def-fun 'isearch-backward)
|
|
|
|
(eq key-fun 'viper-isearch-backward))))
|
|
|
|
;; These bindings works as the default bindings,
|
|
|
|
;; return t
|
|
|
|
t)
|
|
|
|
((when normal-erase-is-backspace
|
|
|
|
(or (and (equal key [C-delete])
|
|
|
|
(equal key-fun 'kill-word))
|
|
|
|
(and (equal key [C-backspace])
|
|
|
|
(equal key-fun 'backward-kill-word))))
|
|
|
|
;; This is the strange handling of C-delete and
|
|
|
|
;; C-backspace, return t
|
|
|
|
t)
|
|
|
|
(t
|
|
|
|
;; This key has indeed been rebound. Put information
|
|
|
|
;; in `remark' and return nil
|
|
|
|
(setq remark
|
|
|
|
(list "more info" 'current-binding
|
|
|
|
key-fun def-fun key where))
|
|
|
|
nil))
|
2021-03-21 01:26:37 +00:00
|
|
|
(push (list key def-fun def-fun-txt where remark nil)
|
|
|
|
changed-keys)))))
|
2006-10-30 14:30:59 +00:00
|
|
|
changed-keys))
|
|
|
|
|
2006-12-21 17:26:00 +00:00
|
|
|
(defun tutorial--key-description (key)
|
|
|
|
(let ((desc (key-description key)))
|
|
|
|
(cond ((string= "ESC" desc) "<ESC>")
|
|
|
|
((string= "RET" desc) "<Return>")
|
|
|
|
((string= "DEL" desc) "<Delback>")
|
|
|
|
(t desc))))
|
|
|
|
|
|
|
|
(defun tutorial--display-changes ()
|
2006-10-30 14:30:59 +00:00
|
|
|
"Display changes to some default key bindings.
|
|
|
|
If some of the default key bindings that the tutorial depends on
|
|
|
|
have been changed then display the changes in the tutorial buffer
|
2006-12-21 17:26:00 +00:00
|
|
|
with some explanatory links."
|
|
|
|
(let* ((changed-keys (tutorial--find-changed-keys
|
|
|
|
tutorial--default-keys))
|
|
|
|
;; Alist of element (DESC . CK) where DESC is the
|
|
|
|
;; key-description of a changed key and CK is the
|
|
|
|
;; corresponding element in `changed-keys'.
|
|
|
|
(changed-keys-alist
|
|
|
|
(mapcar (lambda (ck) (cons (tutorial--key-description (car ck)) ck))
|
|
|
|
changed-keys))
|
2006-12-22 15:17:24 +00:00
|
|
|
changed-key
|
2006-12-21 17:26:00 +00:00
|
|
|
(start (point))
|
|
|
|
(case-fold-search nil)
|
|
|
|
(keybindings-regexp
|
2014-07-29 13:41:50 +00:00
|
|
|
;; 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.
|
2014-09-01 16:44:06 +00:00
|
|
|
(concat "\\(?:[[:space:]]\\|[[:punct:]]\\)\\("
|
2006-12-22 15:17:24 +00:00
|
|
|
(mapconcat (lambda (kdf) (regexp-quote
|
|
|
|
(tutorial--key-description
|
|
|
|
(nth 1 kdf))))
|
2006-12-21 17:26:00 +00:00
|
|
|
tutorial--default-keys
|
|
|
|
"\\|")
|
|
|
|
"\\)[[:punct:][:space:]]")))
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Need the custom button face for viper buttons:
|
2006-12-21 17:26:00 +00:00
|
|
|
(if (boundp 'viper-mode-string) (require 'cus-edit))
|
|
|
|
|
|
|
|
(if (or changed-keys (boundp 'viper-mode-string))
|
|
|
|
(let ((head (get-lang-string tutorial--lang 'tut-chgdhead))
|
|
|
|
(head2 (get-lang-string tutorial--lang 'tut-chgdhead2)))
|
|
|
|
(when (and head head2)
|
|
|
|
(goto-char tutorial--point-before-chkeys)
|
2006-12-22 15:17:24 +00:00
|
|
|
(insert head " [")
|
2006-12-21 17:26:00 +00:00
|
|
|
(insert-button head2 'tutorial-buffer (current-buffer)
|
|
|
|
'action 'tutorial--detailed-help
|
|
|
|
'follow-link t 'face 'link)
|
|
|
|
(insert "]\n\n")
|
|
|
|
(add-text-properties tutorial--point-before-chkeys (point)
|
2006-12-22 15:17:24 +00:00
|
|
|
'(tutorial-remark remark
|
|
|
|
face tutorial-warning-face
|
|
|
|
read-only t)))))
|
2006-12-21 17:26:00 +00:00
|
|
|
|
|
|
|
;; Scan the tutorial for all key sequences.
|
|
|
|
(goto-char (point-min))
|
|
|
|
(while (re-search-forward keybindings-regexp (point-max) t)
|
|
|
|
;; Then highlight each rebound key sequence.
|
|
|
|
;; This avoids issuing a warning for, e.g., C-x C-b if C-b is rebound.
|
2006-12-22 15:17:24 +00:00
|
|
|
(setq changed-key (assoc (match-string 1) changed-keys-alist))
|
|
|
|
(and changed-key
|
|
|
|
(not (get-text-property (match-beginning 1) 'tutorial-remark))
|
|
|
|
(let* ((desc (car changed-key))
|
|
|
|
(ck (cdr changed-key))
|
|
|
|
(def-fun (nth 1 ck))
|
|
|
|
(where (nth 3 ck))
|
|
|
|
s1 s2 help-string)
|
|
|
|
(unless (string= where "Same key")
|
2007-01-09 13:09:44 +00:00
|
|
|
(when (string= where "")
|
|
|
|
(setq where (format "M-x %s" def-fun)))
|
2006-12-22 15:17:24 +00:00
|
|
|
(setq tutorial--point-after-chkeys (point-marker)
|
|
|
|
s1 (get-lang-string tutorial--lang 'tut-chgdkey)
|
|
|
|
s2 (get-lang-string tutorial--lang 'tut-chgdkey2)
|
|
|
|
help-string (and s1 s2 (format s1 desc where)))
|
|
|
|
(add-text-properties (match-beginning 1) (match-end 1)
|
|
|
|
'(face tutorial-warning-face
|
|
|
|
tutorial-remark key-sequence))
|
|
|
|
(if help-string
|
|
|
|
(if (nth 5 ck)
|
|
|
|
;; Put help string in the tooltip.
|
|
|
|
(put-text-property (match-beginning 1) (match-end 1)
|
|
|
|
'help-echo help-string)
|
|
|
|
;; Put help string in the buffer.
|
|
|
|
(save-excursion
|
|
|
|
(setcar (nthcdr 5 ck) t)
|
|
|
|
(forward-line)
|
|
|
|
;; Two or more changed keys were on the same line.
|
|
|
|
(while (eq (get-text-property (point) 'tutorial-remark)
|
|
|
|
'remark)
|
|
|
|
(forward-line))
|
|
|
|
(setq start (point))
|
|
|
|
(insert "** " help-string " [")
|
2006-12-21 17:26:00 +00:00
|
|
|
(insert-button s2 'tutorial-buffer (current-buffer)
|
|
|
|
'action 'tutorial--detailed-help
|
|
|
|
'explain-key-desc desc 'follow-link t
|
|
|
|
'face 'link)
|
|
|
|
(insert "] **\n")
|
|
|
|
(add-text-properties start (point)
|
2006-12-22 15:17:24 +00:00
|
|
|
'(tutorial-remark remark
|
|
|
|
rear-nonsticky t
|
2006-12-21 17:26:00 +00:00
|
|
|
face tutorial-warning-face
|
2006-12-22 15:17:24 +00:00
|
|
|
read-only t)))))))))))
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
(defun tutorial--saved-dir ()
|
2006-12-21 17:26:00 +00:00
|
|
|
"Directory to which tutorials are saved."
|
2008-10-24 09:39:27 +00:00
|
|
|
(locate-user-emacs-file "tutorial/"))
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
(defun tutorial--saved-file ()
|
|
|
|
"File name in which to save tutorials."
|
|
|
|
(let ((file-name tutorial--lang)
|
|
|
|
(ext (file-name-extension tutorial--lang)))
|
|
|
|
(when (or (not ext)
|
|
|
|
(string= ext ""))
|
|
|
|
(setq file-name (concat file-name ".tut")))
|
|
|
|
(expand-file-name file-name (tutorial--saved-dir))))
|
|
|
|
|
2007-01-28 07:08:51 +00:00
|
|
|
(defun tutorial--remove-remarks ()
|
2006-10-30 14:30:59 +00:00
|
|
|
"Remove the remark lines that was added to the tutorial buffer."
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(let (prop-start
|
|
|
|
prop-end
|
|
|
|
prop-val)
|
|
|
|
;; Catch the case when we already are on a remark line
|
|
|
|
(while (if (get-text-property (point) 'tutorial-remark)
|
|
|
|
(setq prop-start (point))
|
|
|
|
(setq prop-start (next-single-property-change (point) 'tutorial-remark)))
|
|
|
|
(setq prop-end (next-single-property-change prop-start 'tutorial-remark))
|
|
|
|
(setq prop-val (get-text-property prop-start 'tutorial-remark))
|
|
|
|
(unless prop-end
|
|
|
|
(setq prop-end (point-max)))
|
|
|
|
(goto-char prop-end)
|
2006-12-22 15:17:24 +00:00
|
|
|
(unless (eq prop-val 'key-sequence)
|
|
|
|
(delete-region prop-start prop-end))))))
|
2006-10-30 14:30:59 +00:00
|
|
|
|
2020-12-12 12:46:33 +00:00
|
|
|
(defun tutorial--save-on-kill ()
|
|
|
|
"Query the user about saving the tutorial when killing Emacs."
|
|
|
|
(when (buffer-live-p tutorial--buffer)
|
|
|
|
(with-current-buffer tutorial--buffer
|
|
|
|
(if (y-or-n-p "Save your position in the tutorial? ")
|
|
|
|
(tutorial--save-tutorial-to (tutorial--saved-file))
|
|
|
|
(message "Tutorial position not saved"))))
|
|
|
|
t)
|
|
|
|
|
2006-10-30 14:30:59 +00:00
|
|
|
(defun tutorial--save-tutorial ()
|
|
|
|
"Save the tutorial buffer.
|
|
|
|
This saves the part of the tutorial before and after the area
|
|
|
|
showing changed keys. It also saves the point position and the
|
|
|
|
position where the display of changed bindings was inserted."
|
|
|
|
;; This runs in a hook so protect it:
|
|
|
|
(condition-case err
|
2006-12-22 15:24:10 +00:00
|
|
|
(if (y-or-n-p "Save your position in the tutorial? ")
|
2007-10-17 21:09:56 +00:00
|
|
|
(tutorial--save-tutorial-to (tutorial--saved-file))
|
|
|
|
(message "Tutorial position not saved"))
|
2006-12-22 15:24:10 +00:00
|
|
|
(error (message "Error saving tutorial state: %s"
|
|
|
|
(error-message-string err)))))
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
(defun tutorial--save-tutorial-to (saved-file)
|
|
|
|
"Save the tutorial buffer to SAVED-FILE.
|
|
|
|
See `tutorial--save-tutorial' for more information."
|
|
|
|
;; Anything to save?
|
|
|
|
(when (or (buffer-modified-p)
|
|
|
|
(< 1 (point)))
|
|
|
|
(let ((tutorial-dir (tutorial--saved-dir))
|
|
|
|
save-err)
|
|
|
|
;; The tutorial is saved in a subdirectory in the user home
|
|
|
|
;; directory. Create this subdirectory first.
|
|
|
|
(unless (file-directory-p tutorial-dir)
|
|
|
|
(condition-case err
|
|
|
|
(make-directory tutorial-dir nil)
|
|
|
|
(error (setq save-err t)
|
|
|
|
(warn "Could not create directory %s: %s" tutorial-dir
|
|
|
|
(error-message-string err)))))
|
|
|
|
;; Make sure we have that directory.
|
|
|
|
(if (file-directory-p tutorial-dir)
|
|
|
|
(let ((tut-point (if (= 0 tutorial--point-after-chkeys)
|
|
|
|
;; No info about changed keys is
|
|
|
|
;; displayed.
|
|
|
|
(point)
|
|
|
|
(if (< (point) tutorial--point-after-chkeys)
|
|
|
|
(- (point))
|
|
|
|
(- (point) tutorial--point-after-chkeys))))
|
|
|
|
(old-point (point))
|
|
|
|
;; Use a special undo list so that we easily can undo
|
|
|
|
;; the changes we make to the tutorial buffer. This is
|
|
|
|
;; currently not needed since we now delete the buffer
|
|
|
|
;; after saving, but kept for possible future use of
|
|
|
|
;; this function.
|
|
|
|
buffer-undo-list
|
|
|
|
(inhibit-read-only t))
|
|
|
|
;; Delete the area displaying info about changed keys.
|
|
|
|
;; (when (< 0 tutorial--point-after-chkeys)
|
|
|
|
;; (delete-region tutorial--point-before-chkeys
|
|
|
|
;; tutorial--point-after-chkeys))
|
|
|
|
;; Delete the remarks:
|
|
|
|
(tutorial--remove-remarks)
|
|
|
|
;; Put the value of point first in the buffer so it will
|
|
|
|
;; be saved with the tutorial.
|
|
|
|
(goto-char (point-min))
|
|
|
|
(insert (number-to-string tut-point)
|
|
|
|
"\n"
|
|
|
|
(number-to-string (marker-position
|
|
|
|
tutorial--point-before-chkeys))
|
|
|
|
"\n")
|
|
|
|
(condition-case err
|
|
|
|
(write-region nil nil saved-file)
|
|
|
|
(error (setq save-err t)
|
|
|
|
(warn "Could not save tutorial to %s: %s"
|
|
|
|
saved-file
|
|
|
|
(error-message-string err))))
|
|
|
|
;; An error is raised here?? Is this a bug?
|
2013-08-11 00:07:48 +00:00
|
|
|
(ignore-errors (undo-only))
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Restore point
|
|
|
|
(goto-char old-point)
|
|
|
|
(if save-err
|
|
|
|
(message "Could not save tutorial state.")
|
|
|
|
(message "Saved tutorial state.")))
|
|
|
|
(message "Can't save tutorial: %s is not a directory"
|
|
|
|
tutorial-dir)))))
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun help-with-tutorial (&optional arg dont-ask-for-revert)
|
|
|
|
"Select the Emacs learn-by-doing tutorial.
|
|
|
|
If there is a tutorial version written in the language
|
|
|
|
of the selected language environment, that version is used.
|
|
|
|
If there's no tutorial in that language, `TUTORIAL' is selected.
|
|
|
|
With ARG, you are asked to choose which language.
|
|
|
|
If DONT-ASK-FOR-REVERT is non-nil the buffer is reverted without
|
|
|
|
any question when restarting the tutorial.
|
|
|
|
|
|
|
|
If any of the standard Emacs key bindings that are used in the
|
|
|
|
tutorial have been changed then an explanatory note about this is
|
|
|
|
shown in the beginning of the tutorial buffer.
|
|
|
|
|
|
|
|
When the tutorial buffer is killed the content and the point
|
|
|
|
position in the buffer is saved so that the tutorial may be
|
|
|
|
resumed later."
|
|
|
|
(interactive "P")
|
|
|
|
(if (boundp 'viper-current-state)
|
2006-10-30 14:52:56 +00:00
|
|
|
(let ((prompt1
|
|
|
|
"You can not run the Emacs tutorial directly because you have \
|
|
|
|
enabled Viper.")
|
|
|
|
(prompt2 "\nThere is however a Viper tutorial you can run instead.
|
|
|
|
Run the Viper tutorial? "))
|
|
|
|
(if (fboundp 'viper-tutorial)
|
|
|
|
(if (y-or-n-p (concat prompt1 prompt2))
|
|
|
|
(progn (message "")
|
2021-03-21 01:26:37 +00:00
|
|
|
(funcall #'viper-tutorial 0))
|
2006-10-30 14:52:56 +00:00
|
|
|
(message "Tutorial aborted by user"))
|
|
|
|
(message prompt1)))
|
2012-09-30 03:21:50 +00:00
|
|
|
(let* ((lang (cond
|
|
|
|
(arg
|
|
|
|
(minibuffer-with-setup-hook #'minibuffer-completion-help
|
|
|
|
(read-language-name 'tutorial "Language: " "English")))
|
|
|
|
((get-language-info current-language-environment 'tutorial)
|
|
|
|
current-language-environment)
|
|
|
|
(t "English")))
|
2006-10-30 14:30:59 +00:00
|
|
|
(filename (get-language-info lang 'tutorial))
|
2009-05-12 16:42:20 +00:00
|
|
|
(tut-buf-name filename)
|
2006-10-30 14:30:59 +00:00
|
|
|
(old-tut-buf (get-buffer tut-buf-name))
|
|
|
|
(old-tut-win (when old-tut-buf (get-buffer-window old-tut-buf t)))
|
|
|
|
(old-tut-is-ok (when old-tut-buf
|
|
|
|
(not (buffer-modified-p old-tut-buf))))
|
|
|
|
old-tut-file
|
|
|
|
(old-tut-point 1))
|
|
|
|
(setq tutorial--point-after-chkeys (point-min))
|
|
|
|
;; Try to display the tutorial buffer before asking to revert it.
|
|
|
|
;; If the tutorial buffer is shown in some window make sure it is
|
|
|
|
;; selected and displayed:
|
|
|
|
(if old-tut-win
|
|
|
|
(raise-frame
|
|
|
|
(window-frame
|
|
|
|
(select-window (get-buffer-window old-tut-buf t))))
|
|
|
|
;; Else, is there an old tutorial buffer? Then display it:
|
|
|
|
(when old-tut-buf
|
|
|
|
(switch-to-buffer old-tut-buf)))
|
|
|
|
;; Use whole frame for tutorial
|
|
|
|
(delete-other-windows)
|
|
|
|
;; If the tutorial buffer has been changed then ask if it should
|
|
|
|
;; be reverted:
|
|
|
|
(when (and old-tut-buf
|
|
|
|
(not old-tut-is-ok))
|
|
|
|
(setq old-tut-is-ok
|
|
|
|
(if dont-ask-for-revert
|
|
|
|
nil
|
|
|
|
(not (y-or-n-p
|
|
|
|
"You have changed the Tutorial buffer. Revert it? ")))))
|
|
|
|
;; (Re)build the tutorial buffer if it is not ok
|
|
|
|
(unless old-tut-is-ok
|
|
|
|
(switch-to-buffer (get-buffer-create tut-buf-name))
|
2020-12-12 12:46:33 +00:00
|
|
|
(setq tutorial--buffer (current-buffer))
|
2009-05-12 16:06:07 +00:00
|
|
|
;; (unless old-tut-buf (text-mode))
|
2006-10-30 14:30:59 +00:00
|
|
|
(unless lang (error "Variable lang is nil"))
|
|
|
|
(setq tutorial--lang lang)
|
|
|
|
(setq old-tut-file (file-exists-p (tutorial--saved-file)))
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
(erase-buffer))
|
|
|
|
(message "Preparing tutorial ...") (sit-for 0)
|
|
|
|
|
|
|
|
;; Do not associate the tutorial buffer with a file. Instead use
|
|
|
|
;; a hook to save it when the buffer is killed.
|
|
|
|
(setq buffer-auto-save-file-name nil)
|
|
|
|
(add-hook 'kill-buffer-hook 'tutorial--save-tutorial nil t)
|
2020-12-12 12:46:33 +00:00
|
|
|
(add-hook 'kill-emacs-query-functions 'tutorial--save-on-kill)
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
;; Insert the tutorial. First offer to resume last tutorial
|
|
|
|
;; editing session.
|
|
|
|
(when dont-ask-for-revert
|
|
|
|
(setq old-tut-file nil))
|
|
|
|
(when old-tut-file
|
|
|
|
(setq old-tut-file
|
|
|
|
(y-or-n-p "Resume your last saved tutorial? ")))
|
|
|
|
(if old-tut-file
|
|
|
|
(progn
|
|
|
|
(insert-file-contents (tutorial--saved-file))
|
2012-08-10 06:53:52 +00:00
|
|
|
(let ((enable-local-variables :safe)
|
2013-02-11 01:50:45 +00:00
|
|
|
(enable-local-eval nil)
|
|
|
|
(enable-dir-local-variables nil)) ; bug#11127
|
2010-08-07 09:31:03 +00:00
|
|
|
(hack-local-variables))
|
2006-10-30 14:30:59 +00:00
|
|
|
(goto-char (point-min))
|
|
|
|
(setq old-tut-point
|
|
|
|
(string-to-number
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
(line-beginning-position) (line-end-position))))
|
|
|
|
(forward-line)
|
|
|
|
(setq tutorial--point-before-chkeys
|
|
|
|
(string-to-number
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
(line-beginning-position) (line-end-position))))
|
|
|
|
(forward-line)
|
|
|
|
(delete-region (point-min) (point))
|
|
|
|
(goto-char tutorial--point-before-chkeys)
|
|
|
|
(setq tutorial--point-before-chkeys (point-marker)))
|
2007-08-22 07:42:18 +00:00
|
|
|
(insert-file-contents (expand-file-name filename tutorial-directory))
|
2012-08-10 06:53:52 +00:00
|
|
|
(let ((enable-local-variables :safe)
|
2013-02-11 01:50:45 +00:00
|
|
|
(enable-local-eval nil)
|
|
|
|
(enable-dir-local-variables nil)) ; bug#11127
|
2010-08-07 09:31:03 +00:00
|
|
|
(hack-local-variables))
|
2006-10-30 14:30:59 +00:00
|
|
|
(forward-line)
|
|
|
|
(setq tutorial--point-before-chkeys (point-marker)))
|
|
|
|
|
2006-12-21 17:26:00 +00:00
|
|
|
(tutorial--display-changes)
|
2006-10-30 14:30:59 +00:00
|
|
|
|
|
|
|
;; Clear message:
|
|
|
|
(unless dont-ask-for-revert
|
|
|
|
(message "") (sit-for 0))
|
|
|
|
|
|
|
|
|
|
|
|
(if old-tut-file
|
|
|
|
;; Just move to old point in saved tutorial.
|
|
|
|
(let ((old-point
|
|
|
|
(if (> 0 old-tut-point)
|
|
|
|
(- old-tut-point)
|
|
|
|
(+ old-tut-point tutorial--point-after-chkeys))))
|
|
|
|
(when (< old-point 1)
|
|
|
|
(setq old-point 1))
|
|
|
|
(goto-char old-point))
|
2009-07-08 02:37:11 +00:00
|
|
|
;; Delete the arch-tag line, so as not to confuse readers.
|
|
|
|
(goto-char (point-max))
|
|
|
|
(if (search-backward ";;; arch-tag: " nil t)
|
|
|
|
(delete-region (point) (point-max)))
|
2006-10-30 14:30:59 +00:00
|
|
|
(goto-char (point-min))
|
|
|
|
(search-forward "\n<<")
|
|
|
|
(beginning-of-line)
|
|
|
|
;; Convert the <<...>> line to the proper [...] line,
|
|
|
|
;; or just delete the <<...>> line if a [...] line follows.
|
|
|
|
(cond ((save-excursion
|
|
|
|
(forward-line 1)
|
2013-08-11 00:07:48 +00:00
|
|
|
(looking-at-p "\\["))
|
2006-10-30 14:30:59 +00:00
|
|
|
(delete-region (point) (progn (forward-line 1) (point))))
|
|
|
|
((looking-at "<<Blank lines inserted.*>>")
|
|
|
|
(replace-match "[Middle of page left blank for didactic purposes. Text continues below]"))
|
|
|
|
(t
|
|
|
|
(looking-at "<<")
|
|
|
|
(replace-match "[")
|
|
|
|
(search-forward ">>")
|
|
|
|
(replace-match "]")))
|
|
|
|
(beginning-of-line)
|
2011-08-20 22:53:00 +00:00
|
|
|
;; FIXME: if the window is not tall, and especially if the
|
|
|
|
;; big red "NOTICE: The main purpose..." text has been
|
|
|
|
;; inserted at the start of the buffer, the "type C-v to
|
|
|
|
;; move to the next screen" might not be visible on the
|
|
|
|
;; first screen (n < 0). How will the novice know what to do?
|
Do not call to `selected-window' where it is assumed by default.
Affected functions are `window-minibuffer-p', `window-dedicated-p',
`window-hscroll', `window-width', `window-height', `window-buffer',
`window-frame', `window-start', `window-point', `next-window'
and `window-display-table'.
* abbrev.el (abbrev--default-expand):
* bs.el (bs--show-with-configuration):
* buff-menu.el (Buffer-menu-mouse-select):
* calc/calc.el (calc):
* calendar/calendar.el (calendar-generate-window):
* calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
(diary-make-entry):
* comint.el (send-invisible, comint-dynamic-complete-filename)
(comint-dynamic-simple-complete, comint-dynamic-list-completions):
* completion.el (complete):
* dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
* disp-table.el (describe-current-display-table):
* doc-view.el (doc-view-insert-image):
* ebuff-menu.el (Electric-buffer-menu-mouse-select):
* ehelp.el (with-electric-help):
* emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
* emacs-lisp/helper.el (Helper-help-scroller):
* emulation/cua-base.el (cua--post-command-handler-1):
* eshell/esh-mode.el (eshell-output-filter):
* ffap.el (ffap-gnus-wrapper):
* help-macro.el (make-help-screen):
* hilit-chg.el (highlight-compare-buffers):
* hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
* hl-line.el (global-hl-line-highlight):
* icomplete.el (icomplete-simple-completing-p):
* isearch.el (isearch-done):
* jit-lock.el (jit-lock-stealth-fontify):
* mail/rmailsum.el (rmail-summary-scroll-msg-up):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* mpc.el (mpc-tagbrowser, mpc):
* net/rcirc.el (rcirc-any-buffer):
* play/gomoku.el (gomoku-max-width, gomoku-max-height):
* play/landmark.el (landmark-max-width, landmark-max-height):
* play/zone.el (zone):
* progmodes/compile.el (compilation-goto-locus):
* progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
* progmodes/etags.el (find-tag-other-window):
* progmodes/fortran.el (fortran-column-ruler):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/verilog-mode.el (verilog-point-text):
* reposition.el (reposition-window):
* rot13.el (toggle-rot13-mode):
* server.el (server-switch-buffer):
* shell.el (shell-dynamic-complete-command)
(shell-dynamic-complete-environment-variable):
* simple.el (insert-buffer, set-selective-display)
(delete-completion-window):
* speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
(speedbar-recenter):
* startup.el (fancy-splash-head):
* textmodes/ispell.el (ispell-command-loop):
* textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
* tutorial.el (help-with-tutorial):
* vc/add-log.el (add-change-log-entry):
* vc/compare-w.el (compare-windows):
* vc/ediff-help.el (ediff-indent-help-message):
* vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
* vc/ediff-wind.el (ediff-skip-unsuitable-frames)
(ediff-setup-control-frame):
* vc/emerge.el (emerge-position-region):
* vc/pcvs-util.el (cvs-bury-buffer):
* window.el (walk-windows, mouse-autoselect-window-select):
* winner.el (winner-set-conf, winner-undo): Related users changed.
2013-08-05 14:26:57 +00:00
|
|
|
(let ((n (- (window-height)
|
2006-10-30 14:30:59 +00:00
|
|
|
(count-lines (point-min) (point))
|
|
|
|
6)))
|
|
|
|
(if (< n 8)
|
|
|
|
(progn
|
|
|
|
;; For a short gap, we don't need the [...] line,
|
|
|
|
;; so delete it.
|
|
|
|
(delete-region (point) (progn (end-of-line) (point)))
|
2011-08-20 22:53:00 +00:00
|
|
|
(if (> n 0) (newline n)))
|
2006-10-30 14:30:59 +00:00
|
|
|
;; Some people get confused by the large gap.
|
|
|
|
(newline (/ n 2))
|
|
|
|
|
|
|
|
;; Skip the [...] line (don't delete it).
|
|
|
|
(forward-line 1)
|
|
|
|
(newline (- n (/ n 2)))))
|
|
|
|
(goto-char (point-min)))
|
|
|
|
(setq buffer-undo-list nil)
|
|
|
|
(set-buffer-modified-p nil)))))
|
|
|
|
|
|
|
|
|
|
|
|
;; Below is some attempt to handle language specific strings. These
|
|
|
|
;; are currently only used in the tutorial.
|
|
|
|
|
|
|
|
(defconst lang-strings
|
2006-12-21 17:26:00 +00:00
|
|
|
'(("English" .
|
2006-12-22 15:17:24 +00:00
|
|
|
((tut-chgdkey . "%s has been rebound, but you can use %s instead")
|
2006-12-21 17:26:00 +00:00
|
|
|
(tut-chgdkey2 . "More")
|
2006-10-30 14:30:59 +00:00
|
|
|
(tut-chgdhead . "
|
|
|
|
NOTICE: The main purpose of the Emacs tutorial is to teach you
|
|
|
|
the most important standard Emacs commands (key bindings).
|
|
|
|
However, your Emacs has been customized by changing some of
|
|
|
|
these basic editing commands, so it doesn't correspond to the
|
|
|
|
tutorial. We have inserted colored notices where the altered
|
2006-12-22 15:17:24 +00:00
|
|
|
commands have been introduced.")
|
2006-12-21 17:26:00 +00:00
|
|
|
(tut-chgdhead2 . "More"))))
|
2006-10-30 14:30:59 +00:00
|
|
|
"Language specific strings for Emacs.
|
|
|
|
This is an association list with the keys equal to the strings
|
|
|
|
that can be returned by `read-language-name'. The elements in
|
|
|
|
the list are themselves association lists with keys that are
|
|
|
|
string ids and values that are the language specific strings.
|
|
|
|
|
|
|
|
See `get-lang-string' for more information.")
|
|
|
|
|
2007-01-28 07:08:51 +00:00
|
|
|
(defun get-lang-string (lang stringid &optional no-eng-fallback)
|
2006-10-30 14:30:59 +00:00
|
|
|
"Get a language specific string for Emacs.
|
2007-05-16 13:19:02 +00:00
|
|
|
In certain places Emacs can replace a string shown to the user with
|
|
|
|
a language specific string. This function retrieves such strings.
|
2006-10-30 14:30:59 +00:00
|
|
|
|
* completion.el (add-completion-to-head, add-completion): Doc fixes.
(completion-search-next, add-completions-from-file):
Fix typos in docstrings.
* filesets.el (filesets-menu-ensure-use-cached)
(filesets-ingroup-patterns, filesets-filetype-property):
* tutorial.el (get-lang-string):
* play/gamegrid.el (gamegrid-score-file-length, gamegrid-add-score):
Fix typos in docstrings.
* image-dired.el (image-dired-dired-after-readin-hook): Doc fix.
(image-dired-line-up-method, image-dired-thumb-size)
(image-dired-cmd-write-exif-data-options, image-dired-write-tags)
(image-dired-track-original-file, image-dired-track-thumbnail)
(image-dired-dired-next-line, image-dired-dired-previous-line)
(image-dired-write-comments): Reflow docstrings.
(image-dired-show-all-from-dir-max-files)
(image-dired-format-properties-string, image-dired-create-thumbs)
(image-dired-mark-tagged-files, image-dired-gallery-generate):
Fix typos in docstrings.
* savehist.el (savehist-save-minibuffer-history, savehist-file)
(savehist-additional-variables, savehist-ignored-variables)
(savehist-file-modes, savehist-autosave-interval):
* startup.el (inhibit-startup-echo-area-message, inhibit-default-init)
(inhibit-startup-buffer-menu, mail-host-address, user-mail-address)
(fancy-splash-image):
* thumbs.el (thumbs-thumbsdir, thumbs-geometry, thumbs-relief)
(thumbs-conversion-program, thumbs-margin):
Remove spurious * in docstrings.
2008-10-25 00:46:25 +00:00
|
|
|
LANG is the language specification. It should be one of those
|
2006-10-30 14:30:59 +00:00
|
|
|
strings that can be returned by `read-language-name'. STRINGID
|
|
|
|
is a symbol that specifies the string to retrieve.
|
|
|
|
|
2007-05-16 13:19:02 +00:00
|
|
|
If no string is found for STRINGID in the chosen language then
|
2006-10-30 14:30:59 +00:00
|
|
|
the English string is returned unless NO-ENG-FALLBACK is non-nil.
|
|
|
|
|
|
|
|
See `lang-strings' for more information.
|
|
|
|
|
|
|
|
Currently this feature is only used in `help-with-tutorial'."
|
|
|
|
(let ((my-lang-strings (assoc lang lang-strings))
|
|
|
|
(found-string))
|
|
|
|
(when my-lang-strings
|
|
|
|
(let ((entry (assoc stringid (cdr my-lang-strings))))
|
|
|
|
(when entry
|
|
|
|
(setq found-string (cdr entry)))))
|
|
|
|
;; Fallback to English strings
|
|
|
|
(unless (or found-string
|
|
|
|
no-eng-fallback)
|
|
|
|
(setq found-string (get-lang-string "English" stringid t)))
|
|
|
|
found-string))
|
|
|
|
|
|
|
|
;;(get-lang-string "English" 'tut-chgdkey)
|
|
|
|
|
|
|
|
(provide 'tutorial)
|
|
|
|
|
|
|
|
;;; tutorial.el ends here
|