1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

6676 Commits

Author SHA1 Message Date
Lele Gaifax
85a3e4e486 Fix typos in flymake.el
* lisp/progmodes/flymake.el (flymake-check-patch-master-file-buffer):
Spelling fixes in the doc string.

Copyright-paperwork-exempt: yes
2017-01-18 18:15:28 +02:00
Stefan Monnier
9b89896b7a * lisp/progmodes/sql.el (sql-product-alist): Doc tweak
`:sqli-comint-func' does not have to be a symbol.
2017-01-14 11:50:11 -05:00
Eli Zaretskii
69b50f56ad * lisp/progmodes/sql.el (sql-product-alist): Doc fix. (Bug#25440) 2017-01-14 10:40:01 +02:00
Eli Zaretskii
16fb50db11 Fix an error message in python.el
* lisp/progmodes/python.el (python-shell-get-process-or-error):
Don't repeat the same key binding twice.  (Bug#25405)
2017-01-09 17:28:17 +02:00
Noam Postavsky
fc38671988 Add helpful comment to compile-command's docstring
* lisp/progmodes/compile.el (compile-command): Mention trailing space in
docstring (Bug#25337).
2017-01-07 09:30:00 -05:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Alan Mackenzie
9e1209d7a6 Amend the version number of CC Mode 5.33 -> 5.32.99. Don't merge to trunk.
lisp/progmodes/cc-defs.el: Amend the version number.
etc/NEWS: Add an item explaining the change.
2016-12-20 21:49:31 +00:00
Dmitry Gutov
43022f9860 Ignore forward-sexp-function in js-mode indentation code
* lisp/progmodes/js.el (js--multi-line-declaration-indentation)
(js--maybe-goto-declaration-keyword-end):
Bind forward-sexp-function to nil (bug#25215).
2016-12-17 01:52:12 +02:00
Glenn Morris
e46a13446a Improve treatment of Fortran's "class is"
* lisp/progmodes/f90.el (f90-start-block-re, f90-no-block-limit):
Handle "class is".  (Bug#25039)
* test/automated/f90.el (f90-test-bug25039): New test.
2016-11-27 16:05:02 -08:00
Dmitry Gutov
4887e7c6cb js-mode: Fix indent problem after a regexp
* lisp/progmodes/js.el (js--looking-at-operator-p): Check that the
slash is not ending a regexp (bug#24854).
2016-11-17 01:59:18 +02:00
Daniel Colascione
3ef4ee84fa Avoid infloop in python
Fix bug#24905

* lisp/progmodes/python.el (python-info-docstring-p): Improve
infloop avoidance: replace (bobp) with generic test for
forward progress.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
test for bug#24905
2016-11-08 15:28:49 -08:00
Noam Postavsky
0b6b815118 Fix python-mode hideshow regexp
2015-02-07 "Fix hideshow integration[...]" changed the regexp added to
`hs-special-modes-alist' so that it worked when not searching from the
beginning of the line.  However, this allows matching tokens ending in
"def" or "class", not just those keywords.  This results in an infinite
loop in hs-hide-all (Bug #24815).

* lisp/progmodes/python.el (python-mode): Add symbol boundaries around
the def|class matching part of the regexp added to
hs-special-modes-alist.
2016-11-06 09:14:12 -05:00
Paul Eggert
dc152c54f4 Modernize usage of 'macOS' in doc and comments
Apple changed the spelling of its operating system again, to "macOS",
effective with macOS 10.12 Sierra (2016-09-20).  Change Emacs
documentation and comments to match this.  Stick with older OS
spellings ("OS X", "Mac OS X") when talking about older releases where
the older names are more correct.
2016-11-06 00:42:03 -07:00
Clément Pit--Claudel
dbb3410228 python.el: Fix detection of native completion in Python 3 (bug #24401)
With Python 3.5, (python-shell-completion-native-get-completions ... "")
would return an empty list, causing python.el to think that native
completion was unavailable (the difference between Python 2 and Python 3
is due to https://bugs.python.org/issue25660).

* lisp/progmodes/python.el (python-shell-completion-native-try): Use "_"
  to check whether native completion is available instead of "".
2016-10-31 08:35:33 -04:00
Andreas Politz
55ebb708cf Catch the imenu-unavailable error in sh-mode completion table
* lisp/progmodes/sh-script.el (sh--cmd-completion-table):
Catch the imenu-unavailable error (bug#24238).
2016-10-16 16:56:25 +03:00
Noam Postavsky
17197d0ae9 Fix tags-query-replace docstring
* lisp/progmodes/etags.el (tags-query-replace): Remove incorrect info
regarding non-existent parameters.
2016-08-26 22:33:41 -04:00
Eli Zaretskii
baa7abde77 Improve doc strings of 'gud-gdb' and 'gdb'
* lisp/progmodes/gdb-mi.el (gdb):
* lisp/progmodes/gud.el (gud-gdb): Doc fix.  (Bug#24125)
2016-08-01 22:58:37 +03:00
Paul Pogonyshev
bc4c07fca5 Don't let completion break `declare' handling
* elisp-mode.el (elisp-completion-at-point): Fix to not alter
`defun-declarations-alist' by side effect (Bug #23648).
2016-07-23 10:16:38 -04:00
Noam Postavsky
113d1e2bef Fix escaping in sh-indent-after-continuation docstr
* lisp/progmodes/sh-script.el (sh-indent-after-continuation): Properly
escape backslashes in docstring (Bug#23046).
2016-07-02 19:59:10 -04:00
Noam Postavsky
ebf047254b Add to elisp-completion-at-point's docstring
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Document
position dependent behavior (Bug #19854).
2016-06-27 00:32:51 -04:00
Jules Tamagnan
66d556b518 Fix eldoc-related freezes in python mode
* lisp/progmodes/python.el (python-eldoc-get-doc): New defvar.
(python-eldoc-function-timeout)
(python-eldoc-function-timeout-permanent): New defcustoms.
(python-eldoc-function): If python-eldoc--get-doc-at-point times
out, effectively turn off ElDoc in current buffer.  (Bug#23609)
2016-06-10 12:08:29 +03:00
Glenn Morris
ba3f206239 * lisp/progmodes/python.el (inferior-python-mode):
Avoid tabs.  (Bug#23616)
2016-06-07 18:26:33 -04:00
Dmitry Gutov
973ce5a123 Improve squiggly heredoc support in non-SMIE Ruby mode
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Support
squiggly heredocs here, too (port from upstream).
2016-06-07 04:07:15 +03:00
Stephen Berman
9d5ccebeba Fix doc string quoting
* lisp/files.el (shell-quote-wildcard-pattern):
* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/subr.el (replace-regexp-in-string):
* lisp/view.el (view-mode):
* src/nsfns.m (syms_of_nsfns):
* src/syntax.c (Fbackward_prefix_chars):
Fix quoting problems in doc strings (Bug#23696).
2016-06-06 09:30:22 -07:00
Andreas Schwab
f907f98b0b * lisp/progmodes/elisp-mode.el (elisp-function-argstring): Call
substitute-command-keys to undo help--docstring-quote. (Bug#23634)
2016-05-28 11:18:05 +02:00
Dmitry Gutov
1a5a05cf6f Do not mistake colon at the end of regexp for slash symbol
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Check the parse state in the "Symbols with special characters"
rule (bug#23515).
2016-05-12 03:18:45 +03:00
Dmitry Gutov
8d2f78c421 Don't treat JS spread as contination method call
* lisp/progmodes/js.el (js--indent-operator-re):
Allow only one dot (bug#23492).

* test/indent/js.js (default): Add a corresponding example.
2016-05-11 02:27:46 +03:00
Alan Mackenzie
e58f900e6d Add some "safe-local-variable" declarations for compatibility with master.
These enable C files from the master repository to be visited in Emacs 25
without generating irritating questions about configuration variable safety.

* lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New
functions.
(c-noise-macro-names, c-noise-macro-with-parens-names): give the
safe-local-variable property c-string-list-p.
(c-macro-names-with-semicolon): give the safe-local-variable property
c-string-or-string-list-p.
2016-05-09 18:12:52 +00:00
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
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
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
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
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
Paul Eggert
bf21c84f0d Fix quoting problem in cc-engine debug message
* lisp/progmodes/cc-engine.el (c-replay-parse-state-state):
Use "%s" format to pass through ‘'’ unscathed (Bug#23425), and
likewise for ‘`’, and ‘%’.
2016-05-02 10:06:25 -07:00
Dmitry Gutov
fd7b430afd `nreverse' Grep hits before passing them to xref--convert-hits
* lisp/progmodes/xref.el (xref-collect-matches): `nreverse' hits
before passing them to xref--convert-hits.  Fixes a regression
from cc0b7132.
2016-05-02 12:21:26 +03:00
Lars Ingebrigtsen
9bd2af866b Clarify doc string of internal compilation function
* lisp/progmodes/compile.el (compilation-get-file-structure):
Clarify doc string (bug#3137).

(cherry picked from commit 123191decb)
2016-05-01 19:27:07 +02:00
Eli Zaretskii
ccdaf04cfd Fix the MSDOS build
* config.bat:
* msdos/sedlisp.inp:
* msdos/sedlibmk.inp:
* msdos/sedleim.inp:
* msdos/sedadmin.inp:
* msdos/sed6.inp:
* msdos/sed3v2.inp:
* msdos/sed2v2.inp:
* msdos/sed1v2.inp: Adapt to Emacs 25.

* src/process.c (remove_slash_colon): Move out of "#ifdef
subprocesses" block, as it its called unconditionally.  Move
ADD_SUBFEATURE calls into "#ifdef subprocesses" block, as they
reference variables only defined in that block.
* src/msdos.h: Provide prototypes for IT_set_frame_parameters,
faccessat, msdos_fatal_signal, syms_of_msdos, pthread_sigmask,
dos_keysns, dos_keyread, run_msdos_command, and
syms_of_win16select, to avoid compiler warnings.
* src/msdos.c (SYS_ENVIRON): Define to either '_environ' or
'environ', depending on the DJGPP version.
Remove declarations of externally-visible Lisp objects, like
Qbackground_color and Qreverse.
(run_msdos_command): First argument is not signed, not unsigned.
Use SYS_ENVIRON.
(sys_select): Use 'timespec_cmp' instead of 'timespec_sign', as
the latter doesn't work when 'time_t' is an unsigned data type.
This caused idle timers to behave incorrectly: they only fired
after a keyboard input event.
* src/frame.c (adjust_frame_size) [MSDOS]: Account for
FRAME_TOP_MARGIN that isn't counted in the frame's number of
lines, but dos_set_window_size needs it to be added.
* src/lread.c (INFINITY, NAN) [DJGPP < 2.05]: Provide definitions.
* src/fns.c (sort_vector_copy) [__GNUC__ < 4]: Provide a prototype
that works around compilation errors with older GCC versions.
* src/w16select.c: Don't declare QCLIPBOARD and QPRIMARY as Lisp
Objects.
* src/filelock.c [MSDOS]: Ifdef away most of the code.  Provide
no-op implementations for 'lock_file' and 'unlock_file'.
(Ffile_locked_p) [MSDOS]: Always return nil.  This avoids multiple
ifdefs in all users of filelock.c functionality.
* src/conf_post.h (EOVERFLOW, SIZE_MAX) [DJGPP < 2.04]: Define.
* src/emacs.c [MSDOS]: Include dosfns.h, to avoid compiler
warnings.
* src/dosfns.h: Provide prototypes for dos_cleanup,
syms_of_dosfns, and init_dosfns.
* src/deps.mk (atimer.o): Depend on msdos.h.
(emacs.o): Depend on dosfns.h.
* src/atimer.c [MSDOS]: Include msdos.h, to avoid compiler
warnings.

* lisp/window.el (window--adjust-process-windows): Skip the body
if 'process-list' is not available.  This avoids failure to start
up on MS-DOS.
* lisp/vc/diff.el (diff-no-select): Test 'make-process', not
'start-process', as the latter is now available on all platforms.
* lisp/textmodes/ispell.el (ispell-async-processp): Replace
'start-process' with 'make-process' in a comment.
* lisp/term/internal.el (IT-unicode-translations): Modify and add
a few translations to display Info files with Unicode markup.  Fix
an ancient off-by-one mismatch error with Unicode codepoints.
* lisp/progmodes/compile.el (compilation-start): Test
'make-process', not 'start-process', as the latter is now
available on all platforms.
* lisp/man.el (Man-build-man-command, Man-getpage-in-background):
Test 'make-process', not 'start-process', as the latter is now
available on all platforms.
* lisp/international/mule-cmds.el (set-coding-system-map): Test
'make-process', not 'start-process', as the latter is now
available on all platforms.
* lisp/eshell/esh-cmd.el (eshell-do-pipelines-synchronously): Doc
fix.
(eshell-execute-pipeline): Test 'make-process', not
'start-process', as the latter is now available on all platforms.
2016-04-30 13:45:33 +03:00
Alan Mackenzie
b671e218db Revert unneeded change which harms syntactic parsing. This fixes bug #23308.
* lisp/progmodes/cc-engine.el (c-invalidate-state-cache): User
c-state-old-cpp-end as an argument to c-with-all-but-one-cpps-commented-out
regardless of the value of `here'.
2016-04-29 14:36:33 +00:00
Alan Mackenzie
48b24c9b03 Correct indentation of ids in a C++ enum after a protection keyword.
Also correct the misfontification of the last enum identifier.

* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): setq
c-last-identifier-range to nil to ensure that only types recognized by this
macro are set for fontification as types.
(c-backward-typed-enum-colon): Function renamed from
c-backward-colon-prefixed-type.  On finding a colon in the backward search,
check it is preceded by an identifier rather than a keyword.
2016-04-29 13:35:01 +00:00
Dmitry Gutov
0255a70c8a Don't mistake `for' inside a function for a part of array comprehension
* lisp/progmodes/js.el (js--indent-in-array-comp): Also check the
depth in parens between the bracket and `for' (bug#23391).

* test/indent/js.js: Add a corresponding example.
2016-04-28 02:00:48 +03:00
Jorgen Schaefer
40bfebec83 Add Python 3.5 keyword "await"
* lisp/progmodes/python.el (python-font-lock-keywords): Add await as
keyword.
2016-04-26 13:50:30 -04:00
Lele Gaifax
fa7886a46f Add new keywords of Python 3.5
Python 3.5, released in mid September 2015, introduced a few new
keywords to better support asynchronous code, "async" and "await"
in particular. See https://www.python.org/dev/peps/pep-0492/ for
details. (Bug#21783)
* lisp/progmodes/python.el (python-rx-constituents): Add async
def/for/with as block-start and async def as defun.
* lisp/progmodes/python.el (python-font-lock-keywords): Add async
def/for/with as keyword.
* test/automated/python-tests.el (python-indent-after-async-block-1,
python-indent-after-async-block-2, python-indent-after-async-block-3,
python-nav-beginning-of-defun-3): New tests to test indentation and
navigation for the async keyword.
2016-04-26 13:50:26 -04:00
Eli Zaretskii
1ba947f275 Revert "Allow to customize names of executables used by grep.el"
This reverts commit c93ae7a1e5.
2016-04-21 05:08:29 +03:00
Eli Zaretskii
570e0fa357 Revert "Don't use 'find-program'"
This reverts commit 10597c977d.
2016-04-21 05:07:27 +03:00
Reto Zimmermann
2007e32444 Sync with upstream vhdl mode v3.38.1.
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-mode): No longer set comment-padding.
(vhdl-begin-p): Handle missing space between keyword and parenthesis.
(vhdl-beginning-of-statement-1): Fix indentation for "else generate".
(vhdl-template-else, vhdl-template-elsif): Support generate statement.
(vhdl-re-search-forward, vhdl-re-search-backward): Save match data.
2016-04-17 16:15:29 -07:00
Mark Oteiza
ac00a92e3d Make sh-electric-here-document-mode accessible in sh-mode-hook. (Bug#3226)
* lisp/progmodes/sh-script.el (sh-mode-hook): Add
sh-electric-here-document-mode as an option and the default value.
(sh-mode): Mention sh-mode-hook in docstring.
(sh-mode): Remove sh-electric-here-document-mode invocation.
2016-04-16 14:47:49 -04:00
Dmitry Gutov
cc0b713210 Perform xref searches without visiting unopened files
* lisp/progmodes/xref.el (xref-collect-references): Instead of
calling `semantic-symref-find-references-by-name', use
`semantic-symref-instantiate' and `semantic-symref-perform-search'
directly.  Ask for `line-and-text' results (bug#23223).
(xref-collect-matches): Include the line text in the "hit"
structure.
(xref--convert-hits): New function, split off from
`xref-collect-references' and `xref-collect-matches', to convert
"hits" to xref instance list.  Create a temporary buffer here, to
use it for post-processing all hit lines.
(xref--collect-matches): Use a different approach for non-visited
files.  Insert the line text into the temp buffer, apply the
file's major mode the best we can without reading its whole
contents, syntax-propertize, and search in the result.
(xref--collect-matches-1): Extract, to handle the common logic
between two cases.
(xref--find-buffer-visiting): New function, a wrapper around
`find-buffer-visiting' to amortize its cost.

* lisp/cedet/semantic/symref/idutils.el
(semantic-symref-idutils--line-re): New constant.
(semantic-symref-parse-tool-output-one-line): Support result type
`line-and-text'.

* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep--line-re)
(semantic-symref-parse-tool-output-one-line): Same.

* lisp/cedet/semantic/symref/cscope.el
(semantic-symref-cscope--line-re)
(semantic-symref-parse-tool-output-one-line): Same.

* lisp/cedet/semantic/symref/global.el
(semantic-symref-global--line-re)
(semantic-symref-parse-tool-output-one-line): Same.
2016-04-12 21:08:56 +03:00
Eli Zaretskii
10597c977d Don't use 'find-program'
* lisp/progmodes/project.el (project-file-completion-table): Use
'grep-find-program', rather than the obsolete 'find-program'.
2016-04-11 19:41:48 +03:00