1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 22:20:24 -08:00
Commit graph

6499 commits

Author SHA1 Message Date
Stefan Monnier
cbfb129555 * lisp/progmodes/which-func.el: Improve disabling the mode
Use lexical-binding.
(which-func-modes, which-func-non-auto-modes, which-func-maxout)
(which-func, which-func-format): Remove redundant :group arg.
(which-func-try-to-enable): New function.
(which-func-ff-hook, which-function-mode): Use it.
(mode-line-misc-info): Add ourselves here instead of in bindings.el.
* lisp/bindings.el (mode-line-misc-info): Remove which-func-mode entry.
2015-11-30 10:52:12 -05:00
Wilson Snyder
ea78129522 verilog-mode.el: Commentary and fix pre-Emacs 21 behavior.
* verilog-mode.el (verilog-save-font-no-change-functions):
Commentary and fix pre-Emacs 21 behavior.
2015-11-21 14:29:38 -05:00
Stefan Monnier
0b42c33b1a * lisp/progmodes/cc-defs.el: Use with-silent-modifications
(c-save-buffer-state): Use with-silent-modifications when available.
(c--macroexpand-all): Check macroexpand-all directly rather than
c--mapcan-status.
2015-11-18 11:51:11 -05:00
Juanma Barranquero
937565268a * lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote 2015-11-16 04:32:31 +01:00
Stefan Monnier
353f5e7664 * lisp/progmodes/verilog-mode.el: Use with-silent-modifications
(verilog-save-buffer-state): Use with-silent-modifications when available.
(verilog-save-font-no-change-functions): Don't bind
before/after-change-functions if it's not needed.
2015-11-15 14:04:30 -05:00
Wilson Snyder
9e00a029c4 Update verilog-mode.el to 2015-11-09-b121d60-vpo.
* verilog-mode.el (verilog-auto, verilog-delete-auto)
(verilog-modi-cache-results, verilog-save-buffer-state)
(verilog-save-font-no-change-functions): When internally suppressing change
functions, use `inhibit-modification-hooks' and call
`after-change-funtions' to more nicely work with user hooks.  Reported by
Stefan Monnier.

(verilog-auto, verilog-delete-auto, verilog-delete-auto-buffer):
Create `verilog-delete-auto-buffer' to avoid double-calling
fontification hooks.

(verilog-restore-buffer-modified-p, verilog-auto)
(verilog-save-buffer-state): Prefer restore-buffer-modified-p over
set-buffer-modified-p. Reported by Stefan Monnier.

(verilog-diff-auto, verilog-diff-buffers-p)
(verilog-diff-ignore-regexp): Add `verilog-diff-ignore-regexp'.

(verilog-auto-inst-port, verilog-read-sub-decls-expr): Fix
AUTOINST with unpacked dimensional parameters, bug981. Reported by
by Amol Nagapurkar.

(verilog-read-decls, verilog-read-sub-decls-line): Avoid unneeded
properties inside internal structures. No functional change
intended.
2015-11-13 21:17:57 -05:00
Dmitry Gutov
7126e9a40b ; Update xref-etags-mode for the latest change 2015-11-14 02:41:38 +02:00
Dmitry Gutov
246d6605f7 Use generic dispatch for xref backends
* lisp/progmodes/xref.el (xref-backend-functions):
New variable.
(xref-find-function): Remove.
(xref-find-backend)
(xref--etags-backend): New functions.
(xref-identifier-at-point-function)
(xref-identifier-completion-table-function): Remove.
(xref-backend-definitions, xref-backend-references)
(xref-backend-apropos, xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table):
New generic functions.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
`elisp--xref-backend' to the beginning of
`xref-backend-functions', locally.  Delete references to
removed functions and vars.
(elisp-xref-find): Remove.
(elisp--xref-backend): New function.
(elisp--xref-find-references, elisp--xref-find-apropos)
(elisp--xref-identifier-completion-table):
Turn into appropriately named generic methods.

* lisp/progmodes/etags.el (etags-xref-find): Remove.
(xref-backend-identifier-completion-table)
(xref-backend-references, xref-backend-definitions)
(xref-backend-apropos): New generic methods.
2015-11-14 02:41:38 +02:00
Dmitry Gutov
f103a2771b Handle multiple matches on the same line; add highlighting
* lisp/progmodes/xref.el (xref-location-marker): Interpret the
column value in characters.
(xref--collect-matches): Rename from `xref--collect-match'.
Search for all matches in the hit line.  Add `highlight' face to
the matched region in the summary.  Update both callers.
2015-11-14 01:11:52 +02:00
Dmitry Gutov
fe973fc270 Replace xref-match-bounds with xref-match-length
Relying on xref-location-marker to point to the beginning of the match

