diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/emacs/dired.texi | 6 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/sequences.texi | 10 | ||||
| -rw-r--r-- | etc/ChangeLog | 2 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 57 | ||||
| -rw-r--r-- | lisp/cedet/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cedet/semantic/texi.el | 4 | ||||
| -rw-r--r-- | lisp/doc-view.el | 35 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 183 | ||||
| -rw-r--r-- | lisp/international/quail.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 74 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 18 |
14 files changed, 303 insertions, 105 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6b4c12511dd..f356d35f1c5 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-09-26 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * dired.texi (Flagging Many Files): Use @emph instead of @strong. | ||
| 4 | |||
| 5 | * emacs.texi (Intro): Minor cleanup. | ||
| 6 | |||
| 1 | 2013-09-22 Xue Fuqiao <xfq.free@gmail.com> | 7 | 2013-09-22 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 8 | ||
| 3 | * fixit.texi (Transpose): | 9 | * fixit.texi (Transpose): |
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index f4ca6c30a5a..391cd99fbce 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -281,9 +281,9 @@ say they are backup files---that is, files whose names end in | |||
| 281 | the backup files for deletion: all but the oldest few and newest few | 281 | the backup files for deletion: all but the oldest few and newest few |
| 282 | backups of any one file. Normally, the number of newest versions kept | 282 | backups of any one file. Normally, the number of newest versions kept |
| 283 | for each file is given by the variable @code{dired-kept-versions} | 283 | for each file is given by the variable @code{dired-kept-versions} |
| 284 | (@strong{not} @code{kept-new-versions}; that applies only when | 284 | (@emph{not} @code{kept-new-versions}; that applies only when saving). |
| 285 | saving). The number of oldest versions to keep is given by the | 285 | The number of oldest versions to keep is given by the variable |
| 286 | variable @code{kept-old-versions}. | 286 | @code{kept-old-versions}. |
| 287 | 287 | ||
| 288 | Period with a positive numeric argument, as in @kbd{C-u 3 .}, | 288 | Period with a positive numeric argument, as in @kbd{C-u 3 .}, |
| 289 | specifies the number of newest versions to keep, overriding | 289 | specifies the number of newest versions to keep, overriding |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 985466810f2..7c594503afb 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -1469,7 +1469,7 @@ Neal Ziring, Teodor Zlatanov, and Detlev Zundel. | |||
| 1469 | 1469 | ||
| 1470 | You are reading about GNU Emacs, the GNU incarnation of the | 1470 | You are reading about GNU Emacs, the GNU incarnation of the |
| 1471 | advanced, self-documenting, customizable, extensible editor Emacs. | 1471 | advanced, self-documenting, customizable, extensible editor Emacs. |
| 1472 | (The `G' in `GNU' is not silent.) | 1472 | (The @samp{G} in @acronym{GNU, @acronym{GNU}'s Not Unix} is not silent.) |
| 1473 | 1473 | ||
| 1474 | We call Emacs @dfn{advanced} because it can do much more than simple | 1474 | We call Emacs @dfn{advanced} because it can do much more than simple |
| 1475 | insertion and deletion of text. It can control subprocesses, indent | 1475 | insertion and deletion of text. It can control subprocesses, indent |
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 00384de7ec8..b6cf322211e 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi | |||
| @@ -713,6 +713,16 @@ This returns @code{t} if @var{object} is a bool-vector, | |||
| 713 | and @code{nil} otherwise. | 713 | and @code{nil} otherwise. |
| 714 | @end defun | 714 | @end defun |
| 715 | 715 | ||
| 716 | @c FIXME: Document these functions: | ||
| 717 | @c `bool-vector-exclusive-or' | ||
| 718 | @c `bool-vector-union' | ||
| 719 | @c `bool-vector-intersection' | ||
| 720 | @c `bool-vector-set-difference' | ||
| 721 | @c `bool-vector-not' | ||
| 722 | @c `bool-vector-subsetp' | ||
| 723 | @c `bool-vector-count-matches' | ||
| 724 | @c `bool-vector-count-matches-at' | ||
| 725 | |||
| 716 | Here is an example of creating, examining, and updating a | 726 | Here is an example of creating, examining, and updating a |
| 717 | bool-vector. Note that the printed form represents up to 8 boolean | 727 | bool-vector. Note that the printed form represents up to 8 boolean |
| 718 | values as a single character. | 728 | values as a single character. |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 06ca0f3f8bc..a68d76fc4d1 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * NEWS: Mention new bool-vector functionality. | 3 | * NEWS: Mention new bool-vector functionality. |
| 4 | 4 | ||
| 5 | aaaa2013-09-15 Jan Djärv <jan.h.d@swipnet.se> | 5 | 2013-09-15 Jan Djärv <jan.h.d@swipnet.se> |
| 6 | 6 | ||
| 7 | * NEWS: Mention the macfont backend. | 7 | * NEWS: Mention the macfont backend. |
| 8 | 8 | ||
| @@ -154,6 +154,9 @@ not consume CPU cycles. | |||
| 154 | some enhancements, like the ability to restore deleted frames. Command | 154 | some enhancements, like the ability to restore deleted frames. Command |
| 155 | `frame-configuration-to-register' is still available, but unbound. | 155 | `frame-configuration-to-register' is still available, but unbound. |
| 156 | 156 | ||
| 157 | ** The command `quail-help' is deleted. Use `C-h C-\' | ||
| 158 | (`describe-input-method') instead. | ||
| 159 | |||
| 157 | 160 | ||
| 158 | * Editing Changes in Emacs 24.4 | 161 | * Editing Changes in Emacs 24.4 |
| 159 | 162 | ||
| @@ -644,7 +647,7 @@ for something (not just adding elements to it), it ought not to affect you. | |||
| 644 | *** `bool-vector-intersection' | 647 | *** `bool-vector-intersection' |
| 645 | *** `bool-vector-set-difference' | 648 | *** `bool-vector-set-difference' |
| 646 | *** `bool-vector-not' | 649 | *** `bool-vector-not' |
| 647 | *** `bool-vector-subset' | 650 | *** `bool-vector-subsetp' |
| 648 | *** `bool-vector-count-matches' | 651 | *** `bool-vector-count-matches' |
| 649 | *** `bool-vector-count-matches-at' | 652 | *** `bool-vector-count-matches-at' |
| 650 | 653 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf450c55612..971cc182448 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,60 @@ | |||
| 1 | 2013-09-28 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/octave.el (inferior-octave-completion-table) | ||
| 4 | (inferior-octave-completion-at-point): Minor tweaks. | ||
| 5 | |||
| 6 | * textmodes/ispell.el (ispell-lookup-words): Rename from | ||
| 7 | lookup-words. (Bug#15460) | ||
| 8 | (lookup-words): Obsolete. | ||
| 9 | (ispell-complete-word, ispell-command-loop): All uses changed. | ||
| 10 | |||
| 11 | 2013-09-28 Rüdiger Sonderfeld <ruediger@c-plusplus.de> | ||
| 12 | |||
| 13 | * lisp/progmodes/octave.el (octave-mode-map): Bind octave-send-buffer. | ||
| 14 | (octave-mode-menu): Add octave-send-buffer. | ||
| 15 | (octave-send-buffer): New function. | ||
| 16 | |||
| 17 | 2013-09-28 Rüdiger Sonderfeld <ruediger@c-plusplus.de> | ||
| 18 | |||
| 19 | * lisp/progmodes/octave.el (octave-mode-map): Add key binding for | ||
| 20 | octave-lookfor. | ||
| 21 | (octave-mode-menu): Add octave-lookfor. | ||
| 22 | (inferior-octave-mode-map, octave-help-mode-map): Bind C-ha to | ||
| 23 | octave-lookfor. | ||
| 24 | (octave-lookfor): New function. | ||
| 25 | |||
| 26 | 2013-09-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 27 | |||
| 28 | * emacs-lisp/cl-macs.el: | ||
| 29 | (cl--loop-destr-temps): Remove. | ||
| 30 | (cl--loop-iterator-function): Rename from cl--loop-map-form and change | ||
| 31 | its convention. | ||
| 32 | (cl--loop-set-iterator-function): New function. | ||
| 33 | (cl-loop): Adjust accordingly, so as not to use cl-subst. | ||
| 34 | (cl--parse-loop-clause): Adjust all uses of cl--loop-map-form. | ||
| 35 | Bind `it' with `let' instead of substituting it with `cl-subst'. | ||
| 36 | (cl--unused-var-p): New function. | ||
| 37 | (cl--loop-let): Don't use the cl--loop-destr-temps hack any more. | ||
| 38 | Eliminate some unused variable warnings (bug#15326). | ||
| 39 | |||
| 40 | 2013-09-27 Tassilo Horn <tsdh@gnu.org> | ||
| 41 | |||
| 42 | * doc-view.el (doc-view-scale-reset): Rename from | ||
| 43 | `doc-view-reset-zoom-level'. | ||
| 44 | (doc-view-scale-adjust): New command. | ||
| 45 | (doc-view-mode-map): Remap `text-scale-adjust' bindings to | ||
| 46 | `doc-view-scale-adjust'. | ||
| 47 | |||
| 48 | 2013-09-26 Tassilo Horn <tsdh@gnu.org> | ||
| 49 | |||
| 50 | * doc-view.el (doc-view-reset-zoom-level): New command. | ||
| 51 | (doc-view-mode-map): Remap text-scale-adjust bindings to doc-view | ||
| 52 | zoom commands (bug#15466). | ||
| 53 | |||
| 54 | 2013-09-26 Kenichi Handa <handa@gnu.org> | ||
| 55 | |||
| 56 | * international/quail.el (quail-help): Make it not a command. | ||
| 57 | |||
| 1 | 2013-09-26 Leo Liu <sdl.web@gmail.com> | 58 | 2013-09-26 Leo Liu <sdl.web@gmail.com> |
| 2 | 59 | ||
| 3 | * minibuffer.el (completion-all-sorted-completions): Make args | 60 | * minibuffer.el (completion-all-sorted-completions): Make args |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index ed3301510f0..4a017644c84 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-09-28 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * semantic/texi.el (semantic-analyze-possible-completions): Use | ||
| 4 | ispell-lookup-words instead. (Bug#15460) | ||
| 5 | |||
| 1 | 2013-09-20 Glenn Morris <rgm@gnu.org> | 6 | 2013-09-20 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * semantic.el (semantic-new-buffer-fcn-was-run, semantic-active-p): | 8 | * semantic.el (semantic-new-buffer-fcn-was-run, semantic-active-p): |
diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 34a85b8b79b..51105077188 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | (require 'texinfo) | 32 | (require 'texinfo) |
| 33 | 33 | ||
| 34 | (defvar ede-minor-mode) | 34 | (defvar ede-minor-mode) |
| 35 | (declare-function lookup-words "ispell") | 35 | (declare-function ispell-lookup-words "ispell") |
| 36 | (declare-function ede-current-project "ede") | 36 | (declare-function ede-current-project "ede") |
| 37 | 37 | ||
| 38 | (defvar semantic-texi-super-regex | 38 | (defvar semantic-texi-super-regex |
| @@ -431,7 +431,7 @@ that start with that symbol." | |||
| 431 | ((member 'word (oref context :prefixclass)) | 431 | ((member 'word (oref context :prefixclass)) |
| 432 | ;; Do completion for words via ispell. | 432 | ;; Do completion for words via ispell. |
| 433 | (require 'ispell) | 433 | (require 'ispell) |
| 434 | (let ((word-list (lookup-words prefix))) | 434 | (let ((word-list (ispell-lookup-words prefix))) |
| 435 | (mapcar (lambda (f) (semantic-tag f 'word)) word-list)) | 435 | (mapcar (lambda (f) (semantic-tag f 'word)) word-list)) |
| 436 | ) | 436 | ) |
| 437 | (t nil)) | 437 | (t nil)) |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index cbf4d0bda31..e59aecc8773 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -405,7 +405,10 @@ Typically \"page-%s.png\".") | |||
| 405 | (define-key map (kbd "RET") 'image-next-line) | 405 | (define-key map (kbd "RET") 'image-next-line) |
| 406 | ;; Zoom in/out. | 406 | ;; Zoom in/out. |
| 407 | (define-key map "+" 'doc-view-enlarge) | 407 | (define-key map "+" 'doc-view-enlarge) |
| 408 | (define-key map "=" 'doc-view-enlarge) | ||
| 408 | (define-key map "-" 'doc-view-shrink) | 409 | (define-key map "-" 'doc-view-shrink) |
| 410 | (define-key map "0" 'doc-view-scale-reset) | ||
| 411 | (define-key map [remap text-scale-adjust] 'doc-view-scale-adjust) | ||
| 409 | ;; Fit the image to the window | 412 | ;; Fit the image to the window |
| 410 | (define-key map "W" 'doc-view-fit-width-to-window) | 413 | (define-key map "W" 'doc-view-fit-width-to-window) |
| 411 | (define-key map "H" 'doc-view-fit-height-to-window) | 414 | (define-key map "H" 'doc-view-fit-height-to-window) |
| @@ -753,6 +756,38 @@ OpenDocument format)." | |||
| 753 | (interactive (list doc-view-shrink-factor)) | 756 | (interactive (list doc-view-shrink-factor)) |
| 754 | (doc-view-enlarge (/ 1.0 factor))) | 757 | (doc-view-enlarge (/ 1.0 factor))) |
| 755 | 758 | ||
| 759 | (defun doc-view-scale-reset () | ||
| 760 | "Reset the document size/zoom level to the initial one." | ||
| 761 | (interactive) | ||
| 762 | (if (and doc-view-scale-internally | ||
| 763 | (eq (plist-get (cdr (doc-view-current-image)) :type) | ||
| 764 | 'imagemagick)) | ||
| 765 | (progn | ||
| 766 | (kill-local-variable 'doc-view-image-width) | ||
| 767 | (doc-view-insert-image | ||
| 768 | (plist-get (cdr (doc-view-current-image)) :file) | ||
| 769 | :width doc-view-image-width)) | ||
| 770 | (kill-local-variable 'doc-view-resolution) | ||
| 771 | (doc-view-reconvert-doc))) | ||
| 772 | |||
| 773 | (defun doc-view-scale-adjust (factor) | ||
| 774 | "Adjust the scale of the DocView page images by FACTOR. | ||
| 775 | FACTOR defaults to `doc-view-shrink-factor'. | ||
| 776 | |||
| 777 | The actual adjustment made depends on the final component of the | ||
| 778 | key-binding used to invoke the command, with all modifiers removed: | ||
| 779 | |||
| 780 | +, = Increase the image scale by FACTOR | ||
| 781 | - Decrease the image scale by FACTOR | ||
| 782 | 0 Reset the image scale to the initial scale" | ||
| 783 | (interactive (list doc-view-shrink-factor)) | ||
| 784 | (let ((ev last-command-event) | ||
| 785 | (echo-keystrokes nil)) | ||
| 786 | (pcase (event-basic-type ev) | ||
| 787 | ((or ?+ ?=) (doc-view-enlarge factor)) | ||
| 788 | (?- (doc-view-shrink factor)) | ||
| 789 | (?0 (doc-view-scale-reset))))) | ||
| 790 | |||
| 756 | (defun doc-view-fit-width-to-window () | 791 | (defun doc-view-fit-width-to-window () |
| 757 | "Fit the image width to the window width." | 792 | "Fit the image width to the window width." |
| 758 | (interactive) | 793 | (interactive) |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 031bf5553d0..60fdc09c053 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -756,14 +756,22 @@ This is compatible with Common Lisp, but note that `defun' and | |||
| 756 | ;;; The "cl-loop" macro. | 756 | ;;; The "cl-loop" macro. |
| 757 | 757 | ||
| 758 | (defvar cl--loop-args) (defvar cl--loop-accum-var) (defvar cl--loop-accum-vars) | 758 | (defvar cl--loop-args) (defvar cl--loop-accum-var) (defvar cl--loop-accum-vars) |
| 759 | (defvar cl--loop-bindings) (defvar cl--loop-body) (defvar cl--loop-destr-temps) | 759 | (defvar cl--loop-bindings) (defvar cl--loop-body) |
| 760 | (defvar cl--loop-finally) (defvar cl--loop-finish-flag) | 760 | (defvar cl--loop-finally) |
| 761 | (defvar cl--loop-finish-flag) ;Symbol set to nil to exit the loop? | ||
| 761 | (defvar cl--loop-first-flag) | 762 | (defvar cl--loop-first-flag) |
| 762 | (defvar cl--loop-initially) (defvar cl--loop-map-form) (defvar cl--loop-name) | 763 | (defvar cl--loop-initially) (defvar cl--loop-iterator-function) |
| 764 | (defvar cl--loop-name) | ||
| 763 | (defvar cl--loop-result) (defvar cl--loop-result-explicit) | 765 | (defvar cl--loop-result) (defvar cl--loop-result-explicit) |
| 764 | (defvar cl--loop-result-var) (defvar cl--loop-steps) | 766 | (defvar cl--loop-result-var) (defvar cl--loop-steps) |
| 765 | (defvar cl--loop-symbol-macs) | 767 | (defvar cl--loop-symbol-macs) |
| 766 | 768 | ||
| 769 | (defun cl--loop-set-iterator-function (kind iterator) | ||
| 770 | (if cl--loop-iterator-function | ||
| 771 | ;; FIXME: Of course, we could make it work, but why bother. | ||
| 772 | (error "Iteration on %S does not support this combination" kind) | ||
| 773 | (setq cl--loop-iterator-function iterator))) | ||
| 774 | |||
| 767 | ;;;###autoload | 775 | ;;;###autoload |
| 768 | (defmacro cl-loop (&rest loop-args) | 776 | (defmacro cl-loop (&rest loop-args) |
| 769 | "The Common Lisp `loop' macro. | 777 | "The Common Lisp `loop' macro. |
| @@ -817,13 +825,35 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 817 | (delq nil (delq t (cl-copy-list loop-args)))))) | 825 | (delq nil (delq t (cl-copy-list loop-args)))))) |
| 818 | `(cl-block nil (while t ,@loop-args)) | 826 | `(cl-block nil (while t ,@loop-args)) |
| 819 | (let ((cl--loop-args loop-args) (cl--loop-name nil) (cl--loop-bindings nil) | 827 | (let ((cl--loop-args loop-args) (cl--loop-name nil) (cl--loop-bindings nil) |
| 820 | (cl--loop-body nil) (cl--loop-steps nil) | 828 | (cl--loop-body nil) (cl--loop-steps nil) |
| 821 | (cl--loop-result nil) (cl--loop-result-explicit nil) | 829 | (cl--loop-result nil) (cl--loop-result-explicit nil) |
| 822 | (cl--loop-result-var nil) (cl--loop-finish-flag nil) | 830 | (cl--loop-result-var nil) (cl--loop-finish-flag nil) |
| 823 | (cl--loop-accum-var nil) (cl--loop-accum-vars nil) | 831 | (cl--loop-accum-var nil) (cl--loop-accum-vars nil) |
| 824 | (cl--loop-initially nil) (cl--loop-finally nil) | 832 | (cl--loop-initially nil) (cl--loop-finally nil) |
| 825 | (cl--loop-map-form nil) (cl--loop-first-flag nil) | 833 | (cl--loop-iterator-function nil) (cl--loop-first-flag nil) |
| 826 | (cl--loop-destr-temps nil) (cl--loop-symbol-macs nil)) | 834 | (cl--loop-symbol-macs nil)) |
| 835 | ;; Here is more or less how those dynbind vars are used after looping | ||
| 836 | ;; over cl--parse-loop-clause: | ||
| 837 | ;; | ||
| 838 | ;; (cl-block ,cl--loop-name | ||
| 839 | ;; (cl-symbol-macrolet ,cl--loop-symbol-macs | ||
| 840 | ;; (foldl #'cl--loop-let | ||
| 841 | ;; `((,cl--loop-result-var) | ||
| 842 | ;; ((,cl--loop-first-flag t)) | ||
| 843 | ;; ((,cl--loop-finish-flag t)) | ||
| 844 | ;; ,@cl--loop-bindings) | ||
| 845 | ;; ,@(nreverse cl--loop-initially) | ||
| 846 | ;; (while ;(well: cl--loop-iterator-function) | ||
| 847 | ;; ,(car (cl--loop-build-ands (nreverse cl--loop-body))) | ||
| 848 | ;; ,@(cadr (cl--loop-build-ands (nreverse cl--loop-body))) | ||
| 849 | ;; ,@(nreverse cl--loop-steps) | ||
| 850 | ;; (setq ,cl--loop-first-flag nil)) | ||
| 851 | ;; (if (not ,cl--loop-finish-flag) ;FIXME: Why `if' vs `progn'? | ||
| 852 | ;; ,cl--loop-result-var | ||
| 853 | ;; ,@(nreverse cl--loop-finally) | ||
| 854 | ;; ,(or cl--loop-result-explicit | ||
| 855 | ;; cl--loop-result))))) | ||
| 856 | ;; | ||
| 827 | (setq cl--loop-args (append cl--loop-args '(cl-end-loop))) | 857 | (setq cl--loop-args (append cl--loop-args '(cl-end-loop))) |
| 828 | (while (not (eq (car cl--loop-args) 'cl-end-loop)) | 858 | (while (not (eq (car cl--loop-args) 'cl-end-loop)) |
| 829 | (cl--parse-loop-clause)) | 859 | (cl--parse-loop-clause)) |
| @@ -839,15 +869,15 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 839 | (while-body (nconc (cadr ands) (nreverse cl--loop-steps))) | 869 | (while-body (nconc (cadr ands) (nreverse cl--loop-steps))) |
| 840 | (body (append | 870 | (body (append |
| 841 | (nreverse cl--loop-initially) | 871 | (nreverse cl--loop-initially) |
| 842 | (list (if cl--loop-map-form | 872 | (list (if cl--loop-iterator-function |
| 843 | `(cl-block --cl-finish-- | 873 | `(cl-block --cl-finish-- |
| 844 | ,(cl-subst | 874 | ,(funcall cl--loop-iterator-function |
| 845 | (if (eq (car ands) t) while-body | 875 | (if (eq (car ands) t) while-body |
| 846 | (cons `(or ,(car ands) | 876 | (cons `(or ,(car ands) |
| 847 | (cl-return-from --cl-finish-- | 877 | (cl-return-from |
| 848 | nil)) | 878 | --cl-finish-- |
| 849 | while-body)) | 879 | nil)) |
| 850 | '--cl-map cl--loop-map-form)) | 880 | while-body)))) |
| 851 | `(while ,(car ands) ,@while-body))) | 881 | `(while ,(car ands) ,@while-body))) |
| 852 | (if cl--loop-finish-flag | 882 | (if cl--loop-finish-flag |
| 853 | (if (equal epilogue '(nil)) (list cl--loop-result-var) | 883 | (if (equal epilogue '(nil)) (list cl--loop-result-var) |
| @@ -1216,15 +1246,18 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1216 | (make-symbol "--cl-var--")))) | 1246 | (make-symbol "--cl-var--")))) |
| 1217 | (if (memq word '(hash-value hash-values)) | 1247 | (if (memq word '(hash-value hash-values)) |
| 1218 | (setq var (prog1 other (setq other var)))) | 1248 | (setq var (prog1 other (setq other var)))) |
| 1219 | (setq cl--loop-map-form | 1249 | (cl--loop-set-iterator-function |
| 1220 | `(maphash (lambda (,var ,other) . --cl-map) ,table)))) | 1250 | 'hash-tables (lambda (body) |
| 1251 | `(maphash (lambda (,var ,other) . ,body) | ||
| 1252 | ,table))))) | ||
| 1221 | 1253 | ||
| 1222 | ((memq word '(symbol present-symbol external-symbol | 1254 | ((memq word '(symbol present-symbol external-symbol |
| 1223 | symbols present-symbols external-symbols)) | 1255 | symbols present-symbols external-symbols)) |
| 1224 | (let ((ob (and (memq (car cl--loop-args) '(in of)) | 1256 | (let ((ob (and (memq (car cl--loop-args) '(in of)) |
| 1225 | (cl--pop2 cl--loop-args)))) | 1257 | (cl--pop2 cl--loop-args)))) |
| 1226 | (setq cl--loop-map-form | 1258 | (cl--loop-set-iterator-function |
| 1227 | `(mapatoms (lambda (,var) . --cl-map) ,ob)))) | 1259 | 'symbols (lambda (body) |
| 1260 | `(mapatoms (lambda (,var) . ,body) ,ob))))) | ||
| 1228 | 1261 | ||
| 1229 | ((memq word '(overlay overlays extent extents)) | 1262 | ((memq word '(overlay overlays extent extents)) |
| 1230 | (let ((buf nil) (from nil) (to nil)) | 1263 | (let ((buf nil) (from nil) (to nil)) |
| @@ -1234,11 +1267,12 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1234 | ((eq (car cl--loop-args) 'to) | 1267 | ((eq (car cl--loop-args) 'to) |
| 1235 | (setq to (cl--pop2 cl--loop-args))) | 1268 | (setq to (cl--pop2 cl--loop-args))) |
| 1236 | (t (setq buf (cl--pop2 cl--loop-args))))) | 1269 | (t (setq buf (cl--pop2 cl--loop-args))))) |
| 1237 | (setq cl--loop-map-form | 1270 | (cl--loop-set-iterator-function |
| 1238 | `(cl--map-overlays | 1271 | 'overlays (lambda (body) |
| 1239 | (lambda (,var ,(make-symbol "--cl-var--")) | 1272 | `(cl--map-overlays |
| 1240 | (progn . --cl-map) nil) | 1273 | (lambda (,var ,(make-symbol "--cl-var--")) |
| 1241 | ,buf ,from ,to)))) | 1274 | (progn . ,body) nil) |
| 1275 | ,buf ,from ,to))))) | ||
| 1242 | 1276 | ||
| 1243 | ((memq word '(interval intervals)) | 1277 | ((memq word '(interval intervals)) |
| 1244 | (let ((buf nil) (prop nil) (from nil) (to nil) | 1278 | (let ((buf nil) (prop nil) (from nil) (to nil) |
| @@ -1255,10 +1289,11 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1255 | (if (and (consp var) (symbolp (car var)) (symbolp (cdr var))) | 1289 | (if (and (consp var) (symbolp (car var)) (symbolp (cdr var))) |
| 1256 | (setq var1 (car var) var2 (cdr var)) | 1290 | (setq var1 (car var) var2 (cdr var)) |
| 1257 | (push (list var `(cons ,var1 ,var2)) loop-for-sets)) | 1291 | (push (list var `(cons ,var1 ,var2)) loop-for-sets)) |
| 1258 | (setq cl--loop-map-form | 1292 | (cl--loop-set-iterator-function |
| 1259 | `(cl--map-intervals | 1293 | 'intervals (lambda (body) |
| 1260 | (lambda (,var1 ,var2) . --cl-map) | 1294 | `(cl--map-intervals |
| 1261 | ,buf ,prop ,from ,to)))) | 1295 | (lambda (,var1 ,var2) . ,body) |
| 1296 | ,buf ,prop ,from ,to))))) | ||
| 1262 | 1297 | ||
| 1263 | ((memq word key-types) | 1298 | ((memq word key-types) |
| 1264 | (or (memq (car cl--loop-args) '(in of)) | 1299 | (or (memq (car cl--loop-args) '(in of)) |
| @@ -1274,10 +1309,11 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1274 | (make-symbol "--cl-var--")))) | 1309 | (make-symbol "--cl-var--")))) |
| 1275 | (if (memq word '(key-binding key-bindings)) | 1310 | (if (memq word '(key-binding key-bindings)) |
| 1276 | (setq var (prog1 other (setq other var)))) | 1311 | (setq var (prog1 other (setq other var)))) |
| 1277 | (setq cl--loop-map-form | 1312 | (cl--loop-set-iterator-function |
| 1278 | `(,(if (memq word '(key-seq key-seqs)) | 1313 | 'keys (lambda (body) |
| 1279 | 'cl--map-keymap-recursively 'map-keymap) | 1314 | `(,(if (memq word '(key-seq key-seqs)) |
| 1280 | (lambda (,var ,other) . --cl-map) ,cl-map)))) | 1315 | 'cl--map-keymap-recursively 'map-keymap) |
| 1316 | (lambda (,var ,other) . ,body) ,cl-map))))) | ||
| 1281 | 1317 | ||
| 1282 | ((memq word '(frame frames screen screens)) | 1318 | ((memq word '(frame frames screen screens)) |
| 1283 | (let ((temp (make-symbol "--cl-var--"))) | 1319 | (let ((temp (make-symbol "--cl-var--"))) |
| @@ -1448,12 +1484,9 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1448 | (if (eq word 'unless) (setq then (prog1 else (setq else then)))) | 1484 | (if (eq word 'unless) (setq then (prog1 else (setq else then)))) |
| 1449 | (let ((form (cons (if simple (cons 'progn (nth 1 then)) (nth 2 then)) | 1485 | (let ((form (cons (if simple (cons 'progn (nth 1 then)) (nth 2 then)) |
| 1450 | (if simple (nth 1 else) (list (nth 2 else)))))) | 1486 | (if simple (nth 1 else) (list (nth 2 else)))))) |
| 1451 | (if (cl--expr-contains form 'it) | 1487 | (setq form (if (cl--expr-contains form 'it) |
| 1452 | (let ((temp (make-symbol "--cl-var--"))) | 1488 | `(let ((it ,cond)) (if it ,@form)) |
| 1453 | (push (list temp) cl--loop-bindings) | 1489 | `(if ,cond ,@form))) |
| 1454 | (setq form `(if (setq ,temp ,cond) | ||
| 1455 | ,@(cl-subst temp 'it form)))) | ||
| 1456 | (setq form `(if ,cond ,@form))) | ||
| 1457 | (push (if simple `(progn ,form t) form) cl--loop-body)))) | 1490 | (push (if simple `(progn ,form t) form) cl--loop-body)))) |
| 1458 | 1491 | ||
| 1459 | ((memq word '(do doing)) | 1492 | ((memq word '(do doing)) |
| @@ -1478,36 +1511,50 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1478 | (if (eq (car cl--loop-args) 'and) | 1511 | (if (eq (car cl--loop-args) 'and) |
| 1479 | (progn (pop cl--loop-args) (cl--parse-loop-clause))))) | 1512 | (progn (pop cl--loop-args) (cl--parse-loop-clause))))) |
| 1480 | 1513 | ||
| 1481 | (defun cl--loop-let (specs body par) ; uses loop-* | 1514 | (defun cl--unused-var-p (sym) |
| 1482 | (let ((p specs) (temps nil) (new nil)) | 1515 | (or (null sym) (eq ?_ (aref (symbol-name sym) 0)))) |
| 1483 | (while (and p (or (symbolp (car-safe (car p))) (null (cl-cadar p)))) | 1516 | |
| 1484 | (setq p (cdr p))) | 1517 | (defun cl--loop-let (specs body par) ; modifies cl--loop-bindings |
| 1485 | (and par p | 1518 | "Build an expression equivalent to (let SPECS BODY). |
| 1486 | (progn | 1519 | SPECS can include bindings using `cl-loop's destructuring (not to be |
| 1487 | (setq par nil p specs) | 1520 | confused with the patterns of `cl-destructuring-bind'). |
| 1488 | (while p | 1521 | If PAR is nil, do the bindings step by step, like `let*'. |
| 1489 | (or (macroexp-const-p (cl-cadar p)) | 1522 | If BODY is `setq', then use SPECS for assignments rather than for bindings." |
| 1490 | (let ((temp (make-symbol "--cl-var--"))) | 1523 | (let ((temps nil) (new nil)) |
| 1491 | (push (list temp (cl-cadar p)) temps) | 1524 | (when par |
| 1492 | (setcar (cdar p) temp))) | 1525 | (let ((p specs)) |
| 1493 | (setq p (cdr p))))) | 1526 | (while (and p (or (symbolp (car-safe (car p))) (null (cl-cadar p)))) |
| 1527 | (setq p (cdr p))) | ||
| 1528 | (when p | ||
| 1529 | (setq par nil) | ||
| 1530 | (dolist (spec specs) | ||
| 1531 | (or (macroexp-const-p (cadr spec)) | ||
| 1532 | (let ((temp (make-symbol "--cl-var--"))) | ||
| 1533 | (push (list temp (cadr spec)) temps) | ||
| 1534 | (setcar (cdr spec) temp))))))) | ||
| 1494 | (while specs | 1535 | (while specs |
| 1495 | (if (and (consp (car specs)) (listp (caar specs))) | 1536 | (let* ((binding (pop specs)) |
| 1496 | (let* ((spec (caar specs)) (nspecs nil) | 1537 | (spec (car-safe binding))) |
| 1497 | (expr (cadr (pop specs))) | 1538 | (if (and (consp binding) (or (consp spec) (cl--unused-var-p spec))) |
| 1498 | (temp | 1539 | (let* ((nspecs nil) |
| 1499 | (cdr (or (assq spec cl--loop-destr-temps) | 1540 | (expr (car (cdr-safe binding))) |
| 1500 | (car (push (cons spec | 1541 | (temp (last spec 0))) |
| 1501 | (or (last spec 0) | 1542 | (if (and (cl--unused-var-p temp) (null expr)) |
| 1502 | (make-symbol "--cl-var--"))) | 1543 | nil ;; Don't bother declaring/setting `temp' since it won't |
| 1503 | cl--loop-destr-temps)))))) | 1544 | ;; be used when `expr' is nil, anyway. |
| 1504 | (push (list temp expr) new) | 1545 | (when (and (eq body 'setq) (cl--unused-var-p temp)) |
| 1505 | (while (consp spec) | 1546 | ;; Prefer a fresh uninterned symbol over "_to", to avoid |
| 1506 | (push (list (pop spec) | 1547 | ;; warnings that we set an unused variable. |
| 1507 | (and expr (list (if spec 'pop 'car) temp))) | 1548 | (setq temp (make-symbol "--cl-var--")) |
| 1508 | nspecs)) | 1549 | ;; Make sure this temp variable is locally declared. |
| 1509 | (setq specs (nconc (nreverse nspecs) specs))) | 1550 | (push (list (list temp)) cl--loop-bindings)) |
| 1510 | (push (pop specs) new))) | 1551 | (push (list temp expr) new)) |
| 1552 | (while (consp spec) | ||
| 1553 | (push (list (pop spec) | ||
| 1554 | (and expr (list (if spec 'pop 'car) temp))) | ||
| 1555 | nspecs)) | ||
| 1556 | (setq specs (nconc (nreverse nspecs) specs))) | ||
| 1557 | (push binding new)))) | ||
| 1511 | (if (eq body 'setq) | 1558 | (if (eq body 'setq) |
| 1512 | (let ((set (cons (if par 'cl-psetq 'setq) | 1559 | (let ((set (cons (if par 'cl-psetq 'setq) |
| 1513 | (apply 'nconc (nreverse new))))) | 1560 | (apply 'nconc (nreverse new))))) |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 245f7975d91..f2df229e349 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -2486,7 +2486,6 @@ should be made by `quail-build-decode-map' (which see)." | |||
| 2486 | "Show brief description of the current Quail package. | 2486 | "Show brief description of the current Quail package. |
| 2487 | Optional arg PACKAGE specifies the name of alternative Quail | 2487 | Optional arg PACKAGE specifies the name of alternative Quail |
| 2488 | package to describe." | 2488 | package to describe." |
| 2489 | (interactive) | ||
| 2490 | (require 'help-mode) | 2489 | (require 'help-mode) |
| 2491 | (let ((help-xref-mule-regexp help-xref-mule-regexp-template) | 2490 | (let ((help-xref-mule-regexp help-xref-mule-regexp-template) |
| 2492 | (mb enable-multibyte-characters) | 2491 | (mb enable-multibyte-characters) |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index f20a57940be..899f2752a7e 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; octave.el --- editing octave source files under emacs -*- lexical-binding: t; -*- | 1 | ;;; octave.el --- editing octave source files under emacs -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2001-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2001-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; This package provides emacs support for Octave. It defines a major | 27 | ;; This package provides Emacs support for Octave. It defines a major |
| 28 | ;; mode for editing Octave code and contains code for interacting with | 28 | ;; mode for editing Octave code and contains code for interacting with |
| 29 | ;; an inferior Octave process using comint. | 29 | ;; an inferior Octave process using comint. |
| 30 | 30 | ||
| @@ -109,11 +109,13 @@ parenthetical grouping.") | |||
| 109 | (define-key map "\C-c/" 'smie-close-block) | 109 | (define-key map "\C-c/" 'smie-close-block) |
| 110 | (define-key map "\C-c;" 'octave-update-function-file-comment) | 110 | (define-key map "\C-c;" 'octave-update-function-file-comment) |
| 111 | (define-key map "\C-hd" 'octave-help) | 111 | (define-key map "\C-hd" 'octave-help) |
| 112 | (define-key map "\C-ha" 'octave-lookfor) | ||
| 112 | (define-key map "\C-c\C-f" 'octave-insert-defun) | 113 | (define-key map "\C-c\C-f" 'octave-insert-defun) |
| 113 | (define-key map "\C-c\C-il" 'octave-send-line) | 114 | (define-key map "\C-c\C-il" 'octave-send-line) |
| 114 | (define-key map "\C-c\C-ib" 'octave-send-block) | 115 | (define-key map "\C-c\C-ib" 'octave-send-block) |
| 115 | (define-key map "\C-c\C-if" 'octave-send-defun) | 116 | (define-key map "\C-c\C-if" 'octave-send-defun) |
| 116 | (define-key map "\C-c\C-ir" 'octave-send-region) | 117 | (define-key map "\C-c\C-ir" 'octave-send-region) |
| 118 | (define-key map "\C-c\C-ia" 'octave-send-buffer) | ||
| 117 | (define-key map "\C-c\C-is" 'octave-show-process-buffer) | 119 | (define-key map "\C-c\C-is" 'octave-show-process-buffer) |
| 118 | (define-key map "\C-c\C-iq" 'octave-hide-process-buffer) | 120 | (define-key map "\C-c\C-iq" 'octave-hide-process-buffer) |
| 119 | (define-key map "\C-c\C-ik" 'octave-kill-process) | 121 | (define-key map "\C-c\C-ik" 'octave-kill-process) |
| @@ -121,6 +123,7 @@ parenthetical grouping.") | |||
| 121 | (define-key map "\C-c\C-i\C-b" 'octave-send-block) | 123 | (define-key map "\C-c\C-i\C-b" 'octave-send-block) |
| 122 | (define-key map "\C-c\C-i\C-f" 'octave-send-defun) | 124 | (define-key map "\C-c\C-i\C-f" 'octave-send-defun) |
| 123 | (define-key map "\C-c\C-i\C-r" 'octave-send-region) | 125 | (define-key map "\C-c\C-i\C-r" 'octave-send-region) |
| 126 | (define-key map "\C-c\C-i\C-a" 'octave-send-buffer) | ||
| 124 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) | 127 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) |
| 125 | (define-key map "\C-c\C-i\C-q" 'octave-hide-process-buffer) | 128 | (define-key map "\C-c\C-i\C-q" 'octave-hide-process-buffer) |
| 126 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) | 129 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) |
| @@ -143,6 +146,7 @@ parenthetical grouping.") | |||
| 143 | ["Start Octave Process" run-octave t] | 146 | ["Start Octave Process" run-octave t] |
| 144 | ["Documentation Lookup" info-lookup-symbol t] | 147 | ["Documentation Lookup" info-lookup-symbol t] |
| 145 | ["Help on Function" octave-help t] | 148 | ["Help on Function" octave-help t] |
| 149 | ["Search help" octave-lookfor t] | ||
| 146 | ["Find Function Definition" octave-find-definition t] | 150 | ["Find Function Definition" octave-find-definition t] |
| 147 | ["Insert Function" octave-insert-defun t] | 151 | ["Insert Function" octave-insert-defun t] |
| 148 | ["Update Function File Comment" octave-update-function-file-comment t] | 152 | ["Update Function File Comment" octave-update-function-file-comment t] |
| @@ -169,6 +173,7 @@ parenthetical grouping.") | |||
| 169 | ["Send Current Block" octave-send-block t] | 173 | ["Send Current Block" octave-send-block t] |
| 170 | ["Send Current Function" octave-send-defun t] | 174 | ["Send Current Function" octave-send-defun t] |
| 171 | ["Send Region" octave-send-region t] | 175 | ["Send Region" octave-send-region t] |
| 176 | ["Send Buffer" octave-send-buffer t] | ||
| 172 | ["Show Process Buffer" octave-show-process-buffer t] | 177 | ["Show Process Buffer" octave-show-process-buffer t] |
| 173 | ["Hide Process Buffer" octave-hide-process-buffer t] | 178 | ["Hide Process Buffer" octave-hide-process-buffer t] |
| 174 | ["Kill Process" octave-kill-process t]) | 179 | ["Kill Process" octave-kill-process t]) |
| @@ -634,6 +639,7 @@ mode, include \"-q\" and \"--traditional\"." | |||
| 634 | (define-key map "\M-." 'octave-find-definition) | 639 | (define-key map "\M-." 'octave-find-definition) |
| 635 | (define-key map "\t" 'completion-at-point) | 640 | (define-key map "\t" 'completion-at-point) |
| 636 | (define-key map "\C-hd" 'octave-help) | 641 | (define-key map "\C-hd" 'octave-help) |
| 642 | (define-key map "\C-ha" 'octave-lookfor) | ||
| 637 | ;; Same as in `shell-mode'. | 643 | ;; Same as in `shell-mode'. |
| 638 | (define-key map "\M-?" 'comint-dynamic-list-filename-completions) | 644 | (define-key map "\M-?" 'comint-dynamic-list-filename-completions) |
| 639 | (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) | 645 | (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) |
| @@ -645,7 +651,7 @@ mode, include \"-q\" and \"--traditional\"." | |||
| 645 | (defvar inferior-octave-mode-syntax-table | 651 | (defvar inferior-octave-mode-syntax-table |
| 646 | (let ((table (make-syntax-table octave-mode-syntax-table))) | 652 | (let ((table (make-syntax-table octave-mode-syntax-table))) |
| 647 | table) | 653 | table) |
| 648 | "Syntax table in use in inferior-octave-mode buffers.") | 654 | "Syntax table in use in `inferior-octave-mode' buffers.") |
| 649 | 655 | ||
| 650 | (defvar inferior-octave-font-lock-keywords | 656 | (defvar inferior-octave-font-lock-keywords |
| 651 | (list | 657 | (list |
| @@ -798,34 +804,30 @@ startup file, `~/.emacs-octave'." | |||
| 798 | ;; | 804 | ;; |
| 799 | ;; Use cache to avoid repetitive computation of completions due to | 805 | ;; Use cache to avoid repetitive computation of completions due to |
| 800 | ;; bug#11906 - http://debbugs.gnu.org/11906 - which may cause | 806 | ;; bug#11906 - http://debbugs.gnu.org/11906 - which may cause |
| 801 | ;; noticeable delay. CACHE: (CMD TIME VALUE). | 807 | ;; noticeable delay. CACHE: (CMD . VALUE). |
| 802 | (let ((cache)) | 808 | (let ((cache)) |
| 803 | (completion-table-dynamic | 809 | (completion-table-dynamic |
| 804 | (lambda (command) | 810 | (lambda (command) |
| 805 | (unless (and (equal (car cache) command) | 811 | (unless (equal (car cache) command) |
| 806 | (< (float-time) (+ 5 (cadr cache)))) | ||
| 807 | (inferior-octave-send-list-and-digest | 812 | (inferior-octave-send-list-and-digest |
| 808 | (list (format "completion_matches ('%s');\n" command))) | 813 | (list (format "completion_matches ('%s');\n" command))) |
| 809 | (setq cache (list command (float-time) | 814 | (setq cache (cons command |
| 810 | (delete-consecutive-dups | 815 | (delete-consecutive-dups |
| 811 | (sort inferior-octave-output-list 'string-lessp))))) | 816 | (sort inferior-octave-output-list 'string-lessp))))) |
| 812 | (car (cddr cache)))))) | 817 | (cdr cache))))) |
| 813 | 818 | ||
| 814 | (defun inferior-octave-completion-at-point () | 819 | (defun inferior-octave-completion-at-point () |
| 815 | "Return the data to complete the Octave symbol at point." | 820 | "Return the data to complete the Octave symbol at point." |
| 816 | ;; http://debbugs.gnu.org/14300 | 821 | ;; http://debbugs.gnu.org/14300 |
| 817 | (let* ((filecomp (string-match-p | 822 | (unless (string-match-p "/" (or (comint--match-partial-filename) "")) |
| 818 | "/" (or (comint--match-partial-filename) ""))) | 823 | (let ((beg (save-excursion |
| 819 | (end (point)) | 824 | (skip-syntax-backward "w_" (comint-line-beginning-position)) |
| 820 | (start | 825 | (point))) |
| 821 | (unless filecomp | 826 | (end (point))) |
| 822 | (save-excursion | 827 | (when (and beg (> end beg)) |
| 823 | (skip-syntax-backward "w_" (comint-line-beginning-position)) | 828 | (list beg end (completion-table-in-turn |
| 824 | (point))))) | ||
| 825 | (when (and start (> end start)) | ||
| 826 | (list start end (completion-table-in-turn | ||
| 827 | inferior-octave-completion-table | 829 | inferior-octave-completion-table |
| 828 | 'comint-completion-file-name-table))))) | 830 | 'comint-completion-file-name-table)))))) |
| 829 | 831 | ||
| 830 | (define-obsolete-function-alias 'inferior-octave-complete | 832 | (define-obsolete-function-alias 'inferior-octave-complete |
| 831 | 'completion-at-point "24.1") | 833 | 'completion-at-point "24.1") |
| @@ -1462,6 +1464,11 @@ entered without parens)." | |||
| 1462 | (if octave-send-show-buffer | 1464 | (if octave-send-show-buffer |
| 1463 | (display-buffer inferior-octave-buffer))) | 1465 | (display-buffer inferior-octave-buffer))) |
| 1464 | 1466 | ||
| 1467 | (defun octave-send-buffer () | ||
| 1468 | "Send current buffer to the inferior Octave process." | ||
| 1469 | (interactive) | ||
| 1470 | (octave-send-region (point-min) (point-max))) | ||
| 1471 | |||
| 1465 | (defun octave-send-block () | 1472 | (defun octave-send-block () |
| 1466 | "Send current Octave block to the inferior Octave process." | 1473 | "Send current Octave block to the inferior Octave process." |
| 1467 | (interactive) | 1474 | (interactive) |
| @@ -1599,6 +1606,7 @@ code line." | |||
| 1599 | (let ((map (make-sparse-keymap))) | 1606 | (let ((map (make-sparse-keymap))) |
| 1600 | (define-key map "\M-." 'octave-find-definition) | 1607 | (define-key map "\M-." 'octave-find-definition) |
| 1601 | (define-key map "\C-hd" 'octave-help) | 1608 | (define-key map "\C-hd" 'octave-help) |
| 1609 | (define-key map "\C-ha" 'octave-lookfor) | ||
| 1602 | map)) | 1610 | map)) |
| 1603 | 1611 | ||
| 1604 | (define-derived-mode octave-help-mode help-mode "OctHelp" | 1612 | (define-derived-mode octave-help-mode help-mode "OctHelp" |
| @@ -1677,6 +1685,32 @@ code line." | |||
| 1677 | :type 'octave-help-function))))) | 1685 | :type 'octave-help-function))))) |
| 1678 | (octave-help-mode))))) | 1686 | (octave-help-mode))))) |
| 1679 | 1687 | ||
| 1688 | (defun octave-lookfor (str &optional all) | ||
| 1689 | "Search for the string STR in all function help strings. | ||
| 1690 | If ALL is non-nil search the entire help string else only search the first | ||
| 1691 | sentence." | ||
| 1692 | (interactive "sSearch for: \nP") | ||
| 1693 | (inferior-octave-send-list-and-digest | ||
| 1694 | (list (format "lookfor (%s'%s');\n" | ||
| 1695 | (if all "'-all', " "") | ||
| 1696 | str))) | ||
| 1697 | (let ((lines inferior-octave-output-list)) | ||
| 1698 | (when (string-match "error: \\(.*\\)$" (car lines)) | ||
| 1699 | (error "%s" (match-string 1 (car lines)))) | ||
| 1700 | (with-help-window octave-help-buffer | ||
| 1701 | (princ (mapconcat 'identity lines "\n")) | ||
| 1702 | (with-current-buffer octave-help-buffer | ||
| 1703 | ;; Bound to t so that `help-buffer' returns current buffer for | ||
| 1704 | ;; `help-setup-xref'. | ||
| 1705 | (let ((help-xref-following t)) | ||
| 1706 | (help-setup-xref (list 'octave-lookfor str all) | ||
| 1707 | (called-interactively-p 'interactive))) | ||
| 1708 | (goto-char (point-min)) | ||
| 1709 | (while (re-search-forward "^\\([^[:blank:]]+\\) " nil 'noerror) | ||
| 1710 | (make-text-button (match-beginning 1) (match-end 1) | ||
| 1711 | :type 'octave-help-function)) | ||
| 1712 | (octave-help-mode))))) | ||
| 1713 | |||
| 1680 | (defcustom octave-source-directories nil | 1714 | (defcustom octave-source-directories nil |
| 1681 | "A list of directories for Octave sources. | 1715 | "A list of directories for Octave sources. |
| 1682 | If the environment variable OCTAVE_SRCDIR is set, it is searched first." | 1716 | If the environment variable OCTAVE_SRCDIR is set, it is searched first." |
| @@ -1722,7 +1756,7 @@ If the environment variable OCTAVE_SRCDIR is set, it is searched first." | |||
| 1722 | (defun octave-find-definition (fn) | 1756 | (defun octave-find-definition (fn) |
| 1723 | "Find the definition of FN. | 1757 | "Find the definition of FN. |
| 1724 | Functions implemented in C++ can be found if | 1758 | Functions implemented in C++ can be found if |
| 1725 | `octave-source-directories' is set correctly." | 1759 | variable `octave-source-directories' is set correctly." |
| 1726 | (interactive (list (octave-completing-read))) | 1760 | (interactive (list (octave-completing-read))) |
| 1727 | (require 'etags) | 1761 | (require 'etags) |
| 1728 | (let ((orig (point))) | 1762 | (let ((orig (point))) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 3998fafa5cc..a361bdae64b 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2407,7 +2407,7 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2407 | " -- word-list: " | 2407 | " -- word-list: " |
| 2408 | (or ispell-complete-word-dict | 2408 | (or ispell-complete-word-dict |
| 2409 | ispell-alternate-dictionary)) | 2409 | ispell-alternate-dictionary)) |
| 2410 | miss (lookup-words new-word) | 2410 | miss (ispell-lookup-words new-word) |
| 2411 | choices miss | 2411 | choices miss |
| 2412 | line ispell-choices-win-default-height) | 2412 | line ispell-choices-win-default-height) |
| 2413 | (while (and choices ; adjust choices window. | 2413 | (while (and choices ; adjust choices window. |
| @@ -2613,8 +2613,9 @@ SPC: Accept word this time. | |||
| 2613 | (sit-for 5)) | 2613 | (sit-for 5)) |
| 2614 | (erase-buffer))))))) | 2614 | (erase-buffer))))))) |
| 2615 | 2615 | ||
| 2616 | (define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4") | ||
| 2616 | 2617 | ||
| 2617 | (defun lookup-words (word &optional lookup-dict) | 2618 | (defun ispell-lookup-words (word &optional lookup-dict) |
| 2618 | "Look up WORD in optional word-list dictionary LOOKUP-DICT. | 2619 | "Look up WORD in optional word-list dictionary LOOKUP-DICT. |
| 2619 | A `*' serves as a wild card. If no wild cards, `look' is used if it exists. | 2620 | A `*' serves as a wild card. If no wild cards, `look' is used if it exists. |
| 2620 | Otherwise the variable `ispell-grep-command' contains the command used to | 2621 | Otherwise the variable `ispell-grep-command' contains the command used to |
| @@ -3766,7 +3767,7 @@ Use APPEND to append the info to previous buffer if exists." | |||
| 3766 | 3767 | ||
| 3767 | ;;;###autoload | 3768 | ;;;###autoload |
| 3768 | (defun ispell-complete-word (&optional interior-frag) | 3769 | (defun ispell-complete-word (&optional interior-frag) |
| 3769 | "Try to complete the word before or under point (see `lookup-words'). | 3770 | "Try to complete the word before or under point. |
| 3770 | If optional INTERIOR-FRAG is non-nil then the word may be a character | 3771 | If optional INTERIOR-FRAG is non-nil then the word may be a character |
| 3771 | sequence inside of a word. | 3772 | sequence inside of a word. |
| 3772 | 3773 | ||
| @@ -3782,11 +3783,12 @@ Standard ispell choices are then available." | |||
| 3782 | word (car word) | 3783 | word (car word) |
| 3783 | possibilities | 3784 | possibilities |
| 3784 | (or (string= word "") ; Will give you every word | 3785 | (or (string= word "") ; Will give you every word |
| 3785 | (lookup-words (concat (and interior-frag "*") word | 3786 | (ispell-lookup-words |
| 3786 | (if (or interior-frag (null ispell-look-p)) | 3787 | (concat (and interior-frag "*") word |
| 3787 | "*")) | 3788 | (if (or interior-frag (null ispell-look-p)) |
| 3788 | (or ispell-complete-word-dict | 3789 | "*")) |
| 3789 | ispell-alternate-dictionary)))) | 3790 | (or ispell-complete-word-dict |
| 3791 | ispell-alternate-dictionary)))) | ||
| 3790 | (cond ((eq possibilities t) | 3792 | (cond ((eq possibilities t) |
| 3791 | (message "No word to complete")) | 3793 | (message "No word to complete")) |
| 3792 | ((null possibilities) | 3794 | ((null possibilities) |