Commit graph

6254 commits

Author SHA1 Message Date
Fabián Ezequiel Gallina
659609d182 python.el: Keep symmetry on sexp navigation with parens
Fixes: debbugs:19954

* lisp/progmodes/python.el
(python-nav--forward-sexp): Add argument skip-parens-p.
(python-nav-forward-sexp, python-nav-backward-sexp)
(python-nav-forward-sexp-safe)
(python-nav-backward-sexp-safe): Use it.

* test/automated/python-tests.el
(python-nav-forward-sexp-1): Fix test.
2015-04-12 22:43:44 -03:00
Stefan Monnier
26f8a38497 cl-lib.el: Partial revert of "2015-04-05 Rationalize c[ad]+r"
* lisp/emacs-lisp/cl-lib.el: Partial revert of "2015-04-05 Rationalize
use of c[ad]+r", so as to keep the "cl-" prefix on all
cl-lib definitions.
2015-04-10 01:50:22 -04:00
Stefan Monnier
5194890891 * vhdl-mode.el (vhdl-prepare-search-2): Use inhibit-point-motion-hooks 2015-04-10 00:20:54 -04:00
Stefan Monnier
beaab89896 Stop messing with the EMACS env var
Fixes: debbugs:20202

* lisp/net/tramp-sh.el (tramp-remote-process-environment):
* lisp/comint.el (comint-exec-1):
* lisp/term.el (term-exec-1): Don't set EMACS envvar.
* lisp/progmodes/compile.el (compilation-start): Same and bring
INSIDE_EMACS's format in line with other users.
2015-04-09 11:01:04 -04:00
Fabián Ezequiel Gallina
c9415ccbf8 python.el: Indent docstring lines to base-indent
Fixes: debbugs:19595

Thanks to immerrr <immerrr@gmail.com> for reporting and providing
an initial patch.

* lisp/progmodes/python.el
(python-indent-context): Add :inside-docstring context.
(python-indent--calculate-indentation): Handle :inside-docstring.
(python-indent-region): Re-indent docstrings.

* test/automated/python-tests.el (python-indent-region-5)
(python-indent-inside-string-2): Fix tests.
2015-04-09 01:41:55 -03:00
Fabián Ezequiel Gallina
911ed2eba4 python.el: Increase native completion robustness
Fixes: debbugs:19755

Thanks to Carlos Pita <carlosjosepita@gmail.com> for reporting
this and providing useful ideas.

* lisp/progmodes/python.el
(python-shell-completion-native-output-timeout): Increase value.
(python-shell-completion-native-try-output-timeout): New var.
(python-shell-completion-native-try): Use it.
(python-shell-completion-native-setup): New readline setup avoids
polluting current context, ensures output when no-completions are
available and includes output end marker.
(python-shell-completion-native-get-completions): Trigger with one
tab only.  Call accept-process-output until output end is found or
python-shell-completion-native-output-timeout is exceeded.
2015-04-09 00:53:18 -03:00
Alan Mackenzie
db0a3b2c97 Always mark "<" and ">" in #include directives with text properties.
* lisp/progmodes/c-fonts.el (c-cpp-matchers): Replace a font-lock "anchored
matcher" with an invocation of c-make-font-lock-search-function to allow
fontification when there's no trailing space on an "#include <..>" line.
2015-04-07 11:01:43 +00:00
Alan Mackenzie
4d748735d5 Fix miscellaneous glitches in cc-mode.el. Fixes debbugs#20245.
* progmodes/cc-mode.el (c-common-init): bind
\(before\|after\)-change-functions to nil around invocations of
c-get-state-before-change-functions and
c-before-font-lock-functions to prevent recursive invocations.
(c-neutralize-syntax-in-and-mark-CPP): On c-beginning-of-macro,
check that point has actually moved back.
(c-fl-decl-start): Check whether c-beginning-of-decl-1 has
actually found a boundary (as contrasted with hitting a search
limit).
2015-04-06 22:23:30 +00:00
Alan Mackenzie
b31d359d18 CC Mode: Stop Font Lock forcing fontification from BOL. Fixes debbugs#19669.
cc-mode.el (c-font-lock-init): Setq font-lock-extend-region-functions to
nil.
2015-04-06 22:23:29 +00:00
Fabián Ezequiel Gallina
ab9252a01a python.el: Do not break IPython magic completions.
Fixes: debbugs:19736