* lisp/progmodes/xref.el (xref-match-bounds): Remove.
(xref-match-length): Add.
(xref-make-match): Change the arguments.
(xref--match-buffer-bounds): Remove.
(xref-match-item): Store length, instead of end-column.
(xref-pulse-momentarily)
(xref--collect-match)
(xref--query-replace-1): Update accordingly.
(xref-query-replace): Ditto.  And check that the search results
are up-to-date.
2015-11-14 01:01:58 +02:00
Juanma Barranquero
2b4c0c0cef * lisp/progmodes/elisp-mode.el: Declare function `project-roots' 2015-11-13 11:04:10 +01:00
Alan Mackenzie
e0f64e7b4f CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.
lisp/progmodes/cc-engine.el (c-backward-single-comment, c-backward-comments)
(c-invalidate-state-cache-1, c-parse-state-1, c-guess-basic-syntax):
remove bindings of open-paren-in-column-0-is-defun-start to nil.
(c-get-fallback-scan-pos): "New" function (existed several years ago).
(c-parse-state-get-strategy): Reintroduce the 'BOD strategy, using
c-get-fallback-scan-pos.
(c-parse-state-1): Handle 'BOD strategy.

lisp/progmodes/cc-mode.el (c-before-change, c-after-change)
c-font-lock-fontify-region): remove bindings of
open-paren-in-column-0-is-defun-start to nil.

cc-mode.texi (Performance Issues, Limitations and Known Bugs): Fix mix up
between @chapter and @appendix.
2015-11-11 22:22:35 +00:00
Paul Eggert
c92dbd6d0c Spelling fixes
* lisp/net/soap-inspect.el (soap-inspect-xs-simple-type):
Fix misspelling in output.
2015-11-10 10:23:00 -08:00
Dmitry Gutov
cbc51211f9 ; project-library-roots-function: Update the FIXME 2015-11-10 13:31:20 +02:00
Dmitry Gutov
82d59f1b3b * lisp/progmodes/project.el: Update Commentary. 2015-11-10 02:56:55 +02:00
Dmitry Gutov
0be6fb8e17 Merge branch 'project-next' 2015-11-10 02:47:46 +02:00
Dmitry Gutov
1c72afb7aa Fold project-ask-user' into project-current'
* lisp/progmodes/project.el (project-find-functions): Remove
`project-ask-user'.
(project-ask-user): Remove function and the corresponding
`project-roots' implementation.
(project-current): Add a new argument, MAYBE-PROMPT.  Prompt the
user in case there's no project in the current directory.  Update
all callers.
2015-11-10 02:41:06 +02:00
Dmitry Gutov
cad0490b01 Remove dirs in vc project roots from the the vc project library roots
* lisp/progmodes/project.el (project-library-roots): Remove
directories inside the project roots from the result.
(http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00536.html)
2015-11-08 14:46:22 +02:00
Dmitry Gutov
aeae5875f9 ; project-library-roots: Update docstring 2015-11-08 14:20:26 +02:00
Dmitry Gutov
3a37d99e97 Move and rename xref-find-regexp to the project package
* lisp/progmodes/project.el (project-find-regexp)
(project--read-regexp)
(project--find-regexp-in): New functions.

* lisp/progmodes/xref.el (xref--find-xrefs): Extract from
xref--show-xrefs.  Use in existing callers in place of that
function.
(xref--show-xrefs): Only do the "show" part.
(xref-find-regexp): Rename, more or less, to
project-or-libraries-find-regexp.
2015-11-08 03:07:09 +02:00
Eli Zaretskii
19e09cfab6 Ensure redisplay after evaluation
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert
last change.
* lisp/frame.el (redisplay--variables): Populate the
redisplay--variables list.
* src/xdisp.c (maybe_set_redisplay): New function.
(syms_of_xdisp) <redisplay--variables>: New variable.
* src/window.h (maybe_set_redisplay): Declare prototype.
* src/data.c (set_internal): Call maybe_set_redisplay.  (Bug#21835)
2015-11-06 21:21:52 +02:00
Dmitry Gutov
55ad7fce86 Abolish temporary buffer management for xref
* lisp/progmodes/xref.el (xref--temporary-buffers)
(xref--current)
(xref--inhibit-mark-current)
(xref--mark-selected): Remove.  Remove all references.
(xref--show-xrefs): Do not construct the
list of the temporary buffers, nor pass it along.
2015-11-06 15:37:28 +02:00
Dmitry Gutov
977697203f Rename "search path" to "library roots"
* lisp/emacs-lisp/cl-seq.el (cl-set-difference): Retain the order
of the elements from CL-LIST1.

* test/automated/cl-lib-tests.el (cl-lib-test-set-functions):
Update WRT to the above change.

* lisp/progmodes/project.el (project-search-path-function): Rename
to project-library-roots-function, update the documentation and
references.
(project-search-path): Likewise, to project-library-roots.
(project-roots): Clarify documentation.
(project-vc-search-path): Likewise, to project-vc-library-roots.
(project-library-roots): In addition to the renames, thread the
results through file-name-as-directory.
(project-prune-directories): Accept a variable number of
arguments.  Rename to project-combine-directories.
(project-subtract-directories): New function.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-references):
Append project-roots and project-library-roots together.

* lisp/progmodes/etags.el (etags--xref-find-references): Ditto.
2015-11-06 15:37:24 +02:00
Eli Zaretskii
29c360ee1c Ensure redisplay after "C-x C-e"
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure
redisplay happens to account for any side effects of the evaluated
sexp.  (Bug#21835)
2015-11-06 11:28:46 +02:00
Stephen Leake
267e0e80e1 * lisp/progmodes/xref.el: require semantic/symref during compilation. 2015-11-06 05:15:56 +02:00
Juanma Barranquero
587b232837 * lisp/progmodes/xref.el: Doc fixes
(xref-make-file-location, xref-make-buffer-location, xref-make)
(xref-make-bogus-location, xref-make-match): Add cross-references.
(xref--insert-xrefs): Fix typo in docstring.
2015-11-04 10:07:25 +01:00
Glenn Morris
ff80687aee * lisp/progmodes/f90.el (f90-no-block-limit):
Add associate.  (Bug#21794)
* test/automated/f90.el (f90-test-bug21794): New test.
2015-11-01 18:25:42 -08:00
Juanma Barranquero
590a820fd9 Fix bug#21762
* lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with
`eql' instead of `=' to accommodate the case that (syntax-after (point))
returns nil.

