Now on revision 112784. ------------------------------------------------------------ revno: 112784 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:30:34 -0700 message: Silence ielm compilation * lisp/ielm.el (ielm-map, ielm-complete-symbol): Use completion-at-point rather than obsolete functions. (inferior-emacs-lisp-mode): Doc fix. Set completion-at-point-functions, rather than comint-dynamic-complete-functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:27:46 +0000 +++ lisp/ChangeLog 2013-05-30 03:30:34 +0000 @@ -1,5 +1,11 @@ 2013-05-30 Glenn Morris + * ielm.el (ielm-map, ielm-complete-symbol): + Use completion-at-point rather than obsolete functions. + (inferior-emacs-lisp-mode): Doc fix. + Set completion-at-point-functions, rather than + comint-dynamic-complete-functions. + * eshell/em-cmpl.el (eshell-complete-lisp-symbol): New function. (eshell-cmpl-initialize, eshell-complete-parse-arguments): Replace obsolete lisp-complete-symbol with eshell-complete-lisp-symbol. === modified file 'lisp/ielm.el' --- lisp/ielm.el 2013-05-23 15:27:48 +0000 +++ lisp/ielm.el 2013-05-30 03:30:34 +0000 @@ -167,7 +167,7 @@ (defvar ielm-map (let ((map (make-sparse-keymap))) - (define-key map "\t" 'comint-dynamic-complete) + (define-key map "\t" 'completion-at-point) (define-key map "\C-m" 'ielm-return) (define-key map "\C-j" 'ielm-send-input) (define-key map "\e\C-x" 'eval-defun) ; for consistency with @@ -209,12 +209,13 @@ (defun ielm-complete-symbol nil "Complete the Lisp symbol before point." - ;; A wrapper for lisp-complete symbol that returns non-nil if + ;; A wrapper for completion-at-point that returns non-nil if ;; completion has occurred (let* ((btick (buffer-modified-tick)) (cbuffer (get-buffer "*Completions*")) - (ctick (and cbuffer (buffer-modified-tick cbuffer)))) - (lisp-complete-symbol) + (ctick (and cbuffer (buffer-modified-tick cbuffer))) + (completion-at-point-functions '(lisp-completion-at-point))) + (completion-at-point) ;; completion has occurred if: (or ;; the buffer has been modified @@ -461,7 +462,7 @@ Inputs longer than one line are moved to the line following the prompt (but see variable `ielm-dynamic-multiline-inputs'). -* \\[comint-dynamic-complete] completes Lisp symbols (or filenames, within strings), +* \\[completion-at-point] completes Lisp symbols (or filenames, within strings), or indents the line if there is nothing to complete. The current working buffer may be changed (with a call to `set-buffer', @@ -498,7 +499,7 @@ (set (make-local-variable 'paragraph-start) comint-prompt-regexp) (setq comint-input-sender 'ielm-input-sender) (setq comint-process-echoes nil) - (set (make-local-variable 'comint-dynamic-complete-functions) + (set (make-local-variable 'completion-at-point-functions) '(ielm-tab comint-replace-by-expanded-history ielm-complete-filename ielm-complete-symbol)) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) @@ -513,8 +514,6 @@ (set (make-local-variable 'indent-line-function) 'ielm-indent-line) (set (make-local-variable 'ielm-working-buffer) (current-buffer)) (set (make-local-variable 'fill-paragraph-function) 'lisp-fill-paragraph) - (add-hook 'completion-at-point-functions - 'lisp-completion-at-point nil 'local) ;; Value holders (set (make-local-variable '*) nil) ------------------------------------------------------------ revno: 112783 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:27:46 -0700 message: In Eshell, replace obsolete lisp-complete-symbol * eshell/em-cmpl.el (eshell-complete-lisp-symbol): New function. (eshell-cmpl-initialize, eshell-complete-parse-arguments): Replace obsolete lisp-complete-symbol with eshell-complete-lisp-symbol. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:24:30 +0000 +++ lisp/ChangeLog 2013-05-30 03:27:46 +0000 @@ -1,5 +1,9 @@ 2013-05-30 Glenn Morris + * eshell/em-cmpl.el (eshell-complete-lisp-symbol): New function. + (eshell-cmpl-initialize, eshell-complete-parse-arguments): + Replace obsolete lisp-complete-symbol with eshell-complete-lisp-symbol. + * image.el (image-animated-p): Tweak definition. * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. === modified file 'lisp/eshell/em-cmpl.el' --- lisp/eshell/em-cmpl.el 2013-05-23 04:57:27 +0000 +++ lisp/eshell/em-cmpl.el 2013-05-30 03:27:46 +0000 @@ -243,6 +243,12 @@ ;;; Functions: +(defun eshell-complete-lisp-symbol () + "Try to complete the text around point as a Lisp symbol." + (interactive) + (let ((completion-at-point-functions '(lisp-completion-at-point))) + (completion-at-point))) + (defun eshell-cmpl-initialize () "Initialize the completions module." (set (make-local-variable 'pcomplete-command-completion-function) @@ -288,8 +294,8 @@ (set (make-local-variable 'pcomplete-arg-quote-list) eshell-special-chars-outside-quoting))) nil t) (add-hook 'pcomplete-quote-arg-hook 'eshell-quote-backslash nil t) - (define-key eshell-mode-map [(meta tab)] 'lisp-complete-symbol) - (define-key eshell-mode-map [(meta control ?i)] 'lisp-complete-symbol) + (define-key eshell-mode-map [(meta tab)] 'eshell-complete-lisp-symbol) + (define-key eshell-mode-map [(meta control ?i)] 'eshell-complete-lisp-symbol) (define-key eshell-command-map [(meta ?h)] 'eshell-completion-help) (define-key eshell-command-map [tab] 'pcomplete-expand-and-complete) (define-key eshell-command-map [(control ?i)] @@ -347,7 +353,7 @@ (setq begin (1+ (cadr delim)) args (eshell-parse-arguments begin end))) ((eq (car delim) ?\() - (lisp-complete-symbol) + (eshell-complete-lisp-symbol) (throw 'pcompleted t)) (t (insert-and-inherit "\t") ------------------------------------------------------------ revno: 112782 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:26:13 -0700 message: * gnus/nnmail.el (nnmail-fancy-expiry-target): Also bind mail-dont-reply-to-names diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-30 03:25:29 +0000 +++ lisp/gnus/ChangeLog 2013-05-30 03:26:13 +0000 @@ -1,5 +1,8 @@ 2013-05-30 Glenn Morris + * nnmail.el (nnmail-fancy-expiry-target): + Also bind mail-dont-reply-to-names. + * spam-stat.el (spam-stat-save): No need to tweak font-lock in temp buffers. === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2013-05-29 02:40:43 +0000 +++ lisp/gnus/nnmail.el 2013-05-30 03:26:13 +0000 @@ -1952,8 +1952,10 @@ ((and (equal header 'to-from) (or (string-match (cadr regexp-target-pair) from) (and (string-match (cadr regexp-target-pair) to) - (let ((rmail-dont-reply-to-names - (message-dont-reply-to-names))) + (let* ((mail-dont-reply-to-names + (message-dont-reply-to-names)) + (rmail-dont-reply-to-names ; obsolete since 24.1 + mail-dont-reply-to-names)) (equal (if (fboundp 'rmail-dont-reply-to) (rmail-dont-reply-to from) (mail-dont-reply-to from)) ""))))) ------------------------------------------------------------ revno: 112781 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:25:29 -0700 message: * gnus/spam-stat.el (spam-stat-save): No need to tweak font-lock in temp buffers diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-30 03:24:30 +0000 +++ lisp/gnus/ChangeLog 2013-05-30 03:25:29 +0000 @@ -1,5 +1,8 @@ 2013-05-30 Glenn Morris + * spam-stat.el (spam-stat-save): + No need to tweak font-lock in temp buffers. + * shr.el (shr-put-image): Silence compiler. 2013-05-29 Glenn Morris === modified file 'lisp/gnus/spam-stat.el' --- lisp/gnus/spam-stat.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/spam-stat.el 2013-05-30 03:25:29 +0000 @@ -412,8 +412,7 @@ (when (or force spam-stat-dirty) (let ((coding-system-for-write spam-stat-coding-system)) (with-temp-file spam-stat-file - (let ((standard-output (current-buffer)) - (font-lock-maximum-size 0)) + (let ((standard-output (current-buffer))) (insert (format ";-*- coding: %s; -*-\n" spam-stat-coding-system)) (insert (format "(setq spam-stat-ngood %d spam-stat-nbad %d spam-stat (spam-stat-to-hash-table '(" spam-stat-ngood spam-stat-nbad)) ------------------------------------------------------------ revno: 112780 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:24:30 -0700 message: * image.el (image-animated-p): Tweak definition. * gnus/shr.el (shr-put-image): Silence compiler. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:22:45 +0000 +++ lisp/ChangeLog 2013-05-30 03:24:30 +0000 @@ -1,5 +1,7 @@ 2013-05-30 Glenn Morris + * image.el (image-animated-p): Tweak definition. + * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. (rlogin-process-connection-type): Tweak default. Add set-after. (rlogin-host): Doc fix. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-29 02:40:43 +0000 +++ lisp/gnus/ChangeLog 2013-05-30 03:24:30 +0000 @@ -1,3 +1,7 @@ +2013-05-30 Glenn Morris + + * shr.el (shr-put-image): Silence compiler. + 2013-05-29 Glenn Morris * gnus-ems.el (set-process-plist): Every supported Emacs has this. === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-05-19 22:49:17 +0000 +++ lisp/gnus/shr.el 2013-05-30 03:24:30 +0000 @@ -631,12 +631,13 @@ (overlay-put overlay 'face 'default))) (insert-image image (or alt "*"))) (put-text-property start (point) 'image-size size) - (when (if (fboundp 'image-multi-frame-p) - ;; Only animate multi-frame things that specify a - ;; delay; eg animated gifs as opposed to - ;; multi-page tiffs. FIXME? - (cdr (image-multi-frame-p image)) - (image-animated-p image)) + (when (cond ((fboundp 'image-multi-frame-p) + ;; Only animate multi-frame things that specify a + ;; delay; eg animated gifs as opposed to + ;; multi-page tiffs. FIXME? + (cdr (image-multi-frame-p image))) + ((fboundp 'image-animated-p) + (image-animated-p image))) (image-animate image nil 60))) image) (insert alt))) === modified file 'lisp/image.el' --- lisp/image.el 2013-02-20 07:57:33 +0000 +++ lisp/image.el 2013-05-30 03:24:30 +0000 @@ -624,7 +624,12 @@ (setq delay image-default-frame-delay)) (cons images delay)))) -(define-obsolete-function-alias 'image-animated-p 'image-multi-frame-p "24.4") +(defun image-animated-p (image) + "Like `image-multi-frame-p', but returns nil if no delay is specified." + (let ((multi (image-multi-frame-p image))) + (and (cdr multi) multi))) + +(make-obsolete 'image-animated-p 'image-multi-frame-p "24.4") ;; "Destructively"? (defun image-animate (image &optional index limit) ------------------------------------------------------------ revno: 112779 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:22:45 -0700 message: rlogin.el tiny cleanup * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. (rlogin-process-connection-type): Tweak default. Add set-after. (rlogin-host): Doc fix. (rlogin): Tweak prompt. (rlogin-tab-or-complete): Use completion-at-point rather than alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:20:56 +0000 +++ lisp/ChangeLog 2013-05-30 03:22:45 +0000 @@ -1,5 +1,11 @@ 2013-05-30 Glenn Morris + * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. + (rlogin-process-connection-type): Tweak default. Add set-after. + (rlogin-host): Doc fix. + (rlogin): Tweak prompt. + (rlogin-tab-or-complete): Use completion-at-point rather than alias. + * net/net-utils.el (nslookup-mode-map, ftp-mode-map): * progmodes/tcl.el (inferior-tcl-mode-map): Use completion-at-point rather than obsolete alias. === modified file 'lisp/net/rlogin.el' --- lisp/net/rlogin.el 2013-01-01 09:11:05 +0000 +++ lisp/net/rlogin.el 2013-05-30 03:22:45 +0000 @@ -36,6 +36,11 @@ ;;; Code: +;; FIXME? +;; Maybe this file should be obsolete. +;; http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00517.html +;; It only adds rlogin-directory-tracking-mode. Is that useful? + (require 'comint) (require 'shell) @@ -44,13 +49,15 @@ :group 'processes :group 'unix) -(defcustom rlogin-program "rlogin" - "Name of program to invoke rlogin" +(defcustom rlogin-program "ssh" + "Name of program to invoke remote login." + :version "24.4" ; rlogin -> ssh :type 'string :group 'rlogin) -(defcustom rlogin-explicit-args nil - "List of arguments to pass to rlogin on the command line." +(defcustom rlogin-explicit-args '("-t" "-t") + "List of arguments to pass to `rlogin-program' on the command line." + :version "24.4" ; nil -> -t -t :type '(repeat (string :tag "Argument")) :group 'rlogin) @@ -62,13 +69,15 @@ (defcustom rlogin-process-connection-type ;; Solaris 2.x `rlogin' will spew a bunch of ioctl error messages if ;; stdin isn't a tty. - (and (string-match-p "-solaris2" system-configuration) t) + (and (string-match "rlogin" rlogin-program) + (string-match-p "-solaris2" system-configuration) t) "If non-nil, use a pty for the local rlogin process. If nil, use a pipe (if pipes are supported on the local system). Generally it is better not to waste ptys on systems which have a static number of them. On the other hand, some implementations of `rlogin' assume a pty is being used, and errors will result from using a pipe instead." + :set-after '(rlogin-program) :type '(choice (const :tag "pipes" nil) (other :tag "ptys" t)) :group 'rlogin) @@ -98,7 +107,7 @@ (make-variable-buffer-local 'rlogin-directory-tracking-mode) (defcustom rlogin-host nil - "The name of the remote host. This variable is buffer-local." + "The name of the default remote host. This variable is buffer-local." :type '(choice (const nil) string) :group 'rlogin) @@ -165,7 +174,9 @@ function `rlogin-directory-tracking-mode' rather than simply setting the variable." (interactive (list - (read-from-minibuffer "rlogin arguments (hostname first): " + (read-from-minibuffer (format + "Arguments for `%s' (hostname first): " + (file-name-nondirectory rlogin-program)) nil nil nil 'rlogin-history) current-prefix-arg)) (let* ((process-connection-type rlogin-process-connection-type) @@ -297,7 +308,7 @@ "Complete file name if doing directory tracking, or just insert TAB." (interactive) (if rlogin-directory-tracking-mode - (comint-dynamic-complete) + (completion-at-point) (insert "\C-i"))) (provide 'rlogin) ------------------------------------------------------------ revno: 112778 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:20:56 -0700 message: Use completion-at-point rather than obsolete alias. * net/net-utils.el (nslookup-mode-map, ftp-mode-map): * progmodes/tcl.el (inferior-tcl-mode-map): Use completion-at-point rather than obsolete alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:19:37 +0000 +++ lisp/ChangeLog 2013-05-30 03:20:56 +0000 @@ -1,5 +1,9 @@ 2013-05-30 Glenn Morris + * net/net-utils.el (nslookup-mode-map, ftp-mode-map): + * progmodes/tcl.el (inferior-tcl-mode-map): + Use completion-at-point rather than obsolete alias. + * emacs-lisp/eieio.el (eieio-eval-default-p): Move before use. * minibuffer.el (read-file-name-completion-ignore-case): === modified file 'lisp/net/net-utils.el' --- lisp/net/net-utils.el 2013-03-11 18:30:49 +0000 +++ lisp/net/net-utils.el 2013-05-30 03:20:56 +0000 @@ -497,7 +497,7 @@ (defvar nslookup-mode-map (let ((map (make-sparse-keymap))) - (define-key map "\t" 'comint-dynamic-complete) + (define-key map "\t" 'completion-at-point) map)) ;; Using a derived mode gives us keymaps, hooks, etc. @@ -567,7 +567,7 @@ (defvar ftp-mode-map (let ((map (make-sparse-keymap))) ;; Occasionally useful - (define-key map "\t" 'comint-dynamic-complete) + (define-key map "\t" 'completion-at-point) map)) (define-derived-mode ftp-mode comint-mode "FTP" === modified file 'lisp/progmodes/tcl.el' --- lisp/progmodes/tcl.el 2013-02-22 01:59:28 +0000 +++ lisp/progmodes/tcl.el 2013-05-30 03:20:56 +0000 @@ -266,7 +266,7 @@ ;; Maybe someone has a better set? (let ((map (make-sparse-keymap))) ;; Will inherit from `comint-mode-map' thanks to define-derived-mode. - (define-key map "\t" 'comint-dynamic-complete) + (define-key map "\t" 'completion-at-point) (define-key map "\M-?" 'comint-dynamic-list-filename-completions) (define-key map "\177" 'backward-delete-char-untabify) (define-key map "\M-\C-x" 'tcl-eval-defun) ------------------------------------------------------------ revno: 112777 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:19:37 -0700 message: * lisp/emacs-lisp/eieio.el (eieio-eval-default-p): Move before use. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-30 03:18:06 +0000 +++ lisp/ChangeLog 2013-05-30 03:19:37 +0000 @@ -1,5 +1,7 @@ 2013-05-30 Glenn Morris + * emacs-lisp/eieio.el (eieio-eval-default-p): Move before use. + * minibuffer.el (read-file-name-completion-ignore-case): Move before completion--in-region, for eager macro expansion. === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2013-02-19 02:57:04 +0000 +++ lisp/emacs-lisp/eieio.el 2013-05-30 03:19:37 +0000 @@ -851,6 +851,10 @@ cname )) +(defsubst eieio-eval-default-p (val) + "Whether the default value VAL should be evaluated for use." + (and (consp val) (symbolp (car val)) (fboundp (car val)))) + (defun eieio-perform-slot-validation-for-default (slot spec value skipnil) "For SLOT, signal if SPEC does not match VALUE. If SKIPNIL is non-nil, then if VALUE is nil return t instead." @@ -1554,10 +1558,6 @@ (eieio-default-eval-maybe val)) obj cl 'oref-default)))) -(defsubst eieio-eval-default-p (val) - "Whether the default value VAL should be evaluated for use." - (and (consp val) (symbolp (car val)) (fboundp (car val)))) - (defun eieio-default-eval-maybe (val) "Check VAL, and return what `oref-default' would provide." (cond ------------------------------------------------------------ revno: 112776 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:19:04 -0700 message: * erc/erc-backend.el: Require erc at run-time too (silences compilation) diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-05-21 07:25:14 +0000 +++ lisp/erc/ChangeLog 2013-05-30 03:19:04 +0000 @@ -1,3 +1,7 @@ +2013-05-30 Glenn Morris + + * erc-backend.el: Require erc at run-time too. + 2013-05-21 Glenn Morris * erc-log.el (erc-network-name): Declare. === modified file 'lisp/erc/erc-backend.el' --- lisp/erc/erc-backend.el 2013-01-04 01:31:52 +0000 +++ lisp/erc/erc-backend.el 2013-05-30 03:19:04 +0000 @@ -102,7 +102,8 @@ ;; There's a fairly strong mutual dependency between erc.el and erc-backend.el. ;; Luckily, erc.el does not need erc-backend.el for macroexpansion whereas the ;; reverse is true: -(eval-when-compile (provide 'erc-backend) (require 'erc)) +(provide 'erc-backend) +(require 'erc) ;;;; Variables and options ------------------------------------------------------------ revno: 112775 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 20:18:06 -0700 message: * minibuffer.el (read-file-name-completion-ignore-case): Move before completion--in-region, for eager macro expansion. Somehow, this avoids an eager macro expansion failure present during bootstrap since ~ 2013-04-17. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 23:43:39 +0000 +++ lisp/ChangeLog 2013-05-30 03:18:06 +0000 @@ -1,3 +1,8 @@ +2013-05-30 Glenn Morris + + * minibuffer.el (read-file-name-completion-ignore-case): + Move before completion--in-region, for eager macro expansion. + 2013-05-29 Juri Linkov * replace.el (occur-engine): Rename `globalcount' to `global-lines' @@ -1756,7 +1761,7 @@ 2013-04-21 Xue Fuqiao - * comint.el: (comint-dynamic-complete-functions, comint-mode-map): + * comint.el (comint-dynamic-complete-functions, comint-mode-map): `comint-dynamic-complete' is obsolete since 24.1, replaced by `completion-at-point'. (Bug#13774) === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2013-05-15 23:55:41 +0000 +++ lisp/minibuffer.el 2013-05-30 03:18:06 +0000 @@ -1796,6 +1796,14 @@ (cl-assert (<= start (point)) (<= (point) end)) (funcall completion-in-region-function start end collection predicate)) +(defcustom read-file-name-completion-ignore-case + (if (memq system-type '(ms-dos windows-nt darwin cygwin)) + t nil) + "Non-nil means when reading a file name completion ignores case." + :group 'minibuffer + :type 'boolean + :version "22.1") + (defun completion--in-region (start end collection &optional predicate) (with-wrapper-hook ;; FIXME: Maybe we should use this hook to provide a "display @@ -2268,14 +2276,6 @@ "The function called by `read-file-name' to do its work. It should accept the same arguments as `read-file-name'.") -(defcustom read-file-name-completion-ignore-case - (if (memq system-type '(ms-dos windows-nt darwin cygwin)) - t nil) - "Non-nil means when reading a file name completion ignores case." - :group 'minibuffer - :type 'boolean - :version "22.1") - (defcustom insert-default-directory t "Non-nil means when reading a filename start with default dir in minibuffer. ------------------------------------------------------------ revno: 112774 fixes bug: http://debbugs.gnu.org/14017 committer: Juri Linkov branch nick: trunk timestamp: Thu 2013-05-30 02:43:39 +0300 message: * lisp/replace.el (occur-engine): Rename `globalcount' to `global-lines' for total count of matching lines. Add `global-matches' for total count of matches. Rename `matches' to `lines' for count of matching lines. Add `matches' for count of matches. Rename `lines' to `curr-line' for line count. Rename `prev-lines' to `prev-line' for line number of prev match endpt. Increment `matches' for every match. Print the number of matching lines in the header. (occur-context-lines): Rename `lines' to `curr-line'. Rename `prev-lines' to `prev-line'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 23:11:41 +0000 +++ lisp/ChangeLog 2013-05-29 23:43:39 +0000 @@ -1,5 +1,18 @@ 2013-05-29 Juri Linkov + * replace.el (occur-engine): Rename `globalcount' to `global-lines' + for total count of matching lines. Add `global-matches' for total + count of matches. Rename `matches' to `lines' for count of + matching lines. Add `matches' for count of matches. + Rename `lines' to `curr-line' for line count. Rename `prev-lines' + to `prev-line' for line number of prev match endpt. + Increment `matches' for every match. Print the number of + matching lines in the header. + (occur-context-lines): Rename `lines' to `curr-line'. + Rename `prev-lines' to `prev-line'. (Bug#14017) + +2013-05-29 Juri Linkov + * replace.el (perform-replace): Add `skip-read-only-count', `skip-filtered-count', `skip-invisible-count' let-bound to 0. Increment them for corresponding conditions and report the number === modified file 'lisp/replace.el' --- lisp/replace.el 2013-05-29 23:11:41 +0000 +++ lisp/replace.el 2013-05-29 23:43:39 +0000 @@ -1389,16 +1389,18 @@ (defun occur-engine (regexp buffers out-buf nlines case-fold title-face prefix-face match-face keep-props) (with-current-buffer out-buf - (let ((globalcount 0) + (let ((global-lines 0) ;; total count of matching lines + (global-matches 0) ;; total count of matches (coding nil) (case-fold-search case-fold)) ;; Map over all the buffers (dolist (buf buffers) (when (buffer-live-p buf) - (let ((matches 0) ;; count of matched lines - (lines 1) ;; line count - (prev-after-lines nil) ;; context lines of prev match - (prev-lines nil) ;; line number of prev match endpt + (let ((lines 0) ;; count of matching lines + (matches 0) ;; count of matches + (curr-line 1) ;; line count + (prev-line nil) ;; line number of prev match endpt + (prev-after-lines nil) ;; context lines of prev match (matchbeg 0) (origpt nil) (begpt nil) @@ -1419,7 +1421,7 @@ (while (not (eobp)) (setq origpt (point)) (when (setq endpt (re-search-forward regexp nil t)) - (setq matches (1+ matches)) ;; increment match count + (setq lines (1+ lines)) ;; increment matching lines count (setq matchbeg (match-beginning 0)) ;; Get beginning of first match line and end of the last. (save-excursion @@ -1428,7 +1430,7 @@ (goto-char endpt) (setq endpt (line-end-position))) ;; Sum line numbers up to the first match line. - (setq lines (+ lines (count-lines origpt begpt))) + (setq curr-line (+ curr-line (count-lines origpt begpt))) (setq marker (make-marker)) (set-marker marker matchbeg) (setq curstring (occur-engine-line begpt endpt keep-props)) @@ -1437,6 +1439,7 @@ (start 0)) (while (and (< start len) (string-match regexp curstring start)) + (setq matches (1+ matches)) (add-text-properties (match-beginning 0) (match-end 0) (append @@ -1450,7 +1453,7 @@ ;; Generate the string to insert for this match (let* ((match-prefix ;; Using 7 digits aligns tabs properly. - (apply #'propertize (format "%7d:" lines) + (apply #'propertize (format "%7d:" curr-line) (append (when prefix-face `(font-lock-face ,prefix-face)) @@ -1490,7 +1493,7 @@ ;; The complex multi-line display style. (setq ret (occur-context-lines out-line nlines keep-props begpt endpt - lines prev-lines prev-after-lines + curr-line prev-line prev-after-lines prefix-face)) ;; Set first elem of the returned list to `data', ;; and the second elem to `prev-after-lines'. @@ -1503,28 +1506,34 @@ (if endpt (progn ;; Sum line numbers between first and last match lines. - (setq lines (+ lines (count-lines begpt endpt) - ;; Add 1 for empty last match line since - ;; count-lines returns 1 line less. - (if (and (bolp) (eolp)) 1 0))) + (setq curr-line (+ curr-line (count-lines begpt endpt) + ;; Add 1 for empty last match line since + ;; count-lines returns 1 line less. + (if (and (bolp) (eolp)) 1 0))) ;; On to the next match... (forward-line 1)) (goto-char (point-max))) - (setq prev-lines (1- lines))) + (setq prev-line (1- curr-line))) ;; Flush remaining context after-lines. (when prev-after-lines (with-current-buffer out-buf (insert (apply #'concat (occur-engine-add-prefix prev-after-lines prefix-face))))))) - (when (not (zerop matches)) ;; is the count zero? - (setq globalcount (+ globalcount matches)) + (when (not (zerop lines)) ;; is the count zero? + (setq global-lines (+ global-lines lines) + global-matches (+ global-matches matches)) (with-current-buffer out-buf (goto-char headerpt) (let ((beg (point)) end) (insert (propertize - (format "%d match%s%s in buffer: %s\n" + (format "%d match%s%s%s in buffer: %s\n" matches (if (= matches 1) "" "es") + ;; Don't display the same number of lines + ;; and matches in case of 1 match per line. + (if (= lines matches) + "" (format " in %d line%s" + lines (if (= lines 1) "" "s"))) ;; Don't display regexp for multi-buffer. (if (> (length buffers) 1) "" (format " for \"%s\"" @@ -1539,12 +1548,17 @@ `(occur-title ,buf)))) (goto-char (point-min))))))) ;; Display total match count and regexp for multi-buffer. - (when (and (not (zerop globalcount)) (> (length buffers) 1)) + (when (and (not (zerop global-lines)) (> (length buffers) 1)) (goto-char (point-min)) (let ((beg (point)) end) - (insert (format "%d match%s total for \"%s\":\n" - globalcount (if (= globalcount 1) "" "es") + (insert (format "%d match%s%s total for \"%s\":\n" + global-matches (if (= global-matches 1) "" "es") + ;; Don't display the same number of lines + ;; and matches in case of 1 match per line. + (if (= global-lines global-matches) + "" (format " in %d line%s" + global-lines (if (= global-lines 1) "" "s"))) (query-replace-descr regexp))) (setq end (point)) (add-text-properties beg end (when title-face @@ -1556,7 +1570,7 @@ ;; buffer. (set-buffer-file-coding-system coding)) ;; Return the number of matches - globalcount))) + global-matches))) (defun occur-engine-line (beg end &optional keep-props) (if (and keep-props (if (boundp 'jit-lock-mode) jit-lock-mode) @@ -1599,13 +1613,13 @@ ;; Generate context display for occur. ;; OUT-LINE is the line where the match is. ;; NLINES and KEEP-PROPS are args to occur-engine. -;; LINES is line count of the current match, -;; PREV-LINES is line count of the previous match, +;; CURR-LINE is line count of the current match, +;; PREV-LINE is line count of the previous match, ;; PREV-AFTER-LINES is a list of after-context lines of the previous match. ;; Generate a list of lines, add prefixes to all but OUT-LINE, ;; then concatenate them all together. (defun occur-context-lines (out-line nlines keep-props begpt endpt - lines prev-lines prev-after-lines + curr-line prev-line prev-after-lines &optional prefix-face) ;; Find after- and before-context lines of the current match. (let ((before-lines @@ -1621,22 +1635,22 @@ (when prev-after-lines ;; Don't overlap prev after-lines with current before-lines. - (if (>= (+ prev-lines (length prev-after-lines)) - (- lines (length before-lines))) + (if (>= (+ prev-line (length prev-after-lines)) + (- curr-line (length before-lines))) (setq prev-after-lines (butlast prev-after-lines (- (length prev-after-lines) - (- lines prev-lines (length before-lines) 1)))) + (- curr-line prev-line (length before-lines) 1)))) ;; Separate non-overlapping context lines with a dashed line. (setq separator "-------\n"))) - (when prev-lines + (when prev-line ;; Don't overlap current before-lines with previous match line. - (if (<= (- lines (length before-lines)) - prev-lines) + (if (<= (- curr-line (length before-lines)) + prev-line) (setq before-lines (nthcdr (- (length before-lines) - (- lines prev-lines 1)) + (- curr-line prev-line 1)) before-lines)) ;; Separate non-overlapping before-context lines. (unless (> nlines 0) ------------------------------------------------------------ revno: 112773 fixes bug: http://debbugs.gnu.org/11746 committer: Juri Linkov branch nick: trunk timestamp: Thu 2013-05-30 02:11:41 +0300 message: * lisp/replace.el (perform-replace): Add `skip-read-only-count', `skip-filtered-count', `skip-invisible-count' let-bound to 0. Increment them for corresponding conditions and report the number of skipped occurrences in the final message. (query-replace, query-replace-regexp, query-replace-regexp-eval) (replace-string, replace-regexp): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 15:17:12 +0000 +++ lisp/ChangeLog 2013-05-29 23:11:41 +0000 @@ -1,3 +1,12 @@ +2013-05-29 Juri Linkov + + * replace.el (perform-replace): Add `skip-read-only-count', + `skip-filtered-count', `skip-invisible-count' let-bound to 0. + Increment them for corresponding conditions and report the number + of skipped occurrences in the final message. (Bug#11746) + (query-replace, query-replace-regexp, query-replace-regexp-eval) + (replace-string, replace-regexp): Doc fix. + 2013-05-29 Stefan Monnier * emacs-lisp/trace.el (trace--read-args): Provide a default. === modified file 'lisp/replace.el' --- lisp/replace.el 2013-05-27 23:38:56 +0000 +++ lisp/replace.el 2013-05-29 23:11:41 +0000 @@ -250,6 +250,10 @@ matched is all caps, or capitalized, then its replacement is upcased or capitalized.) +Ignore read-only matches if `query-replace-skip-read-only' is non-nil, +ignore hidden matches if `search-invisible' is nil, and ignore more +matches using a non-nil `isearch-filter-predicates'. + If `replace-lax-whitespace' is non-nil, a space or spaces in the string to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -300,6 +304,10 @@ all caps, or capitalized, then its replacement is upcased or capitalized.) +Ignore read-only matches if `query-replace-skip-read-only' is non-nil, +ignore hidden matches if `search-invisible' is nil, and ignore more +matches using a non-nil `isearch-filter-predicates'. + If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -380,6 +388,10 @@ Preserves case in each replacement if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. +Ignore read-only matches if `query-replace-skip-read-only' is non-nil, +ignore hidden matches if `search-invisible' is nil, and ignore more +matches using a non-nil `isearch-filter-predicates'. + If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -470,6 +482,10 @@ \(Preserving case means that if the string matched is all caps, or capitalized, then its replacement is upcased or capitalized.) +Ignore read-only matches if `query-replace-skip-read-only' is non-nil, +ignore hidden matches if `search-invisible' is nil, and ignore more +matches using a non-nil `isearch-filter-predicates'. + If `replace-lax-whitespace' is non-nil, a space or spaces in the string to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -512,6 +528,10 @@ Preserve case in each match if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. +Ignore read-only matches if `query-replace-skip-read-only' is non-nil, +ignore hidden matches if `search-invisible' is nil, and ignore more +matches using a non-nil `isearch-filter-predicates'. + If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -1934,6 +1954,9 @@ (keep-going t) (stack nil) (replace-count 0) + (skip-read-only-count 0) + (skip-filtered-count 0) + (skip-invisible-count 0) (nonempty-match nil) (multi-buffer nil) (recenter-last-op nil) ; Start cycling order with initial position. @@ -2042,20 +2065,24 @@ (and (/= (nth 0 match) (nth 1 match)) match)))))) - ;; Optionally ignore matches that have a read-only property. - (when (and (or (not query-replace-skip-read-only) - (not (text-property-not-all - (nth 0 real-match-data) (nth 1 real-match-data) - 'read-only nil))) - ;; Optionally filter out matches. - (run-hook-with-args-until-failure - 'isearch-filter-predicates - (nth 0 real-match-data) (nth 1 real-match-data)) - ;; Optionally ignore invisible matches. - (or (eq search-invisible t) - (not (isearch-range-invisible - (nth 0 real-match-data) (nth 1 real-match-data))))) - + (cond + ;; Optionally ignore matches that have a read-only property. + ((not (or (not query-replace-skip-read-only) + (not (text-property-not-all + (nth 0 real-match-data) (nth 1 real-match-data) + 'read-only nil)))) + (setq skip-read-only-count (1+ skip-read-only-count))) + ;; Optionally filter out matches. + ((not (run-hook-with-args-until-failure + 'isearch-filter-predicates + (nth 0 real-match-data) (nth 1 real-match-data))) + (setq skip-filtered-count (1+ skip-filtered-count))) + ;; Optionally ignore invisible matches. + ((not (or (eq search-invisible t) + (not (isearch-range-invisible + (nth 0 real-match-data) (nth 1 real-match-data))))) + (setq skip-invisible-count (1+ skip-invisible-count))) + (t ;; Calculate the replacement string, if necessary. (when replacements (set-match-data real-match-data) @@ -2260,13 +2287,31 @@ (match-end 0) (current-buffer)) (match-data t))) - stack))))) + stack)))))) (replace-dehighlight)) (or unread-command-events - (message "Replaced %d occurrence%s" + (message "Replaced %d occurrence%s%s" replace-count - (if (= replace-count 1) "" "s"))) + (if (= replace-count 1) "" "s") + (if (> (+ skip-read-only-count + skip-filtered-count + skip-invisible-count) 0) + (format " (skipped %s)" + (mapconcat + 'identity + (delq nil (list + (if (> skip-read-only-count 0) + (format "%s read-only" + skip-read-only-count)) + (if (> skip-invisible-count 0) + (format "%s invisible" + skip-invisible-count)) + (if (> skip-filtered-count 0) + (format "%s filtered out" + skip-filtered-count)))) + ", ")) + ""))) (or (and keep-going stack) multi-buffer))) ;;; replace.el ends here ------------------------------------------------------------ revno: 112772 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-05-29 19:48:42 +0300 message: Remove *.res files in mostlyclean, to avoid problems with out-of-tree builds. src/Makefile.in (mostlyclean): Remove *.res files. lib-src/Makefile.in (mostlyclean): Remove *.res files. nt/Makefile.in (emacs.res): Include srcdir when preprocessing resources, for out-of-tree builds. (mostlyclean): Remove *.res files. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-05-18 05:32:17 +0000 +++ lib-src/ChangeLog 2013-05-29 16:48:42 +0000 @@ -1,3 +1,7 @@ +2013-05-29 Eli Zaretskii + + * Makefile.in (mostlyclean): Remove *.res files. + 2013-05-18 Paul Eggert Port --enable-gcc-warnings to clang. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2013-04-14 16:36:49 +0000 +++ lib-src/Makefile.in 2013-05-29 16:48:42 +0000 @@ -278,7 +278,7 @@ fi mostlyclean: - -rm -f core *.o + -rm -f core *.o *.res clean: mostlyclean -rm -f ${EXE_FILES} === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-05-17 09:35:23 +0000 +++ nt/ChangeLog 2013-05-29 16:48:42 +0000 @@ -1,3 +1,9 @@ +2013-05-29 Eli Zaretskii + + * Makefile.in (emacs.res): Include srcdir when preprocessing + resources, for out-of-tree builds. + (mostlyclean): Remove *.res files. + 2013-05-17 Eli Zaretskii * runemacs.c (WinMain): Support invocation of un-installed === modified file 'nt/Makefile.in' --- nt/Makefile.in 2013-04-21 15:13:24 +0000 +++ nt/Makefile.in 2013-05-29 16:48:42 +0000 @@ -168,7 +168,7 @@ fi mostlyclean: - -rm -f core *.o + -rm -f core *.o *.res clean: mostlyclean -rm -f ${EXE_FILES} @@ -209,4 +209,4 @@ -o runemacs${EXEEXT} emacs.res: ${srcdir}/emacs.rc ${srcdir}/icons/emacs.ico ${srcdir}/$(EMACS_MANIFEST) - ${WINDRES} -O coff -o emacs.res ${srcdir}/emacs.rc + ${WINDRES} -I ${srcdir} -O coff -o emacs.res ${srcdir}/emacs.rc === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-29 01:07:53 +0000 +++ src/ChangeLog 2013-05-29 16:48:42 +0000 @@ -1,3 +1,7 @@ +2013-05-29 Eli Zaretskii + + * Makefile.in (mostlyclean): Remove *.res files. + 2013-05-29 Stefan Monnier * fileio.c (Finsert_file_contents): Preserve undo info when reverting === modified file 'src/Makefile.in' --- src/Makefile.in 2013-05-16 09:58:56 +0000 +++ src/Makefile.in 2013-05-29 16:48:42 +0000 @@ -547,6 +547,7 @@ rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT) rm -f buildobj.h rm -f globals.h gl-stamp + rm -f *.res clean: mostlyclean rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) -rm -rf $(DEPDIR) ------------------------------------------------------------ revno: 112771 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-05-29 11:17:12 -0400 message: * lisp/emacs-lisp/trace.el (trace--read-args): Provide a default. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 14:14:16 +0000 +++ lisp/ChangeLog 2013-05-29 15:17:12 +0000 @@ -1,5 +1,7 @@ 2013-05-29 Stefan Monnier + * emacs-lisp/trace.el (trace--read-args): Provide a default. + * emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit from prog-mode-map. === modified file 'lisp/emacs-lisp/trace.el' --- lisp/emacs-lisp/trace.el 2013-05-06 22:33:24 +0000 +++ lisp/emacs-lisp/trace.el 2013-05-29 15:17:12 +0000 @@ -262,7 +262,17 @@ (defun trace--read-args (prompt) (cons - (intern (completing-read prompt obarray 'fboundp t)) + (let ((default (function-called-at-point)) + (beg (string-match ":[ \t]*\\'" prompt))) + (intern (completing-read (if default + (format + "%s (default %s)%s" + (substring prompt 0 beg) + default + (if beg (substring prompt beg) ": ")) + prompt) + obarray 'fboundp t nil nil + (if default (symbol-name default))))) (when current-prefix-arg (list (read-buffer "Output to buffer: " trace-buffer) ------------------------------------------------------------ revno: 112770 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-05-29 10:14:16 -0400 message: * lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit from prog-mode-map. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 07:18:09 +0000 +++ lisp/ChangeLog 2013-05-29 14:14:16 +0000 @@ -1,3 +1,8 @@ +2013-05-29 Stefan Monnier + + * emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit from + prog-mode-map. + 2013-05-29 Leo Liu * progmodes/octave.el (octave-indent-comment): Tweak regexps. @@ -24,8 +29,7 @@ 2013-05-28 Alan Mackenzie Handle "capitalised keywords" correctly. - * progmodes/cc-mode.el (c-after-change): bind case-fold-search to - nil. + * progmodes/cc-mode.el (c-after-change): Bind case-fold-search to nil. 2013-05-28 Aidan Gauland === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2013-05-06 20:23:40 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-05-29 14:14:16 +0000 @@ -266,6 +266,7 @@ (defvar lisp-mode-shared-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map prog-mode-map) (define-key map "\e\C-q" 'indent-sexp) (define-key map "\177" 'backward-delete-char-untabify) ;; This gets in the way when viewing a Lisp file in view-mode. As ------------------------------------------------------------ revno: 112769 committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-05-29 21:21:17 +0800 message: * INSTALL: Fix description. diff: === modified file 'ChangeLog' --- ChangeLog 2013-05-27 02:03:18 +0000 +++ ChangeLog 2013-05-29 13:21:17 +0000 @@ -1,3 +1,7 @@ +2013-05-29 Xue Fuqiao + + * INSTALL: Fix description. + 2013-05-27 YAMAMOTO Mitsuharu * configure.ac (HAVE_XRANDR): Check availability of === modified file 'INSTALL' --- INSTALL 2013-03-06 06:26:55 +0000 +++ INSTALL 2013-05-29 13:21:17 +0000 @@ -212,7 +212,7 @@ GNU/Linux distribution that you use, and the options that you want to configure Emacs with. On Debian-based systems, you can install all the packages needed to build the installed version of Emacs with a command -like `apt-get build-dep emacs23'. On Red Hat systems, the +like `apt-get build-dep emacs24'. On Red Hat systems, the corresponding command is `yum-builddep emacs'. ------------------------------------------------------------ revno: 112768 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-29 00:18:09 -0700 message: idlwave-concatenate-rinfo-lists fix * progmodes/idlwave.el (idlwave-concatenate-rinfo-lists): Handle idlwave-last-system-routine-info-cons-cell being nil. This seems to prevent an error on typing `C-c TAB', idlwave-update-routine-info, in an idlwave buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 06:50:48 +0000 +++ lisp/ChangeLog 2013-05-29 07:18:09 +0000 @@ -8,6 +8,9 @@ 2013-05-29 Glenn Morris + * progmodes/idlwave.el (idlwave-concatenate-rinfo-lists): + Handle idlwave-last-system-routine-info-cons-cell being nil. + * progmodes/idlwave.el (idlwave-scan-user-lib-files) (idlwave-write-paths): Simplify via with-temp-buffer. === modified file 'lisp/progmodes/idlwave.el' --- lisp/progmodes/idlwave.el 2013-05-29 06:44:19 +0000 +++ lisp/progmodes/idlwave.el 2013-05-29 07:18:09 +0000 @@ -5078,11 +5078,14 @@ ;; The sequence here is important because earlier definitions shadow ;; later ones. We assume that if things in the buffers are newer ;; then in the shell of the system, they are meant to be different. - (setcdr idlwave-last-system-routine-info-cons-cell - (append idlwave-buffer-routines - idlwave-compiled-routines - idlwave-library-catalog-routines - idlwave-user-catalog-routines)) + (let ((temp (append idlwave-buffer-routines + idlwave-compiled-routines + idlwave-library-catalog-routines + idlwave-user-catalog-routines))) + ;; Not actually used for anything? + (if idlwave-last-system-routine-info-cons-cell + (setcdr idlwave-last-system-routine-info-cons-cell temp) + (setq idlwave-last-system-routine-info-cons-cell (cons temp nil)))) (setq idlwave-class-alist nil) ;; Give a message with information about the number of routines we have. ------------------------------------------------------------ revno: 112767 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-05-29 14:50:48 +0800 message: * lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn off the highlight first. * lisp/progmodes/octave.el (octave-indent-comment): Tweak regexps. (octave-help): Small simplification. * test/indent/octave.m: Tweak. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-29 06:44:19 +0000 +++ lisp/ChangeLog 2013-05-29 06:50:48 +0000 @@ -1,3 +1,11 @@ +2013-05-29 Leo Liu + + * progmodes/octave.el (octave-indent-comment): Tweak regexps. + (octave-help): Small simplification. + + * emacs-lisp/smie.el (smie-highlight-matching-block): Always turn + off the highlight first. + 2013-05-29 Glenn Morris * progmodes/idlwave.el (idlwave-scan-user-lib-files) === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2013-05-24 19:37:55 +0000 +++ lisp/emacs-lisp/smie.el 2013-05-29 06:50:48 +0000 @@ -1060,10 +1060,10 @@ beg end (current-buffer)) (overlay-put smie--highlight-matching-block-overlay 'face 'smie-matching-block-highlight)))) - (save-excursion - (condition-case nil - (if (nth 8 (syntax-ppss)) - (overlay-put smie--highlight-matching-block-overlay 'face nil) + (overlay-put smie--highlight-matching-block-overlay 'face nil) + (unless (nth 8 (syntax-ppss)) + (save-excursion + (condition-case nil (let ((token (or (funcall beg-of-tok) (funcall beg-of-tok @@ -1082,11 +1082,8 @@ (let ((beg (point)) (opener (funcall smie-forward-token-function))) (when (assoc opener smie-closer-alist) - (funcall highlight beg (point))))) - (t (overlay-put smie--highlight-matching-block-overlay - 'face nil))))) - (scan-error - (overlay-put smie--highlight-matching-block-overlay 'face nil))))))) + (funcall highlight beg (point))))))) + (scan-error))))))) (defvar smie--highlight-matching-block-timer nil) === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-27 05:08:04 +0000 +++ lisp/progmodes/octave.el 2013-05-29 06:50:48 +0000 @@ -446,11 +446,11 @@ (back-to-indentation) (cond ((octave-in-string-or-comment-p) nil) - ((looking-at-p "\\s<\\{3,\\}") + ((looking-at-p "\\(\\s<\\)\\1\\{2,\\}") 0) ;; Exclude %{, %} and %!. ((and (looking-at-p "\\s<\\(?:[^{}!]\\|$\\)") - (not (looking-at-p "\\s<\\s<"))) + (not (looking-at-p "\\(\\s<\\)\\1"))) (comment-choose-indent))))) @@ -1637,8 +1637,7 @@ ;; Make 'See also' clickable (with-syntax-table octave-mode-syntax-table (when (re-search-forward "^\\s-*See also:" nil t) - (let ((end (or (save-excursion (re-search-forward "^\\s-*$" nil t)) - (point-max)))) + (let ((end (save-excursion (re-search-forward "^\\s-*$" nil t)))) (while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" end t) (make-text-button (match-beginning 0) ;; If the match ends with . exclude it. === modified file 'test/ChangeLog' --- test/ChangeLog 2013-05-26 07:54:01 +0000 +++ test/ChangeLog 2013-05-29 06:50:48 +0000 @@ -1,3 +1,7 @@ +2013-05-29 Leo Liu + + * indent/octave.m: Tweak. + 2013-05-26 Aidan Gauland * tests/eshell.el: Rewrite tests using ERT. === modified file 'test/indent/octave.m' --- test/indent/octave.m 2013-05-25 02:03:03 +0000 +++ test/indent/octave.m 2013-05-29 06:50:48 +0000 @@ -2311,7 +2311,7 @@ ext(end) = []; else isglob = false; # I am a test - # me too + #%% me too ### I shall align to column 0 endif pos = findstr (nm, ext);