1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-26 19:18:50 +00:00
Commit Graph

126090 Commits

Author SHA1 Message Date
Dmitry Gutov
cd27f7396b Say 'All results processed' at the end
* lisp/progmodes/xref.el (xref--query-replace-1):
Say 'All results processed' at the end if the user hadn't
cancelled the process (bug#23284).
2016-05-08 00:29:44 +03:00
Michael Albinus
97776f295d Continue to fix Bug#10085
* lisp/net/tramp.el (tramp-completion-file-name-handler-alist)
<expand-file-name>: Add handler.
(tramp-completion-handle-expand-file-name): New defun.
(tramp-handle-file-name-as-directory): Handle completion mode case.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Fix test.
(tramp-test24-file-name-completion): Extend test.
2016-05-07 22:52:30 +02:00
Alan Mackenzie
2ac39b0699 Revert change 8e4595a... due to annoyance it causes the development team.
Change 8e4595a438 from 2016-04-30 17:28:24
+0000 was an enhancement to .dir-locals to allow correct fontification
of certain macro constructs.

* .dir-locals.el: Remove the two forms for C Mode dealing with noise macros.
2016-05-07 20:28:18 +00:00
Alan Mackenzie
23a071d87d * lisp/emacs-lisp/edebug.el (edebug-sit-on-break): Give it a version number. 2016-05-07 17:10:36 +00:00
Simen Heggestøyl
29c9803c2a Add tests for CSS mode completion
* test/lisp/textmodes/css-mode-tests.el (css-test-property-values)
(css-test-property-values-no-duplicates)
(css-test-value-class-lookup): Use `seq-sort'.
(css-mode-tests--completions): New helper function for retrieving CSS
completions.
(css-test-complete-bang-rule, scss-test-complete-bang-rule)
(css-test-complete-property-value, css-test-complete-pseudo-class)
(css-test-complete-pseudo-element, css-test-complete-at-rule)
(scss-test-complete-at-rule, css-test-complete-property)
(css-test-complete-selector, css-test-complete-nested-selector)
(scss-test-complete-nested-selector): New tests.
2016-05-07 16:38:02 +02:00
Eli Zaretskii
4ffec91aa1 Document automatic adjustment of process' logical window dimensions
* doc/lispref/processes.texi (Process Buffers): Document
'set-process-window-size' and
'window-adjust-process-window-size-function'.

* etc/NEWS: Mention the new functionality and variable.

* src/process.c (Fset_process_window_size): Improve the doc string.
2016-05-07 12:16:27 +03:00
Alan Mackenzie
ed5282d239 Add an option in Edebug to prevent pauses after h', 'f', and o'.
Requested by Paul Pogonyshev.  Also add in documentation for Edebug config
variables which was missing.

* lisp/emacs-lisp/edebug.el (edebug-sit-on-break): New customizable option.
(edebug--display-1): Test edebug-sit-on-break before pausing 1 second.

* doc/lispref/edebug.texi (Jumping): Document the effect of the new option.
(Edebug Options): Document the new option.  Also add documentation for
edebug-eval-macro-args, edebug-print-length, edebug-print-level,
edebug-print-circle, edebug-sit-for-seconds.

* etc/NEWS: Note the new feature.
2016-05-07 06:42:29 +00:00
Jorgen Schaefer
bf7fc7a804 scheme.el: Turn literal tabs into \t
* lisp/progmodes/scheme.el: The last change to turn tabs into spaces
also caught some literal tabs in character classes. Fix this by
adding \t to those classes.
2016-05-07 12:24:27 +02:00
Tino Calancha
4a6d39b395 Make 'backtab' work in table-mode on text terminals
* lisp/textmodes/table.el (table-cell-bindings): Bind 'backtab'
explicitly.  (Bug#23456)
2016-05-07 11:19:26 +03:00
Eli Zaretskii
fa6a6edd1d Try to speed-up display of many all-blank lines
* src/bidi.c (bidi_initialize): Use anchored regexps for
paragraph start and paragraph separator sequences.  (Bug#23457)
2016-05-07 11:00:36 +03:00
Alan Mackenzie
26171e0277 Correct hack-local-variables change from Thu May 5 11:05:49 2016 +0000
Prevent hack-local-variables being called from the fundamental-mode mode call
early in normal-mode.  This fixes bug #23460 and bug #23463.

* lisp/files.el (normal-mode) Replace call to fundamental-mode with calls to
the things it calls, with the exception of hack-local-variables.

* etc/NEWS: Add an entry to note the calling of hack-local-variables at each
major mode initialization.
2016-05-06 18:58:49 +00:00
Paul Eggert
81204b276f Port xref-tests to master branch
Also, add a test to make this problem less likely in the future.
* test/Makefile.in (check-no-automated-subdir): New rule.
(check, check-expensive, check-maybe): Depend on it.
* test/automated/data/xref/file1.txt: Rename to ...
* test/data/xref/file1.txt: ... here.
* test/automated/data/xref/file2.txt: Rename to ...
* test/data/xref/file2.txt: ... here.
* test/automated/xref-tests.el: Rename to ...
* test/lisp/progmodes/xref-tests.el: ... here.
(xref-tests-data-dir): Use EMACS_TEST_DIRECTORY.
2016-05-06 10:09:53 -07:00
Michael Albinus
dc662713e2 ; Fix typos and stylistic glitches in NEWS 2016-05-06 17:53:18 +02:00
Michael Albinus
c760a600da tramp-sh.el: Work around a stat bug (backport from master)
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
stat versions which produce shell quoted output.  See also
coreutils Bug#23422.

(cherry picked from commit 6aad36ace9)
2016-05-06 08:13:08 +02:00
Paul Eggert
89ce83b202 Merge from origin/emacs-25
50650cb Doc fixes for fclist and grep
5e814e0 Minor doc fixes for quoting
3347a73 `nreverse' the marker pairs list
1a4127d Use save-excursion in xref-location-marker more
ab3ba91 shell-quote-argument DIR when appropriate
922c7a3 Rework xref-query-replace-in-results
3fe3510 * lisp/replace.el (query-replace-read-from): Use minibuffer-w...
0932b94 Fix todo-mode bug involving archived items (bug#23447)
e68ad1f ; * etc/NEWS: Tiny edit. (Bug#23432)
adc80b7 ; * test/automated/xref-tests.el: Add copyright and license.
4d8fd9c Handle "empty line" regexp in xref searches
f559b37 Add tests for xref-collect-matches
6428aa0 Use grep-find-ignored-directories instead of vc-directory-exc...
6f82d8e Clear buffer-undo-list when showing xrefs
c68a091 Note the quote translation in `message' in section "incompati...
52f86a7 * etc/NEWS: Mention (message "%s" (format ...)).
93703c5 (Common Keywords): Correct what missing :group means
79e5800 Improve documentation of Dired's 'A' and 'Q' commands
2ea2a2f Doc fixes for quoting
8544b98 posnp doc clarification
805204f Mention what a missing :group does
ec554d7 Fix documentation of dired-aux search/replace commands
2016-05-05 23:11:11 -07:00
Paul Eggert
50650cb688 Doc fixes for fclist and grep
A newline is needed between two fc-list calls.
egrep and fgrep have been withdrawn from POSIX,
so document grep -E and grep -F instead.
2016-05-05 12:50:01 -07:00
Simen Heggestøyl
d546ed13b0 Support completion of HTML tags in CSS selectors
* lisp/textmodes/css-mode.el (css--html-tags): New variable holding a
list of HTML tags for completion.
(css--nested-selectors-allowed): New variable for determining whether
nested selectors are allowed in the current mode.
(css--complete-selector): New function for completing part of a CSS
selector.
(css-completion-at-point): Support completion of selectors.
(scss-mode): Allow nested selectors.
2016-05-05 21:22:36 +02:00
Lars Ingebrigtsen
67fa7f13d4 Make `R' in eww work more reliably
* lisp/net/eww.el (eww-score-readability): Protect against
null children.
2016-05-05 19:41:21 +02:00
Paul Eggert
5e814e02f0 Minor doc fixes for quoting
* doc/lispref/control.texi (Signaling Errors):
* doc/lispref/display.texi (Displaying Messages):
Don’t say that formats “generate”.  Try to word more clearly.
* etc/NEWS: Coalesce near-duplicate entries.
2016-05-05 06:40:12 -07:00
Dmitry Gutov
3347a733e0 `nreverse' the marker pairs list
* lisp/progmodes/xref.el (xref--buf-pairs-iterator): `nreverse'
the marker pairs list for each buffer before returning.
2016-05-05 16:01:52 +03:00
Alan Mackenzie
25f455815b Call hack-local-variables from major modes rather than from file visiting
This prevents file/directory local variables from being lost when the major
mode is set or changed.

This fixes bug #15577 and bug #23407.

* lisp/files.el (normal-mode): Call `hack-local-variables' when the major mode
function hasn't already done so.
(hack-local-variables): Rename parameter `mode-only' to `handle-mode', make
its previous non-nil setting be t, and introduce the following action for a
non-nil non-t value: apply all settings apart from `mode'.

* lisp/subr.el (run-mode-hooks): call `hack-local-variables' for buffers
which are visiting files.

* doc/emacs/custom.texi (File Variables): Note that setting a major mode also
sets file variables.
(Directory Variables): Note that `mode', `eval', and `unibyte' can be set as
dir local variables, but `coding' can't.

* doc/lispref/modes.texi (Major Mode Conventions): Say that `run-mode-hooks'
also calls `hack-local-variables'.
(Auto Major Mode): Say that `find-file' no longer runs `hack-local-variables',
as from 25.2.  Remove vagueness from `normal-mode' and `set-auto-mode' by
saying that the mode IS SET, not merely "selected" or "chosen".
(Mode Hooks): Document change to `run-mode-hooks'.

* doc/lispref/variables.texi (File Local Variables): Document change to
`hack-local-variables'.
2016-05-05 11:05:49 +00:00
Michael Albinus
6aad36ace9 tramp-sh.el: Work around a stat bug
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
stat versions which produce shell quoted output.  See also
coreutils Bug#23422.
2016-05-05 10:23:06 +02:00
Noam Postavsky
403cc9fad9 Fix autogen.sh for separate worktrees
* autogen.sh: Use the $hooks variable in the $sample_hooks loop, instead
of assuming .git/hooks is a directory.
2016-05-04 21:11:37 -07:00
Dmitry Gutov
1a4127dbd6 Use save-excursion in xref-location-marker more
* lisp/progmodes/elisp-mode.el (xref-location-marker): Use
save-excursion, in order not to alter the value of point if the
buffer is currently open in the background (problem reported by
Robert Weiner).

* lisp/progmodes/etags.el (xref-location-marker): Same.
2016-05-05 04:28:14 +03:00
Dmitry Gutov
ab3ba912fc shell-quote-argument DIR when appropriate
* lisp/progmodes/project.el (project-file-completion-table):
`shell-quote-argument' DIR as well.

* lisp/progmodes/xref.el (xref--rgrep-command): Pass DIR through
`shell-quote-argument' (bug#23453).  Thanks for Kaushal Modi for
pointing out the problem.  Assert that DIR doesn't start with `~'.
2016-05-05 04:15:23 +03:00
Dmitry Gutov
922c7a3e48 Rework xref-query-replace-in-results
* lisp/progmodes/xref.el (xref-query-replace-in-results): Collect
all xrefs from the buffer first, then delegate most of the
processing to the value returned by xref--buf-pairs-iterator.
(xref--buf-pairs-iterator): New function.  Return an "iterator"
which partitions returned markers into buffers, and only processes
markers from one buffer at a time.  When an xref is out of date,
skip it with a message instead of signaling error (bug#23284).
(xref--outdated-p): Extract from xref--buf-pairs-iterator.  Trim
CR from both strings before comparing.
(xref--query-replace-1): Remove the variable current-buf, no need
to track it anymore.  Simplify the filter-predicate and search
functions accordingly.  Iterate over buffer-markers pairs returned
by the iterator, and call `perform-replace' for each of them.  Use
multi-query-replace-map (bug#23284).  Use `switch-to-buffer' every
time after the first, in order not to jump between windows.

* test/automated/xref-tests.el
(xref--buf-pairs-iterator-groups-markers-by-buffers-1)
(xref--buf-pairs-iterator-groups-markers-by-buffers-2)
(xref--buf-pairs-iterator-cleans-up-markers): New tests.
2016-05-05 03:26:04 +03:00
Juri Linkov
3fe3510728 * lisp/replace.el (query-replace-read-from): Use minibuffer-with-setup-hook
to set minibuffer-local value of text-property-default-nonsticky.
(Bug#23418, bug#23127)
2016-05-04 23:05:33 +03:00
Alan Mackenzie
32f5bf0c29 Allow text-quoting-style' to be leave', i.e. no translation of quotes.
* lisp/help-fns.el (describe-function-1): Don't set coding system to UTF-8
when text-quoting-style is `leave'.

* src/lisp.h (enum text_quoting_style): Add identifier LEAVE_QUOTING_STYLE.

* src/doc.c (syms_of_doc): New symbol "leave".  Amend doc string of
`text_quoting_style'.
(text_quoting_style): Handle `leave' by returning LEAVE_QUOTING_STYLE.
(Fsubstitute_command_keys): Don't translate quotes when quoting_style is
LEAVE_QUOTING_STYLE.

* src/editfns.c (styled_format): Set quoting_style to -1 when
text-quoting-style is `leave'.
2016-05-04 19:59:50 +00:00
Stephen Berman
0932b94897 Fix todo-mode bug involving archived items (bug#23447)
* lisp/calendar/todo-mode.el (todo-jump-to-category): When jumping
from Todo Categories mode to a category with only archived items
and todo-skip-archived-categories is non-nil, make sure the
archive file buffer is in Todo Archive mode to prevent
todo-category-select from raising an error, and don't set
todo-current-todo-file, since that makes todo-show display the
archived category.  Remove a no-op call to kill-buffer, which is
already called in todo-insert-category-line.
2016-05-04 21:52:32 +02:00
Glenn Morris
e68ad1f3f0 ; * etc/NEWS: Tiny edit. (Bug#23432) 2016-05-04 13:23:21 -04:00
Stefan Monnier
088acab383 * lisp/emulation/viper(-cmd)?.el: Use lexical-binding.
* lisp/emulation/viper-cmd.el: Use lexical-binding.
(viper-change-state-to-vi, viper-change-state-to-emacs): Allow dummy
args, for use in advice-add.
(viper--init-message): Rename from init-message.
(viper-minibuffer-standard-hook): Adjust accordingly.
(viper-undo): Remove unused var `modified'.
(viper-read-string-with-history, viper-set-searchstyle-toggling-macros):
Don't use dynamic vars as args.
(viper-submit-report): Clarify use of dynamic vars.

* lisp/emulation/viper.el: Use lexical-binding and nadvice.
Remove redundant :group keywords.  Group the (if viper-mode) at top-level.
Use add-function rather than a `(lambda ...).
(viper--advice-list): New var.
(viper--advice-add, viper--deactivate-advice-list): New funs.
(viper-go-away, viper-set-hooks, viper-non-hook-settings): Use them.
(viper-non-hook-settings): Don't hook into find-file any more.
2016-05-04 11:09:01 -04:00
Stefan Monnier
3d8b29bbf6 * lisp/vc/ediff-util.el: Use lexical-binding. 2016-05-04 09:12:49 -04:00
Stefan Monnier
4deb5bd9b1 * lisp/progmodes/js.el (js-syntax-propertize): Recognize shebang line. 2016-05-04 08:53:00 -04:00
Glenn Morris
adc80b7e23 ; * test/automated/xref-tests.el: Add copyright and license. 2016-05-03 19:36:40 -07:00
Lars Ingebrigtsen
9ec81c5a6e Add an animation sanity check
* lisp/image.el (image-multi-frame-p): Give up on animations
if it seems like they are too slow (bug#23431).
2016-05-04 01:37:01 +02:00
Dmitry Gutov
4d8fd9cf33 Handle "empty line" regexp in xref searches
* lisp/progmodes/xref.el (xref--collect-matches-1): Stop after one
match if re-search-forward doesn't move point (bug#23426).

* test/automated/xref-tests.el
(xref-collect-matches-finds-an-empty-line-regexp-match):
Uncomment test.
2016-05-04 01:59:29 +03:00
Dmitry Gutov
f559b374a3 Add tests for xref-collect-matches
* test/automated/xref-tests.el: New file.  Add tests for
xref-collect-matches.
2016-05-04 01:38:02 +03:00
Dmitry Gutov
6428aa044a Use grep-find-ignored-directories instead of vc-directory-exclusion-list
* lisp/dired-aux.el (dired-do-find-regexp):
Use grep-find-ignored-directories instead of
vc-directory-exclusion-list.  The result should be functionally
similar (the former uses the latter as the default value), but it
should be more consistent and appropriate WRT user
customizations.
(dired-do-find-regexp-and-replace): Update the docstring.

* lisp/dired.el: Update the corresponding autoloads.

* doc/emacs/dired.texi (Operating on Files): Update the
documentation accordingly.
2016-05-04 01:02:43 +03:00
Dmitry Gutov
6f82d8ef7d Clear buffer-undo-list when showing xrefs
* lisp/progmodes/xref.el (xref--show-xref-buffer): Clear
buffer-undo-list and temporarily bind it to t while rendering the
buffer contents.
2016-05-04 00:42:43 +03:00
Alan Mackenzie
c68a09107c Note the quote translation in `message' in section "incompatible changes".
* etc/NEWS: Note that `message' translates quotes, that the translation
cannot be disabled, and that `format' can be used to get the old
behavior back.
2016-05-03 20:36:09 +00:00
Paul Eggert
52f86a755b * etc/NEWS: Mention (message "%s" (format ...)). 2016-05-03 13:30:21 -07:00
Lars Ingebrigtsen
3a788d7a41 abbrev-tests.el fix
* test/lisp/abbrev-tests.el (abbrev-table-p-test): Don't check
internal implementation detail.
2016-05-03 19:21:47 +02:00
Lars Ingebrigtsen
93703c547a (Common Keywords): Correct what missing :group means
* doc/lispref/customize.texi (Common Keywords): Correct what
missing :group means.
2016-05-03 19:06:36 +02:00
Eli Zaretskii
79e58003aa Improve documentation of Dired's 'A' and 'Q' commands
* lisp/dired-aux.el (dired-do-find-regexp)
(dired-do-find-regexp-and-replace): Mention
'grep-find-ignored-files' and 'vc-directory-exclusion-list', and
also the fact that REGEXP should be palatable by Grep.  (Bug#23426)
* lisp/dired.el: Update the corresponding autoload forms.

* doc/emacs/dired.texi (Operating on Files): Mention
'grep-find-ignored-files' and 'vc-directory-exclusion-list'.
(Bug#23429)
2016-05-03 19:14:31 +03:00
Lars Ingebrigtsen
43bb4305c5 (shr-rescale-image): Clarify logic slightly
* lisp/net/shr.el (shr-rescale-image): Clarify logic slightly.
2016-05-03 17:27:04 +02:00
Paul Eggert
2ea2a2f1a5 Doc fixes for quoting
* doc/emacs/text.texi, doc/lispintro/emacs-lisp-intro.texi:
* doc/lispref/control.texi, doc/lispref/display.texi:
* doc/lispref/help.texi, doc/lispref/strings.texi, lisp/subr.el:
* src/callint.c, src/doprnt.c, src/editfns.c:
Document quoting a bit more systematically.
Problem reported by Alan Mackenzie (Bug#23425).
2016-05-03 08:03:04 -07:00
Martin Rudalics
72166f2f3d Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2
* lisp/wid-edit.el (widget-keymap): Bind `widget-button-click'
to mouse-1/-2 instead of down-mouse-1/-2.  Suggested by Stefan
Monnier.  (Bug#19185, Bug#20398)
2016-05-03 08:38:49 +02:00
Lee Bochicchio
3a21ea15ae Add more abbrev tests
* test/lisp/abbrev-tests.el
(clear-abbrev-table-test): Use `abbrev-expansion'
(abbrev-table-empty-p-test, list-abbrevs-test)
(prepare-abbrev-list-buffer-test, insert-abbrevs-test)
(edit-abbrevs-test, define-abbrevs-test)
(read-write-abbrev-file-test)
(abbrev-edit-save-to-file-test): New tests (bug#23139).
2016-05-03 00:12:53 +02:00
Lars Ingebrigtsen
8544b9879c posnp doc clarification
* lisp/subr.el (posnp): Mention that a posn object is returned
from `event-start' (bug#18211).
2016-05-03 00:08:31 +02:00
Lars Ingebrigtsen
805204f3ef Mention what a missing :group does
* doc/lispref/customize.texi (Common Keywords): Document that
a missing :group reuses the group from the preceding item (bug#21601).
2016-05-03 00:03:20 +02:00