diff options
| author | jave | 2015-01-04 09:09:36 +0100 |
|---|---|---|
| committer | jave | 2015-01-04 09:09:36 +0100 |
| commit | a7e2c92ddf6c27b2cfcc9782fd71f15d36162cce (patch) | |
| tree | 7e092998b7e6956f311a169e0d87254ef87703e3 /lisp | |
| parent | db4613576d3115aa320f0293d081ce98baa06acd (diff) | |
| parent | fec9b792f543c35b1a635b3a3326d496e3ca9012 (diff) | |
| download | emacs-a7e2c92ddf6c27b2cfcc9782fd71f15d36162cce.tar.gz emacs-a7e2c92ddf6c27b2cfcc9782fd71f15d36162cce.zip | |
merge master
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 54 | ||||
| -rw-r--r-- | lisp/Makefile.in | 27 | ||||
| -rw-r--r-- | lisp/button.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | lisp/files.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/international/quail.el | 4 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 1 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 42 |
11 files changed, 114 insertions, 38 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d5416c5cea..aa79a8d4b2e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,51 @@ | |||
| 1 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Less 'make' chatter for lisp dir | ||
| 4 | * Makefile.in (THEFILE): Define to be 'no-such-file' by default, | ||
| 5 | to make it clearer that the caller must specify it. | ||
| 6 | (compile-onefile): Remove, replacing by ... | ||
| 7 | ($(THEFILE)c): ... new rule. This lets us use AM_V_GEN here. | ||
| 8 | ($(THEFILE)c, .el.elc, $(MH_E_DIR)/mh-loaddefs.el) | ||
| 9 | ($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el) | ||
| 10 | ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): | ||
| 11 | Use AM_V_GEN to lessen 'make' chatter. | ||
| 12 | (.el.elc): Omit duplicate comment. | ||
| 13 | |||
| 14 | Less 'make' chatter in batch mode | ||
| 15 | * emacs-lisp/autoload.el (autoload-generate-file-autoloads): | ||
| 16 | * emacs-lisp/bytecomp.el (byte-compile-file): | ||
| 17 | * files.el (save-buffer, basic-save-buffer): | ||
| 18 | * international/quail.el (quail-update-leim-list-file): | ||
| 19 | Don't output messages like "Generating ..." in batch mode. | ||
| 20 | |||
| 21 | 2015-01-04 Dmitry Gutov <dgutov@yandex.ru> | ||
| 22 | |||
| 23 | Unbreak `mouse-action' property in text buttons. | ||
| 24 | |||
| 25 | * button.el (push-button): Fix regression from 2012-12-06. | ||
| 26 | |||
| 27 | 2015-01-03 Dmitry Gutov <dgutov@yandex.ru> | ||
| 28 | |||
| 29 | * progmodes/xref.el (xref-marker-stack-empty-p): New function. | ||
| 30 | |||
| 31 | * menu-bar.el (menu-bar-goto-menu): Use it. | ||
| 32 | |||
| 33 | 2015-01-03 Dmitry Gutov <dgutov@yandex.ru> | ||
| 34 | |||
| 35 | * progmodes/xref.el (xref--window-configuration): New variable. | ||
| 36 | (xref-show-location-at-point): New command. | ||
| 37 | (xref--restore-window-configuration): New function. | ||
| 38 | (xref-next-line, xref-prev-line): Delegate to | ||
| 39 | `xref-show-location-at-point'. | ||
| 40 | (xref--location-at-point): Don't signal the error. | ||
| 41 | (xref-goto-xref): Do that here instead. | ||
| 42 | (xref--xref-buffer-mode): Add `xref--restore-window-configuration' | ||
| 43 | to `pre-command-hook'. | ||
| 44 | (xref--xref-buffer-mode-map): Don't remap `next-line' and | ||
| 45 | `previous-line'. Additionally bind `xref-next-line' and | ||
| 46 | `xref-prev-line' to `n' and `p' respectively. Bind | ||
| 47 | `xref-show-location-at-point' to `C-o'. | ||
| 48 | |||
| 1 | 2015-01-01 Eli Zaretskii <eliz@gnu.org> | 49 | 2015-01-01 Eli Zaretskii <eliz@gnu.org> |
| 2 | 50 | ||
| 3 | * tool-bar.el (tool-bar-local-item) | 51 | * tool-bar.el (tool-bar-local-item) |
| @@ -59,6 +107,12 @@ | |||
| 59 | 107 | ||
| 60 | * obsolete/pc-select.el (pc-selection-mode): Use system-type. | 108 | * obsolete/pc-select.el (pc-selection-mode): Use system-type. |
| 61 | This is instead of system-name, which is both wrong here and obsolete. | 109 | This is instead of system-name, which is both wrong here and obsolete. |
| 110 | * desktop.el (desktop-save-frameset): | ||
| 111 | * dnd.el (dnd-get-local-file-uri): | ||
| 112 | * nxml/rng-uri.el (rng-uri-file-name-1): | ||
| 113 | Prefer (system-name) to system-name, and avoid naming | ||
| 114 | locals 'system-name'. | ||
| 115 | * startup.el (system-name): Now an obsolete variable. (Bug#19438) | ||
| 62 | 116 | ||
| 63 | 2014-12-29 Dmitry Gutov <dgutov@yandex.ru> | 117 | 2014-12-29 Dmitry Gutov <dgutov@yandex.ru> |
| 64 | 118 | ||
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 67855baf9f3..565ca77de3b 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -257,12 +257,10 @@ TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | |||
| 257 | # src/Makefile.in to rebuild a particular Lisp file, no questions asked. | 257 | # src/Makefile.in to rebuild a particular Lisp file, no questions asked. |
| 258 | # Use byte-compile-refresh-preloaded to try and work around some of | 258 | # Use byte-compile-refresh-preloaded to try and work around some of |
| 259 | # the most common problems of not bootstrapping from a clean state. | 259 | # the most common problems of not bootstrapping from a clean state. |
| 260 | .PHONY: compile-onefile | 260 | THEFILE = no-such-file |
| 261 | compile-onefile: | 261 | .PHONY: $(THEFILE)c |
| 262 | @echo Compiling $(THEFILE) | 262 | $(THEFILE)c: |
| 263 | @# Use byte-compile-refresh-preloaded to try and work around some of | 263 | $(AM_V_GEN)$(emacs) $(BYTE_COMPILE_FLAGS) \ |
| 264 | @# the most common bootstrapping problems. | ||
| 265 | @$(emacs) $(BYTE_COMPILE_FLAGS) \ | ||
| 266 | -l bytecomp -f byte-compile-refresh-preloaded \ | 264 | -l bytecomp -f byte-compile-refresh-preloaded \ |
| 267 | -f batch-byte-compile $(THEFILE) | 265 | -f batch-byte-compile $(THEFILE) |
| 268 | 266 | ||
| @@ -278,12 +276,7 @@ compile-onefile: | |||
| 278 | # An old-fashioned suffix rule, which, according to the GNU Make manual, | 276 | # An old-fashioned suffix rule, which, according to the GNU Make manual, |
| 279 | # cannot have prerequisites. | 277 | # cannot have prerequisites. |
| 280 | .el.elc: | 278 | .el.elc: |
| 281 | @echo Compiling $< | 279 | $(AM_V_GEN)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $< |
| 282 | @# The BIG_STACK_OPTS are only needed to byte-compile the byte-compiler | ||
| 283 | @# files, which is normally done in compile-first, but may also be | ||
| 284 | @# recompiled via this rule. | ||
| 285 | @$(emacs) $(BYTE_COMPILE_FLAGS) \ | ||
| 286 | -f batch-byte-compile $< | ||
| 287 | 280 | ||
| 288 | .PHONY: compile-first compile-main compile compile-always | 281 | .PHONY: compile-first compile-main compile compile-always |
| 289 | 282 | ||
| @@ -404,7 +397,7 @@ MH_E_SRC = $(MH_E_DIR)/mh-acros.el $(MH_E_DIR)/mh-alias.el \ | |||
| 404 | .PHONY: mh-autoloads | 397 | .PHONY: mh-autoloads |
| 405 | mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el | 398 | mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el |
| 406 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) | 399 | $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) |
| 407 | $(emacs) -l autoload \ | 400 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 408 | --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ | 401 | --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ |
| 409 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ | 402 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ |
| 410 | -f batch-update-autoloads $(MH_E_DIR) | 403 | -f batch-update-autoloads $(MH_E_DIR) |
| @@ -421,7 +414,7 @@ TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \ | |||
| 421 | $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el | 414 | $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el |
| 422 | 415 | ||
| 423 | $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) | 416 | $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) |
| 424 | $(emacs) -l autoload \ | 417 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 425 | --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \ | 418 | --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \ |
| 426 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ | 419 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ |
| 427 | -f batch-update-autoloads $(TRAMP_DIR) | 420 | -f batch-update-autoloads $(TRAMP_DIR) |
| @@ -442,19 +435,19 @@ CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el \ | |||
| 442 | $(CAL_DIR)/solar.el | 435 | $(CAL_DIR)/solar.el |
| 443 | 436 | ||
| 444 | $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) | 437 | $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) |
| 445 | $(emacs) -l autoload \ | 438 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 446 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ | 439 | --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ |
| 447 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ | 440 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ |
| 448 | -f batch-update-autoloads $(CAL_DIR) | 441 | -f batch-update-autoloads $(CAL_DIR) |
| 449 | 442 | ||
| 450 | $(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/cal-loaddefs.el | 443 | $(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/cal-loaddefs.el |
| 451 | $(emacs) -l autoload \ | 444 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 452 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ | 445 | --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ |
| 453 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ | 446 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ |
| 454 | -f batch-update-autoloads $(CAL_DIR) | 447 | -f batch-update-autoloads $(CAL_DIR) |
| 455 | 448 | ||
| 456 | $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/diary-loaddefs.el | 449 | $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/diary-loaddefs.el |
| 457 | $(emacs) -l autoload \ | 450 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 458 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ | 451 | --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ |
| 459 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ | 452 | --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ |
| 460 | -f batch-update-autoloads $(CAL_DIR) | 453 | -f batch-update-autoloads $(CAL_DIR) |
diff --git a/lisp/button.el b/lisp/button.el index 2836b89020a..189a1c23a4d 100644 --- a/lisp/button.el +++ b/lisp/button.el | |||
| @@ -449,7 +449,7 @@ return t." | |||
| 449 | (if (posn-string posn) | 449 | (if (posn-string posn) |
| 450 | ;; mode-line, header-line, or display string event. | 450 | ;; mode-line, header-line, or display string event. |
| 451 | (button-activate (posn-string posn) t) | 451 | (button-activate (posn-string posn) t) |
| 452 | (push-button (posn-point posn)) t))) | 452 | (push-button (posn-point posn) t)))) |
| 453 | ;; POS is just normal position | 453 | ;; POS is just normal position |
| 454 | (let ((button (button-at (or pos (point))))) | 454 | (let ((button (button-at (or pos (point))))) |
| 455 | (when button | 455 | (when button |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index e9d13b86c29..073d923a178 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -539,7 +539,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE | |||
| 539 | (autoload-find-file file)) | 539 | (autoload-find-file file)) |
| 540 | ;; Obey the no-update-autoloads file local variable. | 540 | ;; Obey the no-update-autoloads file local variable. |
| 541 | (unless no-update-autoloads | 541 | (unless no-update-autoloads |
| 542 | (message "Generating autoloads for %s..." file) | 542 | (or noninteractive (message "Generating autoloads for %s..." file)) |
| 543 | (setq load-name | 543 | (setq load-name |
| 544 | (if (stringp generated-autoload-load-name) | 544 | (if (stringp generated-autoload-load-name) |
| 545 | generated-autoload-load-name | 545 | generated-autoload-load-name |
| @@ -623,7 +623,8 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE | |||
| 623 | (nth 5 (file-attributes relfile)))) | 623 | (nth 5 (file-attributes relfile)))) |
| 624 | (insert ";;; Generated autoloads from " relfile "\n"))) | 624 | (insert ";;; Generated autoloads from " relfile "\n"))) |
| 625 | (insert generate-autoload-section-trailer)))) | 625 | (insert generate-autoload-section-trailer)))) |
| 626 | (message "Generating autoloads for %s...done" file)) | 626 | (or noninteractive |
| 627 | (message "Generating autoloads for %s...done" file))) | ||
| 627 | (or visited | 628 | (or visited |
| 628 | ;; We created this buffer, so we should kill it. | 629 | ;; We created this buffer, so we should kill it. |
| 629 | (kill-buffer (current-buffer)))) | 630 | (kill-buffer (current-buffer)))) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4c694adfa23..1acd4fe76b2 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1858,7 +1858,7 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 1858 | ;; recompiled). Previously this was accomplished by | 1858 | ;; recompiled). Previously this was accomplished by |
| 1859 | ;; deleting target-file before writing it. | 1859 | ;; deleting target-file before writing it. |
| 1860 | (rename-file tempfile target-file t) | 1860 | (rename-file tempfile target-file t) |
| 1861 | (message "Wrote %s" target-file)) | 1861 | (or noninteractive (message "Wrote %s" target-file))) |
| 1862 | ;; This is just to give a better error message than write-region | 1862 | ;; This is just to give a better error message than write-region |
| 1863 | (signal 'file-error | 1863 | (signal 'file-error |
| 1864 | (list "Opening output file" | 1864 | (list "Opening output file" |
diff --git a/lisp/files.el b/lisp/files.el index 22362ca13ca..80b538c3267 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4663,7 +4663,7 @@ See the subroutine `basic-save-buffer' for more information." | |||
| 4663 | ;; then Rmail-mbox never displays it due to buffer swapping. If | 4663 | ;; then Rmail-mbox never displays it due to buffer swapping. If |
| 4664 | ;; the test is ever re-introduced, be sure to handle saving of | 4664 | ;; the test is ever re-introduced, be sure to handle saving of |
| 4665 | ;; Rmail files. | 4665 | ;; Rmail files. |
| 4666 | (if (and modp (buffer-file-name)) | 4666 | (if (and modp (buffer-file-name) (not noninteractive)) |
| 4667 | (message "Saving file %s..." (buffer-file-name))) | 4667 | (message "Saving file %s..." (buffer-file-name))) |
| 4668 | (basic-save-buffer) | 4668 | (basic-save-buffer) |
| 4669 | (and modp (memq arg '(4 64)) (setq buffer-backed-up nil)))) | 4669 | (and modp (memq arg '(4 64)) (setq buffer-backed-up nil)))) |
| @@ -4805,7 +4805,7 @@ Before and after saving the buffer, this function runs | |||
| 4805 | ;; Support VC `implicit' locking. | 4805 | ;; Support VC `implicit' locking. |
| 4806 | (vc-after-save) | 4806 | (vc-after-save) |
| 4807 | (run-hooks 'after-save-hook)) | 4807 | (run-hooks 'after-save-hook)) |
| 4808 | (message "(No changes need to be saved)")))) | 4808 | (or noninteractive (message "(No changes need to be saved)"))))) |
| 4809 | 4809 | ||
| 4810 | ;; This does the "real job" of writing a buffer into its visited file | 4810 | ;; This does the "real job" of writing a buffer into its visited file |
| 4811 | ;; and making a backup file. This is what is normally done | 4811 | ;; and making a backup file. This is what is normally done |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 73fe41f01f2..73a0de76a1f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-12-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * message.el (message-make-fqdn): | ||
| 4 | * nnvirtual.el (nnvirtual-retrieve-headers) | ||
| 5 | (nnvirtual-update-xref-header): Prefer (system-name) to system-name, | ||
| 6 | and avoid naming locals 'system-name'. | ||
| 7 | |||
| 1 | 2014-12-29 Lars Ingebrigtsen <larsi@gnus.org> | 8 | 2014-12-29 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 9 | ||
| 3 | * mm-decode.el (mm-shr): Bind `shr-width' to `fill-column' so that | 10 | * mm-decode.el (mm-shr): Bind `shr-width' to `fill-column' so that |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f194b93526e..2755fd68bef 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -2985,7 +2985,7 @@ of each directory." | |||
| 2985 | quail-dirs list-buf pkg-list pos) | 2985 | quail-dirs list-buf pkg-list pos) |
| 2986 | (if (not (file-writable-p leim-list)) | 2986 | (if (not (file-writable-p leim-list)) |
| 2987 | (error "Can't write to file \"%s\"" leim-list)) | 2987 | (error "Can't write to file \"%s\"" leim-list)) |
| 2988 | (message "Updating %s ..." leim-list) | 2988 | (or noninteractive (message "Updating %s ..." leim-list)) |
| 2989 | (setq list-buf (find-file-noselect leim-list)) | 2989 | (setq list-buf (find-file-noselect leim-list)) |
| 2990 | 2990 | ||
| 2991 | ;; At first, clean up the file. | 2991 | ;; At first, clean up the file. |
| @@ -3077,7 +3077,7 @@ of each directory." | |||
| 3077 | (let ((coding-system-for-write 'utf-8)) | 3077 | (let ((coding-system-for-write 'utf-8)) |
| 3078 | (save-buffer 0))) | 3078 | (save-buffer 0))) |
| 3079 | (kill-buffer list-buf) | 3079 | (kill-buffer list-buf) |
| 3080 | (message "Updating %s ... done" leim-list))) | 3080 | (or noninteractive (message "Updating %s ... done" leim-list)))) |
| 3081 | 3081 | ||
| 3082 | (defun quail-advice (args) | 3082 | (defun quail-advice (args) |
| 3083 | "Advise users about the characters input by the current Quail package. | 3083 | "Advise users about the characters input by the current Quail package. |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 7d7e4660fb5..67cb3273d23 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -381,6 +381,7 @@ | |||
| 381 | 381 | ||
| 382 | (bindings--define-key menu [xref-pop] | 382 | (bindings--define-key menu [xref-pop] |
| 383 | '(menu-item "Back" xref-pop-marker-stack | 383 | '(menu-item "Back" xref-pop-marker-stack |
| 384 | :visible (not (xref-marker-stack-empty-p)) | ||
| 384 | :help "Back to the position of the last search")) | 385 | :help "Back to the position of the last search")) |
| 385 | 386 | ||
| 386 | (bindings--define-key menu [xref-apropos] | 387 | (bindings--define-key menu [xref-apropos] |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 7b87933935c..081da5db73b 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-12-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * org-clock.el (org-clock-save): Prefer (system-name) to system-name. | ||
| 4 | |||
| 1 | 2014-10-29 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2014-10-29 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | Simplify use of current-time and friends. | 7 | Simplify use of current-time and friends. |
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index a5ff5ee55ad..7bc6500a8de 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -301,6 +301,10 @@ backward." | |||
| 301 | (let ((marker (ring-remove ring))) | 301 | (let ((marker (ring-remove ring))) |
| 302 | (set-marker marker nil nil))))) | 302 | (set-marker marker nil nil))))) |
| 303 | 303 | ||
| 304 | (defun xref-marker-stack-empty-p () | ||
| 305 | "Return t if the marker stack is empty; nil otherwise." | ||
| 306 | (ring-empty-p xref--marker-ring)) | ||
| 307 | |||
| 304 | 308 | ||
| 305 | (defun xref--goto-location (location) | 309 | (defun xref--goto-location (location) |
| 306 | "Set buffer and point according to xref-location LOCATION." | 310 | "Set buffer and point according to xref-location LOCATION." |
| @@ -328,6 +332,8 @@ WINDOW controls how the buffer is displayed: | |||
| 328 | 332 | ||
| 329 | ;; The xref buffer is used to display a set of xrefs. | 333 | ;; The xref buffer is used to display a set of xrefs. |
| 330 | 334 | ||
| 335 | (defvar-local xref--window-configuration nil) | ||
| 336 | |||
| 331 | (defun xref--display-position (pos other-window recenter-arg) | 337 | (defun xref--display-position (pos other-window recenter-arg) |
| 332 | ;; show the location, but don't hijack focus. | 338 | ;; show the location, but don't hijack focus. |
| 333 | (with-selected-window (display-buffer (current-buffer) other-window) | 339 | (with-selected-window (display-buffer (current-buffer) other-window) |
| @@ -341,46 +347,56 @@ WINDOW controls how the buffer is displayed: | |||
| 341 | (xref--display-position (point) t 1)) | 347 | (xref--display-position (point) t 1)) |
| 342 | (user-error (message (error-message-string err))))) | 348 | (user-error (message (error-message-string err))))) |
| 343 | 349 | ||
| 344 | (defun xref--next-line (backward) | 350 | (defun xref-show-location-at-point () |
| 345 | (let ((loc (xref--search-property 'xref-location backward))) | 351 | "Display the source of xref at point in the other window, if any." |
| 352 | (interactive) | ||
| 353 | (let ((loc (xref--location-at-point))) | ||
| 346 | (when loc | 354 | (when loc |
| 347 | (save-window-excursion | 355 | (setq xref--window-configuration (current-window-configuration)) |
| 348 | (xref--show-location loc) | 356 | (xref--show-location loc)))) |
| 349 | (sit-for most-positive-fixnum))))) | 357 | |
| 358 | (defun xref--restore-window-configuration () | ||
| 359 | (when xref--window-configuration | ||
| 360 | (set-window-configuration xref--window-configuration) | ||
| 361 | (setq xref--window-configuration nil))) | ||
| 350 | 362 | ||
| 351 | (defun xref-next-line () | 363 | (defun xref-next-line () |
| 352 | "Move to the next xref and display its source in the other window." | 364 | "Move to the next xref and display its source in the other window." |
| 353 | (interactive) | 365 | (interactive) |
| 354 | (xref--next-line nil)) | 366 | (xref--search-property 'xref-location) |
| 367 | (xref-show-location-at-point)) | ||
| 355 | 368 | ||
| 356 | (defun xref-prev-line () | 369 | (defun xref-prev-line () |
| 357 | "Move to the previous xref and display its source in the other window." | 370 | "Move to the previous xref and display its source in the other window." |
| 358 | (interactive) | 371 | (interactive) |
| 359 | (xref--next-line t)) | 372 | (xref--search-property 'xref-location t) |
| 373 | (xref-show-location-at-point)) | ||
| 360 | 374 | ||
| 361 | (defun xref--location-at-point () | 375 | (defun xref--location-at-point () |
| 362 | (or (get-text-property (point) 'xref-location) | 376 | (get-text-property (point) 'xref-location)) |
| 363 | (error "No reference at point"))) | ||
| 364 | 377 | ||
| 365 | (defvar-local xref--window nil) | 378 | (defvar-local xref--window nil) |
| 366 | 379 | ||
| 367 | (defun xref-goto-xref () | 380 | (defun xref-goto-xref () |
| 368 | "Jump to the xref at point and bury the xref buffer." | 381 | "Jump to the xref at point and bury the xref buffer." |
| 369 | (interactive) | 382 | (interactive) |
| 370 | (let ((loc (xref--location-at-point)) | 383 | (let ((loc (or (xref--location-at-point) |
| 384 | (error "No reference at point"))) | ||
| 371 | (window xref--window)) | 385 | (window xref--window)) |
| 372 | (quit-window) | 386 | (quit-window) |
| 373 | (xref--pop-to-location loc window))) | 387 | (xref--pop-to-location loc window))) |
| 374 | 388 | ||
| 375 | (define-derived-mode xref--xref-buffer-mode fundamental-mode "XREF" | 389 | (define-derived-mode xref--xref-buffer-mode fundamental-mode "XREF" |
| 376 | "Mode for displaying cross-references." | 390 | "Mode for displaying cross-references." |
| 377 | (setq buffer-read-only t)) | 391 | (setq buffer-read-only t) |
| 392 | (add-hook 'pre-command-hook #'xref--restore-window-configuration nil t)) | ||
| 378 | 393 | ||
| 379 | (let ((map xref--xref-buffer-mode-map)) | 394 | (let ((map xref--xref-buffer-mode-map)) |
| 380 | (define-key map (kbd "q") #'quit-window) | 395 | (define-key map (kbd "q") #'quit-window) |
| 381 | (define-key map [remap next-line] #'xref-next-line) | 396 | (define-key map (kbd "n") #'xref-next-line) |
| 382 | (define-key map [remap previous-line] #'xref-prev-line) | 397 | (define-key map (kbd "p") #'xref-prev-line) |
| 383 | (define-key map (kbd "RET") #'xref-goto-xref) | 398 | (define-key map (kbd "RET") #'xref-goto-xref) |
| 399 | (define-key map (kbd "C-o") #'xref-show-location-at-point) | ||
| 384 | 400 | ||
| 385 | ;; suggested by Johan Claesson "to further reduce finger movement": | 401 | ;; suggested by Johan Claesson "to further reduce finger movement": |
| 386 | (define-key map (kbd ".") #'xref-next-line) | 402 | (define-key map (kbd ".") #'xref-next-line) |