* lisp/progmodes/python.el (python-shell-completion-setup-code):
Cleaner setup; import rlcompleter as last resource.
2015-04-06 19:18:46 -03:00
Fabián Ezequiel Gallina
cf7b034ee1 Fix previous commit to prevent infloop 2015-04-06 01:22:19 -03:00
Fabián Ezequiel Gallina
deea36f0ec python.el: Enhance docstring detection following PEP-257.
* lisp/progmodes/python.el (python-docstring-at-p): Remove function.
(python-info-assignment-statement-p): New function.
(python-info-assignment-continuation-line-p): Use it.
(python-info-docstring-p): New function.
(python-font-lock-syntactic-face-function)
(python-fill-string): Use it.

* test/automated/python-tests.el (python-info-assignment-statement-p-1)
(python-info-assignment-statement-p-2)
(python-info-assignment-statement-p-3, python-info-docstring-p-1)
(python-info-docstring-p-2, python-info-docstring-p-3)
(python-info-docstring-p-4, python-info-docstring-p-5)
(python-info-docstring-p-6): New tests.
2015-04-05 23:58:13 -03:00
Alan Mackenzie
2056db3fad Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.
Also expunge eudc-c[ad]+r.

* subr.el (internal--compiler-macro-cXXr): "New" function, copied
from cl--compiler-macro-cXXr.
(caar, cadr, cdar, cddr): Change from defsubsts to defuns with
the above compiler-macro.

* net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove.

* emacs-lisp/cl.el (Top level dolist doing defaliases): Remove
caaar, etc., from list of new alias functions.

* emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc.
(gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro
which generate obsolete cl- aliases for caaar, etc.  Invoke them.

* desktop.el:
* edmacro.el:
* emacs-lisp/cl-macs.el:
* frameset.el:
* ibuffer.el:
* mail/footnote.el:
* net/dbus.el:
* net/eudc-export.el:
* net/eudc.el:
* net/eudcb-ph.el:
* net/rcirc.el:
* net/secrets.el:
* play/5x5.el:
* play/decipher.el:
* play/hanoi.el:
* progmodes/hideif.el:
* ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
2015-04-05 12:49:14 +00:00
Paul Eggert
207f119357 Merge from origin/emacs-24
21d4bf6 * admin/make-tarball.txt: Copyedits.
f3b70a7 ; ChangeLog fix
07432a8 Revert "CC Mode: Stop Font Lock forcing fontification from BOL."

Conflicts:
	lisp/ChangeLog
2015-04-04 15:02:09 -07:00
Alan Mackenzie
07432a8c2d Revert "CC Mode: Stop Font Lock forcing fontification from BOL. Bug#19669."
This reverts commit d69e9f1c24.
2015-04-03 12:22:45 +00:00
Dmitry Gutov
0b914bada3 ; Tweak the previous change 2015-04-03 07:13:14 +03:00
Dmitry Gutov
f2fbd4b712 js-mode: Don't indent inside a multiline string literal
* lisp/progmodes/js.el (js-indent-line): Do nothing when bol is inside
a string (https://github.com/mooz/js2-mode/issues/227).
2015-04-03 06:37:31 +03:00
Alan Mackenzie
23bb07e05d Fix the CC Mode fixes from 2015-03-30. Fixes debbugs#20240.
* progmodes/cc-mode.el (c-extend-after-change-region): Widen before
applying text properties.
* progmodes/cc-langs.el (c-before-font-lock-functions): Update an entry
to a new function name.
2015-04-01 19:12:07 +00:00
Alan Mackenzie
05a5a94000 Correct calculation of CC Mode's font-lock region.
* cc-mode.el (c-fl-decl-start): Renamed from c-set-fl-decl-start.
* Change
signature such that nil is returned when no declaration is found.
(c-change-expand-fl-region): Renamed from c-change-set-fl-decl-start.
This now also handles expanding the font lock region to whole lines.
(c-context-expand-fl-region): Renamed from c-context-set-fl-decl-start.
This now also handles expanding the font lock region to whole lines.
(c-font-lock-fontify-region): When a change font lock region is
spuriously enlarged to the beginning-of-line by jit-lock, fontify the
extra bit separately from the region calculated by CC Mode.
(c-extend-after-change-region): Explicitly apply 'fontified properties
to
the extended bits of the font lock region.

* cc-langs.el (c-before-font-lock-functions)
(c-before-context-fontification-functions): Use new names for existing
functions (see above).
2015-03-30 16:37:04 +00:00
Daniel Colascione
1d02107dab Shut up python-mode's indentation guesser
* lisp/progmodes/python.el
(python-indent-guess-indent-offset-verbose): New defcustom.
(python-indent-guess-indent-offset): Use it.
2015-03-26 13:46:06 -07:00
Dmitry Gutov
8142fc97af ruby-mode: Fix a "required arguments" confusion
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Move `at_exit'
and `callcc' to the "methods with required arguments" section,
they need a block argument.  Remove a `throw' duplicate.
2015-03-20 07:03:54 +02:00
Dmitry Gutov
1c4900d953 Backport: ruby-mode: Detect regexps after `!'
Fixes: debbugs:19285

* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect
regexps after `!'.

(cherry picked from commit 8854b9cf52)
2015-03-20 06:05:02 +02:00
Dmitry Gutov
f74843a7f1 Backport: ruby-mode: Change faces used for self, true, false and nil
Fixes: debbugs:17733

* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Use
`font-lock-constant-face' for nil, true and false.  Highlight
`self' as a keyword.

(cherry picked from commit e991af9228)
2015-03-20 06:04:54 +02:00
Nobuyoshi Nakada
a5d1f94fec Backport: ruby-mode: Expect regexp after { or | too
Fixes: debbugs:20026

* progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect
beginning of regexp also after open brace or vertical bar.

(cherry picked from commit dad0fc589c)
2015-03-20 06:04:36 +02:00
Vibhav Pant
3ffcf0e3de Call delete-backward-space interactively.
* lisp/progmodes/cperl-mode.el (cperl-electric-backspace):
 Call delete-backward-space interactively instead of delete-char.

* lisp/Changelog: Fix previous changelog.
2015-03-20 01:43:37 +05:30
Vibhav Pant
f469024eea Use delete-char instead of delete-backward-char.
* lisp/leim/quail/hangul.el
* lisp/progmodes/cperl-mode.el: Use delete-char instead of
delete-backward-char, fixes compilation warnings.
2015-03-19 06:45:58 +05:30
Dima Kogan
fd93edbb1c Have gud-display-line not display source buffer in gud window.
* lisp/progmodes/gud.el (gud-display-line): Make display-buffer
not reuse selected window.  (Bug#17675, Bug#19901, Bug#20034)
2015-03-18 08:15:54 +01:00
Bozhidar Batsov
5b77d81840 Separate Kernel methods with required args from those without 2015-03-17 23:40:20 +02:00
Bozhidar Batsov
771978259e Font-lock more Kernel methods as built-in 2015-03-17 22:41:36 +02:00
Michael R. Mauger
84a6685660 2015-03-14 Michael R. Mauger <michael@mauger.com>
* progmodes/sql.el: Version 3.5
(sql-starts-with-prompt-re, sql-ends-with-prompt-re): Match password prompts.
(sql-interactive-remove-continuation-prompt): Fixed regression. (Bug#6686)
2015-03-14 23:05:28 -04:00
Paul Eggert
2a1be9eb23 Prefer "initialize" to "initialise"
* lisp/progmodes/js.el (js-indent-first-init):
Rename from js-indent-first-initialiser, to avoid worrying about
American vs British spelling.  All uses changed.
* test/indent/js-indent-init-t.js: Rename from
indent/js-indent-first-initialiser-t.js.
* test/indent/js-indent-init-dynamic.js: Rename from
test/indent/js-indent-first-initialiser-dynamic.js.
2015-03-10 16:29:59 -07:00
Glenn Morris
6c9681afe9 * lisp/progmodes/js.el (js-indent-first-initialiser): Fix doc, type, version.
First line of the doc string should be a complete sentence.

* etc/NEWS: Mention new option.

# Fix associated ChangeLog entries.
2015-03-10 18:40:09 -04:00
Jackson Ray Hamilton
933e0ab4b0 New indentation option for js-mode
* lisp/progmodes/js.el (js--proper-indentation): Add new custom option
`js-indent-first-initialiser' and a function to utilize it,
`js--maybe-goto-declaration-keyword-end'.

* test/indent/js.js: Add local variables.

* test/indent/js-indent-first-initialiser-t.js: New test for
`js-indent-first-initialiser'.

* test/indent/js-indent-first-initialiser-dynamic.js: New test for
`js-indent-first-initialiser'.
2015-03-10 10:19:07 -07:00
Dmitry Gutov
8854b9cf52 ruby-mode: Detect regexps after `!'
Fixes: debbugs:19285

* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect
regexps after `!'.
2015-03-09 05:53:58 +02:00
Dmitry Gutov
4fab7badf5 ruby-mode: Don't consider =' a part of symbol when followed by >'
Fixes: debbugs:18644

* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't consider
`=' a part of symbol when followed by `>'.
2015-03-09 05:26:57 +02:00
Dmitry Gutov
e991af9228 ruby-mode: Change faces used for self, true, false and nil
Fixes: debbugs:17733

* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Use
`font-lock-constant-face' for nil, true and false.  Highlight
`self' as a keyword.
2015-03-08 22:10:45 +02:00
Nobuyoshi Nakada
dad0fc589c ruby-mode: Expect regexp after { or | too
Fixes: debbugs:20026

* progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect
beginning of regexp also after open brace or vertical bar.
2015-03-08 20:57:29 +02:00
Dmitry Gutov
77ab7f8455 Teach js-mode about ES6 template strings
* lisp/progmodes/js.el (js-mode-syntax-table): Add an entry for `.
2015-03-05 04:33:36 +02:00
Paul Eggert
37ad855a38 Merge from origin/emacs-24
f160106 Avoid assertion violations in Rmail due to newline cache
1b0ebbd browse-url-firefox: update for firefox 36's removal of -remote
1817892 Avoid erratic behavior of menu-bar tooltips on w32  (Bug#19925)
0260932 Bump python.el version
b0adfc7 Spelling fixes
35f047c * src/fileio.c (Fmake_temp_name): Doc tweaks.
6f2971a * lisp/comint.el (comint-line-beginning-position): Revert searching
65d8ac7 Mention in admin/notes/repo how to mark commits not to be merged.
86fe750 # Remove NEWS temporary markup
4fa778b erc.el: Add old version header for package.el compatibilty
9366f05 Tramp: Disable paging with PAGER=cat

Conflicts:
	admin/notes/repo
	etc/NEWS
	lisp/ChangeLog
	lisp/erc/ChangeLog
	src/ChangeLog
2015-03-03 14:41:30 -08:00
Paul Eggert
9792a944dc Merge from origin/emacs-24
d3852a9 * admin/admin.el (manual-meta-string): Use bug-gnu-emacs.
d69e9f1 CC Mode: Stop Font Lock forcing fontification from BOL.

Conflicts:
	admin/ChangeLog
	lisp/ChangeLog
2015-03-03 14:21:26 -08:00
Stefan Monnier
7133f262bb * lisp/progmodes/gud.el: Use lexical-binding.
Fixes: debbugs:19966

* lisp/emacs-lisp/gv.el (gv-ref): Warn about likely problematic cases.
2015-03-03 14:23:49 -05:00
Paul Eggert
d8e9122115 Merge from origin/emacs-24
e726f20 Handle "#" operator properly inside macro.  Fix coding bug.
618931b Handle dead frame in menu-bar-non-minibuffer-window-p.  (Bug#19728)
017a03a Document MS-Windows file-name idiosyncrasies  (Bug#19463)
f3faf4f Fix description of Customize buffer in Emacs manual.
1c1d0b7 Fix a typo in the Emacs manual's Hungry Delete description.
be7fb82 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary.
33c4409 Spelling fixes
6c8231e python.el: Handle tabs in python-indent-dedent-line.
41c3b92 * lisp/progmodes/python.el: Respect user indentation after comment.
868df45 Avoid compiler warnings in decode_env_path.
b28c979 Fix XEmacs version typo in comment and ChangeLog
989fb32 Improve solution of bug #19701
6310530 Fix refilling of list of language environments in User Manual
c4c447d Restore XEmacs compatibility

Conflicts:
	doc/emacs/ChangeLog
	lisp/ChangeLog
	src/ChangeLog
	test/ChangeLog
2015-02-25 22:53:56 -08:00
Nicolas Richard
ca5790eb50 lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Document argument.
Fixes: 19932
2015-02-25 16:17:54 +01:00
Glenn Morris
e8a11db943 f90.el: add some support for continued strings without leading '&'
* lisp/progmodes/f90.el (f90-beginning-of-subprogram)
(f90-end-of-subprogram, f90-match-end):
Handle continued strings where the continuation does not start
with "&" and happens to match our regexp.

* test/automated/f90.el (f90-test-bug-19809): New test.

Fixes: debbugs:19809
2015-02-23 23:13:49 -08:00
Dmitry Gutov
f6bb2ccb9b Introduce `xref-etags-mode'
Fixes: debbugs:19466

* lisp/progmodes/xref.el (xref-etags-mode--saved): New variable.
(xref-etags-mode): New minor mode.
2015-02-23 04:00:01 +02:00
Fabián Ezequiel Gallina
02609324ce Bump python.el version 2015-02-21 18:43:33 -03:00
Wilson Snyder
852947baf0 Sync with upstream verilog-mode revision 0d6420b
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Update.
(vector-skip-list): Remove.
(verilog-auto-inst-port, verilog-auto-inst-port-list)
(verilog-auto-inst, verilog-auto-inst-param):
Use arguments rather than vector-skip.
(verilog-auto-inst-port): Fix AUTOINST interfaces to not show modport
if signal attachment is itself a modport.  Reported by Matthew Lovell.
2015-02-20 19:50:46 -05:00
Reto Zimmermann
80e67e434c Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support.
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp)
(vhdl-doc-release-notes): Update.
(vhdl-standard): Add VHDL'08 option.
(vhdl-sensitivity-list-all): New option.
(vhdl-directive-keywords): Add psl.
(vhdl-offsets-alist-default, vhdl-mode-abbrev-table-init)
(vhdl-template-construct-alist-init, vhdl-create-mode-menu):
(vhdl-imenu-generic-expression): Add context, directive.
(vhdl-offsets-alist, vhdl-mode, vhdl-doc-keywords): Doc fixes.
(vhdl-template-map-init): Add vhdl-template-context.
(vhdl-mode-syntax-table): Support VHDL'08 block comments.
(vhdl-create-mode-menu): Add some entries.
(vhdl-08-keywords, vhdl-08-types, vhdl-08-attributes)
(vhdl-08-functions, vhdl-08-packages, vhdl-08-directives): New constants.
(vhdl-directives): New variable.
(vhdl-words-init, vhdl-template-process)
(vhdl-template-replace-header-keywords): Support VHDL'08.
(vhdl-abbrev-list-init): Add vhdl-directives.
(vhdl-in-comment-p, vhdl-in-literal, vhdl-win-il)
(vhdl-forward-syntactic-ws, vhdl-get-syntactic-context)
(vhdl-lineup-comment): Handle block comments and directives.
(vhdl-beginning-of-directive, vhdl-template-context)
(vhdl-template-context-hook): New functions.
(vhdl-libunit-re, vhdl-defun-re, vhdl-begin-p)
(vhdl-corresponding-begin, vhdl-get-library-unit, vhdl-regress-line)
(vhdl-align-declarations, vhdl-beginning-of-block, vhdl-end-of-block)
(vhdl-font-lock-keywords-2, vhdl-get-end-of-unit)
(vhdl-scan-context-clause): Add context.

* etc/NEWS: Mention this.
2015-02-20 19:35:25 -05:00
Glenn Morris
4fa6da01eb f90.el: Add some F2008 keywords
* lisp/progmodes/f90.el (f90-keywords-re, f90-procedures-re)
(f90-font-lock-keywords-2): Some F2008 additions.
2015-02-19 21:28:12 -08:00
Fabián Ezequiel Gallina
16d91bce1d python.el: Do not deactivate mark on shell fontification.
Fixes: debbugs:19871

* lisp/progmodes/python.el (python-shell-font-lock-post-command-hook):
Do not deactivate mark on fontification.
2015-02-16 19:53:59 -03:00