Now on revision 112755. ------------------------------------------------------------ revno: 112755 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-05-27 23:56:55 -0700 message: * obsolete/fast-lock.el (byte-compile-warnings): Don't warn about obsolete features in this obsolete file. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-28 06:55:48 +0000 +++ lisp/ChangeLog 2013-05-28 06:56:55 +0000 @@ -1,5 +1,8 @@ 2013-05-28 Glenn Morris + * obsolete/fast-lock.el (byte-compile-warnings): + Don't warn about obsolete features in this obsolete file. + * progmodes/cc-vars.el (c-macro-names-with-semicolon): Move definition before use. === modified file 'lisp/obsolete/fast-lock.el' --- lisp/obsolete/fast-lock.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/fast-lock.el 2013-05-28 06:56:55 +0000 @@ -855,3 +855,7 @@ (provide 'fast-lock) ;;; fast-lock.el ends here + +;; Local Variables: +;; byte-compile-warnings: (not obsolete) +;; End: ------------------------------------------------------------ revno: 112754 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-05-27 23:55:48 -0700 message: * cc-vars.el (c-macro-names-with-semicolon): Move definition before use. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-28 06:54:23 +0000 +++ lisp/ChangeLog 2013-05-28 06:55:48 +0000 @@ -1,5 +1,8 @@ 2013-05-28 Glenn Morris + * progmodes/cc-vars.el (c-macro-names-with-semicolon): + Move definition before use. + * play/dunnet.el (byte-compile-warnings): Don't disable them all. (dun-unix-verbs): Remove dun-zippy. (dun-zippy): Remove function. === modified file 'lisp/progmodes/cc-vars.el' --- lisp/progmodes/cc-vars.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/cc-vars.el 2013-05-28 06:55:48 +0000 @@ -1622,6 +1622,24 @@ ) (make-variable-buffer-local 'c-macro-with-semi-re) +(defvar c-macro-names-with-semicolon + '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS") + "List of #defined symbols whose expansion ends with a semicolon. +Alternatively it can be a string, a regular expression which +matches all such symbols. + +The \"symbols\" must be syntactically valid identifiers in the +target language \(C, C++, Objective C), or \(as the case may be) +the regular expression must match only valid identifiers. + +If you change this variable's value, call the function +`c-make-macros-with-semi-re' to set the necessary internal +variables. + +Note that currently \(2008-11-04) this variable is a prototype, +and is likely to disappear or change its form soon.") +(make-variable-buffer-local 'c-macro-names-with-semicolon) + (defun c-make-macro-with-semi-re () ;; Convert `c-macro-names-with-semicolon' into the regexp ;; `c-macro-with-semi-re' (or just copy it if it's already a re). @@ -1643,24 +1661,6 @@ c-macro-names-with-semicolon: %s" c-macro-names-with-semicolon)))))) -(defvar c-macro-names-with-semicolon - '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS") - "List of #defined symbols whose expansion ends with a semicolon. -Alternatively it can be a string, a regular expression which -matches all such symbols. - -The \"symbols\" must be syntactically valid identifiers in the -target language \(C, C++, Objective C), or \(as the case may be) -the regular expression must match only valid identifiers. - -If you change this variable's value, call the function -`c-make-macros-with-semi-re' to set the necessary internal -variables. - -Note that currently \(2008-11-04) this variable is a prototype, -and is likely to disappear or change its form soon.") -(make-variable-buffer-local 'c-macro-names-with-semicolon) - (defvar c-file-style nil "Variable interface for setting style via File Local Variables. In a file's Local Variable section, you can set this variable to a ------------------------------------------------------------ revno: 112753 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-05-27 23:54:23 -0700 message: dunnet.el trivia * play/dunnet.el (byte-compile-warnings): Don't disable them all. (dun-unix-verbs): Remove dun-zippy. (dun-zippy): Remove function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-28 06:52:51 +0000 +++ lisp/ChangeLog 2013-05-28 06:54:23 +0000 @@ -1,5 +1,9 @@ 2013-05-28 Glenn Morris + * play/dunnet.el (byte-compile-warnings): Don't disable them all. + (dun-unix-verbs): Remove dun-zippy. + (dun-zippy): Remove function. + * emacs-lisp/bytecomp.el (byte-compile-warnings): Doc fix. 2013-05-27 Juri Linkov === modified file 'lisp/play/dunnet.el' --- lisp/play/dunnet.el 2013-01-01 09:11:05 +0000 +++ lisp/play/dunnet.el 2013-05-28 06:54:23 +0000 @@ -1,4 +1,4 @@ -;;; dunnet.el --- text adventure for Emacs -*- byte-compile-warnings: nil -*- +;;; dunnet.el --- text adventure for Emacs ;; Copyright (C) 1992-1993, 2001-2013 Free Software Foundation, Inc. @@ -1386,7 +1386,7 @@ (setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo) (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd) (rlogin . dun-rlogin) (uncompress . dun-uncompress) - (cat . dun-cat) (zippy . dun-zippy))) + (cat . dun-cat))) (setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type) (exit . dun-dos-exit) (command . dun-dos-spawn) @@ -2996,9 +2996,6 @@ (dun-mprincl "Ascii files only.") (dun-mprincl "File not found.")))))))) -(defun dun-zippy (args) - (dun-mprincl (yow))) - (defun dun-rlogin-endgame () (if (not (= (dun-score nil) 90)) (dun-mprincl @@ -3356,3 +3353,7 @@ (provide 'dunnet) ;;; dunnet.el ends here + +;; Local Variables: +;; byte-compile-warnings: (not free-vars lexical) +;; End: ------------------------------------------------------------ revno: 112752 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-05-27 23:52:51 -0700 message: * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 23:38:56 +0000 +++ lisp/ChangeLog 2013-05-28 06:52:51 +0000 @@ -1,3 +1,7 @@ +2013-05-28 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-warnings): Doc fix. + 2013-05-27 Juri Linkov * replace.el (replace-search): New function with code moved out === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2013-05-22 07:50:30 +0000 +++ lisp/emacs-lisp/bytecomp.el 2013-05-28 06:52:51 +0000 @@ -289,10 +289,11 @@ obsolete obsolete variables and functions. noruntime functions that may not be defined at runtime (typically defined only under `eval-when-compile'). - cl-functions calls to runtime functions from the CL package (as - distinguished from macros and aliases). + cl-functions calls to runtime functions (as distinguished from macros and + aliases) from the old CL package (not the newer cl-lib). interactive-only commands that normally shouldn't be called from Lisp code. + lexical global/dynamic variables lacking a prefix. make-local calls to make-variable-buffer-local that may be incorrect. mapcar mapcar called for effect. constants let-binding of, or assignment to, constants/nonvariables. ------------------------------------------------------------ revno: 112751 committer: Michael Albinus branch nick: trunk timestamp: Tue 2013-05-28 08:49:19 +0200 message: Add comment for last change. diff: === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2013-05-27 12:41:17 +0000 +++ lisp/net/dbus.el 2013-05-28 06:49:19 +0000 @@ -268,6 +268,8 @@ ;; Wait until `dbus-call-method-handler' has put the result into ;; `dbus-return-values-table'. If no timeout is given, use the ;; default 25". Events which are not from D-Bus must be restored. + ;; `read-event' performs a redisplay. This must be suppressed; it + ;; hurts when reading D-Bus events asynchronously. (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) (let ((event (let ((inhibit-redisplay t) unread-command-events) ------------------------------------------------------------ revno: 112750 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-05-28 09:05:41 +0800 message: * erc.texi (Special Features): ERC is being maintained within Emacs now. (See http://lists.gnu.org/archive/html/erc-discuss/2012-10/msg00000.html) diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-05-25 01:26:12 +0000 +++ doc/misc/ChangeLog 2013-05-28 01:05:41 +0000 @@ -1,3 +1,8 @@ +2013-05-28 Xue Fuqiao + + * erc.texi (Special Features): ERC is being maintained within + Emacs now. + 2013-05-25 Xue Fuqiao * flymake.texi: Changing from one space between sentences to two. === modified file 'doc/misc/erc.texi' --- doc/misc/erc.texi 2013-01-02 16:13:04 +0000 +++ doc/misc/erc.texi 2013-05-28 01:05:41 +0000 @@ -234,9 +234,9 @@ Different channels and servers may have different language encodings. -In addition, it is possible to translate the messages that ERC uses into -multiple languages. Please contact the developers of ERC at -@email{erc-discuss@@gnu.org} if you are interested in helping with the +In addition, it is possible to translate the messages that ERC uses +into multiple languages. Please contact the developers of Emacs at +@email{emacs-devel@@gnu.org} if you are interested in helping with the translation effort. @item user scripting ------------------------------------------------------------ revno: 112749 fixes bug: http://debbugs.gnu.org/11746 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-05-28 02:38:56 +0300 message: * lisp/replace.el (replace-search): New function with code moved out from `perform-replace'. (replace-highlight, replace-dehighlight): Move function definitions up closer to `replace-search'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 23:11:21 +0000 +++ lisp/ChangeLog 2013-05-27 23:38:56 +0000 @@ -1,5 +1,12 @@ 2013-05-27 Juri Linkov + * replace.el (replace-search): New function with code moved out + from `perform-replace'. + (replace-highlight, replace-dehighlight): Move function definitions + up closer to `replace-search'. (Bug#11746) + +2013-05-27 Juri Linkov + * replace.el (perform-replace): Ignore invisible matches. In addition to checking `query-replace-skip-read-only', also filter out matches by calling `run-hook-with-args-until-failure' === modified file 'lisp/replace.el' --- lisp/replace.el 2013-05-27 23:02:37 +0000 +++ lisp/replace.el 2013-05-27 23:38:56 +0000 @@ -1838,6 +1838,68 @@ It is called with three arguments, as if it were `re-search-forward'.") +(defun replace-search (search-string limit regexp-flag delimited-flag + case-fold-search) + "Search for the next occurence of SEARCH-STRING to replace." + ;; Let-bind global isearch-* variables to values used + ;; to search the next replacement. These let-bindings + ;; should be effective both at the time of calling + ;; `isearch-search-fun-default' and also at the + ;; time of funcalling `search-function'. + ;; These isearch-* bindings can't be placed higher + ;; outside of this function because then another I-search + ;; used after `recursive-edit' might override them. + (let* ((isearch-regexp regexp-flag) + (isearch-word delimited-flag) + (isearch-lax-whitespace + replace-lax-whitespace) + (isearch-regexp-lax-whitespace + replace-regexp-lax-whitespace) + (isearch-case-fold-search case-fold-search) + (isearch-adjusted nil) + (isearch-nonincremental t) ; don't use lax word mode + (isearch-forward t) + (search-function + (or (if regexp-flag + replace-re-search-function + replace-search-function) + (isearch-search-fun-default)))) + (funcall search-function search-string limit t))) + +(defvar replace-overlay nil) + +(defun replace-highlight (match-beg match-end range-beg range-end + search-string regexp-flag delimited-flag + case-fold-search) + (if query-replace-highlight + (if replace-overlay + (move-overlay replace-overlay match-beg match-end (current-buffer)) + (setq replace-overlay (make-overlay match-beg match-end)) + (overlay-put replace-overlay 'priority 1001) ;higher than lazy overlays + (overlay-put replace-overlay 'face 'query-replace))) + (if query-replace-lazy-highlight + (let ((isearch-string search-string) + (isearch-regexp regexp-flag) + (isearch-word delimited-flag) + (isearch-lax-whitespace + replace-lax-whitespace) + (isearch-regexp-lax-whitespace + replace-regexp-lax-whitespace) + (isearch-case-fold-search case-fold-search) + (isearch-forward t) + (isearch-other-end match-beg) + (isearch-error nil)) + (isearch-lazy-highlight-new-loop range-beg range-end)))) + +(defun replace-dehighlight () + (when replace-overlay + (delete-overlay replace-overlay)) + (when query-replace-lazy-highlight + (lazy-highlight-cleanup lazy-highlight-cleanup) + (setq isearch-lazy-highlight-last-string nil)) + ;; Close overlays opened by `isearch-range-invisible' in `perform-replace'. + (isearch-clean-overlays)) + (defun perform-replace (from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end) @@ -1925,62 +1987,40 @@ ;; Loop finding occurrences that perhaps should be replaced. (while (and keep-going (not (or (eobp) (and limit (>= (point) limit)))) - ;; Let-bind global isearch-* variables to values used - ;; to search the next replacement. These let-bindings - ;; should be effective both at the time of calling - ;; `isearch-search-fun-default' and also at the - ;; time of funcalling `search-function'. - ;; These isearch-* bindings can't be placed higher - ;; outside of this loop because then another I-search - ;; used after `recursive-edit' might override them. - (let* ((isearch-regexp regexp-flag) - (isearch-word delimited-flag) - (isearch-lax-whitespace - replace-lax-whitespace) - (isearch-regexp-lax-whitespace - replace-regexp-lax-whitespace) - (isearch-case-fold-search case-fold-search) - (isearch-adjusted nil) - (isearch-nonincremental t) ; don't use lax word mode - (isearch-forward t) - (search-function - (or (if regexp-flag - replace-re-search-function - replace-search-function) - (isearch-search-fun-default)))) - ;; Use the next match if it is already known; - ;; otherwise, search for a match after moving forward - ;; one char if progress is required. - (setq real-match-data - (cond ((consp match-again) - (goto-char (nth 1 match-again)) - (replace-match-data - t real-match-data match-again)) - ;; MATCH-AGAIN non-nil means accept an - ;; adjacent match. - (match-again - (and - (funcall search-function search-string - limit t) - ;; For speed, use only integers and - ;; reuse the list used last time. - (replace-match-data t real-match-data))) - ((and (< (1+ (point)) (point-max)) - (or (null limit) - (< (1+ (point)) limit))) - ;; If not accepting adjacent matches, - ;; move one char to the right before - ;; searching again. Undo the motion - ;; if the search fails. - (let ((opoint (point))) - (forward-char 1) - (if (funcall - search-function search-string - limit t) - (replace-match-data - t real-match-data) - (goto-char opoint) - nil))))))) + ;; Use the next match if it is already known; + ;; otherwise, search for a match after moving forward + ;; one char if progress is required. + (setq real-match-data + (cond ((consp match-again) + (goto-char (nth 1 match-again)) + (replace-match-data + t real-match-data match-again)) + ;; MATCH-AGAIN non-nil means accept an + ;; adjacent match. + (match-again + (and + (replace-search search-string limit + regexp-flag delimited-flag + case-fold-search) + ;; For speed, use only integers and + ;; reuse the list used last time. + (replace-match-data t real-match-data))) + ((and (< (1+ (point)) (point-max)) + (or (null limit) + (< (1+ (point)) limit))) + ;; If not accepting adjacent matches, + ;; move one char to the right before + ;; searching again. Undo the motion + ;; if the search fails. + (let ((opoint (point))) + (forward-char 1) + (if (replace-search search-string limit + regexp-flag delimited-flag + case-fold-search) + (replace-match-data + t real-match-data) + (goto-char opoint) + nil)))))) ;; Record whether the match is nonempty, to avoid an infinite loop ;; repeatedly matching the same empty string. @@ -2229,38 +2269,4 @@ (if (= replace-count 1) "" "s"))) (or (and keep-going stack) multi-buffer))) -(defvar replace-overlay nil) - -(defun replace-highlight (match-beg match-end range-beg range-end - search-string regexp-flag delimited-flag - case-fold-search) - (if query-replace-highlight - (if replace-overlay - (move-overlay replace-overlay match-beg match-end (current-buffer)) - (setq replace-overlay (make-overlay match-beg match-end)) - (overlay-put replace-overlay 'priority 1001) ;higher than lazy overlays - (overlay-put replace-overlay 'face 'query-replace))) - (if query-replace-lazy-highlight - (let ((isearch-string search-string) - (isearch-regexp regexp-flag) - (isearch-word delimited-flag) - (isearch-lax-whitespace - replace-lax-whitespace) - (isearch-regexp-lax-whitespace - replace-regexp-lax-whitespace) - (isearch-case-fold-search case-fold-search) - (isearch-forward t) - (isearch-other-end match-beg) - (isearch-error nil)) - (isearch-lazy-highlight-new-loop range-beg range-end)))) - -(defun replace-dehighlight () - (when replace-overlay - (delete-overlay replace-overlay)) - (when query-replace-lazy-highlight - (lazy-highlight-cleanup lazy-highlight-cleanup) - (setq isearch-lazy-highlight-last-string nil)) - ;; Close overlays opened by `isearch-range-invisible' in `perform-replace'. - (isearch-clean-overlays)) - ;;; replace.el ends here ------------------------------------------------------------ revno: 112748 fixes bug: http://debbugs.gnu.org/14459 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-05-28 03:11:21 +0400 message: * lisp/vc/vc-git.el (vc-git-working-revision): When in detached mode, return the commit hash. Also set the `vc-git-detached' property. (vc-git--rev-parse): Extract from `vc-git-previous-revision'. (vc-git-mode-line-string): Use the same help-echo format whether in detached mode or not, because we know the actual revision now. When in detached mode, shorten the revision to 7 chars. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 23:02:37 +0000 +++ lisp/ChangeLog 2013-05-27 23:11:21 +0000 @@ -44,6 +44,16 @@ locally instead of changing `isearch-filter-predicate'. (wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'. +2013-05-27 Dmitry Gutov + + * vc/vc-git.el (vc-git-working-revision): When in detached mode, + return the commit hash (Bug#14459). Also set the + `vc-git-detached' property. + (vc-git--rev-parse): Extract from `vc-git-previous-revision'. + (vc-git-mode-line-string): Use the same help-echo format whether + in detached mode or not, because we know the actual revision now. + When in detached mode, shorten the revision to 7 chars. + 2013-05-27 Stefan Monnier * emacs-lisp/easy-mmode.el (define-minor-mode): === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2013-04-24 07:52:00 +0000 +++ lisp/vc/vc-git.el 2013-05-27 23:11:21 +0000 @@ -234,30 +234,30 @@ (vc-git--state-code diff-letter))) (if (vc-git--empty-db-p) 'added 'up-to-date)))) -(defun vc-git-working-revision (_file) +(defun vc-git-working-revision (file) "Git-specific version of `vc-working-revision'." (let* (process-file-side-effects - (str (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "symbolic-ref" "HEAD"))))) - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (match-string 2 str) - str))) + (str (vc-git--run-command-string nil "symbolic-ref" "HEAD"))) + (vc-file-setprop file 'vc-git-detached (null str)) + (if str + (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) + (match-string 2 str) + str) + (vc-git--rev-parse "HEAD")))) (defun vc-git-workfile-unchanged-p (file) (eq 'up-to-date (vc-git-state file))) (defun vc-git-mode-line-string (file) "Return a string for `vc-mode-line' to put in the mode line for FILE." - (let* ((branch (vc-working-revision file)) + (let* ((rev (vc-working-revision file)) + (detached (vc-file-getprop file 'vc-git-detached)) (def-ml (vc-default-mode-line-string 'Git file)) (help-echo (get-text-property 0 'help-echo def-ml))) - (if (zerop (length branch)) - (propertize - (concat def-ml "!") - 'help-echo (concat help-echo "\nNo current branch (detached HEAD)")) - (propertize def-ml - 'help-echo (concat help-echo "\nCurrent branch: " branch))))) + (propertize (if detached + (substring def-ml 0 (- 7 (length rev))) + def-ml) + 'help-echo (concat help-echo "\nCurrent revision: " rev)))) (cl-defstruct (vc-git-extra-fileinfo (:copier nil) @@ -943,10 +943,13 @@ (point) (1- (point-max))))))) (or (vc-git-symbolic-commit prev-rev) prev-rev)) - (with-temp-buffer - (and - (vc-git--out-ok "rev-parse" (concat rev "^")) - (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))) + (vc-git--rev-parse (concat rev "^")))) + +(defun vc-git--rev-parse (rev) + (with-temp-buffer + (and + (vc-git--out-ok "rev-parse" rev) + (buffer-substring-no-properties (point-min) (+ (point-min) 40))))) (defun vc-git-next-revision (file rev) "Git-specific version of `vc-next-revision'." ------------------------------------------------------------ revno: 112747 fixes bug: http://debbugs.gnu.org/11746 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-05-28 02:02:37 +0300 message: * lisp/replace.el (perform-replace): Ignore invisible matches. In addition to checking `query-replace-skip-read-only', also filter out matches by calling `run-hook-with-args-until-failure' on `isearch-filter-predicates', and also check `search-invisible' for t or call `isearch-range-invisible'. (replace-dehighlight): Call `isearch-clean-overlays'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-05-27 22:42:11 +0000 +++ etc/NEWS 2013-05-27 23:02:37 +0000 @@ -236,11 +236,14 @@ entries displayed by `Info-index-next', `Info-virtual-index' and `info-apropos'. -** Isearch +** Search and Replace *** `C-x 8 RET' in Isearch mode reads a character by its Unicode name and adds it to the search string. +*** `query-replace' skips invisible text when `search-invisible' is nil, +and opens overlays with hidden text when `search-invisible' is `open'. + ** MH-E has been updated to MH-E version 8.5. See MH-E-NEWS for details. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 22:42:11 +0000 +++ lisp/ChangeLog 2013-05-27 23:02:37 +0000 @@ -1,5 +1,14 @@ 2013-05-27 Juri Linkov + * replace.el (perform-replace): Ignore invisible matches. + In addition to checking `query-replace-skip-read-only', also + filter out matches by calling `run-hook-with-args-until-failure' + on `isearch-filter-predicates', and also check `search-invisible' + for t or call `isearch-range-invisible'. + (replace-dehighlight): Call `isearch-clean-overlays'. (Bug#11746) + +2013-05-27 Juri Linkov + * isearch.el (isearch-filter-predicates): Rename from `isearch-filter-predicate'. Doc fix. (Bug#11378) (isearch-message-prefix): Display text from the property === modified file 'lisp/replace.el' --- lisp/replace.el 2013-03-24 21:47:52 +0000 +++ lisp/replace.el 2013-05-27 23:02:37 +0000 @@ -2003,10 +2003,18 @@ match)))))) ;; Optionally ignore matches that have a read-only property. - (unless (and query-replace-skip-read-only - (text-property-not-all - (nth 0 real-match-data) (nth 1 real-match-data) - 'read-only nil)) + (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))))) ;; Calculate the replacement string, if necessary. (when replacements @@ -2251,6 +2259,8 @@ (delete-overlay replace-overlay)) (when query-replace-lazy-highlight (lazy-highlight-cleanup lazy-highlight-cleanup) - (setq isearch-lazy-highlight-last-string nil))) + (setq isearch-lazy-highlight-last-string nil)) + ;; Close overlays opened by `isearch-range-invisible' in `perform-replace'. + (isearch-clean-overlays)) ;;; replace.el ends here ------------------------------------------------------------ revno: 112746 fixes bug: http://debbugs.gnu.org/11378 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-05-28 01:42:11 +0300 message: * lisp/isearch.el (isearch-filter-predicates): Rename from `isearch-filter-predicate'. Doc fix. (isearch-message-prefix): Display text from the property `isearch-message-prefix' of the currently active filters. (isearch-search): Don't compare `isearch-filter-predicate' with `isearch-filter-visible'. Call `run-hook-with-args-until-failure' on `isearch-filter-predicates'. Also check `search-invisible' for t or call `isearch-range-invisible'. (isearch-filter-visible): Make obsolete. (isearch-lazy-highlight-search): Call `run-hook-with-args-until-failure' on `isearch-filter-predicates' and use `isearch-range-invisible'. * lisp/info.el (Info-search): Call `run-hook-with-args-until-failure' on `isearch-filter-predicates' instead of `funcall'ing `isearch-filter-predicate'. (Info-mode): Set `Info-isearch-filter' to `isearch-filter-predicates' instead of `isearch-filter-predicate'. * lisp/dired-aux.el (dired-isearch-filter-predicate-orig): Remove variable. (dired-isearch-filenames-toggle, dired-isearch-filenames-setup) (dired-isearch-filenames-end): Add and remove `dired-isearch-filter-filenames' in `isearch-filter-predicates' instead of changing the value of `isearch-filter-predicate'. Rebind `dired-isearch-filenames-toggle' from "\M-sf" to "\M-sff". (dired-isearch-filter-filenames): Don't use `isearch-filter-visible'. Put property `isearch-message-prefix' to "filename " on `dired-isearch-filter-filenames'. * lisp/wdired.el (wdired-change-to-wdired-mode): Add `isearch-filter-predicates' to `wdired-isearch-filter-read-only' locally instead of changing `isearch-filter-predicate'. (wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-05-24 18:39:21 +0000 +++ etc/NEWS 2013-05-27 22:42:11 +0000 @@ -384,6 +384,8 @@ *** `lisp-complete-symbol' *** `field-complete' *** `minibuffer-completion-contents' +*** `isearch-nonincremental-exit-minibuffer' +*** `isearch-filter-visible' ** `with-wrapper-hook' is obsoleted by `add-function'. The few hooks that used with-wrapper-hook are replaced as follows: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 16:12:52 +0000 +++ lisp/ChangeLog 2013-05-27 22:42:11 +0000 @@ -1,3 +1,40 @@ +2013-05-27 Juri Linkov + + * isearch.el (isearch-filter-predicates): Rename from + `isearch-filter-predicate'. Doc fix. (Bug#11378) + (isearch-message-prefix): Display text from the property + `isearch-message-prefix' of the currently active filters. + (isearch-search): Don't compare `isearch-filter-predicate' with + `isearch-filter-visible'. Call `run-hook-with-args-until-failure' + on `isearch-filter-predicates'. Also check `search-invisible' for t + or call `isearch-range-invisible'. + (isearch-filter-visible): Make obsolete. + (isearch-lazy-highlight-search): + Call `run-hook-with-args-until-failure' on + `isearch-filter-predicates' and use `isearch-range-invisible'. + + * info.el (Info-search): Call `run-hook-with-args-until-failure' on + `isearch-filter-predicates' instead of `funcall'ing + `isearch-filter-predicate'. + (Info-mode): Set `Info-isearch-filter' to + `isearch-filter-predicates' instead of `isearch-filter-predicate'. + + * dired-aux.el (dired-isearch-filter-predicate-orig): + Remove variable. + (dired-isearch-filenames-toggle, dired-isearch-filenames-setup) + (dired-isearch-filenames-end): Add and remove + `dired-isearch-filter-filenames' in `isearch-filter-predicates' + instead of changing the value of `isearch-filter-predicate'. + Rebind `dired-isearch-filenames-toggle' from "\M-sf" to "\M-sff". + (dired-isearch-filter-filenames): Don't use `isearch-filter-visible'. + Put property `isearch-message-prefix' to "filename " on + `dired-isearch-filter-filenames'. + + * wdired.el (wdired-change-to-wdired-mode): + Add `isearch-filter-predicates' to `wdired-isearch-filter-read-only' + locally instead of changing `isearch-filter-predicate'. + (wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'. + 2013-05-27 Stefan Monnier * emacs-lisp/easy-mmode.el (define-minor-mode): === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2013-02-28 21:51:11 +0000 +++ lisp/dired-aux.el 2013-05-27 22:42:11 +0000 @@ -2491,18 +2491,16 @@ :group 'dired :version "23.1") -(defvar dired-isearch-filter-predicate-orig nil) - (defun dired-isearch-filenames-toggle () "Toggle file names searching on or off. When on, Isearch skips matches outside file names using the predicate `dired-isearch-filter-filenames' that matches only at file names. When off, it uses the original predicate." (interactive) - (setq isearch-filter-predicate - (if (eq isearch-filter-predicate 'dired-isearch-filter-filenames) - dired-isearch-filter-predicate-orig - 'dired-isearch-filter-filenames)) + (setq isearch-filter-predicates + (if (memq 'dired-isearch-filter-filenames isearch-filter-predicates) + (delq 'dired-isearch-filter-filenames isearch-filter-predicates) + (cons 'dired-isearch-filter-filenames isearch-filter-predicates))) (setq isearch-success t isearch-adjusted t) (isearch-update)) @@ -2513,29 +2511,27 @@ (when (or (eq dired-isearch-filenames t) (and (eq dired-isearch-filenames 'dwim) (get-text-property (point) 'dired-filename))) - (setq isearch-message-prefix-add "filename ") - (define-key isearch-mode-map "\M-sf" 'dired-isearch-filenames-toggle) - (setq dired-isearch-filter-predicate-orig - (default-value 'isearch-filter-predicate)) - (setq-default isearch-filter-predicate 'dired-isearch-filter-filenames) + (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-toggle) + (add-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames nil t) (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t))) (defun dired-isearch-filenames-end () "Clean up the Dired file name search after terminating isearch." (setq isearch-message-prefix-add nil) - (define-key isearch-mode-map "\M-sf" nil) - (setq-default isearch-filter-predicate dired-isearch-filter-predicate-orig) + (define-key isearch-mode-map "\M-sff" nil) + (remove-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames t) (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) (defun dired-isearch-filter-filenames (beg end) - "Test whether the current search hit is a visible file name. + "Test whether the current search hit is a file name. Return non-nil if the text from BEG to END is part of a file -name (has the text property `dired-filename') and is visible." - (and (isearch-filter-visible beg end) - (if dired-isearch-filenames - (text-property-not-all (min beg end) (max beg end) - 'dired-filename nil) - t))) +name (has the text property `dired-filename')." + (if dired-isearch-filenames + (text-property-not-all (min beg end) (max beg end) + 'dired-filename nil) + t)) + +(put 'dired-isearch-filter-filenames 'isearch-message-prefix "filename ") ;;;###autoload (defun dired-isearch-filenames () === modified file 'lisp/dired.el' --- lisp/dired.el 2013-02-28 21:51:11 +0000 +++ lisp/dired.el 2013-05-27 22:42:11 +0000 @@ -3864,7 +3864,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d6a694b6d13fa948465fde52a9ffb3ba") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "8f5af3aa4eee1b3448525896fa6f39a3") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/info.el' --- lisp/info.el 2013-05-22 03:13:56 +0000 +++ lisp/info.el 2013-05-27 22:42:11 +0000 @@ -1931,7 +1931,8 @@ (point-max))) (while (and (not give-up) (or (null found) - (not (funcall isearch-filter-predicate beg-found found)))) + (not (run-hook-with-args-until-failure + 'isearch-filter-predicates beg-found found)))) (let ((search-spaces-regexp Info-search-whitespace-regexp)) (if (if backward (re-search-backward regexp bound t) @@ -2009,7 +2010,8 @@ (setq give-up nil found nil) (while (and (not give-up) (or (null found) - (not (funcall isearch-filter-predicate beg-found found)))) + (not (run-hook-with-args-until-failure + 'isearch-filter-predicates beg-found found)))) (let ((search-spaces-regexp Info-search-whitespace-regexp)) (if (if backward (re-search-backward regexp nil t) @@ -4275,8 +4277,8 @@ 'Info-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'Info-isearch-push-state) - (set (make-local-variable 'isearch-filter-predicate) - 'Info-isearch-filter) + (set (make-local-variable 'isearch-filter-predicates) + '(Info-isearch-filter)) (set (make-local-variable 'revert-buffer-function) 'Info-revert-buffer-function) (Info-set-mode-line) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-15 23:21:01 +0000 +++ lisp/isearch.el 2013-05-27 22:42:11 +0000 @@ -187,12 +187,21 @@ "Function to save a function restoring the mode-specific Isearch state to the search status stack.") -(defvar isearch-filter-predicate 'isearch-filter-visible - "Predicate that filters the search hits that would normally be available. -Search hits that dissatisfy the predicate are skipped. The function -has two arguments: the positions of start and end of text matched by -the search. If this function returns nil, continue searching without -stopping at this match.") +(defvar isearch-filter-predicates nil + "Predicates that filter the search hits that would normally be available. +Search hits that dissatisfy the list of predicates are skipped. +Each function in this list has two arguments: the positions of +start and end of text matched by the search. +The search loop uses `run-hook-with-args-until-failure' to call +each predicate in order, and when one of the predicates returns nil, +skips this match and continues searching for the next match. +When the list of predicates is empty, `run-hook-with-args-until-failure' +returns non-nil that means that the found match is accepted. +The property `isearch-message-prefix' put on the predicate's symbol +specifies the prefix string displyed in the search message.") +(define-obsolete-variable-alias 'isearch-filter-predicate + 'isearch-filter-predicates + "24.4") ;; Search ring. @@ -2491,6 +2500,13 @@ (< (point) isearch-opoint))) "over") (if isearch-wrapped "wrapped ") + (mapconcat (lambda (s) + (and (symbolp s) + (get s 'isearch-message-prefix))) + (if (consp isearch-filter-predicates) + isearch-filter-predicates + (list isearch-filter-predicates)) + "") (if isearch-word (or (and (symbolp isearch-word) (get isearch-word 'isearch-message-prefix)) @@ -2622,10 +2638,7 @@ (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp))) (condition-case lossage - (let ((inhibit-point-motion-hooks - ;; FIXME: equality comparisons on functions is asking for trouble. - (and (eq isearch-filter-predicate 'isearch-filter-visible) - search-invisible)) + (let ((inhibit-point-motion-hooks search-invisible) (inhibit-quit nil) (case-fold-search isearch-case-fold-search) (retry t)) @@ -2638,8 +2651,15 @@ (if (or (not isearch-success) (bobp) (eobp) (= (match-beginning 0) (match-end 0)) - (funcall isearch-filter-predicate - (match-beginning 0) (match-end 0))) + ;; When one of filter predicates returns nil, + ;; retry the search. Otherwise, act according + ;; to search-invisible (open overlays, etc.) + (and (run-hook-with-args-until-failure + 'isearch-filter-predicates + (match-beginning 0) (match-end 0)) + (or (eq search-invisible t) + (not (isearch-range-invisible + (match-beginning 0) (match-end 0)))))) (setq retry nil))) (setq isearch-just-started nil) (if isearch-success @@ -2816,6 +2836,7 @@ searched too when `search-invisible' is t." (or (eq search-invisible t) (not (isearch-range-invisible beg end)))) +(make-obsolete 'isearch-filter-visible 'search-invisible "24.4") ;; General utilities @@ -3041,8 +3062,11 @@ (if (or (not success) (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. (= (match-beginning 0) (match-end 0)) - (funcall isearch-filter-predicate - (match-beginning 0) (match-end 0))) + (and (run-hook-with-args-until-failure + 'isearch-filter-predicates + (match-beginning 0) (match-end 0)) + (not (isearch-range-invisible + (match-beginning 0) (match-end 0))))) (setq retry nil))) success) (error nil))) === modified file 'lisp/wdired.el' --- lisp/wdired.el 2013-03-05 17:13:01 +0000 +++ lisp/wdired.el 2013-05-27 22:42:11 +0000 @@ -239,8 +239,7 @@ (dired-remember-marks (point-min) (point-max))) (set (make-local-variable 'wdired-old-point) (point)) (set (make-local-variable 'query-replace-skip-read-only) t) - (set (make-local-variable 'isearch-filter-predicate) - 'wdired-isearch-filter-read-only) + (add-hook 'isearch-filter-predicates 'wdired-isearch-filter-read-only nil t) (use-local-map wdired-mode-map) (force-mode-line-update) (setq buffer-read-only nil) @@ -268,9 +267,8 @@ (defun wdired-isearch-filter-read-only (beg end) "Skip matches that have a read-only property." - (and (isearch-filter-visible beg end) - (not (text-property-not-all (min beg end) (max beg end) - 'read-only nil)))) + (not (text-property-not-all (min beg end) (max beg end) + 'read-only nil))) ;; Protect the buffer so only the filenames can be changed, and put ;; properties so filenames (old and new) can be easily found. ------------------------------------------------------------ revno: 112745 fixes bug: http://debbugs.gnu.org/14476 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-05-27 19:54:33 +0300 message: Fix bug #14476 with posn-at-point and glyphs from display vector. src/xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a display vector, and we backtrack, handle the case that the previous character position is also displayed from a display vector or covered by a display string or image. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-25 11:14:38 +0000 +++ src/ChangeLog 2013-05-27 16:54:33 +0000 @@ -1,3 +1,10 @@ +2013-05-27 Eli Zaretskii + + * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a + display vector, and we backtrack, handle the case that the + previous character position is also displayed from a display + vector or covered by a display string or image. (Bug#14476) + 2013-05-25 Jan Djärv * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-05-21 05:27:33 +0000 +++ src/xdisp.c 2013-05-27 16:54:33 +0000 @@ -1371,18 +1371,41 @@ top_x = it.glyph_row->x; else { - struct it it2; + struct it it2, it2_prev; + /* The idea is to get to the previous buffer + position, consume the character there, and use + the pixel coordinates we get after that. But if + the previous buffer position is also displayed + from a display vector, we need to consume all of + the glyphs from that display vector. */ start_display (&it2, w, top); move_it_to (&it2, charpos - 1, -1, -1, -1, MOVE_TO_POS); - get_next_display_element (&it2); - PRODUCE_GLYPHS (&it2); - if (ITERATOR_AT_END_OF_LINE_P (&it2) - || it2.current_x > it2.last_visible_x) + /* If we didn't get to CHARPOS - 1, there's some + replacing display property at that position, and + we stopped after it. That is exactly the place + whose coordinates we want. */ + if (IT_CHARPOS (it2) != charpos - 1) + it2_prev = it2; + else + { + /* Iterate until we get out of the display + vector that displays the character at + CHARPOS - 1. */ + do { + get_next_display_element (&it2); + PRODUCE_GLYPHS (&it2); + it2_prev = it2; + set_iterator_to_next (&it2, 1); + } while (it2.method == GET_FROM_DISPLAY_VECTOR + && IT_CHARPOS (it2) < charpos); + } + if (ITERATOR_AT_END_OF_LINE_P (&it2_prev) + || it2_prev.current_x > it2_prev.last_visible_x) top_x = it.glyph_row->x; else { - top_x = it2.current_x; - top_y = it2.current_y; + top_x = it2_prev.current_x; + top_y = it2_prev.current_y; } } } ------------------------------------------------------------ revno: 112744 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-05-27 19:41:32 +0300 message: Restore an omitted bug reference. diff: === modified file 'src/ChangeLog.11' --- src/ChangeLog.11 2013-01-01 09:11:05 +0000 +++ src/ChangeLog.11 2013-05-27 16:41:32 +0000 @@ -14366,7 +14366,7 @@ 2009-01-10 Chong Yidong * xdisp.c (pos_visible_p): When iterator stops on the last glyph - of a display vector, backtrack. + of a display vector, backtrack. (Bug#1810) (try_window_reusing_current_matrix): Check glyph type before referencing charpos member. ------------------------------------------------------------ revno: 112743 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-05-27 12:12:52 -0400 message: Always defvar a mode's hook and provide a docstring. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * lisp/emacs-lisp/derived.el (define-derived-mode): Always defvar the mode hook and provide a docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 13:30:21 +0000 +++ lisp/ChangeLog 2013-05-27 16:12:52 +0000 @@ -1,3 +1,9 @@ +2013-05-27 Stefan Monnier + + * emacs-lisp/easy-mmode.el (define-minor-mode): + * emacs-lisp/derived.el (define-derived-mode): Always defvar the + mode hook and provide a docstring. + 2013-05-27 Alan Mackenzie Remove spurious syntax-table text properties inserted by C-y. === modified file 'lisp/emacs-lisp/derived.el' --- lisp/emacs-lisp/derived.el 2013-01-02 16:13:04 +0000 +++ lisp/emacs-lisp/derived.el 2013-05-27 16:12:52 +0000 @@ -192,12 +192,11 @@ parent child docstring syntax abbrev)) `(progn - (unless (get ',hook 'variable-documentation) - (put ',hook 'variable-documentation - (purecopy ,(format "Hook run when entering %s mode. + (defvar ,hook nil + ,(format "Hook run after entering %s mode. No problems result if this variable is not bound. `add-hook' automatically binds it. (This is true for all hook variables.)" - name)))) + name)) (unless (boundp ',map) (put ',map 'definition-name ',child)) (with-no-warnings (defvar ,map (make-sparse-keymap))) === modified file 'lisp/emacs-lisp/easy-mmode.el' --- lisp/emacs-lisp/easy-mmode.el 2013-05-21 07:25:14 +0000 +++ lisp/emacs-lisp/easy-mmode.el 2013-05-27 16:12:52 +0000 @@ -296,6 +296,12 @@ ;; up-to-here. :autoload-end + (defvar ,hook nil + ,(format "Hook run after entering or leaving `%s'. +No problems result if this variable is not bound. +`add-hook' automatically binds it. (This is true for all hook variables.)" + mode)) + ;; Define the minor-mode keymap. ,(unless (symbolp keymap) ;nil is also a symbol. `(defvar ,keymap-sym ------------------------------------------------------------ revno: 112742 committer: Alan Mackenzie branch nick: trunk timestamp: Mon 2013-05-27 13:30:21 +0000 message: Remove spurious syntax-table text properties inserted by C-y. * progmodes/cc-mode.el (c-after-change): Also clear hard syntax-table property with value nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 12:41:17 +0000 +++ lisp/ChangeLog 2013-05-27 13:30:21 +0000 @@ -1,3 +1,9 @@ +2013-05-27 Alan Mackenzie + + Remove spurious syntax-table text properties inserted by C-y. + * progmodes/cc-mode.el (c-after-change): Also clear hard + syntax-table property with value nil. + 2013-05-27 Michael Albinus * net/dbus.el (dbus-call-method): Let-bind `inhibit-redisplay' === modified file 'lisp/progmodes/cc-mode.el' --- lisp/progmodes/cc-mode.el 2013-05-02 11:18:18 +0000 +++ lisp/progmodes/cc-mode.el 2013-05-27 13:30:21 +0000 @@ -1077,12 +1077,13 @@ (setq beg end))) ;; C-y is capable of spuriously converting category properties - ;; c--as-paren-syntax into hard syntax-table properties. Remove - ;; these when it happens. + ;; c--as-paren-syntax and c-cpp-delimiter into hard syntax-table + ;; properties. Remove these when it happens. (c-clear-char-property-with-value beg end 'syntax-table c-<-as-paren-syntax) (c-clear-char-property-with-value beg end 'syntax-table c->-as-paren-syntax) + (c-clear-char-property-with-value beg end 'syntax-table nil) (c-trim-found-types beg end old-len) ; maybe we don't need all of these. (c-invalidate-sws-region-after beg end) ------------------------------------------------------------ revno: 112741 committer: Michael Albinus branch nick: trunk timestamp: Mon 2013-05-27 14:41:17 +0200 message: * net/dbus.el (dbus-call-method): Let-bind `inhibit-redisplay' when reading the events; the buffer layout shall not be changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 05:08:04 +0000 +++ lisp/ChangeLog 2013-05-27 12:41:17 +0000 @@ -1,3 +1,8 @@ +2013-05-27 Michael Albinus + + * net/dbus.el (dbus-call-method): Let-bind `inhibit-redisplay' + when reading the events; the buffer layout shall not be changed. + 2013-05-27 Leo Liu * progmodes/octave.el (inferior-octave-directory-tracker-resync): === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2013-01-01 09:11:05 +0000 +++ lisp/net/dbus.el 2013-05-27 12:41:17 +0000 @@ -270,7 +270,8 @@ ;; default 25". Events which are not from D-Bus must be restored. (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) - (let ((event (let (unread-command-events) (read-event nil nil 0.1)))) + (let ((event (let ((inhibit-redisplay t) unread-command-events) + (read-event nil nil 0.1)))) (when (and event (not (ignore-errors (dbus-check-event event)))) (setq unread-command-events (append unread-command-events (list event))))))) ------------------------------------------------------------ revno: 112740 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-05-27 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-05-18 10:17:38 +0000 +++ autogen/configure 2013-05-27 10:17:36 +0000 @@ -13956,9 +13956,9 @@ # Test old way in case pkg-config doesn't have it (older machines). ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default" if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRQueryExtension in -lXrandr" >&5 -$as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; } -if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5 +$as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; } +if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13972,27 +13972,27 @@ #ifdef __cplusplus extern "C" #endif -char XRRQueryExtension (); +char XRRGetScreenResources (); int main () { -return XRRQueryExtension (); +return XRRGetScreenResources (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xrandr_XRRQueryExtension=yes + ac_cv_lib_Xrandr_XRRGetScreenResources=yes else - ac_cv_lib_Xrandr_XRRQueryExtension=no + ac_cv_lib_Xrandr_XRRGetScreenResources=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5 +$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; } +if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then : HAVE_XRANDR=yes fi ------------------------------------------------------------ revno: 112739 committer: Leo Liu branch nick: trunk timestamp: Mon 2013-05-27 13:08:04 +0800 message: * progmodes/octave.el (inferior-octave-directory-tracker-resync): New variable. (inferior-octave-directory-tracker): Automatically re-sync default-directory. (octave-help): Improve handling of 'See also'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-27 01:08:43 +0000 +++ lisp/ChangeLog 2013-05-27 05:08:04 +0000 @@ -1,3 +1,11 @@ +2013-05-27 Leo Liu + + * progmodes/octave.el (inferior-octave-directory-tracker-resync): + New variable. + (inferior-octave-directory-tracker): Automatically re-sync + default-directory. + (octave-help): Improve handling of 'See also'. + 2013-05-27 Stefan Monnier * doc-view.el: Minor naming convention tweaks. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-24 19:37:55 +0000 +++ lisp/progmodes/octave.el 2013-05-27 05:08:04 +0000 @@ -885,15 +885,25 @@ (setq list (cdr list))) (set-process-filter proc filter)))) +(defvar inferior-octave-directory-tracker-resync nil) +(make-variable-buffer-local 'inferior-octave-directory-tracker-resync) + (defun inferior-octave-directory-tracker (string) "Tracks `cd' commands issued to the inferior Octave process. Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused." + (when inferior-octave-directory-tracker-resync + (setq inferior-octave-directory-tracker-resync nil) + (inferior-octave-resync-dirs)) (cond ((string-match "^[ \t]*cd[ \t;]*$" string) (cd "~")) ((string-match "^[ \t]*cd[ \t]+\\([^ \t\n;]*\\)[ \t\n;]*" string) - (with-demoted-errors ; in case directory doesn't exist - (cd (substring string (match-beginning 1) (match-end 1))))))) + (condition-case err + (cd (match-string 1 string)) + (error (setq inferior-octave-directory-tracker-resync t) + (message "%s: `%s'" + (error-message-string err) + (match-string 1 string))))))) (defun inferior-octave-resync-dirs () "Resync the buffer's idea of the current directory. @@ -1627,10 +1637,15 @@ ;; Make 'See also' clickable (with-syntax-table octave-mode-syntax-table (when (re-search-forward "^\\s-*See also:" nil t) - (while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" nil t) - (make-text-button (match-beginning 0) - (match-end 0) - :type 'octave-help-function)))) + (let ((end (or (save-excursion (re-search-forward "^\\s-*$" nil t)) + (point-max)))) + (while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" end t) + (make-text-button (match-beginning 0) + ;; If the match ends with . exclude it. + (if (eq (char-before (match-end 0)) ?.) + (1- (match-end 0)) + (match-end 0)) + :type 'octave-help-function))))) (octave-help-mode))))) (defcustom octave-source-directories nil