summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Omit/rewrite useless regexp repetitionsPaul Eggert2019-04-1211-16/+16
| | | | | | | | | | | | | | | | | | | | Problem reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-04/msg00527.html * lisp/align.el (align-rules-list): * lisp/cedet/srecode/srt-mode.el (srecode-font-lock-keywords): * lisp/emacs-lisp/copyright.el (copyright-regexp): * lisp/erc/erc-backend.el (JOIN): * lisp/erc/erc-goodies.el (erc-unmorse): * lisp/mail/mail-extr.el (mail-extr-telephone-extension-pattern): * lisp/net/tramp-adb.el (tramp-adb-prompt): * lisp/org/org-table.el (org-table-range-regexp): * lisp/progmodes/idlwave.el (idlwave-where): * lisp/progmodes/verilog-mode.el (verilog-declaration-re-2-no-macro) (verilog-declaration-re-2-macro, verilog-delete-auto-buffer) (verilog-auto-inst-port): * lisp/url/url-misc.el (url-data): Omit or rewrite useless repetitions that risk being very slow in the backtracking regexp engine in Emacs.
* Don't signal error from url debug functionsDmitry Gutov2019-04-132-11/+0
| | | | | | * lisp/url/url-http.el (url-http-debug): Don't signal error. * lisp/url/url-util.el (url-debug): Same (bug#34763).
* Analyze C++ method with & or && ref-qualifier as defun, not brace listAlan Mackenzie2019-04-121-12/+26
| | | | | | | | | | | Also firm up detection of beginning of brace list in c-looking-at-or-maybe-in-bracelist. * lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): On detection of such a ref-qualifier, set braceassignp to nil. When this variable has a nil value, return nil as the value of the function. On encountering a } when scanning backwards, recognise this as the end of a previous construct and stop the scan.
* * lisp/help-fns.el (help-fns-describe-variable-functions): New hookStefan Monnier2019-04-121-168/+246
| | | | | | | | | | | | | | | | | | | (help-fns--compiler-macro, help-fns--parent-mode, help-fns--obsolete) (help-fns--interactive-only): Indent output by 2 spaces. (help-fns--side-effects): New function extracted from describe-function-1. (help-fns-describe-function-functions): Use it. (help-fns--first-release, help-fns--mention-first-release): New functions. (help-fns-function-description-header): Keymaps and macros can't be interactive. (help-fns--ensure-empty-line): New function. (describe-function-1): Use it. (help-fns--var-safe-local, help-fns--var-risky) (help-fns--var-ignored-local, help-fns--var-file-local) (help-fns--var-watchpoints, help-fns--var-obsolete) (help-fns--var-alias, help-fns--var-bufferlocal): New functions, extacted from describe-variable. (describe-variable): Run help-fns-describe-variable-functions instead.
* Optimize byte-compilation of proper-list-pBasil L. Contovounesios2019-04-122-1/+7
| | | | | | | | | For discussion, see thread starting at: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html * lisp/emacs-lisp/byte-opt.el: Optimize proper-list-p as a predicate. * lisp/subr.el: Mark proper-list-p as pure, and side-effect and error free.
* Pop to originating erc buffer when clicking desktop notificationAlex Murray2019-04-121-8/+14
| | | | | | | | | * lisp/erc/erc-desktop-notifications.el: Switch to lexical-binding. (erc-notifications-notify): Add a default action to the desktop notification which pops to the buffer from which the notification originated. (Bug#35141) Copyright-paperwork-exempt: yes
* Always set gnus-group property to a group nameBasil L. Contovounesios2019-04-121-55/+43
| | | | | | | | | | | * lisp/gnus/gnus-group.el (gnus-group-prepare-flat-list-dead): Set gnus-group property to a group name, not active info. (bug#33653) Simplify surrounding logic. (gnus-group-prepare-flat, gnus-group-goto-group): Use accessor macros. (gnus-group-insert-group-line, gnus-group-new-mail) (gnus-group-mark-group): Write ?\s instead of ? . (gnus-group-group-name, gnus-group-list-active): Simplify.
* * lisp/vc/diff-mode.el: Avoid re-initializing buffer in diff-syntaxStefan Monnier2019-04-111-18/+24
| | | | | | | | | (diff--syntax-file-attributes): New var. (diff-syntax-fontify-hunk): Detect when we're reusing the same buffer as last time, to avoid re-initializing it. Skip the diff-syntax-fontify-revisions hash-table, since buffer-alist plays the same role. (diff-syntax-fontify-revisions): Delete var.
* Merge commit 'de238b39e335c6814283faa171b35145f124edf2'Stephen Leake2019-04-1173-2000/+2466
|\
| * Fix rgrep in dired using directory for search file patternChristopher Thorne2019-04-112-2/+19
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/grep.el (grep-read-files): Allow major modes to define file name to use for default search pattern. Add non-directory file at point as default search pattern candidate. * lisp/dired.el (dired-grep-read-files): Use non-directory file at point for grep file name pattern. (Bug#34621) Copyright-paperwork-exempt: yes
| * Add extra text property to fix issue with js2-mode integrationJackson Ray Hamilton2019-04-101-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--put-syntax-table): New function for consistently ensuring smooth js2-mode integration. js2-mode sets syntax-table temporarily while parsing buffers—seemingly to recover from parsing interruptions—and then it later clears syntax-table blindly. When integrating with js-mode, this means that unterminated string quotes are re-broken in JSX (i.e., they become strings again, often stringifying large regions of the buffer which should not be strings). We try to treat quotes in JSXText as non-strings by setting syntax-table to a non-“string quote” syntax class, but that stops working if we lose the property. On the js2-mode end, by scanning for this second js-jsx-syntax-table property, we can recover the syntax-table property there. (js-jsx--text-range, js-jsx--syntax-propertize-tag): Use js-jsx--put-syntax-table for above reason. (js-jsx--text-properties): Clear the js-jsx-syntax-table property too.
| * Enable message saving to work when first use of Gnus (bug#35208)Katsumi Yamaoka2019-04-111-1/+5
| | | | | | | | | | | | | | * lisp/gnus/gnus-group.el (gnus-group-goto-group); Use gnus-active-hashtb in addition to gnus-newsrc-hashtb to check if a group exists since some kinds of groups are registered in only one of them (bug#35208).
| * Inhibit displaying help buffer in main window in perform-replaceJuri Linkov2019-04-101-16/+18
| | | | | | | | | | | | | | | | | | * lisp/replace.el (perform-replace): Use display-buffer-overriding-action with inhibit-same-window to prevent the help buffer from being displayed in the main window. (Bug#34972) Author: Michał Krzywkowski <k.michal@zoho.com> Copyright-paperwork-exempt: yes
| * Merge from origin/emacs-26Glenn Morris2019-04-101-0/+3
| |\ | | | | | | | | | | | | 5999401 (origin/emacs-26) Note that choose-completion-string-function... 8d2f1df Address name conflicts in EIEIO documentation (bug#31660)
| | * Note that choose-completion-string-functions funcs take four argsEric Abrahamsen2019-04-091-0/+3
| | | | | | | | | | | | | | | | | | * lisp/simple.el (choose-completion-string-functions): Functions in this list actually need to accept four arguments, though the fourth should be ignored.
| | * Clarify the TESTFN argument to `alist-get'Mattias Engdegård2019-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (alist-get): Rephrase the initial text to clarify the meaning of the TESTFN argument. It's an equality predicate, not a look-up function (Bug#35206). (cherry picked from commit c81465580fe262f28ce47502c00f4afcbe3b8f8d)
| * | Merge from origin/emacs-26Glenn Morris2019-04-103-4/+23
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5da653 * src/editfns.c (Fnarrow_to_region): Doc fix. (Bug#35163) 646d33d Fix doc strings of 'vc-version-diff' and 'vc-version-ediff' a30a6c3 Improve documentation of set-window-start 92ce2dd Improve documentation of window parameters 6dc42c5 Improve commentary in frame.el a8cffcf Fix typo in a doc string 9e79f19 (emacs-26) ; * src/fontset.c (set-fontset-font): Use uppercas... # Conflicts: # lisp/vc/vc.el
| | * Fix doc strings of 'vc-version-diff' and 'vc-version-ediff'Eli Zaretskii2019-04-061-3/+14
| | | | | | | | | | | | | | | * lisp/vc/vc.el (vc-version-diff, vc-version-ediff): Describe arguments in the doc strings. (Bug#35019)
| | * Improve commentary in frame.elEli Zaretskii2019-04-061-0/+8
| | | | | | | | | | | | | | | * lisp/frame.el: Improve commentary for display-* functions. (Bug#35058)
| | * Fix typo in a doc stringMauro Aranda2019-04-061-1/+1
| | | | | | | | | | | | | | | * lisp/autorevert.el (global-auto-revert-mode): Fix a typo. (Bug#35165)
| | * ; * lisp/ldefs-boot.el: Update.Nicolas Petton2019-03-201-3/+3
| | |
| * | Eshell dependencies: Fix recent regressionsStefan Monnier2019-04-103-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired.el (dired-insert-directory): Tweak bug#27817's ugly hack. * lisp/eshell/em-ls.el: Refine 'require's. * lisp/eshell/esh-opt.el: Require esh-util on behalf of its clients.
| * | Add new defcustom js-jsx-align->-with-<Jackson Ray Hamilton2019-04-091-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx-align->-with-<): New variable for users to control one opinionated aspect of JSX indentation. It defaults to the style seen in the React docs, which many users expected as the “correct” indentation. Still, the old SGML-style of indentation could be desirable too, especially since it was the old default. This ensures users have a way of getting back the old behavior. (js-jsx--contextual-indentation): Respect js-jsx-align->-with-<. * test/manual/indent/jsx-align-gt-with-lt.jsx: New test for js-jsx-align->-with-<.
| * | Add new defcustom js-jsx-indent-levelJackson Ray Hamilton2019-04-091-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx-indent-level): New variable for users to set JSX indentation differently than JS, like before. (js-jsx--contextual-indentation): Respect js-jsx-indent-level when it’s set. * test/manual/indent/jsx-indent-level.jsx: New test for js-jsx-indent-level.
| * | diff-font-lock-syntax: clarify distinction between t and hunk-alsoStefan Monnier2019-04-091-69/+63
| | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-font-lock-syntax): Rework docstring. (diff-syntax-fontify-hunk): Never use the hunk method when diff-font-lock-syntax is just t.
| * | Use lexical-binding in bug-reference.elAlex Branham2019-04-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .dir-locals.el: Set bug-reference-url-format in all modes, not just changelog mode. Use (eval . (bug-reference-mode)) as described in (info "(emacs) Specifying File Variables") * lisp/progmodes/bug-reference.el: Use lexical binding. (bug-reference-unfontify): (bug-reference-fontify): Mention args in docstring. Bug#35123
| * | Fix Gnus duplicate suppression guards (bug#34987)Basil L. Contovounesios2019-04-091-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/gnus/gnus-dup.el (gnus-dup-enter-articles) (gnus-dup-suppress-articles): Use gnus-dup-hashtb as an indicator of initialization instead of gnus-dup-list, which may happen to be nil. (gnus-dup-unsuppress-article): Do nothing if gnus-dup-hashtb is uninitialized.
| * | * lisp/printing.el: Use lexical-bindingStefan Monnier2019-04-091-1102/+656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require easy-menu instead of adding declarations. Remove backward compatiblity. Remove redundant ':group' args. (pr-region-active-p): Use use-region-p. (pr-set-keymap-name): Delete function and callers. (pr-set-keymap-parents): Delete function; use set-keymap-parent instead. (pr-read-string): Delete function; use read-string instead. (pr-menu-char-height): Delete function; use frame-char-height instead. (pr-menu-char-width): Delete function; use frame-char-width instead. (pr-menu-position): Merge the two definitions. (pr-get-symbol): Delete function; use easy-menu-intern instead. (pr-update-mode-line): Delete function; use force-mode-line-update instead. (pr-do-update-menus): Turn local save-var into dynbound pr--save-var. (pr-menu-alist): Use setf. Simplify since we don't keep key-bindings in the menus any more. (pr-dosify-file-name): Remove interactive spec. (pr-filename-style): Rename from pr-path-style. (pr-unixify-file-name): Delete function. (pr-standard-file-name): Don't turn \ into / under POSIX. (pr-temp-dir): Don't dosify. Use temporary-file-directory unconditionally. (pr-save-file-modes): Delete macro. (pr-ps-directory-using-ghostscript, pr-ps-directory-print) (pr-ps-directory-ps-print, pr-ps-mode-using-ghostscript, pr-ps-print) (pr-ps-mode-preview, pr-ps-mode-print, pr-printify-directory) (pr-txt-directory, pr-ps-file-up-preview, pr-ps-directory-preview) (pr-ps-file-up-ps-print, pr-ps-preview, pr-ps-using-ghostscript): Use properly prefixed, declared, and explicitly let-bound dynamically bound variables around calls to pr-ps-utility-args and pr-set-dir-args. (pr-ps-file-using-ghostscript): Only dosify when passing to suprocess. (pr-expand-file-name): Delete function; use expand-file-name instead. (pr-ps-file-print): Properly dosify. (pr-menu-create): Use backquotes. (pr-eval-alist, pr-eval-local-alist): Use dolist. (pr-ps-utility-args): Don't dosify here. (pr-ps-utility-process): Dosify here instead. (pr-ps-file, pr-command): Don't dosify here either. (pr-interface-map): Move initialization into declaration. (pr-insert-section-1): Use 'push'. (pr-insert-toggle): Use closure instead of backquoted lambda. (pr-insert-menu): Use apply i.s.o eval. (pr-insert-radio-button): Avoid 'eval'.
| * | quail.el: Use delete-and-extract-regionStefan Monnier2019-04-091-10/+7
| | | | | | | | | | | | | | | | | | * lisp/international/quail.el (quail-overlay-region-events): Use delete-and-extract-region. (quail-activate): Use setq-local.
| * | python.el: don't syntax-propertize single/double quoted stringsStefan Monnier2019-04-091-24/+16
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-syntax-propertize-function): Only mark triple-quoted strings, let the normal syntax-table handle the rest. (python-syntax-stringify): Adjust accordingly.
| * | * lisp/progmodes/js.el (js-mode): Don't set comment-start-skip globally!Stefan Monnier2019-04-091-2/+2
| | |
| * | Fix up Eshell 'require's after previous dependency reshuffle.Stefan Monnier2019-04-0922-51/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/em-unix.el: * lisp/eshell/em-script.el: * lisp/eshell/em-pred.el: * lisp/eshell/em-dirs.el: * lisp/eshell/em-alias.el: Fix up 'require's to silence byte-compiler. * lisp/eshell/esh-util.el (eshell-read-hosts-file): Don't limit number of entries per line. Preserve the structure. (eshell-read-hosts): Adjust accordingly.
| * | * lisp/gnus/mm-view.el (mm-display-inline-fontify): Simplify.Stefan Monnier2019-04-091-14/+17
| | | | | | | | | | | | | | | Remove hacks that were needed before font-lock-ensure. Don't use switch-to-buffer. Don't assume point-min == 1.
| * | ; Warn of while/dolist pitfall in gnus-sum.elBasil L. Contovounesios2019-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | Suggested by Andy Moreton in the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00294.html * lisp/gnus/gnus-sum.el (gnus-summary-move-article): Add comment warning of common while/dolist pitfall. (bug#33653#134)
| * | * lisp/vc/diff-mode.el: Cosmetic changes in diff-syntax-fontify-hunkStefan Monnier2019-04-091-82/+113
| | | | | | | | | | | | | | | | | | | | | | | | (diff-default-directory): Use defvar-local. (diff-syntax-fontify-hunk): Use 'setq' less. Fit within 80 columns. Simplify some looking-at tests. (diff-syntax-fontify-props): Don't check the buffer-local part of find-file-hook.
| * | Clarify the TESTFN argument to `alist-get'Mattias Engdegård2019-04-091-2/+2
| | | | | | | | | | | | | | | | | | * lisp/subr.el (alist-get): Rephrase the initial text to clarify the meaning of the TESTFN argument. It's an equality predicate, not a look-up function (Bug#35206).
| * | Fix "M-x eshell"Eli Zaretskii2019-04-091-0/+6
| | | | | | | | | | | | | | | | | | | | | * lisp/eshell/em-dirs.el (eshell-variable-aliases-list) (eshell-directory-name, eshell-mode): Defvar them. (eshell-dirs-initialize): Require esh-var. (Bug#35203) (eshell-apply-indices): Declare.
| * | Explain reasonings for JSX syntax support design decisionsJackson Ray Hamilton2019-04-081-0/+109
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el: Throughout the code, provide explanations for why JSX support was implemented in the way that it was; in particular, address the overlap between syntax-propertize-function, font-lock, and indentation (as requested by Stefan).
| * | Move curly functions closer to where they’re usedJackson Ray Hamilton2019-04-081-20/+20
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--enclosing-curly-pos) (js-jsx--goto-outermost-enclosing-curly): As the code evolved, these functions’ definitions ended up being far away from the only places where they were used. Move them there.
| * | Add open/close parenthesis syntax to “<” and “>” in JSXJackson Ray Hamilton2019-04-081-0/+4
| | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--syntax-propertize-tag): Like in sgml-mode, treat “<” and “>” like open/close parenthesis, making the text more navigable via forward-sexp, etc.
| * | Permit non-ASCII identifiers in JSJackson Ray Hamilton2019-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js--name-start-re): Generally allow identifiers to begin with non-ASCII letters. This is of particular importance to JSX parsing. * test/manual/indent/jsx-unclosed-2.jsx: Add test to ensure non-ASCII characters are parsed properly.
| * | Identify JSX strings (for js2-mode)Jackson Ray Hamilton2019-04-081-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--syntax-propertize-tag): Derived modes like js2-mode may use font-lock-syntactic-face-function to apply faces to JSX strings (and only JSX strings). Apply the js-jsx-string text property to such strings so they can be distinctly identified. (js-jsx--text-properties): Ensure the js-jsx-string text property gets cleaned up, too.
| * | Properly set a dynamic, syntactic mode nameJackson Ray Hamilton2019-04-081-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use mode-line-format constructs to properly set mode-name, rather than use the very hacky solution that was filling-in for my lack of knowledge of this feature. * lisp/progmodes/js.el (js--update-mode-name) (js--idly-update-mode-name): Remove. (js--syntactic-mode-name-part): New helper function for mode-name. (js-use-syntactic-mode-name): Helper to set up the dynamic mode-name. (js-jsx-enable): Don’t need to call any extra functions now. (js-mode): Use the new setup function rather than the old ones. (js-jsx-mode): Use the same initial mode name as js-mode so the final one is identical for both modes.
| * | Improve whitespace and unary keyword parsingJackson Ray Hamilton2019-04-081-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js--name-start-chars): Remove, adding these chars back to js--name-start-re. (js--name-start-re): Add chars back from js--name-start-chars. (js-jsx--tag-start-re): Improve regexp to capture the tag name (so it can be disambiguated from a unary keyword), to match newlines (which are common in this spot), and to require at least one whitespace character before the attribute name. (js-jsx--matched-tag-type): Ensure the “tag name” isn’t possibly a unary keyword. (js-jsx--self-closing-re, js-jsx--matching-close-tag-pos): Allow whitespace around “<” and “>”. * test/manual/indent/jsx-unclosed-2.jsx: Add tests for unary keyword and whitespace parsing.
| * | Optimize js-jsx--enclosing-tag-posJackson Ray Hamilton2019-04-081-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--enclosing-tag-pos): Update docstring to be more precise. Also, remember close tag positions after they’ve been calculated once to avoid many redundant calls to js-jsx--matching-close-tag-pos. (js-jsx--text-properties): Ensure js-jsx-close-tag-pos text properties get cleaned up, too.
| * | Optimize js-jsx--matching-close-tag-posJackson Ray Hamilton2019-04-081-36/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function’s performance was having a noticeable impact when editing large JSX structures. Improve its performance slightly (elapsed time will be cut in half according to ELP). * lisp/progmodes/js.el (js-jsx--tag-re): Remove. (js-jsx--matched-tag-type): Simplify implementation with respect to the new implementation of js-jsx--matching-close-tag-pos. (js-jsx--self-closing-re): Simplify regexp slightly in sync with a generally simpler matching algorithm. (js-jsx--matching-close-tag-pos): Optimize matching algorithm by using multiple simple regexp searches, rather than one big complex search. * test/manual/indent/jsx-unclosed-2.jsx: Use the term “inequality” and add a test for a possible parsing foible.
| * | Split JSX indentation calculation into several functionsJackson Ray Hamilton2019-04-081-65/+81
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--contextual-indentation) (js-jsx--expr-attribute-pos, js-jsx--expr-indentation): Extract logic from js-jsx--indentation, and improve the logic’s documentation. (js-jsx--indentation): Simplify by splitting into several functions (see above) and improve the logic’s documentation.
| * | Indent expressions in JSXAttributes relative to the attribute’s nameJackson Ray Hamilton2019-04-081-39/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--syntax-propertize-tag): Refer to the beginning of a JSXExpressionContainer’s associated JSXAttribute (so line numbers can be calculated later). (js-jsx--text-properties): Also clear the new text property js-jsx-expr-attribute. (js-jsx--indenting): Remove. (js-jsx--indent-col, js-jsx--indent-attribute-line): New variables. (js-jsx--indentation): Instead of alternating between two separate column calculations, neither necessarily correct, bind the JSX column such that the second call to js--proper-indentation can use it as a base column. (js--proper-indentation): Use JSX as the base column for some indents while indenting JSX. * test/manual/indent/jsx.jsx: Add more tests for expression indents.
| * | Fix counting of nested self-closing JSXOpeningElementsJackson Ray Hamilton2019-04-081-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-jsx--matching-close-tag-pos): Fix bug where self-closing JSXOpeningElements might be missed if one was nested within another. * test/manual/indent/jsx-self-closing.jsx: Add test for bug concerning self-closing JSXOpeningElement counting.
| * | Indent broken arrow function bodies as an N+1th argJackson Ray Hamilton2019-04-081-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js--line-terminating-arrow-re): Revise regexp for use with re-search-backward. (js--looking-at-broken-arrow-function-p): Remove. (js--broken-arrow-terminates-line-p): Replacement for js--looking-at-broken-arrow-function-p. Don’t consider whether an arrow appears at point (in an arglist); instead, just look for an arrow that terminates the line. (js--proper-indentation): Use js--broken-arrow-terminates-line-p. * test/manual/indent/js.js: Add test for a broken arrow as an N+1th arg.