* test/automated/python-tests.el (python-indent-inside-paren-7):
New test.
2015-11-01 02:55:16 +01:00
Jackson Ray Hamilton
958da7ff63 Add JSX indentation via js-jsx-mode. (Bug#21799)
* progmodes/js.el: Add JSX indentation support.
(js-jsx-indent-line)
(js-jsx-mode): New functions.
2015-10-31 13:02:36 -07:00
Tassilo Horn
1bab3cefc1 Fix infinite loop in sh-script's SMIE code
* lisp/progmodes/sh-script.el (sh-smie-sh-forward-token): Fix infinite
loop (bug#21747).
2015-10-26 08:01:18 +01:00
Eli Zaretskii
ecb069e2f6 * lisp/progmodes/grep.el (grep): Doc fix. (Bug#21754) 2015-10-25 22:05:44 +02:00
Dmitry Gutov
360d1d8caa js-mode: Don't misindent generator methods
* lisp/progmodes/js.el (js--looking-at-operator-p): Distinguish
generator methods from multiplication operator
(https://github.com/mooz/js2-mode/issues/275).
2015-10-15 22:36:08 +03:00
Stefan Monnier
1b5953e0fd * lisp/progmodes/cc-mode.el (c-after-font-lock-init): Only *move*
our after-change-function, rather than re-adding it if it was removed.
2015-10-09 16:34:20 -04:00
Stefan Monnier
d72d97fcbe * lisp/progmodes/prolog.el: Avoid indenting too much, after ":-"
(prolog-smie-rules): Try and avoid indenting too far after ":-".
2015-10-09 15:30:27 -04:00
Artur Malabarba
4d04cee060 * lisp/progmodes/prog-mode.el (prettify-symbols-alist):
Document more possible values.
2015-10-07 09:40:25 +01:00
Vincent Belaïche
460c357676 Support MSW filename style for ant compilation error regexp
* etc/compilation.txt (symbol ant):
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Support MSW filename style
2015-10-04 07:57:28 +02:00
Markus Triska
d771ae0d5f * prolog.el: Update and extend operator table
(prolog-smie-grammar): Add multifile, public etc.
2015-10-02 16:47:06 -04:00
Eli Zaretskii
9c86325b69 ; * lisp/progmodes/gdb-mi.el (gdb-mi-decode): Improve last change. 2015-10-01 14:52:03 +03:00
Eli Zaretskii
439f483be3 Fix GUD display of GDB output with non-ASCII text
* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): New defcustom.
(gdb-mi-decode): New function.
(gud-gdbmi-marker-filter): If gdb-mi-decode-strings is non-nil,
decode octal escapes in GDB output.  (Bug#21572)
2015-10-01 14:40:10 +03:00
Tassilo Horn
9e4a6ad1c7 Un- and re-prettification are not exclusive
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
Re-apply prettification to previous symbol also when unprettifying next
one.
2015-10-01 08:07:40 +02:00
Tassilo Horn
35ad158f3d Don't unprettify symbol at point by default
* lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
Default to disabled (nil).
2015-10-01 07:54:45 +02:00
Artur Malabarba
cbae4820f9 * lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
Support unprettifying when point is after a symbol.

* etc/NEWS: Document `prettify-symbols-unprettify-at-point'
2015-10-01 02:14:14 +01:00
Eli Zaretskii
80a86074a8 ; Revert inadvertent premature commit. 2015-09-30 22:42:59 +03:00
Eli Zaretskii
5c9304ea86 Disable some display optimizations when frames need redisplay
These optimizations were previously disabled by the
windows_or_buffers_changed flag, which now is not set
when only some frames need to be redrawn.
* src/xdisp.c (redisplay_internal): Redisplay any frame whose
'redisplay' flag is set.
(try_window_reusing_current_matrix, try_window_id)
(try_cursor_movement): Disable these optimizations when the
frame's 'redisplay' flag is set.
2015-09-30 22:32:14 +03:00
Tassilo Horn
82df1878e6 Don't modify buffer by unprettification
* lisp/progmodes/prog-mode.el (prettify-symbols--compose-symbol):
(prettify-symbols--post-command-hook, prettify-symbols-mode): Don't
modify buffer when setting/removing custom prettify-symbols-start/end
text properties.  Add them to font-lock-extra-managed-props, too.
2015-09-30 20:15:22 +02:00
Tassilo Horn
e73b0d6f03 Implement unprettification of symbol at point
* lisp/progmodes/prog-mode.el: Implement feature for unprettifying the
symbol at point.
(prettify-symbols--current-symbol-bounds): New variable.
(prettify-symbols--post-command-hook): New function.
(prettify-symbols-unprettify-at-point): New defcustom.
(prettify-symbols-mode): Use it.
(prettify-symbols--compose-symbol): Use them.
2015-09-30 12:30:45 +02:00
Phil Sainty
3968fa6a44 Avoid empty -path arguments in rgrep
* lisp/progmodes/grep.el (rgrep-default-command): Remove nil from
the list produced according to grep-find-ignored-directories,
before passing it to Find/Grep invocation.  (Bug#21548)
2015-09-30 10:39:21 +03:00
Stefan Monnier
e1877439d8 * lisp/progmodes/prolog.el: Fix various indentation cases
(prolog-operator-chars): New const (add \\).
(prolog-smie-forward-token, prolog-smie-backward-token): Use it.
(prolog-smie-rules): Add rules according to bug#21526.
2015-09-29 23:28:32 -04:00
Stefan Monnier
d6b49570f6 * lisp/progmodes/sh-script.el: Old "dumb" continued line indent
(sh-indent-after-continuation): Add new value `always' (bug#17620)
(sh-smie-sh-rules): Remove old handling of continued lines.
(sh-smie--indent-continuation): New function.
(sh-set-shell): Use it.
2015-09-29 21:43:07 -04:00
Stefan Monnier
90a6f8d074 * lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun
Remove redundant :group keyword args.
(octave-begin-keywords, octave-else-keywords, octave-end-keywords):
Remove variables.
(octave-operator-table, octave-smie-bnf-table): Use let-when-compile to
turn them into compile-time variables.
Auto-generate the "foo ... end" rules from the "foo ... endfoo" rules.
Add rules for break, continue, return, global, and persistent.
Refine the rule for "until".
(octave-smie--funcall-p, octave-smie--end-index-p)
(octave-smie--in-parens-p): New functions.
(octave-smie-backward-token, octave-smie-forward-token): Use them to
distinguish the "enumeration" function and the "end" index from
their corresponding keywords.
(octave--block-offset-keywords): New constant.
(octave-smie-rules): Use it.  Adjust rules for new global/persistent parsing.
(octave-reserved-words): Redefine using octave-smie-grammar.
(octave-font-lock-keywords): Use octave-smie--funcall-p and
octave-smie--end-index-p.
2015-09-29 15:13:44 -04:00