Glenn Morris [Wed, 15 Feb 2017 07:34:49 +0000 (23:34 -0800)]
Small lispref edit
* doc/lispref/os.texi (User Identification):
Remove extraneous detail about user-mail-address.
Katsumi Yamaoka [Wed, 15 Feb 2017 05:59:29 +0000 (05:59 +0000)]
Document fill-separate-heterogeneous-words-with-space (bug#25685)
* doc/lispref/text.texi (Filling):
Document fill-separate-heterogeneous-words-with-space (bug#25685).
Noam Postavsky [Sun, 12 Feb 2017 04:15:13 +0000 (23:15 -0500)]
Test comment-multi-line = nil auto fill case too
* test/lisp/progmodes/js-tests.el (js-mode-auto-fill): Test with
`comment-multi-line' both nil and non-nil.
* lisp/newcomment.el (comment-multi-line): Mark safe if it's a
boolean.
* etc/NEWS: Mention that `js-mode' now sets `comment-multi-line'.
Katsumi Yamaoka [Wed, 15 Feb 2017 01:26:59 +0000 (01:26 +0000)]
Don't delete leading and trailing space from CJK word (bug#25685)
* lisp/textmodes/fill.el (fill-delete-newlines):
Don't delete leading and trailing space from CJK word.
(fill-separate-heterogeneous-words-with-space):
New user option that controls it (bug#25685).
Juri Linkov [Tue, 14 Feb 2017 23:28:15 +0000 (01:28 +0200)]
‘M-s w RET word C-s’ repeats incremental search.
* lisp/isearch.el (isearch-new-nonincremental): New variable.
(with-isearch-suspended): Bind isearch-new-nonincremental to
isearch-nonincremental, and restore it afterwards.
(isearch-forward-exit-minibuffer, isearch-reverse-exit-minibuffer):
Set isearch-new-nonincremental to nil. (Bug#25562)
Tom Tromey [Tue, 14 Feb 2017 01:09:36 +0000 (18:09 -0700)]
Make vc-git detect conflict state for vc-dir
* lisp/vc/vc-git.el (vc-git-dir-status-state): New struct.
(vc-git-dir-status-update-file): New function.
(vc-git-after-dir-status-stage, vc-git-dir-status-goto-stage): Use
vc-git-dir-status-state; add 'ls-files-conflict state.
(vc-git-dir-status-files): Create a vc-git-dir-status-state.
Vibhav Pant [Tue, 14 Feb 2017 16:17:59 +0000 (21:47 +0530)]
byte-opt: Replace merged tags in jump tables too. (bug#25716)
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): While merging
adjacent tags, make sure that the old tag is replaced in all jump
tables, if any. This fixes the bytecode VM jumping to the wrong
address in compiled cond forms where the body of a clause was a loop
of any sort.
Eli Zaretskii [Tue, 14 Feb 2017 16:17:51 +0000 (18:17 +0200)]
; * test/file-organization.org: Minor copyedits.
Glenn Morris [Tue, 14 Feb 2017 07:36:17 +0000 (23:36 -0800)]
Remove overly broad element from default mail-dont-reply-to-names
* lisp/mail/mail-utils.el (mail-dont-reply-to):
Do not include just "user@" in mail-dont-reply-to-names, and simplify.
Ref: lists.gnu.org/archive/html/help-gnu-emacs/2017-02/msg00049.html
* lisp/gnus/message.el (message-dont-reply-to-names): Doc fix.
* doc/misc/message.texi (Wide Reply): Tiny fix re dont-reply-to-names.
Juri Linkov [Tue, 14 Feb 2017 00:04:28 +0000 (02:04 +0200)]
* etc/NEWS: Mention query-replace-from-to-separator. (Bug#25482)
Vibhav Pant [Mon, 13 Feb 2017 17:24:05 +0000 (22:54 +0530)]
; etc/TODO: Remove 'switch' item, as it is now implemented.
Arash Esbati [Mon, 13 Feb 2017 08:22:12 +0000 (09:22 +0100)]
Match all characters in optional argument of \documentclass
* lisp/textmodes/reftex.el (reftex-TeX-master-file): Match all
characters in optional argument containing name of the main file.
Vibhav Pant [Mon, 13 Feb 2017 11:37:36 +0000 (17:07 +0530)]
Merge branch 'master' into feature/byte-switch
Vibhav Pant [Mon, 13 Feb 2017 11:14:06 +0000 (16:44 +0530)]
; Add more documentation for byte-switch related code.
Katsumi Yamaoka [Mon, 13 Feb 2017 08:30:28 +0000 (08:30 +0000)]
Fix non-ASCII text encoding (bug#25658)
* lisp/gnus/mm-bodies.el (mm-encode-body):
Fix non-ASCII text encoding (bug#25658).
Vibhav Pant [Mon, 13 Feb 2017 07:48:54 +0000 (13:18 +0530)]
test/lisp/emacs-lisp/bytecomp-tests.el: Add more tests for switch.
Glenn Morris [Mon, 13 Feb 2017 03:02:56 +0000 (19:02 -0800)]
Fix recent bootstrap issue by moving string-to-list
* lisp/international/mule-util.el (string-to-list, string-to-vector):
Move from here...
* lisp/subr.el (string-to-list, string-to-vector): ...to here.
The implementation is trivial and at least string-to-list
has ended up being needed early during bootstrap.
Glenn Morris [Mon, 13 Feb 2017 01:53:13 +0000 (17:53 -0800)]
Doc fixes related to mail-host-address
* lisp/startup.el (mail-host-address): Doc fix.
* doc/lispref/os.texi (System Environment):
Remove extraneous details of mail-host-address.
Glenn Morris [Mon, 13 Feb 2017 01:44:46 +0000 (17:44 -0800)]
Simplify time-stamp mail host usage
* lisp/time-stamp.el (time-stamp-mail-host-name): Remove function.
(time-stamp-string-preprocess): Handle "h" (mail host) directly.
Glenn Morris [Mon, 13 Feb 2017 01:36:33 +0000 (17:36 -0800)]
Doc fix for vhdl-mode re mail-host-address
* lisp/progmodes/vhdl-mode.el (vhdl-file-header): Doc fix.
(mail-host-address): Do not add to vhdl-related custom group,
since vhdl-template-replace-header-keywords doesn't use it.
Mark Oteiza [Mon, 13 Feb 2017 01:25:57 +0000 (20:25 -0500)]
Substitute leading $HOME/ in xdg-user-dirs
* lisp/xdg.el (xdg--substitute-home-env): New function.
(xdg--user-dirs-parse-line): Use it.
(xdg-user-dir): Expand ~/ in xdg-user-dirs values.
Mark Oteiza [Mon, 13 Feb 2017 01:02:26 +0000 (20:02 -0500)]
* lisp/buff-menu.el: Turn on lexical-binding.
Juri Linkov [Mon, 13 Feb 2017 00:37:52 +0000 (02:37 +0200)]
* lisp/replace.el (query-replace-from-to-separator): Move propertize
and char-displayable-p test to query-replace-read-from.
Add choice nil to disable this feature.
(query-replace-read-from): Don't reevaluate custom setting.
Use char-displayable-p to test the first non-whitespace character
in query-replace-from-to-separator, use " -> " when fails.
Add prompt for the case when separator is nil but
query-replace-defaults is non-nil.
Remove unused test for regexp-flag.
Thanks to Thierry Volpiatto <thierry.volpiatto@gmail.com>
Karl Fogel [Sun, 12 Feb 2017 23:21:06 +0000 (17:21 -0600)]
Convert more uses of `looking-at' to `following-char'
This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
(commit
91478f46238a) with more of the same.
* lisp/bookmark.el (bookmark-send-edited-annotation):
(bookmark-bmenu-execute-deletions): Replace instances of looking-at
with char comparisons using following-char.
Paul Eggert [Sun, 12 Feb 2017 20:55:11 +0000 (12:55 -0800)]
Fix typos in tests for lax-plist-get etc.
Problem reported by Eli Zaretskii (Bug#25606#62).
* test/src/fns-tests.el (test-cycle-lax-plist-get)
(test-cycle-plist-put, test-cycle-lax-plist-put):
Fix tests to match behavior.
Michael Albinus [Sun, 12 Feb 2017 17:19:32 +0000 (18:19 +0100)]
Fix bug#25607
* lisp/net/tramp.el (tramp-completion-file-name-handler):
Improve autoloaded version.
(tramp-autoload-file-name-handler): Avoid recursive load.
(tramp-completion-handle-expand-file-name): Handle empty NAME.
(Bug#25607)
Mark Oteiza [Sun, 12 Feb 2017 16:51:19 +0000 (11:51 -0500)]
Remove server-buffer-clients string from minor-mode-alist
* lisp/server.el: Don't put an element for server-buffer-clients into
minor-mode-alist. (Bug#20201)
Mark Oteiza [Sun, 12 Feb 2017 14:46:03 +0000 (09:46 -0500)]
Nix some useless uses of looking-at, looking-back
* lisp/allout.el (allout-kill-topic):
(allout-next-topic-pending-encryption):
* lisp/bookmark.el (bookmark-kill-line):
* lisp/cus-edit.el (custom-save-variables, custom-save-faces):
* lisp/cus-theme.el (custom-theme-write-variables):
(custom-theme-write-faces):
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer):
* lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-loop):
(checkdoc-interactive-ispell-loop):
(checkdoc-message-interactive-ispell-loop, checkdoc-this-string-valid):
(checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/elint.el (elint-get-top-forms):
* lisp/emulation/viper-cmd.el (viper-backward-indent):
* lisp/image-dired.el (image-dired-delete-char):
* lisp/simple.el (kill-visual-line): Replace instances of looking-at,
looking-back with char comparisons using following-char, preceding-char.
Vibhav Pant [Sun, 12 Feb 2017 07:54:55 +0000 (13:24 +0530)]
; lisp/emacs-lisp/bytecomp.el: Fix indentation.
Tom Tromey [Sun, 5 Feb 2017 18:40:18 +0000 (11:40 -0700)]
Recognize JS regexp literals more correctly
Bug#25529
* lisp/progmodes/js.el (js--syntax-propertize-regexp-regexp): New
constant.
(js-syntax-propertize-regexp): Use it. Remove "end" argument.
(js--syntax-propertize-regexp-syntax-table): Remove.
(js-syntax-propertize): Update.
* test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax-bug-25529):
New test.
Vibhav Pant [Sat, 11 Feb 2017 18:11:56 +0000 (23:41 +0530)]
src/bytecode.c (exec_byte_code): Make hash_code a Lisp_Object.
This avoids using XUINT every time while comparing it with
HASH_HASH (h, i), replacing it with EQ.
Vibhav Pant [Sat, 11 Feb 2017 17:39:47 +0000 (23:09 +0530)]
src/bytecode.c (exec_byte_code): Remove unnecessary (e)assert.
Tom Tromey [Sat, 11 Feb 2017 15:43:33 +0000 (08:43 -0700)]
Fix bug in css--mdn-find-symbol
* lisp/textmodes/css-mode.el (css--mdn-find-symbol): Skip whitespace
before skipping word characters.
test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): Add
regression test.
Vibhav Pant [Sat, 11 Feb 2017 15:06:30 +0000 (20:36 +0530)]
; src/bytecode.c (exec_byte_code): Refactor byte-switch code.
Remove unnecessary asserts, remove duplicate code.
Vibhav Pant [Sat, 11 Feb 2017 14:43:54 +0000 (20:13 +0530)]
src/bytecode.c: Add optional sanity check for jump tables.
* src/bytecode.c (exec_byte_code): When sanity checks are enabled,
check that the jump table's size is equal to it's count.
Vibhav Pant [Sat, 11 Feb 2017 14:24:37 +0000 (19:54 +0530)]
Merge branch 'master' into feature/byte-switch
Vibhav Pant [Sat, 11 Feb 2017 12:47:57 +0000 (18:17 +0530)]
* src/bytecode.c: Refactor to follow GNU coding standards
Eli Zaretskii [Sat, 11 Feb 2017 09:55:11 +0000 (11:55 +0200)]
Fix handling of XBM images on MS-Windows
* src/image.c (xbm_load) [HAVE_NTGUI]: Fix calculation of
'nbytes' when inverting XBM data bits. (Bug#25661)
Michael Albinus [Sat, 11 Feb 2017 09:29:29 +0000 (10:29 +0100)]
; Fix typo in etc/NEWS
Eli Zaretskii [Sat, 11 Feb 2017 09:09:33 +0000 (11:09 +0200)]
Fix handling of PBM data
* src/image.c (pbm_load): Handle PBM data with no blanks between
individual pixel values correctly. (Bug#25660)
Noam Postavsky [Fri, 10 Feb 2017 20:33:05 +0000 (15:33 -0500)]
Fix warnings in debug tracing code
* src/xdisp.c (dump_glyph, dump_glyph_string):
* src/xfaces.c (dump_realized_face): Cast arguments or adjust format
specifiers to match signedness.
Sam Steingold [Fri, 10 Feb 2017 19:53:02 +0000 (14:53 -0500)]
Extract grep-find-ignored-directories processing from rgrep-default-command
(rgrep-find-ignored-directories): Extract from `rgrep-default-command'.
Some Emacs packages use `grep-find-ignored-directories' to ignore some
directories, so will use this function instead of custom code.
(rgrep-default-command): Use `rgrep-find-ignored-directories'.
Vibhav Pant [Fri, 10 Feb 2017 17:55:42 +0000 (23:25 +0530)]
src/bytecode.c: Avoid comparing values unnecessarily in Bswitch
* src/bytecode.c: (exec_byte_code) While linear searching the jump
table, compare the value's hash table first to avoid calling
h->test.cmpfn every time.
Paul Eggert [Fri, 10 Feb 2017 16:34:57 +0000 (08:34 -0800)]
Fix a few integer-overflow glitches
* src/composite.c (composition_compute_stop_pos, composition_reseat_it):
* src/dispextern.h (struct composition_it.rule_idx):
* src/keyboard.c (Fset__this_command_keys):
* src/xwidget.c (webkit_js_to_lisp):
Don’t assume object sizes fit in ‘int’.
* src/xwidget.c (Fxwidget_resize):
Don’t assume Emacs integers fit in ‘int’.
Eli Zaretskii [Fri, 10 Feb 2017 16:19:11 +0000 (18:19 +0200)]
Fix a bug with displaying an image after a TAB
* src/xdisp.c (display_line): Handle TAB at end of screen line
specially only when we are displaying characters. (Bug#25662)
Paul Eggert [Fri, 10 Feb 2017 09:52:41 +0000 (11:52 +0200)]
Move cyclic tests to fns-tests.el
* test/src/fns-tests.el (cyc1, cyc2, dot1, dot2): New functions.
(test-cycle-length, test-cycle-safe-length, test-cycle-member)
(test-cycle-memq, test-cycle-memql, test-cycle-assq)
(test-cycle-assoc, test-cycle-rassq, test-cycle-rassoc)
(test-cycle-delq, test-cycle-delete, test-cycle-reverse)
(test-cycle-plist-get, test-cycle-lax-plist-get)
(test-cycle-plist-member, test-cycle-plist-put)
(test-cycle-lax-plist-put, test-cycle-equal, test-cycle-nconc):
New tests.
* test/manual/cyclic-tests.el: File deleted.
Gemini Lasswell [Fri, 10 Feb 2017 09:35:20 +0000 (11:35 +0200)]
Fix instrumenting code with propertized strings in Edebug
* lisp/emacs-lisp/edebug.el (edebug-read-function): Allow
'read' to decide what is and isn't a syntax error. (Bug#25068)
Vladimir Panteleev [Fri, 10 Feb 2017 09:23:24 +0000 (11:23 +0200)]
Improve fontification in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Match
word and symbol constituents when looking for variable names
to fontify; also, correct the syntax table and mark the equal
sign (=) character as punctuation. Improve fontification
accuracy of iteration/positional variables.
(bat-mode): Set comment-start-skip. (Bug#25541)
* test/lisp/progmodes/bat-mode-tests.el: New file, tests for
bat-mode.el.
Eli Zaretskii [Fri, 10 Feb 2017 08:57:41 +0000 (10:57 +0200)]
Restore special setting of this-command-keys by M-x
It was lost when execute-extended-command was reimplemented in Lisp.
* src/keyboard.c (Fset__this_command_keys): New function.
(syms_of_keyboard): Defsubr it.
* lisp/simple.el (execute-extended-command): Set this-command-keys
as novice.el expects. (Bug#25612)
Juri Linkov [Thu, 9 Feb 2017 22:35:22 +0000 (00:35 +0200)]
* lisp/isearch.el (isearch-search-fun-default): Set isearch-adjusted
to t to display "Pending" in the search prompt for lax
word/symbol search (bug#25562). Don't use lax for lazy-highlighting
when 'bound' is non-nil.
(word-search-regexp, isearch-symbol-regexp): Don't depend on lax
at the beginning of regexp (bug#22589).
* lisp/info.el (Info-isearch-search):
Use isearch--lax-regexp-function-p.
* doc/emacs/search.texi (Word Search, Symbol Search):
Mention "Pending" prompt for lax word/symbol search.
Vibhav Pant [Thu, 9 Feb 2017 16:26:57 +0000 (21:56 +0530)]
src/bytecode.c (exec_byte_code): Remove unneeded assert.
Vibhav Pant [Thu, 9 Feb 2017 13:42:59 +0000 (19:12 +0530)]
bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE
Vibhav Pant [Thu, 9 Feb 2017 13:13:31 +0000 (18:43 +0530)]
bytecode.c (exec_byte_code): don't check hash code in linear search.
* src/bytecode.c (exec_byte_code): Don't check that the hash code is
not nil when linear scanning the jump table. Hash tables for are
declared with :size as the exact number of cases, so each entry i
should have a hash code. When BYTE_CODE_SAFE, do it as a sanity
check.
Tino Calancha [Thu, 9 Feb 2017 12:36:32 +0000 (21:36 +0900)]
Ibuffer: Update mode documentation
* lisp/ibuffer.el (ibuffer-mode): List newest commands in mode documentation.
Steven Allen [Thu, 9 Feb 2017 06:08:09 +0000 (22:08 -0800)]
Fix environment variable for xdg-data-dirs
* lisp/xdg.el (xdg-data-dirs): Use XDG_DATA_DIRS, not XDG_CONFIG_DIRS
Copyright-paperwork-exempt: yes
Tassilo Horn [Thu, 9 Feb 2017 11:02:43 +0000 (12:02 +0100)]
; Theme updates
; * etc/themes/tsdh-light-theme.el (tsdh-light): Theme updates.
Tino Calancha [Thu, 9 Feb 2017 09:14:10 +0000 (18:14 +0900)]
Ibuffer: Erase output buffer before shell commands
* lisp/ibuf-macs.el (define-ibuffer-op): Add keyword arguments
BEFORE and AFTER; they are forms to run before/after the operation.
* lisp/ibuf-ext.el (ibuffer--maybe-erase-shell-cmd-output):
New defun; if shell-command-dont-erase-buffer is nil, then
erase shell command output buffer.
(ibuffer-do-shell-command-pipe, ibuffer-do-shell-command-file): Use it.
Tino Calancha [Thu, 9 Feb 2017 09:13:59 +0000 (18:13 +0900)]
Ibuffer: Don't truncate shell command output
* lisp/ibuf-ext.el (ibuffer-do-shell-command-pipe)
(ibuffer-do-shell-command-pipe-replace)
Use 'call-shell-region' (Bug#22679).
(ibuffer-do-shell-command-file): Use call-process-shell-command.
If FILE, the file that the buffer object is visiting,
exists and the buffer is up-to-date, then use
FILE instead of creating a temporary file (Bug#22679).
Vibhav Pant [Thu, 9 Feb 2017 06:48:54 +0000 (12:18 +0530)]
Improve byte-switch execution.
* lisp/emacs-lisp/byte-opt.el,
lisp/emacs-lisp/bytecomp.el (byte-decompile-bytecode-1),
(byte-compile-lapcode): Calculate the actual jump address while
compiling, store it in the jump table.
* src/bytecode.c: Jump to the looked up value directly, do a linear
search when the number of elements is <= 5.
Noam Postavsky [Thu, 2 Feb 2017 14:19:43 +0000 (09:19 -0500)]
Make sure eshell pipelines don't drop data
* lisp/eshell/esh-proc.el (eshell-sentinel): If called while still
handling output of the process, make sure to close the pipes only later,
so that the next process in the pipeline recieves EOF only after getting
all its input (Bug#25549).
Katsumi Yamaoka [Thu, 9 Feb 2017 00:41:19 +0000 (00:41 +0000)]
Make mm-shr use mail-parse-charset by default
* lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default.
This helps an html message with no charset spec to be decoded.
Stephen Berman [Wed, 8 Feb 2017 21:38:39 +0000 (22:38 +0100)]
describe-char: unambiguous name for inserting ASCII 7
* lisp/descr-text.el (describe-char): Make the input
suggestion for inserting ASCII character 7 by name use the
unambiguous name "BELL (BEL)" (bug#25641).
Michael Albinus [Wed, 8 Feb 2017 18:33:52 +0000 (19:33 +0100)]
Modify suppressing `vc-refresh-state' in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
Use an advice rather than an alias for suppressing `vc-refresh-state'.
Michael Albinus [Tue, 7 Feb 2017 20:42:12 +0000 (21:42 +0100)]
Suppress undesired error messages in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
Suppress `vc-refresh-state', it produces undesired error messages.
Lars Ingebrigtsen [Tue, 7 Feb 2017 14:52:36 +0000 (15:52 +0100)]
Ensure that Gnus bugs show up in the Emacs tracker
* lisp/gnus/gnus.el (gnus-bug-package): Include Emacs in the
package spec.
Lars Ingebrigtsen [Tue, 7 Feb 2017 14:50:39 +0000 (15:50 +0100)]
Revert "Don't tag Gnus bugs with "gnus""
This reverts commit
b6fa58072304c2a24f1fe8a0e06a4739a7f8211b.
The debbugs syntax requires a package name
Vibhav Pant [Tue, 7 Feb 2017 14:05:20 +0000 (19:35 +0530)]
Add tests for checking byte-switch code.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-cond): New test,
test byte-switch bytecode.
Mark Oteiza [Tue, 7 Feb 2017 04:27:47 +0000 (23:27 -0500)]
Add xdg library
* etc/NEWS: Mention new library.
* lisp/xdg.el: New file.
Paul Eggert [Tue, 7 Feb 2017 02:00:13 +0000 (18:00 -0800)]
Do not trick info/dir’s timestamp
* Makefile.in (${srcdir}/info/dir): When making this file, do not
do anything special about its timestamp. Previously this rule
used move-if-change, which meant that this file’s timestamp could
end up being older than the files it depends on, and this caused
‘make --question info’ to fail, which caused ‘make-dist’ to fail
now that ‘make-dist’ invokes ‘make --question info’.
Paul Eggert [Tue, 7 Feb 2017 01:15:14 +0000 (17:15 -0800)]
Make FOR_EACH_TAIL more like other FOR_EACH macros
See comments by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00181.html
and by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00207.html
* src/fns.c (internal_equal): Do not bypass check for depth
overflow when tail-recursing via a dotted list tail or an overlay
plist, to avoid a rare infloop.
* src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE): Take TAIL as an
arg, and update it at each iteration, rather than have callers
access it.tail. All callers changed.
(FOR_EACH_TAIL): Do not check for dotted lists, as this is now
the caller’s responsibility. All callers changed.
(FOR_EACH_TAIL_CONS): Remove. All callers changed.
(struct for_each_tail_internal.tail): Remove; no longer needed.
(FOR_EACH_TAIL_INTERNAL): Remove dotted arg, and set the tail
arg each time through the loop. All callers changed.
Vibhav Pant [Mon, 6 Feb 2017 14:03:01 +0000 (19:33 +0530)]
; bytecomp.el (byte-compile-cond-jump-table): Add TODO note
Vibhav Pant [Mon, 6 Feb 2017 07:56:25 +0000 (13:26 +0530)]
; byte(-opt, comp).el: Add more documentation for byte-switch code.
Paul Eggert [Sun, 5 Feb 2017 22:07:11 +0000 (14:07 -0800)]
Port to clang 3.8.0
It does not allow a for-loop's control var to be an anonymous struct.
* src/lisp.h (struct for_each_tail_internal): New type.
(FOR_EACH_TAIL_INTERNAL): Use it.
Paul Eggert [Sun, 5 Feb 2017 21:25:37 +0000 (13:25 -0800)]
Add cyclic-list tests
* test/manual/cycle-tests.el: New file (Bug#25606).
Paul Eggert [Sun, 5 Feb 2017 21:25:37 +0000 (13:25 -0800)]
FOR_EACH_TAIL now checks for quit
As per Eli Zaretskii (Bug#25606#20). Although these calls to
maybe_quit are unnecessary in practice, Eli was not convinced
that the calls are unnecessary.
* src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_CONS):
Call maybe_quit every so often.
(FOR_EACH_TAIL_INTERNAL): New arg CHECK_QUIT. All callers changed.
Paul Eggert [Sun, 5 Feb 2017 21:25:37 +0000 (13:25 -0800)]
Signal list cycles in ‘length’ etc.
Use macros like FOR_EACH_TAIL instead of maybe_quit to
catch list cycles automatically instead of relying on the
user becoming impatient and typing C-g (Bug#25606).
* src/fns.c (Flength, Fmember, Fmemq, Fmemql, Fassq, Fassoc, Frassq)
(Frassoc, Fdelete, Freverse):
Use FOR_EACH_TAIL instead of maybe_quit.
(Fnreverse): Use simple EQ to check for circular list instead
of rarely_quit, as this suffices in this unusual case.
(Fplist_put, Flax_plist_put, Flax_plist_put):
Use FOR_EACH_TAIL_CONS instead of maybe_quit.
(internal_equal): Use FOR_EACH_TAIL_CONS to check lists, instead
of by-hand tail recursion that did not catch cycles.
* src/fns.c (Fsafe_length, Fplist_get):
* src/xdisp.c (display_mode_element):
Use FOR_EACH_TAIL_SAFE instead of by-hand Floyd’s algorithm.
* src/lisp.h (QUIT_COUNT_HEURISTIC): Remove; no longer needed.
(rarely_quit): Simply count toward USHRT_MAX + 1, since the
fancier versions are no longer needed.
(FOR_EACH_TAIL_CONS, FOR_EACH_TAIL_SAFE)
(FOR_EACH_TAIL_INTERNAL): New macros, the last with definiens
mostly taken from FOR_EACH_TAIL.
(FOR_EACH_TAIL): Rewrite in terms of FOR_EACH_TAIL_INTERNAL.
Paul Eggert [Sun, 5 Feb 2017 21:25:37 +0000 (13:25 -0800)]
Simplify use of FOR_EACH_TAIL
* src/data.c (circular_list): New function.
* src/lisp.h (FOR_EACH_TAIL): Use Brent’s algorithm and C99 for-loop
decl, to eliminate the need for the args TAIL, TORTOISE and N, and
to speed things up a bit on typical hosts with optimization.
All uses changed (Bug#25605).
Simen Heggestøyl [Sun, 5 Feb 2017 21:17:41 +0000 (22:17 +0100)]
* lisp/textmodes/css-mode.el: Require subr-x at compile time
Vibhav Pant [Sun, 5 Feb 2017 17:38:53 +0000 (23:08 +0530)]
Merge remote-tracking branch 'origin/master' into feature/byte-switch
Vibhav Pant [Sun, 5 Feb 2017 17:02:21 +0000 (22:32 +0530)]
bytecomp.el: Use macroexp-const-p instead of bc-cond-valid-obj2-p.
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Use
(macroexp-cons-p) instead of (byte-compile-cond-valid-obj2-p) to
make sure that obj1/obj2 can be compared with `eq'.
Vibhav Pant [Sun, 5 Feb 2017 16:40:22 +0000 (22:10 +0530)]
* byte-opt.el (byte-decompile-bytecode-1): Use eq instead of =.
Vibhav Pant [Sun, 5 Feb 2017 16:21:05 +0000 (21:51 +0530)]
; Fix typo.
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info): Fix
typo in docstring.
Vibhav Pant [Sun, 5 Feb 2017 16:18:27 +0000 (21:48 +0530)]
; bytecomp.el (-inline-lapcode): Fix incorrect parenthesis, refactor
Vibhav Pant [Sun, 5 Feb 2017 13:53:53 +0000 (19:23 +0530)]
bytecomp.el: Inline lapcode containing `byte-switch' correctly.
* lisp/emacs-lisp/bytecomp.el (byte-compile-inline-lapcode):
Restore value of byte-compile-depth after emitting a jump to a tag
in a jump table, or default/done tags.
Set the depth of final tags for byte-switch to nil after emitting
any jumps to them.
Vibhav Pant [Sun, 5 Feb 2017 13:25:45 +0000 (18:55 +0530)]
; * byte-opt.el (byte-decompile-bytecode-1): Add more documentation.
Vibhav Pant [Sun, 5 Feb 2017 13:19:24 +0000 (18:49 +0530)]
byte-opt.el: Replace jump tables while decompiling correctly.
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
Don't make a copy of the constant vector, as it isn't used with
the decompiled lapcode.
Make sure that the correct lapcode pair/list is being modified while
replacing the jump table.
Vibhav Pant [Sun, 5 Feb 2017 10:07:43 +0000 (15:37 +0530)]
bytecomp.el: Don't store non-keyword symbols in jump-tables.
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return
nil when OBJ is a non-keyword symbol (i.e a variable), as the jump
table can only be used when comparing variables with constant values.
Tom Tromey [Sat, 4 Feb 2017 20:22:39 +0000 (13:22 -0700)]
typo fix
(css--colon-inside-selector-p): Fix typo in docstring.
Tom Tromey [Wed, 18 Jan 2017 04:50:14 +0000 (21:50 -0700)]
Set comment-multi-line in js-mode
Bug#6806:
* lisp/progmodes/js.el (js-mode): Set comment-multi-line to t.
* test/lisp/progmodes/js-tests.el (js-mode-auto-fill): New test.
Simen Heggestøyl [Sat, 4 Feb 2017 19:33:58 +0000 (20:33 +0100)]
* test/manual/indent/scss-mode.scss: Fix indentation
Simen Heggestøyl [Thu, 2 Feb 2017 19:05:32 +0000 (20:05 +0100)]
Fix indentation of multiline CSS property values
* lisp/textmodes/css-mode.el (css-smie-grammar): Give colons belonging
to properties higher precedence.
(css--colon-inside-selector-p, css--colon-inside-funcall): New
functions for helping SMIE during tokenization.
(css-smie--forward-token, css-smie--backward-token): Distinguish
colons belonging to properties from other colons.
* test/manual/indent/css-mode.css: Add tests for the changes above.
* test/manual/indent/scss-mode.scss: Ditto.
Gemini Lasswell [Sat, 4 Feb 2017 11:55:47 +0000 (13:55 +0200)]
Add tests for lisp/kmacro.el
* test/lisp/kmacro-tests.el: New file. (Bug#24939)
Eli Zaretskii [Sat, 4 Feb 2017 11:49:55 +0000 (13:49 +0200)]
Fix autorevert-tests on MS-Windows
* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Don't check that
auto-revert-use-notify was reset to nil on w32.
Gemini Lasswell [Sat, 4 Feb 2017 11:36:43 +0000 (13:36 +0200)]
New macro 'ert-with-message-capture'
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture): New macro.
(Bug#25158)
* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert)
(auto-revert-test00-auto-revert-mode)
(auto-revert-test01-auto-revert-several-files)
(auto-revert-test02-auto-revert-deleted-file)
(auto-revert-test03-auto-revert-tail-mode)
(auto-revert-test04-auto-revert-mode-dired):
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert): Use
ert-with-message-capture.
Gemini Lasswell [Sat, 4 Feb 2017 11:18:29 +0000 (13:18 +0200)]
Avoid invalid read syntax errors due to 'ert-with-test-buffer'
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Fix the
'declare' form. (Bug#24722)
Eli Zaretskii [Sat, 4 Feb 2017 11:12:14 +0000 (13:12 +0200)]
Fix a syntax error when evaluating pcase.el under Edebug
* lisp/emacs-lisp/pcase.el (pcase-MACRO): Replace def-edebug-spec
with an explicit 'put' form. Suggested by Gemini Lasswell
<gazally@runbox.com>. (Bug#24717)
Eli Zaretskii [Sat, 4 Feb 2017 10:59:41 +0000 (12:59 +0200)]
; * lisp/files.el (save-some-buffers-default-predicate): Add :version.
Gemini Lasswell [Sat, 4 Feb 2017 10:56:19 +0000 (12:56 +0200)]
Change edebug-max-depth from defconst to defcustom
* lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom.
(Bug#24713)
* etc/NEWS: Mention edebug-max-depth.
* doc/lispref/edebug.texi (Checking Whether to Stop): Mention
edebug-max-depth and index it. Add cross-references for
max-lisp-eval-depth and max-specpdl-size.
Co-authored-by: Eli Zaretskii <eliz@gnu.org>
Eli Zaretskii [Sat, 4 Feb 2017 10:02:55 +0000 (12:02 +0200)]
Support options with embedded whitespace in 'dired-listing-switches'
* lisp/dired.el (dired-listing-switches): Document how to quote
options with embedded whitespace.
* lisp/files.el (insert-directory): Use split-string-and-unquote
to support dired-listing-switches that specify command-line
options with embedded spaces. (Bug#25485)
Gemini Lasswell [Sat, 4 Feb 2017 09:43:50 +0000 (11:43 +0200)]
Add tests for lisp/emacs-lisp/testcover.el
* test/lisp/emacs-lisp/testcover-tests.el: New file.
* test/lisp/emacs-lisp/testcover-resources/testcases.el: New file.
Co-authored-by: Noam Postavsky <npostavs@users.sourceforge.net>