diff options
| author | Glenn Morris | 2020-04-20 07:50:19 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-04-20 07:50:19 -0700 |
| commit | 477b9eaf45da1ebc4f2117d69df3571f0bf61e47 (patch) | |
| tree | 4600314923713c339c41cd450f50e64c3f16a8aa /lisp | |
| parent | 80f04b5d7c817977a365a999693443c4e04e5223 (diff) | |
| parent | 05089a4d65831c5e873956f5f2d92a3d5672d405 (diff) | |
| download | emacs-477b9eaf45da1ebc4f2117d69df3571f0bf61e47.tar.gz emacs-477b9eaf45da1ebc4f2117d69df3571f0bf61e47.zip | |
Merge from origin/emacs-27
05089a4d65 (origin/emacs-27) Tweak wording re constant variables
a1040861f1 Tweak setcar-related wording
751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend...
9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor...
e1d42da0d6 Fix mutability glitches reported by Drew Adams
5805df74f5 Improve mutability doc
dca35b31d0 Improve mutability documentation
81e7d7f111 Document that quoting yields constants
5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu...
14a570afae Remove #' and function quoting from lambda forms in manual
d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ...
4df8a61117 Add new node "Image Mode" to Emacs Manual.
d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701)
5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo.
eebfb72c90 Document constant vs mutable objects better
6c187ed6b0 Improve documentation of 'sort-lines'
52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta...
067b070598 ; Fix some typos and doc issues (bug#40695)
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/elp.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/generator.el | 32 | ||||
| -rw-r--r-- | lisp/emacs-lisp/gv.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 2 | ||||
| -rw-r--r-- | lisp/image-mode.el | 76 | ||||
| -rw-r--r-- | lisp/image/exif.el | 4 | ||||
| -rw-r--r-- | lisp/international/mule-util.el | 2 | ||||
| -rw-r--r-- | lisp/json.el | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 4 | ||||
| -rw-r--r-- | lisp/obsolete/cl.el | 2 | ||||
| -rw-r--r-- | lisp/sort.el | 3 | ||||
| -rw-r--r-- | lisp/startup.el | 8 | ||||
| -rw-r--r-- | lisp/subr.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 10 |
17 files changed, 82 insertions, 85 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4f01918bdb9..13b72196565 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -677,7 +677,7 @@ Each element is (INDEX . VALUE)") | |||
| 677 | (byte-defop 112 1 byte-current-buffer) | 677 | (byte-defop 112 1 byte-current-buffer) |
| 678 | (byte-defop 113 0 byte-set-buffer) | 678 | (byte-defop 113 0 byte-set-buffer) |
| 679 | (byte-defop 114 0 byte-save-current-buffer | 679 | (byte-defop 114 0 byte-save-current-buffer |
| 680 | "To make a binding to record the current buffer") | 680 | "to make a binding to record the current buffer") |
| 681 | (byte-defop 115 0 byte-set-mark-OBSOLETE) | 681 | (byte-defop 115 0 byte-set-mark-OBSOLETE) |
| 682 | (byte-defop 116 1 byte-interactive-p-OBSOLETE) | 682 | (byte-defop 116 1 byte-interactive-p-OBSOLETE) |
| 683 | 683 | ||
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index b5581aa3fbb..e4b800786cc 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -2134,7 +2134,7 @@ buffer, otherwise stop after the first error." | |||
| 2134 | (checkdoc-ispell-init) | 2134 | (checkdoc-ispell-init) |
| 2135 | (unless checkdoc-spellcheck-documentation-flag | 2135 | (unless checkdoc-spellcheck-documentation-flag |
| 2136 | ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name' | 2136 | ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name' |
| 2137 | (user-error "No spellchecker installed: check the variable `ispell-program-name'.")) | 2137 | (user-error "No spellchecker installed: check the variable `ispell-program-name'")) |
| 2138 | (save-excursion | 2138 | (save-excursion |
| 2139 | (skip-chars-forward "^a-zA-Z") | 2139 | (skip-chars-forward "^a-zA-Z") |
| 2140 | (let (word sym case-fold-search err word-beginning word-end) | 2140 | (let (word sym case-fold-search err word-beginning word-end) |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index bb10194a946..4408bb58464 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -767,7 +767,7 @@ The result of the body appears to the compiler as a quoted constant." | |||
| 767 | "Eval EXPR and choose among clauses on that value. | 767 | "Eval EXPR and choose among clauses on that value. |
| 768 | Each clause looks like (KEYLIST BODY...). EXPR is evaluated and | 768 | Each clause looks like (KEYLIST BODY...). EXPR is evaluated and |
| 769 | compared against each key in each KEYLIST; the corresponding BODY | 769 | compared against each key in each KEYLIST; the corresponding BODY |
| 770 | is evaluated. If no clause succeeds, cl-case returns nil. A | 770 | is evaluated. If no clause succeeds, this macro returns nil. A |
| 771 | single non-nil atom may be used in place of a KEYLIST of one | 771 | single non-nil atom may be used in place of a KEYLIST of one |
| 772 | atom. A KEYLIST of t or `otherwise' is allowed only in the final | 772 | atom. A KEYLIST of t or `otherwise' is allowed only in the final |
| 773 | clause, and matches if no other keys match. Key values are | 773 | clause, and matches if no other keys match. Key values are |
| @@ -806,10 +806,10 @@ compared by `eql'. | |||
| 806 | 806 | ||
| 807 | ;;;###autoload | 807 | ;;;###autoload |
| 808 | (defmacro cl-typecase (expr &rest clauses) | 808 | (defmacro cl-typecase (expr &rest clauses) |
| 809 | "Evals EXPR, chooses among clauses on that value. | 809 | "Eval EXPR and choose among clauses on that value. |
| 810 | Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it | 810 | Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it |
| 811 | satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, | 811 | satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, |
| 812 | cl-typecase returns nil. A TYPE of t or `otherwise' is allowed only in the | 812 | this macro returns nil. A TYPE of t or `otherwise' is allowed only in the |
| 813 | final clause, and matches if no other keys match. | 813 | final clause, and matches if no other keys match. |
| 814 | \n(fn EXPR (TYPE BODY...)...)" | 814 | \n(fn EXPR (TYPE BODY...)...)" |
| 815 | (declare (indent 1) | 815 | (declare (indent 1) |
| @@ -2701,7 +2701,7 @@ pairs for that slot. | |||
| 2701 | Supported keywords for slots are: | 2701 | Supported keywords for slots are: |
| 2702 | - `:read-only': If this has a non-nil value, that slot cannot be set via `setf'. | 2702 | - `:read-only': If this has a non-nil value, that slot cannot be set via `setf'. |
| 2703 | - `:documentation': this is a docstring describing the slot. | 2703 | - `:documentation': this is a docstring describing the slot. |
| 2704 | - `:type': the type of the field; currently unused. | 2704 | - `:type': the type of the field; currently only used for documentation. |
| 2705 | 2705 | ||
| 2706 | \(fn NAME &optional DOCSTRING &rest SLOTS)" | 2706 | \(fn NAME &optional DOCSTRING &rest SLOTS)" |
| 2707 | (declare (doc-string 2) (indent 1) | 2707 | (declare (doc-string 2) (indent 1) |
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 7dd3cbd1a21..f68c0faf09d 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el | |||
| @@ -238,7 +238,7 @@ FUNSYM must be a symbol of a defined function." | |||
| 238 | ;; The info vector data structure is a 2 element vector. The 0th | 238 | ;; The info vector data structure is a 2 element vector. The 0th |
| 239 | ;; element is the call-count, i.e. the total number of times this | 239 | ;; element is the call-count, i.e. the total number of times this |
| 240 | ;; function has been entered. This value is bumped up on entry to | 240 | ;; function has been entered. This value is bumped up on entry to |
| 241 | ;; the function so that non-local exists are still recorded. TBD: | 241 | ;; the function so that non-local exits are still recorded. TBD: |
| 242 | ;; I haven't tested non-local exits at all, so no guarantees. | 242 | ;; I haven't tested non-local exits at all, so no guarantees. |
| 243 | ;; | 243 | ;; |
| 244 | ;; The 1st element is the total amount of time in seconds that has | 244 | ;; The 1st element is the total amount of time in seconds that has |
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index 27ed29925b3..ba344eb5150 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | ;; This raw form of iteration is general, but a bit awkward to use, so | 59 | ;; This raw form of iteration is general, but a bit awkward to use, so |
| 60 | ;; this library also provides some convenience functions: | 60 | ;; this library also provides some convenience functions: |
| 61 | ;; | 61 | ;; |
| 62 | ;; `iter-do' is like `cl-do', except that instead of walking a list, | 62 | ;; `iter-do' is like `dolist', except that instead of walking a list, |
| 63 | ;; it walks an iterator. `cl-loop' is also extended with a new | 63 | ;; it walks an iterator. `cl-loop' is also extended with a new |
| 64 | ;; keyword, `iter-by', that iterates over an iterator. | 64 | ;; keyword, `iter-by', that iterates over an iterator. |
| 65 | ;; | 65 | ;; |
| @@ -67,7 +67,7 @@ | |||
| 67 | ;;; Implementation: | 67 | ;;; Implementation: |
| 68 | 68 | ||
| 69 | ;; | 69 | ;; |
| 70 | ;; The internal cps transformation code uses the cps- namespace. | 70 | ;; The internal CPS transformation code uses the cps- namespace. |
| 71 | ;; Iteration functions use the `iter-' namespace. Generator functions | 71 | ;; Iteration functions use the `iter-' namespace. Generator functions |
| 72 | ;; are somewhat less efficient than conventional elisp routines, | 72 | ;; are somewhat less efficient than conventional elisp routines, |
| 73 | ;; although we try to avoid CPS transformation on forms that do not | 73 | ;; although we try to avoid CPS transformation on forms that do not |
| @@ -89,13 +89,13 @@ | |||
| 89 | `(gensym (format ,fmt ,@args))) | 89 | `(gensym (format ,fmt ,@args))) |
| 90 | 90 | ||
| 91 | (defvar cps--dynamic-wrappers '(identity) | 91 | (defvar cps--dynamic-wrappers '(identity) |
| 92 | "List of transformer functions to apply to atomic forms we | 92 | "List of functions to apply to atomic forms. |
| 93 | evaluate in CPS context.") | 93 | These are transformer functions applied to atomic forms evaluated |
| 94 | in CPS context.") | ||
| 94 | 95 | ||
| 95 | (defconst cps-standard-special-forms | 96 | (defconst cps-standard-special-forms |
| 96 | '(setq setq-default throw interactive) | 97 | '(setq setq-default throw interactive) |
| 97 | "List of special forms that we treat just like ordinary | 98 | "List of special forms treated just like ordinary function applications." ) |
| 98 | function applications." ) | ||
| 99 | 99 | ||
| 100 | (defun cps--trace-funcall (func &rest args) | 100 | (defun cps--trace-funcall (func &rest args) |
| 101 | (message "%S: args=%S" func args) | 101 | (message "%S: args=%S" func args) |
| @@ -118,17 +118,15 @@ evaluate in CPS context.") | |||
| 118 | (error "%s not supported in generators" ,function))) | 118 | (error "%s not supported in generators" ,function))) |
| 119 | 119 | ||
| 120 | (defmacro cps--with-value-wrapper (wrapper &rest body) | 120 | (defmacro cps--with-value-wrapper (wrapper &rest body) |
| 121 | "Continue generating CPS code with an atomic-form wrapper | 121 | "Evaluate BODY with WRAPPER added to the stack of atomic-form wrappers. |
| 122 | to the current stack of such wrappers. WRAPPER is a function that | 122 | WRAPPER is a function that takes an atomic form and returns a wrapped form. |
| 123 | takes a form and returns a wrapped form. | ||
| 124 | 123 | ||
| 125 | Whenever we generate an atomic form (i.e., a form that can't | 124 | Whenever we generate an atomic form (i.e., a form that can't |
| 126 | `iter-yield'), we first (before actually inserting that form in our | 125 | `iter-yield'), we first (before actually inserting that form in our |
| 127 | generated code) pass that form through all the transformer | 126 | generated code) pass that form through all the transformer |
| 128 | functions. We use this facility to wrap forms that can transfer | 127 | functions. We use this facility to wrap forms that can transfer |
| 129 | control flow non-locally in goo that diverts this control flow to | 128 | control flow non-locally in goo that diverts this control flow to |
| 130 | the CPS state machinery. | 129 | the CPS state machinery." |
| 131 | " | ||
| 132 | (declare (indent 1)) | 130 | (declare (indent 1)) |
| 133 | `(let ((cps--dynamic-wrappers | 131 | `(let ((cps--dynamic-wrappers |
| 134 | (cons | 132 | (cons |
| @@ -153,7 +151,7 @@ DYNAMIC-VAR bound to STATIC-VAR." | |||
| 153 | ,@body)) | 151 | ,@body)) |
| 154 | 152 | ||
| 155 | (defun cps--add-state (kind body) | 153 | (defun cps--add-state (kind body) |
| 156 | "Create a new CPS state with body BODY and return the state's name." | 154 | "Create a new CPS state of KIND with BODY and return the state's name." |
| 157 | (declare (indent 1)) | 155 | (declare (indent 1)) |
| 158 | (let ((state (cps--gensym "cps-state-%s-" kind))) | 156 | (let ((state (cps--gensym "cps-state-%s-" kind))) |
| 159 | (push (list state body cps--cleanup-function) cps--states) | 157 | (push (list state body cps--cleanup-function) cps--states) |
| @@ -170,14 +168,12 @@ DYNAMIC-VAR bound to STATIC-VAR." | |||
| 170 | (and (fboundp handler) handler))) | 168 | (and (fboundp handler) handler))) |
| 171 | 169 | ||
| 172 | (defvar cps-inhibit-atomic-optimization nil | 170 | (defvar cps-inhibit-atomic-optimization nil |
| 173 | "When non-nil, always rewrite forms into cps even when they | 171 | "When non-nil, always rewrite forms into CPS even when they don't yield.") |
| 174 | don't yield.") | ||
| 175 | 172 | ||
| 176 | (defvar cps--yield-seen) | 173 | (defvar cps--yield-seen) |
| 177 | 174 | ||
| 178 | (defun cps--atomic-p (form) | 175 | (defun cps--atomic-p (form) |
| 179 | "Return whether the given form never yields." | 176 | "Return nil if FORM can yield, non-nil otherwise." |
| 180 | |||
| 181 | (and (not cps-inhibit-atomic-optimization) | 177 | (and (not cps-inhibit-atomic-optimization) |
| 182 | (let* ((cps--yield-seen)) | 178 | (let* ((cps--yield-seen)) |
| 183 | (ignore (macroexpand-all | 179 | (ignore (macroexpand-all |
| @@ -649,8 +645,8 @@ modified copy." | |||
| 649 | (defun iter-yield (value) | 645 | (defun iter-yield (value) |
| 650 | "When used inside a generator, yield control to caller. | 646 | "When used inside a generator, yield control to caller. |
| 651 | The caller of `iter-next' receives VALUE, and the next call to | 647 | The caller of `iter-next' receives VALUE, and the next call to |
| 652 | `iter-next' resumes execution at the previous | 648 | `iter-next' resumes execution with the form immediately following this |
| 653 | `iter-yield' point." | 649 | `iter-yield' call." |
| 654 | (identity value) | 650 | (identity value) |
| 655 | (error "`iter-yield' used outside a generator")) | 651 | (error "`iter-yield' used outside a generator")) |
| 656 | 652 | ||
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 3ab49293e90..096036a0ffa 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | ;; | 38 | ;; |
| 39 | ;; Instead, we use here a higher-order approach: instead | 39 | ;; Instead, we use here a higher-order approach: instead |
| 40 | ;; of a 5-tuple, a place-expander returns a function. | 40 | ;; of a 5-tuple, a place-expander returns a function. |
| 41 | ;; If you think about types, the old approach return things of type | 41 | ;; If you think about types, the old approach returns things of type |
| 42 | ;; {vars: List Var, values: List Exp, | 42 | ;; {vars: List Var, values: List Exp, |
| 43 | ;; stores: List Var, getter: Exp, setter: Exp} | 43 | ;; stores: List Var, getter: Exp, setter: Exp} |
| 44 | ;; whereas the new approach returns a function of type | 44 | ;; whereas the new approach returns a function of type |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 3b0f5493eeb..98c44161ad0 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -535,7 +535,7 @@ This will generate compile-time constants from BINDINGS." | |||
| 535 | 535 | ||
| 536 | ;; Support backtrace mode. | 536 | ;; Support backtrace mode. |
| 537 | (defconst lisp-el-font-lock-keywords-for-backtraces lisp-el-font-lock-keywords | 537 | (defconst lisp-el-font-lock-keywords-for-backtraces lisp-el-font-lock-keywords |
| 538 | "Default highlighting from Emacs Lisp mod used in Backtrace mode.") | 538 | "Default highlighting from Emacs Lisp mode used in Backtrace mode.") |
| 539 | (defconst lisp-el-font-lock-keywords-for-backtraces-1 lisp-el-font-lock-keywords-1 | 539 | (defconst lisp-el-font-lock-keywords-for-backtraces-1 lisp-el-font-lock-keywords-1 |
| 540 | "Subdued highlighting from Emacs Lisp mode used in Backtrace mode.") | 540 | "Subdued highlighting from Emacs Lisp mode used in Backtrace mode.") |
| 541 | (defconst lisp-el-font-lock-keywords-for-backtraces-2 | 541 | (defconst lisp-el-font-lock-keywords-for-backtraces-2 |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 22d7d913141..fbce1193cd0 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -418,24 +418,40 @@ call." | |||
| 418 | 418 | ||
| 419 | (defvar image-mode-map | 419 | (defvar image-mode-map |
| 420 | (let ((map (make-sparse-keymap))) | 420 | (let ((map (make-sparse-keymap))) |
| 421 | |||
| 422 | ;; Toggling keys | ||
| 421 | (define-key map "\C-c\C-c" 'image-toggle-display) | 423 | (define-key map "\C-c\C-c" 'image-toggle-display) |
| 422 | (define-key map "\C-c\C-x" 'image-toggle-hex-display) | 424 | (define-key map "\C-c\C-x" 'image-toggle-hex-display) |
| 423 | (define-key map (kbd "SPC") 'image-scroll-up) | 425 | |
| 424 | (define-key map (kbd "S-SPC") 'image-scroll-down) | 426 | ;; Transformation keys |
| 425 | (define-key map (kbd "DEL") 'image-scroll-down) | 427 | (define-key map "sf" 'image-mode-fit-frame) |
| 426 | (define-key map (kbd "RET") 'image-toggle-animation) | 428 | (define-key map "sh" 'image-transform-fit-to-height) |
| 429 | (define-key map "sw" 'image-transform-fit-to-width) | ||
| 430 | (define-key map "sr" 'image-transform-set-rotation) | ||
| 431 | (define-key map "s0" 'image-transform-reset) | ||
| 432 | (define-key map "ss" 'image-transform-set-scale) | ||
| 433 | |||
| 434 | ;; Multi-frame keys | ||
| 435 | (define-key map (kbd "RET") 'image-toggle-animation) | ||
| 427 | (define-key map "F" 'image-goto-frame) | 436 | (define-key map "F" 'image-goto-frame) |
| 428 | (define-key map "f" 'image-next-frame) | 437 | (define-key map "f" 'image-next-frame) |
| 429 | (define-key map "b" 'image-previous-frame) | 438 | (define-key map "b" 'image-previous-frame) |
| 430 | (define-key map "n" 'image-next-file) | ||
| 431 | (define-key map "p" 'image-previous-file) | ||
| 432 | (define-key map "a+" 'image-increase-speed) | 439 | (define-key map "a+" 'image-increase-speed) |
| 433 | (define-key map "a-" 'image-decrease-speed) | 440 | (define-key map "a-" 'image-decrease-speed) |
| 434 | (define-key map "a0" 'image-reset-speed) | 441 | (define-key map "a0" 'image-reset-speed) |
| 435 | (define-key map "ar" 'image-reverse-speed) | 442 | (define-key map "ar" 'image-reverse-speed) |
| 443 | |||
| 444 | ;; File keys | ||
| 445 | (define-key map "n" 'image-next-file) | ||
| 446 | (define-key map "p" 'image-previous-file) | ||
| 436 | (define-key map "w" 'image-mode-copy-file-name-as-kill) | 447 | (define-key map "w" 'image-mode-copy-file-name-as-kill) |
| 437 | (define-key map "m" 'image-mode-mark-file) | 448 | (define-key map "m" 'image-mode-mark-file) |
| 438 | (define-key map "u" 'image-mode-unmark-file) | 449 | (define-key map "u" 'image-mode-unmark-file) |
| 450 | |||
| 451 | ;; Scrolling keys | ||
| 452 | (define-key map (kbd "SPC") 'image-scroll-up) | ||
| 453 | (define-key map (kbd "S-SPC") 'image-scroll-down) | ||
| 454 | (define-key map (kbd "DEL") 'image-scroll-down) | ||
| 439 | (define-key map [remap forward-char] 'image-forward-hscroll) | 455 | (define-key map [remap forward-char] 'image-forward-hscroll) |
| 440 | (define-key map [remap backward-char] 'image-backward-hscroll) | 456 | (define-key map [remap backward-char] 'image-backward-hscroll) |
| 441 | (define-key map [remap right-char] 'image-forward-hscroll) | 457 | (define-key map [remap right-char] 'image-forward-hscroll) |
| @@ -452,6 +468,7 @@ call." | |||
| 452 | (define-key map [remap move-end-of-line] 'image-eol) | 468 | (define-key map [remap move-end-of-line] 'image-eol) |
| 453 | (define-key map [remap beginning-of-buffer] 'image-bob) | 469 | (define-key map [remap beginning-of-buffer] 'image-bob) |
| 454 | (define-key map [remap end-of-buffer] 'image-eob) | 470 | (define-key map [remap end-of-buffer] 'image-eob) |
| 471 | |||
| 455 | (easy-menu-define image-mode-menu map "Menu for Image mode." | 472 | (easy-menu-define image-mode-menu map "Menu for Image mode." |
| 456 | '("Image" | 473 | '("Image" |
| 457 | ["Show as Text" image-toggle-display :active t | 474 | ["Show as Text" image-toggle-display :active t |
| @@ -459,17 +476,15 @@ call." | |||
| 459 | ["Show as Hex" image-toggle-hex-display :active t | 476 | ["Show as Hex" image-toggle-hex-display :active t |
| 460 | :help "Show image as hex"] | 477 | :help "Show image as hex"] |
| 461 | "--" | 478 | "--" |
| 479 | ["Fit Frame to Image" image-mode-fit-frame :active t | ||
| 480 | :help "Resize frame to match image"] | ||
| 462 | ["Fit to Window Height" image-transform-fit-to-height | 481 | ["Fit to Window Height" image-transform-fit-to-height |
| 463 | :visible (eq image-type 'imagemagick) | ||
| 464 | :help "Resize image to match the window height"] | 482 | :help "Resize image to match the window height"] |
| 465 | ["Fit to Window Width" image-transform-fit-to-width | 483 | ["Fit to Window Width" image-transform-fit-to-width |
| 466 | :visible (eq image-type 'imagemagick) | ||
| 467 | :help "Resize image to match the window width"] | 484 | :help "Resize image to match the window width"] |
| 468 | ["Rotate Image..." image-transform-set-rotation | 485 | ["Rotate Image..." image-transform-set-rotation |
| 469 | :visible (eq image-type 'imagemagick) | ||
| 470 | :help "Rotate the image"] | 486 | :help "Rotate the image"] |
| 471 | ["Reset Transformations" image-transform-reset | 487 | ["Reset Transformations" image-transform-reset |
| 472 | :visible (eq image-type 'imagemagick) | ||
| 473 | :help "Reset all image transformations"] | 488 | :help "Reset all image transformations"] |
| 474 | "--" | 489 | "--" |
| 475 | ["Show Thumbnails" | 490 | ["Show Thumbnails" |
| @@ -486,9 +501,6 @@ call." | |||
| 486 | :active buffer-file-name | 501 | :active buffer-file-name |
| 487 | :help "Copy the current file name to the kill ring"] | 502 | :help "Copy the current file name to the kill ring"] |
| 488 | "--" | 503 | "--" |
| 489 | ["Fit Frame to Image" image-mode-fit-frame :active t | ||
| 490 | :help "Resize frame to match image"] | ||
| 491 | "--" | ||
| 492 | ["Animate Image" image-toggle-animation :style toggle | 504 | ["Animate Image" image-toggle-animation :style toggle |
| 493 | :selected (let ((image (image-get-display-property))) | 505 | :selected (let ((image (image-get-display-property))) |
| 494 | (and image (image-animate-timer image))) | 506 | (and image (image-animate-timer image))) |
| @@ -767,11 +779,12 @@ was inserted." | |||
| 767 | props image) | 779 | props image) |
| 768 | 780 | ||
| 769 | ;; Get the rotation data from the file, if any. | 781 | ;; Get the rotation data from the file, if any. |
| 770 | (setq image-transform-rotation | 782 | (when (zerop image-transform-rotation) ; don't reset modified value |
| 771 | (or (exif-orientation | 783 | (setq image-transform-rotation |
| 772 | (ignore-error exif-error | 784 | (or (exif-orientation |
| 773 | (exif-parse-buffer))) | 785 | (ignore-error exif-error |
| 774 | 0.0)) | 786 | (exif-parse-buffer))) |
| 787 | 0.0))) | ||
| 775 | 788 | ||
| 776 | ;; :scale 1: If we do not set this, create-image will apply | 789 | ;; :scale 1: If we do not set this, create-image will apply |
| 777 | ;; default scaling based on font size. | 790 | ;; default scaling based on font size. |
| @@ -1250,8 +1263,7 @@ Do this for an image of type `imagemagick' to make sure that the | |||
| 1250 | elisp code matches the way ImageMagick computes the bounding box | 1263 | elisp code matches the way ImageMagick computes the bounding box |
| 1251 | of a rotated image." | 1264 | of a rotated image." |
| 1252 | (when (and (not (numberp image-transform-resize)) | 1265 | (when (and (not (numberp image-transform-resize)) |
| 1253 | (boundp 'image-type) | 1266 | (boundp 'image-type)) |
| 1254 | (eq image-type 'imagemagick)) | ||
| 1255 | (let ((size (image-display-size (image-get-display-property) t))) | 1267 | (let ((size (image-display-size (image-get-display-property) t))) |
| 1256 | (cond ((eq image-transform-resize 'fit-width) | 1268 | (cond ((eq image-transform-resize 'fit-width) |
| 1257 | (cl-assert (= (car size) | 1269 | (cl-assert (= (car size) |
| @@ -1268,10 +1280,7 @@ of a rotated image." | |||
| 1268 | "Return rescaling/rotation properties for image SPEC. | 1280 | "Return rescaling/rotation properties for image SPEC. |
| 1269 | These properties are determined by the Image mode variables | 1281 | These properties are determined by the Image mode variables |
| 1270 | `image-transform-resize' and `image-transform-rotation'. The | 1282 | `image-transform-resize' and `image-transform-rotation'. The |
| 1271 | return value is suitable for appending to an image spec. | 1283 | return value is suitable for appending to an image spec." |
| 1272 | |||
| 1273 | Rescaling and rotation properties only take effect if Emacs is | ||
| 1274 | compiled with ImageMagick support." | ||
| 1275 | (setq image-transform-scale 1.0) | 1284 | (setq image-transform-scale 1.0) |
| 1276 | (when (or image-transform-resize | 1285 | (when (or image-transform-resize |
| 1277 | (/= image-transform-rotation 0.0)) | 1286 | (/= image-transform-rotation 0.0)) |
| @@ -1302,41 +1311,32 @@ compiled with ImageMagick support." | |||
| 1302 | (list :rotation image-transform-rotation)))))) | 1311 | (list :rotation image-transform-rotation)))))) |
| 1303 | 1312 | ||
| 1304 | (defun image-transform-set-scale (scale) | 1313 | (defun image-transform-set-scale (scale) |
| 1305 | "Prompt for a number, and resize the current image by that amount. | 1314 | "Prompt for a number, and resize the current image by that amount." |
| 1306 | This command has no effect unless Emacs is compiled with | ||
| 1307 | ImageMagick support." | ||
| 1308 | (interactive "nScale: ") | 1315 | (interactive "nScale: ") |
| 1309 | (setq image-transform-resize scale) | 1316 | (setq image-transform-resize scale) |
| 1310 | (image-toggle-display-image)) | 1317 | (image-toggle-display-image)) |
| 1311 | 1318 | ||
| 1312 | (defun image-transform-fit-to-height () | 1319 | (defun image-transform-fit-to-height () |
| 1313 | "Fit the current image to the height of the current window. | 1320 | "Fit the current image to the height of the current window." |
| 1314 | This command has no effect unless Emacs is compiled with | ||
| 1315 | ImageMagick support." | ||
| 1316 | (interactive) | 1321 | (interactive) |
| 1317 | (setq image-transform-resize 'fit-height) | 1322 | (setq image-transform-resize 'fit-height) |
| 1318 | (image-toggle-display-image)) | 1323 | (image-toggle-display-image)) |
| 1319 | 1324 | ||
| 1320 | (defun image-transform-fit-to-width () | 1325 | (defun image-transform-fit-to-width () |
| 1321 | "Fit the current image to the width of the current window. | 1326 | "Fit the current image to the width of the current window." |
| 1322 | This command has no effect unless Emacs is compiled with | ||
| 1323 | ImageMagick support." | ||
| 1324 | (interactive) | 1327 | (interactive) |
| 1325 | (setq image-transform-resize 'fit-width) | 1328 | (setq image-transform-resize 'fit-width) |
| 1326 | (image-toggle-display-image)) | 1329 | (image-toggle-display-image)) |
| 1327 | 1330 | ||
| 1328 | (defun image-transform-set-rotation (rotation) | 1331 | (defun image-transform-set-rotation (rotation) |
| 1329 | "Prompt for an angle ROTATION, and rotate the image by that amount. | 1332 | "Prompt for an angle ROTATION, and rotate the image by that amount. |
| 1330 | ROTATION should be in degrees. This command has no effect unless | 1333 | ROTATION should be in degrees." |
| 1331 | Emacs is compiled with ImageMagick support." | ||
| 1332 | (interactive "nRotation angle (in degrees): ") | 1334 | (interactive "nRotation angle (in degrees): ") |
| 1333 | (setq image-transform-rotation (float (mod rotation 360))) | 1335 | (setq image-transform-rotation (float (mod rotation 360))) |
| 1334 | (image-toggle-display-image)) | 1336 | (image-toggle-display-image)) |
| 1335 | 1337 | ||
| 1336 | (defun image-transform-reset () | 1338 | (defun image-transform-reset () |
| 1337 | "Display the current image with the default size and rotation. | 1339 | "Display the current image with the default size and rotation." |
| 1338 | This command has no effect unless Emacs is compiled with | ||
| 1339 | ImageMagick support." | ||
| 1340 | (interactive) | 1340 | (interactive) |
| 1341 | (setq image-transform-resize nil | 1341 | (setq image-transform-resize nil |
| 1342 | image-transform-rotation 0.0 | 1342 | image-transform-rotation 0.0 |
diff --git a/lisp/image/exif.el b/lisp/image/exif.el index 065456dc318..6aeb52c726d 100644 --- a/lisp/image/exif.el +++ b/lisp/image/exif.el | |||
| @@ -95,7 +95,7 @@ mirrored or not.") | |||
| 95 | "Parse FILE (a JPEG file) and return the Exif data, if any. | 95 | "Parse FILE (a JPEG file) and return the Exif data, if any. |
| 96 | The return value is a list of Exif items. | 96 | The return value is a list of Exif items. |
| 97 | 97 | ||
| 98 | If the data is invalid, an `exif-error' is signalled." | 98 | If the data is invalid, an `exif-error' is signaled." |
| 99 | (with-temp-buffer | 99 | (with-temp-buffer |
| 100 | (set-buffer-multibyte nil) | 100 | (set-buffer-multibyte nil) |
| 101 | (insert-file-contents-literally file) | 101 | (insert-file-contents-literally file) |
| @@ -105,7 +105,7 @@ If the data is invalid, an `exif-error' is signalled." | |||
| 105 | "Parse BUFFER (which should be a JPEG file) and return the Exif data, if any. | 105 | "Parse BUFFER (which should be a JPEG file) and return the Exif data, if any. |
| 106 | The return value is a list of Exif items. | 106 | The return value is a list of Exif items. |
| 107 | 107 | ||
| 108 | If the data is invalid, an `exif-error' is signalled." | 108 | If the data is invalid, an `exif-error' is signaled." |
| 109 | (setq buffer (or buffer (current-buffer))) | 109 | (setq buffer (or buffer (current-buffer))) |
| 110 | (with-current-buffer buffer | 110 | (with-current-buffer buffer |
| 111 | (if enable-multibyte-characters | 111 | (if enable-multibyte-characters |
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index caa5747817c..5cc10b1315a 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el | |||
| @@ -75,7 +75,7 @@ unless the display width of STR is equal to or less than the display | |||
| 75 | width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS | 75 | width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS |
| 76 | defaults to `truncate-string-ellipsis'. | 76 | defaults to `truncate-string-ellipsis'. |
| 77 | 77 | ||
| 78 | If ELLIPSIS-TEXT-PROPERTY in non-nil, a too-long string will not | 78 | If ELLIPSIS-TEXT-PROPERTY is non-nil, a too-long string will not |
| 79 | be truncated, but instead the elided parts will be covered by a | 79 | be truncated, but instead the elided parts will be covered by a |
| 80 | `display' text property showing the ellipsis." | 80 | `display' text property showing the ellipsis." |
| 81 | (or start-column | 81 | (or start-column |
diff --git a/lisp/json.el b/lisp/json.el index 055f3f5be11..6f3b791ed17 100644 --- a/lisp/json.el +++ b/lisp/json.el | |||
| @@ -736,7 +736,7 @@ you will get the following structure returned: | |||
| 736 | 736 | ||
| 737 | OBJECT should have a structure like one returned by `json-read'. | 737 | OBJECT should have a structure like one returned by `json-read'. |
| 738 | If an error is detected during encoding, an error based on | 738 | If an error is detected during encoding, an error based on |
| 739 | `json-error' is signalled." | 739 | `json-error' is signaled." |
| 740 | (cond ((memq object (list t json-null json-false)) | 740 | (cond ((memq object (list t json-null json-false)) |
| 741 | (json-encode-keyword object)) | 741 | (json-encode-keyword object)) |
| 742 | ((stringp object) (json-encode-string object)) | 742 | ((stringp object) (json-encode-string object)) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 6090e3f74ed..d2c3f9045e5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -163,8 +163,8 @@ perform completion, no matter what ACTION is. | |||
| 163 | 163 | ||
| 164 | If ACTION is `metadata' or a list where the first element is | 164 | If ACTION is `metadata' or a list where the first element is |
| 165 | `boundaries', return nil. If ACTION is nil, this function works | 165 | `boundaries', return nil. If ACTION is nil, this function works |
| 166 | like `try-completion'; if it's t, this function works like | 166 | like `try-completion'; if it is t, this function works like |
| 167 | `all-completion'; and any other values makes it work like | 167 | `all-completion'; and any other value makes it work like |
| 168 | `test-completion'." | 168 | `test-completion'." |
| 169 | (cond | 169 | (cond |
| 170 | ((functionp collection) (funcall collection string predicate action)) | 170 | ((functionp collection) (funcall collection string predicate action)) |
diff --git a/lisp/obsolete/cl.el b/lisp/obsolete/cl.el index 1da4289b695..20bffffd781 100644 --- a/lisp/obsolete/cl.el +++ b/lisp/obsolete/cl.el | |||
| @@ -509,7 +509,7 @@ This method shows how to handle `setf's to places of the form | |||
| 509 | ARGLIST, as if NAME were going to be expanded as a macro, then | 509 | ARGLIST, as if NAME were going to be expanded as a macro, then |
| 510 | the BODY forms are executed and must return a list of five elements: | 510 | the BODY forms are executed and must return a list of five elements: |
| 511 | a temporary-variables list, a value-forms list, a store-variables list | 511 | a temporary-variables list, a value-forms list, a store-variables list |
| 512 | \(of length one), a store-form, and an access- form. | 512 | \(of length one), a store-form, and an access-form. |
| 513 | 513 | ||
| 514 | See `gv-define-expander', and `gv-define-setter' for better and | 514 | See `gv-define-expander', and `gv-define-setter' for better and |
| 515 | simpler ways to define setf-methods." | 515 | simpler ways to define setf-methods." |
diff --git a/lisp/sort.el b/lisp/sort.el index e4ff2afb3d7..de0e1b9519d 100644 --- a/lisp/sort.el +++ b/lisp/sort.el | |||
| @@ -198,7 +198,8 @@ as start and end positions), and with `string<' otherwise." | |||
| 198 | 198 | ||
| 199 | ;;;###autoload | 199 | ;;;###autoload |
| 200 | (defun sort-lines (reverse beg end) | 200 | (defun sort-lines (reverse beg end) |
| 201 | "Sort lines in region alphabetically; argument means descending order. | 201 | "Sort lines in region alphabetically; REVERSE non-nil means descending order. |
| 202 | Interactively, REVERSE is the prefix argument, and BEG and END are the region. | ||
| 202 | Called from a program, there are three arguments: | 203 | Called from a program, there are three arguments: |
| 203 | REVERSE (non-nil means reverse order), BEG and END (region to sort). | 204 | REVERSE (non-nil means reverse order), BEG and END (region to sort). |
| 204 | The variable `sort-fold-case' determines whether alphabetic case affects | 205 | The variable `sort-fold-case' determines whether alphabetic case affects |
diff --git a/lisp/startup.el b/lisp/startup.el index 5af264e3ef7..bff10003f84 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -352,11 +352,11 @@ Setting `init-file-user' does not prevent Emacs from loading | |||
| 352 | 352 | ||
| 353 | (defcustom site-run-file (purecopy "site-start") | 353 | (defcustom site-run-file (purecopy "site-start") |
| 354 | "File containing site-wide run-time initializations. | 354 | "File containing site-wide run-time initializations. |
| 355 | This file is loaded at run-time before `~/.emacs'. It contains inits | 355 | This file is loaded at run-time before `user-init-file'. It contains |
| 356 | that need to be in place for the entire site, but which, due to their | 356 | inits that need to be in place for the entire site, but which, due to |
| 357 | higher incidence of change, don't make sense to put into Emacs's | 357 | their higher incidence of change, don't make sense to put into Emacs's |
| 358 | dump file. Thus, the run-time load order is: 1. file described in | 358 | dump file. Thus, the run-time load order is: 1. file described in |
| 359 | this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'. | 359 | this variable, if non-nil; 2. `user-init-file'; 3. `default.el'. |
| 360 | 360 | ||
| 361 | Don't use the `site-start.el' file for things some users may not like. | 361 | Don't use the `site-start.el' file for things some users may not like. |
| 362 | Put them in `default.el' instead, so that users can more easily | 362 | Put them in `default.el' instead, so that users can more easily |
diff --git a/lisp/subr.el b/lisp/subr.el index f7445d8c25e..c8913145a18 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -385,7 +385,7 @@ entry to the debugger, even when `debug-on-error' is non-nil. | |||
| 385 | This can be overridden by `debug-ignored-errors'. | 385 | This can be overridden by `debug-ignored-errors'. |
| 386 | 386 | ||
| 387 | To signal with MESSAGE without interpreting format characters | 387 | To signal with MESSAGE without interpreting format characters |
| 388 | like `%', `\\=`' and `\\='', use (error \"%s\" MESSAGE). | 388 | like `%', `\\=`' and `\\='', use (user-error \"%s\" MESSAGE). |
| 389 | In Emacs, the convention is that error messages start with a capital | 389 | In Emacs, the convention is that error messages start with a capital |
| 390 | letter but *do not* end with a period. Please follow this convention | 390 | letter but *do not* end with a period. Please follow this convention |
| 391 | for the sake of consistency." | 391 | for the sake of consistency." |
| @@ -3314,7 +3314,7 @@ alternatives." | |||
| 3314 | 3314 | ||
| 3315 | (defun function-get (f prop &optional autoload) | 3315 | (defun function-get (f prop &optional autoload) |
| 3316 | "Return the value of property PROP of function F. | 3316 | "Return the value of property PROP of function F. |
| 3317 | If AUTOLOAD is non-nil and F is autoloaded, try to autoload it | 3317 | If AUTOLOAD is non-nil and F is autoloaded, try to load it |
| 3318 | in the hope that it will set PROP. If AUTOLOAD is `macro', do it only | 3318 | in the hope that it will set PROP. If AUTOLOAD is `macro', do it only |
| 3319 | if it's an autoloaded macro." | 3319 | if it's an autoloaded macro." |
| 3320 | (let ((val nil)) | 3320 | (let ((val nil)) |
| @@ -5021,7 +5021,7 @@ The properties used on SYMBOL are `composefunc', `sendfunc', | |||
| 5021 | (defun backtrace-frames (&optional base) | 5021 | (defun backtrace-frames (&optional base) |
| 5022 | "Collect all frames of current backtrace into a list. | 5022 | "Collect all frames of current backtrace into a list. |
| 5023 | If non-nil, BASE should be a function, and frames before its | 5023 | If non-nil, BASE should be a function, and frames before its |
| 5024 | nearest activation frames are discarded." | 5024 | nearest activation frame are discarded." |
| 5025 | (let ((frames nil)) | 5025 | (let ((frames nil)) |
| 5026 | (mapbacktrace (lambda (&rest frame) (push frame frames)) | 5026 | (mapbacktrace (lambda (&rest frame) (push frame frames)) |
| 5027 | (or base 'backtrace-frames)) | 5027 | (or base 'backtrace-frames)) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a9fbd2f04cb..65f61644b6d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -800,8 +800,8 @@ Otherwise returns the library directory name, if that is defined." | |||
| 800 | 800 | ||
| 801 | (defun ispell-create-debug-buffer (&optional append) | 801 | (defun ispell-create-debug-buffer (&optional append) |
| 802 | "Create an ispell debug buffer for debugging output. | 802 | "Create an ispell debug buffer for debugging output. |
| 803 | If APPEND is non-nil, append the info to previous buffer if exists, | 803 | If APPEND is non-nil, add output to the old buffer if it exists, |
| 804 | otherwise is reset. Returns name of ispell debug buffer. | 804 | otherwise the buffer is erased first. Returns the debug buffer. |
| 805 | See `ispell-buffer-with-debug' for an example of use." | 805 | See `ispell-buffer-with-debug' for an example of use." |
| 806 | (let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*"))) | 806 | (let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*"))) |
| 807 | (with-current-buffer ispell-debug-buffer | 807 | (with-current-buffer ispell-debug-buffer |
| @@ -812,7 +812,7 @@ See `ispell-buffer-with-debug' for an example of use." | |||
| 812 | ispell-debug-buffer)) | 812 | ispell-debug-buffer)) |
| 813 | 813 | ||
| 814 | (defsubst ispell-print-if-debug (format &rest args) | 814 | (defsubst ispell-print-if-debug (format &rest args) |
| 815 | "Print message using FORMAT and ARGS to `ispell-debug-buffer' buffer if enabled." | 815 | "Print message using FORMAT and ARGS to `ispell-debug-buffer' if enabled." |
| 816 | (if (boundp 'ispell-debug-buffer) | 816 | (if (boundp 'ispell-debug-buffer) |
| 817 | (with-current-buffer ispell-debug-buffer | 817 | (with-current-buffer ispell-debug-buffer |
| 818 | (goto-char (point-max)) | 818 | (goto-char (point-max)) |
| @@ -3618,8 +3618,8 @@ Returns the sum SHIFT due to changes in word replacements." | |||
| 3618 | 3618 | ||
| 3619 | ;;;###autoload | 3619 | ;;;###autoload |
| 3620 | (defun ispell-buffer-with-debug (&optional append) | 3620 | (defun ispell-buffer-with-debug (&optional append) |
| 3621 | "`ispell-buffer' with some output sent to `ispell-debug-buffer' buffer. | 3621 | "`ispell-buffer' with some output sent to `ispell-debug-buffer'. |
| 3622 | If APPEND is non-n il, append the info to previous buffer if exists." | 3622 | If APPEND is non-nil, don't erase previous debugging output." |
| 3623 | (interactive) | 3623 | (interactive) |
| 3624 | (let ((ispell-debug-buffer (ispell-create-debug-buffer append))) | 3624 | (let ((ispell-debug-buffer (ispell-create-debug-buffer append))) |
| 3625 | (ispell-buffer))) | 3625 | (ispell-buffer))) |