- 09 Apr, 2019 9 commits
-
-
Jackson Ray Hamilton authored
* test/manual/indent/js-jsx.js: Move test with intentional scan error to its own file, js-jsx-unclosed-1.js. * test/manual/indent/js-jsx-unclosed-1.js: New file. * test/manual/indent/js-jsx-unclosed-2.js: New file with test for regression caused by new ambiguous parsing of JS/JSX.
-
Jackson Ray Hamilton authored
Fix a number of bugs reported for JSX indentation (caused by poor JSX detection): - https://github.com/mooz/js2-mode/issues/140#issuecomment-166250016 - https://github.com/mooz/js2-mode/issues/490 - Bug#24896 / https://github.com/mooz/js2-mode/issues/389 (with respect to comments) - Bug#26001 / https://github.com/mooz/js2-mode/issues/389#issuecomment-271869380 - https://github.com/mooz/js2-mode/issues/411 / Bug#27000 / https://github.com/mooz/js2-mode/issues/451 Potentially manifest some new bugs (due to false positives with ‘<’ and ‘>’ and SGML detection). Slow down indentation a fair bit. * list/progmodes/js.el (js-jsx-syntax, js--jsx-start-tag-re) (js--looking-at-jsx-start-tag-p, js--looking-back-at-jsx-end-tag-p): New variables and functions. (js--jsx-find-before-tag, js--jsx-after-tag-re): Deleted. (js--looking-at-operator-p): Don’t mistake a JSXOpeningElement for the ‘<’ operator. (js--continued-expression-p): Don’t mistake a JSXClosingElement as a fragment of a continued expression including the ‘>’ operator. (js--as-sgml): Simplify. Probably needn’t bind forward-sexp-function to nil (sgml-mode already does) and probably shouldn’t bind parse-sexp-lookup-properties to nil either (see Bug#24896). (js--outermost-enclosing-jsx-tag-pos): Find enclosing JSX more accurately than js--jsx-find-before-tag. Use sgml-mode’s parsing logic, rather than unreliable heuristics like paren-wrapping. This implementation is much slower; the previous implementation was fast, but at the expense of accuracy. To make up for all the grief we’ve caused users, we will prefer accuracy over speed from now on. That said, this can still probably be optimized a lot. (js--jsx-indented-element-p): Rename to js--jsx-indentation, since it doesn’t just return a boolean. (js--jsx-indentation): Refactor js--jsx-indented-element-p to simplify the implementation as the improved accuracy of other code allows (and to repent for some awful stylistic choices I made earlier). (js--expression-in-sgml-indent-line): Rename to js--indent-line-in-jsx-expression, since it’s a private function and we can give it a name that reads more like English. (js--indent-line-in-jsx-expression): Restructure point adjustment logic more like js-indent-line. (js--indent-n+1th-jsx-line): New function to complement js--indent-line-in-jsx-expression. (js-jsx-indent-line): Refactor. Don’t bind js--continued-expression-p to ignore any more; instead, rely on the improved accuracy of js--continued-expression-p. (js-jsx-mode): Set js-jsx-syntax to t. For now, this will be the flag we use to determine whether ‘JSX is enabled.’ (Maybe later, we will refactor the code to use this variable instead of requiring js-jsx-mode to be enabled, thus rendering the mode obsolete.)
-
Jackson Ray Hamilton authored
* test/manual/indent/js-jsx.js: Add failing tests for all the js-mode and js2-mode JSX indentation bugs reported over the years that I could find. Some may be duplicates, so I have grouped similar reports together, for now; we’ll see for certain which distinct cases we need once we start actually implementing fixes. * test/manual/indent/js-jsx-quote.js: New file with a nasty test.
-
Katsumi Yamaoka authored
But this way -- git add/commit/push -- is probably wrong, sorry.
-
Katsumi Yamaoka authored
-
Katsumi Yamaoka authored
-
Katsumi Yamaoka authored
* lisp/gnus/gnus-group.el (gnus-group-goto-group): Use gnus-newsrc-hashtb instead of gnus-active-hashtb to check if a group exists even if its server is not activated (bug#33653).
-
Katsumi Yamaoka authored
* lisp/gnus/gnus-group.el (gnus-group-goto-group): Use gnus-newsrc-hashtb instead of gnus-newsrc-hashtb to check if a group exists even if its server is not activated (bug#33653).
-
Eric Abrahamsen authored
* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format): Encode group names as 'latin-1. * lisp/gnus/nnmail.el (nnmail-parse-active): Ditto. * lisp/gnus/nnml.el (nnml-request-group, nnml-request-create-group, nnml-request-expire-articles, nnml-request-delete-group, nnml-request-rename-group, nnml-deletable-article-p, nnml-active-number, nnml-open-incremental-nov): Use assoc-string with nnml-group-alist. * lisp/gnus/nnrss.el (nnrss-request-delete-group, nnrss-retrieve-groups, nnrss-read-group-data, nnrss-check-group, nnrss-generate-download-script): Use assoc-string with nnrss-group-alist.
-
- 08 Apr, 2019 9 commits
-
-
Katsumi Yamaoka authored
* lisp/gnus/gnus-sum.el (gnus-summary-move-article): Back to while loop m dolist that blocks nov and active from saving (bug#33653).
-
Stefan Monnier authored
Add defvars for all the gnus-tmp-*. (gnus-summary-make-local-variables): Move let binding to avoid setq. (gnus-set-global-variables): Use dolist. (gnus-summary-from-or-to-or-newsgroups, gnus-summary-insert-line) (gnus-summary-insert-dummy-line): Avoid dynbind args. (gnus-build-old-threads): Remove unused var 'id'. (gnus-nov-parse-line): Remove unused var 'buffer'. (gnus-thread-header): Prepare it for a lexbind world. (gnus-adjust-marked-articles): Remove unused var 'marks'. (gnus-mark-xrefs-as-read): Remove unused var 'idlist'. (gnus-summary-display-article): Erase&widen before mm-enable-multibyte. (gnus-summary-better-unread-subject): Remove unused var 'score'. (gnus-summary-find-matching): Remove unused var 'd'. (ps-right-header, ps-left-header, shr-ignore-cache): Declare vars. (gnus-summary-idna-message, gnus-summary-morse-message) (gnus-summary-sort-by-original): Fix interactive spec since we don't actually use any prefix arg. (gnus-summary-move-article, gnus-read-move-group-name): Use user-error. (gnus-summary-move-article): Use dolist. (gnus-summary-edit-article): Fix unquoting. (gnus-summary-highlight-line-0, gnus-summary-highlight-line): Declare dynbind vars documented in gnus-summary-highlight.
-
Juri Linkov authored
and default value of find-file-hook.
-
Paul Eggert authored
Problem reported by Keith David Bershatsky in: https://lists.gnu.org/r/emacs-devel/2019-04/msg00259.html Solution suggested by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2019-04/msg00282.html * src/buffer.h (BUFFER_LISP_SIZE): Simplify by using PSEUDOVECSIZE. (BUFFER_REST_SIZE): Simplify by using VECSIZE and BUFFER_LISP_SIZE. * src/lisp.h (PSEUDOVECSIZE): Base it on the last Lisp field, not the first non-Lisp field. All callers changed. Callers without Lisp fields changed to use ALLOCATE_PLAIN_PSEUDOVECTOR. (ALLOCATE_PLAIN_PSEUDOVECTOR): New macro.
-
Stefan Monnier authored
(gnus-agent-expire-group-1): Dial down on the 'setq'.
-
Stefan Monnier authored
-
Stefan Monnier authored
* lisp/eshell/esh-arg.el: Move defsubst and vars before first use. Don't require `esh-mode but esh-util instead. * lisp/eshell/esh-cmd.el: Require esh-module and esh-io. * lisp/eshell/esh-ext.el: Don't require esh-proc nor esh-cmd. (eshell-external-command): Require esh-proc for eshell-gather-process-output. * lisp/eshell/esh-mode.el: Don't require esh-io nor esh-var, but require esh-arg. (eshell-directory-name): Move from eshell.el. * lisp/eshell/esh-module.el: Don't require eshell. * lisp/eshell/esh-opt.el: Don't require esh-ext at top-level. (eshell--do-opts, eshell-show-usage): Require it here instead. * lisp/eshell/esh-proc.el: Don't require esh-cmd, but require esh-io. (eshell-reset-after-proc, eshell-record-process-object) (eshell-gather-process-output, eshell-send-eof-to-process): Require esh-mode and esh-var here. * lisp/eshell/esh-var.el: Require esh-module, esh-arg, and esh-io. * lisp/eshell/eshell.el: Require esh-module, esh-proc, esh-io, and esh-cmd. But don't require esh-mode. (eshell-directory-name): Move to esh-mode. (eshell-return-exits-minibuffer): Don't bind 'return' and 'M-return' since we already bind RET and M-RET.
-
Michael Albinus authored
* lisp/net/tramp-archive.el (tramp-archive-handle-file-readable-p): Use tramp-gvfs. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p): Check that FILENAME exists. (tramp-gvfs-handle-file-readable-p): Check that FILENAME exists. Use heuristic in case it cannot be determined correctly.
-
Alexander Gramiak authored
This removes a compiler warning with xfree.
-
- 07 Apr, 2019 14 commits
-
-
Alexander Gramiak authored
-
Mattias Engdegård authored
* lisp/progmodes/verilog-mode.el (verilog-sk-define-signal): Rename sig-re to sig-chars, to make it clear that it isn't a regexp.
-
Alexander Gramiak authored
* src/frame.c (free_monitors) [USE_GTK]: Define in the GTK case as well. * src/xfns.c (x-display-monitor-attributes-list) [USE_GTK]: Plug memory leak. * src/frame.h (MonitorInfo): Declare name as pointing to const char.
-
Paul Eggert authored
* src/composite.c (fill_gstring_header): Omit first argument HEADER, since in practice it is always nil. Change caller to match. Help the compiler by telling it LEN is nonnegative. Problem found with --enable-gcc-warnings and gcc -O2 -Og.
-
Paul Eggert authored
* src/xsettings.c (parse_settings): Help the compiler by letting it deduce the native endianness at compile-time.
-
Paul Eggert authored
Problems reported by Mattias Engdegård in: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00178.html * lisp/progmodes/sh-script.el (sh-get-indent-info): Reorder skip-chars-forward arg so that it does not look like a regexp. * lisp/progmodes/verilog-mode.el (verilog-sk-define-signal): Fix typo: the string is not a regexp. * lisp/vc/log-edit.el (log-edit-goto-eoh): Fix typo: stray ‘:’. * lisp/xml.el (xml-parse-dtd): Avoid ‘-’ right after char class.
-
Michael Albinus authored
* doc/misc/tramp.texi (Change file name syntax) (Frequently Asked Questions): '.' or ',' must follow xref.
-
Michael Albinus authored
(tramp-parse-sconfig-group): Fix thinko.
-
Alexander Gramiak authored
Suggested by Basil L. Contovounesios: https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-03/msg01052.html
-
Alexander Gramiak authored
This allows a user to set a non-meta modifier for their terminal should his/her terminal support it. See bug#35058 for background on this change. * lisp/emulation/cua-base.el (cua-rectangle-terminal-modifier-key): New defcustom. * lisp/emulation/cua-base.el (cua--shift-control-x-prefix): Use new defcustom.
-
Alexander Gramiak authored
* lisp/frame.el (display-symbol-keys-p): Define. * lisp/simple.el (normal-erase-is-backspace-setup-frame): Use eq instead of memq. (normal-erase-is-backspace-mode): Use display-symbol-keys-p.
-
Alexander Gramiak authored
display-graphic-p is not used in this case because it may be possible in the future for terminals to allow control over cursor blinking. For details, see bug#35058. * lisp/frame.el (blink-cursor-mode): Use display-blink-cursor-p.
-
Alexander Gramiak authored
* lisp/disp-table.el: * lisp/faces.el: * lisp/frame.el: * lisp/info.el (Info-fontify-node): * lisp/window.el (handle-select-window): Use display-graphic-p and display-multi-frame-p instead of explicit memq calls.
-
Basil L. Contovounesios authored
* lisp/button.el (button-at): * lisp/wid-edit.el (widget-at): Avoid returning a false positive when looking for a button and finding a widget, or vice versa. * test/lisp/button-tests.el: * test/lisp/wid-edit-tests.el: New files.
-
- 06 Apr, 2019 8 commits
-
-
Stefan Monnier authored
-
Stefan Monnier authored
Reported by Johan Bockgård <bojohan+news@gnu.org>
-
Glenn Morris authored
-
Eli Zaretskii authored
* src/filelock.c (Ffile_locked_p): Encode the file name, before passing it to system APIs. (Bug#35171)
-
Basil L. Contovounesios authored
* src/buffer.c (Fget_buffer_create): Explicitly initialize inhibit_buffer_hooks. (bug#34847)
-
Eli Zaretskii authored
-
Michael Albinus authored
* lisp/autorevert.el (auto-revert-remove-current-buffer): Add optional argument BUFFER. (auto-revert-notify-rm-watch): Remove local hook. (auto-revert-buffers): Check `buffer-live-p' in time. (Bug#34847)
-
Alex Branham authored
* lisp/indent.el (indent-relative): Document what happens when there is no previous nonblank line. * doc/lispref/text.texi (Relative Indent): Document indent-relative-first-indent-point instead of obsolete indent-relative-maybe. Fix documentation of which argument from 'indent-relative' is used. Bug#34858
-