]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoRemove conditional includes from bootstrap
Phillip Lord [Fri, 20 Jan 2017 15:13:27 +0000 (15:13 +0000)]
Remove conditional includes from bootstrap

Previously, bootstrap-emacs includes optional functionality, depending
on the platform which is not needed for bootstrap function.  As a
result, bootstrap-emacs contains different functions in different
circumstances.  If ldefs-boot-auto.el is generated, then loaded
functions will not be added to ldefs-boot-auto.el, although they may be
required during some builds.  With this change, bootstrap-emacs should
always behave the same way and, therefore, require the same autoloads.

 * lisp/loadup.el: No longer load optional includes during bootstrap
   dumping.
 * lisp/ldefs-boot-auto.el: Regenerate.
 * lisp/ldefs-boot-manual.el: Add two autoloads.

8 years agoDo not use find-file non-interactively
Phillip Lord [Fri, 20 Jan 2017 15:11:50 +0000 (15:11 +0000)]
Do not use find-file non-interactively

 * lisp/international/titdic-cnv (miscdic-convert): Use
   insert-file-contents in place of find-file.

8 years ago* src/xdisp.c (overlay_arrows_changed_p): Fix return value and doc
Stefan Monnier [Tue, 28 Feb 2017 19:00:17 +0000 (14:00 -0500)]
* src/xdisp.c (overlay_arrows_changed_p): Fix return value and doc

(update_overlay_arrows): Skip non-markers.

8 years ago; * src/w32fns.c (w32_wnd_proc): Adjust comment.
Ken Brown [Tue, 28 Feb 2017 16:59:12 +0000 (11:59 -0500)]
; * src/w32fns.c (w32_wnd_proc): Adjust comment.

8 years agoTry to avoid hang when logging out of MS-Windows
Ken Brown [Tue, 28 Feb 2017 16:25:00 +0000 (11:25 -0500)]
Try to avoid hang when logging out of MS-Windows

* src/w32term.c (x_update_window_begin, x_update_window_end)
(my_show_window, my_set_window_pos, my_set_focus)
(my_set_foreground_window, my_destroy_window)
(my_bring_window_to_top, x_iconify_frame): Replace calls to
SendMessage by calls to SendMessageTimeout with a 6-second
timeout.  (Bug#25875)

8 years ago* lisp/textmodes/reftex-toc.el (reftex-re-enlarge): Demote errors.
Stefan Monnier [Tue, 28 Feb 2017 16:15:24 +0000 (11:15 -0500)]
* lisp/textmodes/reftex-toc.el (reftex-re-enlarge): Demote errors.

8 years ago* doc/misc/eieio.texi: Update to account for the cl-generic facilities
Stefan Monnier [Tue, 28 Feb 2017 16:11:01 +0000 (11:11 -0500)]
* doc/misc/eieio.texi: Update to account for the cl-generic facilities

(Quick Start, Class Options, Generics): Adjust names for cl-generic.
(Methods): Document cl-defmethod.
Explain in more detail the order in which the various
methods are executed.  Document the conditions under which a method
is redefined.  Remove reference to `eieio-generic-call-arglst`.
Don't document the precise return value of cl-next-method-p.
(Static Methods): Adjust to use `subclass` specializer.
(Method Invocation): Use cl-call-next-method and drop mention of :primary.
(Signal Handling, Signals): Adjust names and args for cl-generic; add
cl-no-primary-method.
(CLOS compatibility, Wish List): Adjust to new featureset.

8 years ago* lisp/cedet/mode-local.el (define-mode-local-override): Declare doctring.
Stefan Monnier [Tue, 28 Feb 2017 14:41:04 +0000 (09:41 -0500)]
* lisp/cedet/mode-local.el (define-mode-local-override): Declare doctring.

8 years ago* lisp/nxml/nxml-mode.el (nxml-mode): Use new sgml-syntax-propertize.
Stefan Monnier [Tue, 28 Feb 2017 14:35:25 +0000 (09:35 -0500)]
* lisp/nxml/nxml-mode.el (nxml-mode): Use new sgml-syntax-propertize.

8 years ago* lisp/textmodes/sgml-mode.el: syntax-propertize <![CDATA and <?..?>
Stefan Monnier [Tue, 28 Feb 2017 14:34:13 +0000 (09:34 -0500)]
* lisp/textmodes/sgml-mode.el: syntax-propertize <![CDATA and <?..?>

(sgml-syntax-propertize-function): Mark <![CDATA and <?..?>.
(sgml-syntax-propertize-inside): New fun.

8 years ago* lisp/textmodes/css-mode.el (css-completion-at-point): Auto-insert
Stefan Monnier [Tue, 28 Feb 2017 14:29:06 +0000 (09:29 -0500)]
* lisp/textmodes/css-mode.el (css-completion-at-point): Auto-insert

": ;" after completing a property.

8 years agoShow Ibuffer and jump to line listing current buffer
Tino Calancha [Tue, 28 Feb 2017 02:47:45 +0000 (11:47 +0900)]
Show Ibuffer and jump to line listing current buffer

* lisp/ibuffer.el (ibuffer-jump): New command (Bug#25577).
; * etc/NEWS: Add entry for it.

8 years ago* lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
Juri Linkov [Mon, 27 Feb 2017 22:53:46 +0000 (00:53 +0200)]
* lisp/vc/add-log.el (change-log-next-buffer): Check if file exists

before adding it to the list of files.

8 years agoPut text properties on query-replace separator string instead of "\0"
Juri Linkov [Mon, 27 Feb 2017 22:50:57 +0000 (00:50 +0200)]
Put text properties on query-replace separator string instead of "\0"

* lisp/replace.el (query-replace--split-string):
Split at a substring instead of just character.
(query-replace-read-from): Put text properties on the
separator string instead of "\0".  (Bug#25482)

8 years agoAdd file name and its extension to suggestions in dired-mark-files-regexp
Juri Linkov [Mon, 27 Feb 2017 22:45:21 +0000 (00:45 +0200)]
Add file name and its extension to suggestions in dired-mark-files-regexp

* lisp/dired.el (dired-mark-files-regexp): Add file name
and its extension to the list of suggested defaults.  (Bug#25578)

8 years agoPrompt default extension in dired-mark-extension
Chunyang Xu [Mon, 27 Feb 2017 22:41:56 +0000 (00:41 +0200)]
Prompt default extension in dired-mark-extension

* lisp/dired-x.el (dired-mark-extension): Prompt default extension
based on extension of file at point.  (Bug#25578)

Copyright-paperwork-exempt: yes

8 years agoPrevent for consing in cl-mapc and cl-mapl
Tino Calancha [Mon, 27 Feb 2017 07:32:10 +0000 (16:32 +0900)]
Prevent for consing in cl-mapc and cl-mapl

* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many): Add optional arg ACC;
If non-nil, accumulate values in the result (Bug#25826).
(cl-mapc): Do computations inside function instead of call cl-map.
(cl-mapl): Do computations inside function instead of call cl-maplist.
* lisp/emacs-lisp/cl-lib.el (mapcar): Add autoload cookie.
Call cl--mapcar-many with non-nil 3rd argument.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map)
(cl-extra-test-mapc, cl-extra-test-mapcar, cl-extra-test-mapl)
(cl-extra-test-maplist): New tests.

8 years agoChoose the right target dir on dired operations
Tino Calancha [Mon, 27 Feb 2017 07:26:06 +0000 (16:26 +0900)]
Choose the right target dir on dired operations

Prevent from changing the input target dir
when dired-dwim-target is non-nil (Bug#25609).
* lisp/dired-aux.el (dired-do-create-files):
If dired-dwim-target is non-nil, then bind 'default' to nil.
* test/lisp/dired-tests.el (dired-test-bug25609): Add test.

8 years ago* src/xdisp.c (overlay_arrows_changed_p): Fix last change.
Stefan Monnier [Mon, 27 Feb 2017 05:06:08 +0000 (00:06 -0500)]
* src/xdisp.c (overlay_arrows_changed_p): Fix last change.

8 years agoDon't record eshell/clear "command" in history (Bug#25838)
Noam Postavsky [Thu, 23 Feb 2017 02:48:29 +0000 (21:48 -0500)]
Don't record eshell/clear "command" in history (Bug#25838)

`eshell/clear' is implemented by sending a series of blank lines,
which is not a useful thing to have in the history.

* lisp/eshell/em-hist.el (eshell-input-filter-default): Use
`string-blank-p' which does check for newlines (even though newlines
have comment-end syntax, not whitespace syntax class).
* lisp/eshell/esh-mode.el (eshell/clear): Remove
`eshell-add-to-history' from `eshell-input-filter-functions' while
sending the blank lines.  This change is needed to solve the bug if
the user customizes `eshell-input-filter' to something that doesn't
filter newlines.

8 years agoRemove a few unused C functions
Paul Eggert [Sun, 26 Feb 2017 17:56:44 +0000 (09:56 -0800)]
Remove a few unused C functions

* src/eval.c (let_shadows_global_binding_p):
* src/print.c (write_string):
* src/systhread.c (sys_mutex_destroy, sys_thread_equal):
Remove.
* src/print.c (write_string): Rename from write_string_1.
All uses changed.

8 years agoAvoid segfault in overlay_arrows_changed_p
Eli Zaretskii [Sun, 26 Feb 2017 17:52:22 +0000 (19:52 +0200)]
Avoid segfault in overlay_arrows_changed_p

* src/xdisp.c (overlay_arrows_changed_p): Fix recent change
to avoid a segfault.

8 years agoDon't call package--ensure-init-file if initialized during startup
Noam Postavsky [Thu, 23 Feb 2017 02:12:41 +0000 (21:12 -0500)]
Don't call package--ensure-init-file if initialized during startup

* lisp/emacs-lisp/package.el (package-initialize): Check
`after-init-time' rather than `load-file-name' to decide if
`package--ensure-init-file' should be called.  Depending on
`load-file-name' will fail if the user calls `pacakge-initialize' in
file which is loaded from the init file (Bug#24643, Bug#25819).

8 years agoFix display of before- and after-strings at invisible text
Eli Zaretskii [Sun, 26 Feb 2017 15:56:13 +0000 (17:56 +0200)]
Fix display of before- and after-strings at invisible text

* src/xdisp.c (next_overlay_string): Don't raise the
ignore_overlay_strings_at_pos_p flag if the iterator is already
set to continue at a buffer position different from the one
where the overlay strings we just processed were loaded.  (Bug#25856)

8 years agoWork on `tramp-completion-mode-p'
Michael Albinus [Sun, 26 Feb 2017 11:45:06 +0000 (12:45 +0100)]
Work on `tramp-completion-mode-p'

* etc/NEWS: Say that `tramp-completion-mode' is obsolete.

* lisp/net/tramp.el (tramp-completion-mode): Make it obsolete.
(tramp-completion-mode-p): Reintroduce the check for 'tab.

8 years agoUse font-lock-doc-face in js-mode
Tom Tromey [Sat, 25 Feb 2017 17:27:48 +0000 (10:27 -0700)]
Use font-lock-doc-face in js-mode

Bug#25858:
* lisp/progmodes/js.el (js-font-lock-syntactic-face-function): New
defun.
(js-mode): Use it.
* test/lisp/progmodes/js-tests.el (js-mode-doc-comment-face): New
test.

8 years agoDon't use IP 0.0.0.0 for package test server (Bug#22582)
Noam Postavsky [Wed, 22 Feb 2017 21:56:14 +0000 (16:56 -0500)]
Don't use IP 0.0.0.0 for package test server (Bug#22582)

* test/lisp/emacs-lisp/package-resources/package-test-server.py: Set
'server_address' when port number is given on the command line.  Print
IP and port number as a URL, and flush it after printing.
* test/lisp/emacs-lisp/package-tests.el:
(package-test-update-archives-async): Grab the whole URL from server
output.

8 years agoAdd more branch support to vc-dir
Tom Tromey [Wed, 15 Feb 2017 12:19:50 +0000 (05:19 -0700)]
Add more branch support to vc-dir

Bug#25859:
* lisp/vc/vc-dir.el (vc-dir-mode-map) Add "B" bindings.
* lisp/vc/vc.el (vc-revision-history): New defvar.
(vc-read-revision): Use vc-revision-history.
(vc-print-branch-log): New function.
* doc/emacs/maintaining.texi (VC Directory Commands): Document new
bindings.
* etc/NEWS: Mention new vc-dir bindings.

8 years agoAllow for the :: operator in C++ "enum class" declarations.
Alan Mackenzie [Sat, 25 Feb 2017 14:53:59 +0000 (14:53 +0000)]
Allow for the :: operator in C++ "enum class" declarations.

* lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for
"::".

8 years agoFix bug#25854
Michael Albinus [Sat, 25 Feb 2017 14:02:10 +0000 (15:02 +0100)]
Fix bug#25854

* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
Simplify error handling for huge inodes.
(tramp-convert-file-attributes): Handle very huge inodes.  (Bug#25854)

8 years agoAvoid leaving garbage on screen when using 'raise' display property
Eli Zaretskii [Sat, 25 Feb 2017 11:40:23 +0000 (13:40 +0200)]
Avoid leaving garbage on screen when using 'raise' display property

* src/xdisp.c (display_line): Reset voffset value of the iterator
when it hits ZV, to avoid "inheriting" it to glyph rows past ZV,
which then leaves stuff on screen that needs to be cleared by
redisplay.  (Bug#25855)

8 years agoNew option -u / --suppress-output to emacsclient
Peder O. Klingenberg [Sat, 25 Feb 2017 08:30:46 +0000 (10:30 +0200)]
New option -u / --suppress-output to emacsclient

* lib-src/emacsclient.c (print_help_and_exit, longopts)
(decode_options, main): Implement new option --suppress-output / -u to
suppress printing of eval-results.
* doc/emacs/misc.texi (emacsclient Options): Document the new
"--suppress-output/-u" options.
* etc/NEWS: Mention the new options.

8 years agoFix scrolling with partial line corner case (Bug#25792)
Noam Postavsky [Mon, 20 Feb 2017 18:34:39 +0000 (13:34 -0500)]
Fix scrolling with partial line corner case (Bug#25792)

Also fix up the scrolling tests so that they don't make so many
assumptions about the current window configuration.

* src/xdisp.c (try_window): Take partial line height into account when
comparing cursor position against scroll margin.

* test/manual/scroll-tests.el (scroll-tests-with-buffer-window): Add
HEIGHT argument, to allow setting up window with exact height and
partial line.
(scroll-tests-display-buffer-with-height): New display-buffer action
function.
(scroll-tests-scroll-margin-over-max):
(scroll-tests--scroll-margin-whole-window): Pass HEIGHT to
`scroll-tests--scroll-margin-whole-window'.
(scroll-tests-conservative-show-trailing-whitespace): New test.
(scroll-tests-scroll-margin-negative): Fix line counting.
(scroll-tests--point-in-middle-of-window-p): Set window height
properly.

8 years agoFix indentation error in js.el
Tom Tromey [Fri, 24 Feb 2017 07:24:17 +0000 (00:24 -0700)]
Fix indentation error in js.el

* lisp/progmodes/js.el (js--indent-in-array-comp): Wrap forward-sexp
call in condition-case.
* test/lisp/progmodes/js-tests.el (js-mode-indentation-error): New
test.

8 years agoadd "async" and "await" keywords
Tom Tromey [Fri, 24 Feb 2017 06:57:59 +0000 (23:57 -0700)]
add "async" and "await" keywords

* lisp/progmodes/js.el (js--keyword-re): Add async, await.

8 years agoUse cl-print for Edebug and EIEIO
Stefan Monnier [Fri, 24 Feb 2017 03:39:53 +0000 (22:39 -0500)]
Use cl-print for Edebug and EIEIO

* lisp/emacs-lisp/edebug.el (edebug-prin1-to-string): Use cl-print.
(edebug-prin1, edebug-print): Remove.

* lisp/emacs-lisp/eieio.el (object-print): Declare obsolete.
(cl-print-object): Add a method for EIEIO objects.
(eieio-edebug-prin1-to-string): Delete.
(edebug-prin1-to-string): Don't advise any more.

* lisp/emacs-lisp/eieio-datadebug.el (data-debug-insert-object-button):
Replace `object-print' -> `cl-prin1-to-string'.

8 years agoFix left over uses of `call-next-method'
Stefan Monnier [Fri, 24 Feb 2017 02:19:20 +0000 (21:19 -0500)]
Fix left over uses of `call-next-method'

* lisp/cedet/semantic/db-global.el (object-print):
* lisp/cedet/semantic/db.el (object-print): Use `cl-call-next-method'.

8 years agoMinor redisplay optimisations
Stefan Monnier [Fri, 24 Feb 2017 02:17:04 +0000 (21:17 -0500)]
Minor redisplay optimisations

* src/frame.c (Ficonify_frame): No need to redisplay everything.

* src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument.
(redisplay_internal): Use it to avoid redisplaying everything.
(try_window_id): Use it keep the same behavior as before.

8 years ago* lisp/emacs-lisp/cl-print.el: New file
Stefan Monnier [Fri, 24 Feb 2017 02:06:54 +0000 (21:06 -0500)]
* lisp/emacs-lisp/cl-print.el: New file

* lisp/emacs-lisp/nadvice.el (advice--where): New function.
(advice--make-docstring): Use it.

* src/print.c (print_number_index): Don't declare here any more.
(Fprint_preprocess): New function.

* test/lisp/emacs-lisp/cl-print-tests.el: New file.

8 years agoMake calc's least common multiple positive (bug#25255)
Peder O. Klingenberg [Fri, 24 Feb 2017 01:27:57 +0000 (20:27 -0500)]
Make calc's least common multiple positive (bug#25255)

* lisp/calc/calc-comb.el (calcFunc-lcm): Return absolute value.
* doc/misc/calc.texi (Combinatorial Functions): Update for the above.

8 years agoSupport read syntax for circular objects in Edebug (Bug#23660)
Gemini Lasswell [Fri, 17 Feb 2017 06:08:03 +0000 (22:08 -0800)]
Support read syntax for circular objects in Edebug (Bug#23660)

* lisp/emacs-lisp/edebug.el (edebug-read-special): New name
for edebug-read-function. Handle the read syntax for circular
objects.
(edebug-read-objects): New variable.
(edebug-read-and-maybe-wrap-form1): Reset edebug-read-objects.

* src/lread.c (Fsubstitute_object_in_subtree): Make
substitute_object_in_subtree into a Lisp primitive.

8 years agoAdd Conference to the list of valid bibtex entry types
Lixin Chin [Fri, 24 Feb 2017 00:04:27 +0000 (19:04 -0500)]
Add Conference to the list of valid bibtex entry types

* lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist):
Add Conference as a duplicate of InProceedings.  (Bug#25143)

Copyright-paperwork-exempt: yes

8 years ago* lisp/comint.el (comint-password-prompt-regexp): Add SUDO. (Bug#24817)
Glenn Morris [Thu, 23 Feb 2017 22:12:49 +0000 (17:12 -0500)]
* lisp/comint.el (comint-password-prompt-regexp): Add SUDO. (Bug#24817)

8 years agoSmall dunnet score file improvements
Glenn Morris [Thu, 23 Feb 2017 18:22:31 +0000 (13:22 -0500)]
Small dunnet score file improvements

* lisp/play/dunnet.el (dun-log-file): Switch to per-user default.
(dun-do-logfile): Handle non-existing score file.

8 years ago* lisp/play/dunnet.el (dun-help): Doc fix.
Glenn Morris [Thu, 23 Feb 2017 18:20:48 +0000 (13:20 -0500)]
* lisp/play/dunnet.el (dun-help): Doc fix.

8 years agoDeclare dun-line and dun-line-list
Mark Oteiza [Thu, 23 Feb 2017 18:14:44 +0000 (13:14 -0500)]
Declare dun-line and dun-line-list

Previously, there were free variables 'line' and 'line-list'.
* lisp/play/dunnet.el (dun-line, dun-line-list): New variables.
(dun-press, dun-vparse, dun-parse2, dun-unix-parse, dun-batch-parse):
(dun-batch-parse2, dun-batch-loop, dun-batch-dos-interface):
(dun-batch-unix-interface): Use them.

8 years agoMerge from gnulib
Paul Eggert [Thu, 23 Feb 2017 17:14:06 +0000 (09:14 -0800)]
Merge from gnulib

This incorporates:
2017-02-16 xbinary-io: rename from xsetmode
2017-02-15 xsetmode: new module
* lib-src/etags.c (main):
* lib-src/hexl.c (main):
* src/emacs.c (main) [MSDOS]:
Prefer set_binary_mode to the obsolescent SET_BINARY.
* lib/binary-io.c, lib/binary-io.h: Copy from gnulib.

8 years agohexl: handle large files and I/O errors
Paul Eggert [Thu, 23 Feb 2017 16:58:39 +0000 (08:58 -0800)]
hexl: handle large files and I/O errors

* lib-src/hexl.c: Include inttypes.h, for PRIxMAX etc.
Do not include ctype.h, as the code no longer uses isdigit.
(DEFAULT_GROUPING, un_flag, iso_flag, group_by): Now local to ‘main’.
(DEFAULT_BASE, endian): Remove; was not really used.
(usage): Remove; now done by ‘main’, as that’s simpler.
(progname): Now static.
(output_error, hexchar): New functions.
(main): Use them.  Simplify.  Remove "-oct", "-big-endian", and
"-little-endian" options, as they did not work and were not used.
Use SET_BINARY only on stdin, and fopen with "rb" otherwise.
Use SET_BINARY only once on stdout.
Do not assume file offsets fit in ‘long’.
If an I/O error occurs, report it and exit with nonzero status.

8 years agoAvoid quitting inside a critical section on MS-Windows
Eli Zaretskii [Thu, 23 Feb 2017 16:15:05 +0000 (18:15 +0200)]
Avoid quitting inside a critical section on MS-Windows

* src/w32uniscribe.c (uniscribe_list_family):
* src/w32font.c (w32font_list_family, w32font_text_extents)
(w32font_list_internal, w32font_match_internal)
(list_all_matching_fonts): Prevent quitting while these functions
cons lists of fonts, to avoid leaving the critical section taken
by the main thread, which will then cause any other thread
attempting to enter the critical section to hang.  (Bug#25279)

8 years ago; Less error-like font-lock-variable-name-face
Tassilo Horn [Wed, 22 Feb 2017 17:31:02 +0000 (18:31 +0100)]
; Less error-like font-lock-variable-name-face

; * etc/themes/tsdh-light-theme.el (tsdh-light):

8 years agoUse revision-completion-table in vc-retrieve-tag
Dmitry Gutov [Sun, 19 Feb 2017 22:10:24 +0000 (00:10 +0200)]
Use revision-completion-table in vc-retrieve-tag

* lisp/vc/vc.el (vc-retrieve-tag): Use the
revision-completion-table command for completion (bug#25710).

8 years ago* lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-types): Add `atom'
Stefan Monnier [Wed, 22 Feb 2017 02:44:32 +0000 (21:44 -0500)]
* lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-types): Add `atom'

remove entries whose car can't be returned by type-of.
(cl--generic-all-builtin-types): New var.
(cl-generic-generalizers): Use it to avoid requiring
extra entries in cl--generic-typeof-types.

8 years agoFind macro binding for symbol-bound macros too (Bug#6848)
Noam Postavsky [Wed, 22 Feb 2017 02:31:24 +0000 (21:31 -0500)]
Find macro binding for symbol-bound macros too (Bug#6848)

There are 2 ways to bind a macro: with global-set-key or
kmacro-bind-to-key.  The former binds a key to a symbol, while the
latter binds to a lambda.  In 2010-03-03 "Fix keyboard macro key
lookup (Bug#5481)", `insert-kbd-macro' was fixed to detect the lambda
case, but broke the symbol case.

* lisp/macros.el (insert-kbd-macro): Also check for bindings of
MACRONAME.

8 years ago* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Fix last change
Stefan Monnier [Wed, 22 Feb 2017 02:32:27 +0000 (21:32 -0500)]
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Fix last change

8 years ago* lisp/isearch.el (lazy-highlight-max-at-a-time): Doc fix (bug#21092).
Juri Linkov [Wed, 22 Feb 2017 00:16:06 +0000 (02:16 +0200)]
* lisp/isearch.el (lazy-highlight-max-at-a-time): Doc fix (bug#21092).

8 years ago* lisp/isearch.el (isearch-lazy-highlight): New choice ‘all-windows’.
Juri Linkov [Wed, 22 Feb 2017 00:10:36 +0000 (02:10 +0200)]
* lisp/isearch.el (isearch-lazy-highlight): New choice ‘all-windows’.

(isearch-lazy-highlight-update): Check it to decide whether to apply
overlays only on the selected window.

* lisp/follow.el (follow-mode): Set isearch-lazy-highlight to ‘all-windows’.
(Bug#17453, bug#21092)

8 years agoMinor weak hash table performance tweaks
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Minor weak hash table performance tweaks

* src/fns.c (make_hash_table): Omit unnecessary assignment to
h->next_weak when the hash table is not weak.
(copy_hash_table): Put the copy next to the original in the
weak_hash_tables list, as this should have better locality
when scanning the weak hash tables.

8 years agoUse float instead of Lisp_Object for rehash_size
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Use float instead of Lisp_Object for rehash_size

* src/alloc.c (purecopy_hash_table):
* src/fns.c (maybe_resize_hash_table, Fmake_hash_table):
(Fhash_table_rehash_size):
* src/lisp.h (struct Lisp_Hash_Table.rehash_size):
The rehash_size member of struct Lisp_Hash_Table is now a
float, not a Lisp_Object.
* src/alloc.c (purecopy_hash_table): Assign members in order.
* src/fns.c (make_hash_table): Use EMACS_INT for size and
float for rehash_size, instead of Lisp_Object for both.
All callers changed.
* src/lisp.h (DEFAULT_REHASH_SIZE): Now float, not double,
and 1 smaller.
* src/print.c (print_object): Simplify by calling
Fhash_table_rehash_size and Fhash_table_rehash_threshold.
Avoid unnecessary NILP.

8 years agoUse ptrdiff_t instead of Lisp_Object for collision
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Use ptrdiff_t instead of Lisp_Object for collision

* src/alloc.c (purecopy_hash_table): Assign, don’t purecopy.
* src/fns.c (set_hash_next_slot, set_hash_index_slot): Hash index
arg is now ptrdiff_t index (or -1 if empty), not Lisp_Object
integer (or Qnil if empty).  All callers changed.
(larger_vecalloc): New static function.
(larger_vector): Use it.
(HASH_NEXT, HASH_INDEX): Move here from lisp.h.  Return ptrdiff_t
index (or -1) not Lisp_Object integer (or Qnil).  All callers changed.
* src/fns.c (make_hash_table, maybe_resize_hash_table, hash_lookup)
(hash_put, hash_remove_from_table, hash_clear, sweep_weak_table):
* src/profiler.c (evict_lower_half, record_backtrace):
-1, not nil, is now the convention for end of collision list.
* src/fns.c (maybe_resize_hash_table): Avoid double-initialization
of the free list.  Reallocate H->next last, in case other
reallocations exhaust memory.
* src/lisp.h (struct Lisp_Hash_Table): ‘next_free’ is now
ptrdiff_t, not Lisp_Object.  Adjust commentary for ‘next’ and
‘index’, which no longer contain nil.
(HASH_NEXT, HASH_INDEX): Move to src/fns.c.

8 years agoHash table threshold is now float, not double
Paul Eggert [Tue, 21 Feb 2017 23:31:29 +0000 (15:31 -0800)]
Hash table threshold is now float, not double

Change default from 0.8 to 0.8125 so it fits in float without
rounding glitches.
* doc/lispref/hash.texi (Creating Hash):
* doc/lispref/objects.texi (Hash Table Type):
* etc/NEWS:
Document change.
* src/fns.c (make_hash_table, maybe_resize_hash_table)
(Fmake_hash_table): Threshold is now float, not double.
Be consistent about how this is rounded.
* src/lisp.h (struct Lisp_Hash_Table.rehash_threshold):
Change back to float, now that the other code rounds consistently.
(DEFAULT_REHASH_THRESHOLD): Now float 0.8125 instead of double 0.8.

8 years agoAvoid flicker in lazy-highlight by doing all updates without redisplay.
Juri Linkov [Tue, 21 Feb 2017 23:22:18 +0000 (01:22 +0200)]
Avoid flicker in lazy-highlight by doing all updates without redisplay.

* lisp/isearch.el (lazy-highlight-max-at-a-time):
Change default value from 20 to nil to not trigger redisplay
between updating iterations.
(lazy-highlight-cleanup): New arg ‘procrastinate’ to not remove
overlays when non-nil.
(isearch-lazy-highlight-new-loop): Call lazy-highlight-cleanup
with non-nil second arg when the search string is not empty.
Run timer with isearch-lazy-highlight-start instead of
isearch-lazy-highlight-update.
(isearch-lazy-highlight-start): New function. (Bug#25751)

8 years ago; * lisp/custom.el: Comments.
Glenn Morris [Tue, 21 Feb 2017 20:11:56 +0000 (15:11 -0500)]
; * lisp/custom.el: Comments.

8 years ago* lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric
Stefan Monnier [Tue, 21 Feb 2017 18:51:12 +0000 (13:51 -0500)]
* lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric

* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Tweak for autoloading.

8 years ago* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Fix duplication
Stefan Monnier [Tue, 21 Feb 2017 18:48:30 +0000 (13:48 -0500)]
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Fix duplication

which resulted in incomplete list of parents in one copy of the
cl-structure-class class.

8 years agoTweak recent custom-reevaluate-setting change
Glenn Morris [Tue, 21 Feb 2017 17:59:56 +0000 (12:59 -0500)]
Tweak recent custom-reevaluate-setting change

* lisp/custom.el (custom-reevaluate-setting):
Tweak previous change to avoid font-lock init issues.

8 years agoEnsure delayed-init custom variables get marked special
Glenn Morris [Tue, 21 Feb 2017 02:30:40 +0000 (18:30 -0800)]
Ensure delayed-init custom variables get marked special

* lisp/custom.el (custom-reevaluate-setting):
If the variable has never been set, defvar it.  (Bug#25770)

8 years ago; Add a new TODO item
Glenn Morris [Tue, 21 Feb 2017 02:08:48 +0000 (18:08 -0800)]
; Add a new TODO item

* etc/TODO: Add a new entry for :set-after.
* lisp/startup.el: Related comment.

8 years agoTurn on lexical-binding in dunnet.el
Mark Oteiza [Tue, 21 Feb 2017 02:04:52 +0000 (21:04 -0500)]
Turn on lexical-binding in dunnet.el

* lisp/play/dunnet.el: Turn on lexical-binding.  Re-instate lexical
byte compile warnings.

8 years agoMake dunnet insertion functions n-ary
Mark Oteiza [Tue, 21 Feb 2017 02:00:32 +0000 (21:00 -0500)]
Make dunnet insertion functions n-ary

* lisp/play/dunnet.el (dun-mprinc, dun-mprincl, dun-minsert):
(dun-minsertl, dun-batch-mprinc, dun-batch-mprincl): Change to accept
any number of arguments.
(dun-parse, dun-describe-room, dun-quit, dun-inven, dun-shake):
(dun-take, dun-go, dun-move, dun-press, dun-score):
(dun-compile-save-out, dun-do-logfile): Collect arguments from
multiple insertion calls into less calls with more args.

8 years agomessage-goto-body-1: Fix regexp so as not to match multi-line
Katsumi Yamaoka [Tue, 21 Feb 2017 00:24:05 +0000 (00:24 +0000)]
message-goto-body-1: Fix regexp so as not to match multi-line

* lisp/gnus/message.el (message-goto-body-1):
Fix regexp so as not to match multi-line.

8 years agoSimplify cl-get using `plist-member'
Noam Postavsky [Fri, 5 Aug 2016 23:59:52 +0000 (19:59 -0400)]
Simplify cl-get using `plist-member'

* lisp/emacs-lisp/cl-extra.el (cl-get, cl-getf, cl--set-getf): Use
`plist-member' instead of explicit loop.
* test/lisp/emacs-lisp/cl-extra-tests.el: New tests.

8 years agoVerify xwidget USE_LSB_TAG assumption
Paul Eggert [Mon, 20 Feb 2017 21:03:12 +0000 (13:03 -0800)]
Verify xwidget USE_LSB_TAG assumption

* src/xwidget.c (Fxwidget_webkit_execute_script):
Add verification.  Problem reported by Andreas Schwab (Bug#25816#8).

8 years ago* src/insdel.c (make_gap): Improve comment.
Stefan Monnier [Mon, 20 Feb 2017 19:05:41 +0000 (14:05 -0500)]
* src/insdel.c (make_gap): Improve comment.

8 years agoDo not use switch-to-buffer for working in a temp buffer
Mark Oteiza [Mon, 20 Feb 2017 18:53:41 +0000 (13:53 -0500)]
Do not use switch-to-buffer for working in a temp buffer

* lisp/play/dunnet.el (dunnet): Use pop-to-buffer-same-window instead,
cf. Bug#22244.
(dun-load-d, dun-eval, dun-save-game, dun-do-logfile): Use
with-temp-buffer instead.

8 years agoMake dun-room-shorts a defconst
Mark Oteiza [Mon, 20 Feb 2017 18:33:48 +0000 (13:33 -0500)]
Make dun-room-shorts a defconst

* lisp/play/dunnet.el (dun-room-shorts): Make defconst and collect
initial value into the declaration.
(dun-space-to-hyphen): Remove.

8 years agoPort xwidget to -DCHECK_LISP_OBJECT_TYPE
Paul Eggert [Mon, 20 Feb 2017 16:53:50 +0000 (08:53 -0800)]
Port xwidget to -DCHECK_LISP_OBJECT_TYPE

* src/xwidget.c (webkit_javascript_finished_cb)
(Fxwidget_webkit_execute_script): Don't assume Lisp_Object is an
integer.  This fix is just a hack; I’ll file a bug report about
the underlying problem.

8 years ago; * src/insdel.c: State file encoding explicitly.
Eli Zaretskii [Mon, 20 Feb 2017 15:41:46 +0000 (17:41 +0200)]
; * src/insdel.c: State file encoding explicitly.

8 years agomm-decode.el: Simplify regexp used to search html meta tag
Katsumi Yamaoka [Mon, 20 Feb 2017 06:40:03 +0000 (06:40 +0000)]
mm-decode.el: Simplify regexp used to search html meta tag

* lisp/gnus/mm-decode.el (mm-add-meta-html-tag, mm-shr):
Simplify regexp used to search html meta tag.

8 years agomm-shr: Ignore coding-system `ascii'
Katsumi Yamaoka [Mon, 20 Feb 2017 06:17:20 +0000 (06:17 +0000)]
mm-shr: Ignore coding-system `ascii'

* lisp/gnus/mm-decode.el (mm-shr): Ignore coding-system `ascii'.

8 years agovc-log-outgoing fixes for git; add binding to vc-dir
Tom Tromey [Wed, 15 Feb 2017 12:12:18 +0000 (05:12 -0700)]
vc-log-outgoing fixes for git; add binding to vc-dir

* lisp/vc/vc-dir.el (vc-dir-mode-map): Bind "O" to vc-log-outgoing.
* lisp/vc/vc-git.el (vc-git-log-outgoing, vc-git-log-incoming): Use
async execution.
(vc-git-log-view-mode): Also truncate lines for log-outgoing and
log-incoming.
* lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Don't pass nil
as remote-location argument.

8 years agoRemove stale comments from vc-git and vc-hg
Tom Tromey [Tue, 14 Feb 2017 00:24:04 +0000 (17:24 -0700)]
Remove stale comments from vc-git and vc-hg

* lisp/vc/vc-git.el (vc-git-retrieve-tag): Remove comment.
* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Remove comment.

8 years agoRemove member clone
Mark Oteiza [Mon, 20 Feb 2017 03:19:57 +0000 (22:19 -0500)]
Remove member clone

* lisp/play/dunnet.el (dun-answer): Use member instead.
(dun-members): Remove.

8 years agoPrefix global var
Mark Oteiza [Mon, 20 Feb 2017 03:15:57 +0000 (22:15 -0500)]
Prefix global var

* lisp/play/dunnet.el (room): Rename to dun-room.
(dun-messages, dunnet, dun-describe-room, dun-drop, dun-move):
(dun-restore, dun-do-logfile, dun-batch-loop): Use new name.

8 years agoReplace nested ifs with cond
Mark Oteiza [Mon, 20 Feb 2017 02:31:22 +0000 (21:31 -0500)]
Replace nested ifs with cond

* lisp/play/dunnet.el (dun-messages, dun-describe-room, dun-examine):
(dun-eat, dun-put-objs, dun-turn, dun-press, dun-ls, dun-cd): Use when
and cond where appropriate.
(dun-sauna-heat): Accept sauna level as an argument.  Use cond.
(dun-take): Use null and dun-mprincl.
(dun-inven-weight, dun-load-d): Reformat.
(dun-remove-obj-from-inven, dun-remove-obj-from-room): Nix setq to nil.

8 years agoFix glitches in recent hash table changes
Paul Eggert [Sun, 19 Feb 2017 20:22:33 +0000 (12:22 -0800)]
Fix glitches in recent hash table changes

* src/fns.c (Fmake_hash_table): Simplify the machine code slightly
by using 0 rather than -1.
* src/lisp.h (struct Lisp_Hash_Table.pure): Now bool rather
than a bitfield, for speed (the bitfield did not save space).
(struct Lisp_Hash_Table.rehash_threshold): Now double rather than
float, since the float caused unwanted rounding errors, e.g.,
(hash-table-rehash-threshold (make-hash-table)) yielded
0.800000011920929 instead of the correct 0.8.

8 years ago* src/insdel.c (make_gap): Increase enough to avoid O(N^2) behavior.
Stefan Monnier [Sun, 19 Feb 2017 18:12:16 +0000 (13:12 -0500)]
* src/insdel.c (make_gap): Increase enough to avoid O(N^2) behavior.

8 years ago; Minor fix of recent change in fringe.c
Eli Zaretskii [Sun, 19 Feb 2017 16:40:52 +0000 (18:40 +0200)]
; Minor fix of recent change in fringe.c

* src/fringe.c (init_fringe_bitmap) [HAVE_NTGUI]: Remove an
unnecessary #ifdef introduced in a recent change.

8 years ago; * src/fns.c (Fmake_hash_table): Prefer 'double' to 'float'.
Eli Zaretskii [Sun, 19 Feb 2017 16:35:48 +0000 (18:35 +0200)]
; * src/fns.c (Fmake_hash_table): Prefer 'double' to 'float'.

8 years agoAvoid aborts during loadup
Eli Zaretskii [Sun, 19 Feb 2017 16:32:51 +0000 (18:32 +0200)]
Avoid aborts during loadup

* src/emacs-module.c (syms_of_module):
* src/image.c (xpm_make_color_table_h): Update calls to
make_hash_table to adjust to a recent change in fns.c.
* src/fns.c (make_hash_table):
* src/lisp.h (make_hash_table): 4th arg is now of type double.

8 years agoRework connection local variables
Michael Albinus [Sun, 19 Feb 2017 16:14:35 +0000 (17:14 +0100)]
Rework connection local variables

For connection local variables interface, `class' is renamed
to `profile'.  All arguments `criteria' are a plist now.

* doc/lispref/variables.texi (Connection Local Variables):
Rewrite.

* lisp/files-x.el (connection-local-profile-alist): Rename
from `connection-local-class-alist'.  Adapt docstring.
(connection-local-criteria-alist): Adapt docstring.
(connection-local-normalize-criteria): New defun.
(connection-local-get-profiles): Rename from
`connection-local-get-classes'.  Rewrite.
(connection-local-set-profiles): Rename from
`connection-local-set-classes'.  Rewrite.
(connection-local-get-profile-variables): Rename from
`connection-local-get-class-variables'.  Rewrite.
(connection-local-set-profile-variables): Rename from
`connection-local-set-class-variables'.  Rewrite.
(hack-connection-local-variables)
(hack-connection-local-variables-apply)): Rewrite.
(with-connection-local-profiles): Rename from
`ith-connection-local-classes'.  Rewrite.

* lisp/net/tramp.el (tramp-set-connection-local-variables):
Compute criteria.

* lisp/net/tramp-cmds.el (tramp-bug):
Use `connection-local-profile-alist'.

* test/lisp/files-x-tests.el (files-x-test--variables1)
(files-x-test--variables2, files-x-test--variables3)
(files-x-test--variables4, files-x-test--criteria1)
(files-x-test--criteria2): Make them a defconst.
(files-x-test--application)
(files-x-test--another-application, files-x-test--protocol)
(files-x-test--user, files-x-test--machine): New defconst.
(files-x-test--criteria): New defvar.
(files-x-test--criteria3): Remove.
(files-x-test-connection-local-set-profile-variables):
Rename from `files-x-test-connection-local-set-class-variables'.
Rewrite.
(files-x-test-connection-local-set-profiles): Rename from
`files-x-test-connection-local-set-classes'.  Rewrite.
(files-x-test-hack-connection-local-variables-apply)  Rewrite.
(files-x-test-with-connection-local-profiles): Rename from
`files-x-test-with-connection-local-classes'.  Rewrite.

8 years ago; Fix previous change
Mark Oteiza [Sun, 19 Feb 2017 13:55:45 +0000 (08:55 -0500)]
; Fix previous change

Actually adjust the comment.
* lisp/play/dunnet.el: Change comment to refer to section, add page
break to better demarcate section.

8 years agoSet up combination and random item location
Mark Oteiza [Wed, 18 Jan 2017 04:15:25 +0000 (23:15 -0500)]
Set up combination and random item location

* lisp/play/dunnet.el (dun-combination): Make defconst.
(tloc, tcomb): Remove.  Replace with a top-level form.

8 years agoReplace movement variables with an alist and accessor
Mark Oteiza [Wed, 18 Jan 2017 03:05:48 +0000 (22:05 -0500)]
Replace movement variables with an alist and accessor

* lisp/play/dunnet.el (north, south, east, west, northeast, southeast):
(northwest, southwest, up, down, in, out): Remove.
(dun-movement-alist): New constant.
(dun-movement): New function.
(dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se, dun-nw, dun-sw, dun-up):
(dun-down, dun-in, dun-out): Use a symbol for indicating movement.
(dun-move, dun-special-move): Translate movement symbol to an
enumeration.

8 years agoChange top-level setq forms to defvar or defconst
Mark Oteiza [Wed, 18 Jan 2017 02:34:59 +0000 (21:34 -0500)]
Change top-level setq forms to defvar or defconst

Also collect some code onto fewer lines and reindent.
* lisp/play/dunnet.el (dun-visited, dun-current-room, dun-exitf):
(dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
(dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
(room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
(dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
(dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
(dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
(dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
(dun-mode, dun-sauna-level, north, south, east, west, northeast):
(southeast, northwest, southwest, up, down, in, out, dungeon-map):
(dun-objnames, obj-special, dun-room-objects, dun-room-silents):
(dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
(dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
(dun-diggables, dun-room-shorts, dun-endgame-questions): Change
declaration to use defvar or defconst.
(dun-doverb, dun-vparse, dun-vparse2, dun-batch-parse):
(dun-batch-parse2): Omit the dun- prefix from arguments dun-ignore
dun-verblist.  Those are now constants and the byte compiler doesn't
allow defconsts in lambda lists.

8 years agoMove all dunnet globals up to the top
Mark Oteiza [Wed, 18 Jan 2017 00:11:06 +0000 (19:11 -0500)]
Move all dunnet globals up to the top

* lisp/play/dunnet.el: Adjust comments to reflect moved forms.
(dun-visited, dun-current-room, dun-exitf):
(dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
(dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
(room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
(dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
(dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
(dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
(dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
(dun-mode, dun-sauna-level, north, south, east, west, northeast):
(southeast, northwest, southwest, up, down, in, out, dungeon-map):
(dun-objnames, obj-special, dun-room-objects, dun-room-silents):
(dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
(dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
(dun-diggables, dun-room-shorts, dun-endgame-questions): Move to the
top of the file, before any uses.

8 years agoFix bug#25788
Michael Albinus [Sun, 19 Feb 2017 08:33:24 +0000 (09:33 +0100)]
Fix bug#25788

* lisp/net/tramp.el (tramp-autoload-file-name-handler):
Do not load tramp.el just for "/".  (Bug#25788)

8 years agoFix fringe bitmap initialization on MS-Windows
YAMAMOTO Mitsuharu [Sun, 19 Feb 2017 04:42:05 +0000 (13:42 +0900)]
Fix fringe bitmap initialization on MS-Windows

* src/fringe.c (init_fringe_bitmap) [HAVE_NTGUI]: Fix initialization
of fb->bits.  (Bug#25673)

8 years agoChange type of `rehash_threshold' and `pure' fields in hash-tables
Stefan Monnier [Sun, 19 Feb 2017 03:37:05 +0000 (22:37 -0500)]
Change type of `rehash_threshold' and `pure' fields in hash-tables

* src/lisp.h (struct Lisp_Hash_Table): Change type of
`rehash_threshold' and `pure' fields and move them after `count'.
* src/fns.c (make_hash_table): Change type of `rehash_threshold' and `pure'.
(Fmake_hash_table, Fhash_table_rehash_threshold):
* src/category.c (hash_get_category_set):
* src/xterm.c (syms_of_xterm):
* src/profiler.c (make_log):
* src/print.c (print_object):
* src/alloc.c (purecopy_hash_table, purecopy): Adjust accordingly.

8 years agoUse 'char *FOO' instead of 'char* FOO'
Paul Eggert [Sun, 19 Feb 2017 02:16:37 +0000 (18:16 -0800)]
Use 'char *FOO' instead of 'char* FOO'

8 years agoMore json.el changes
Mark Oteiza [Sun, 19 Feb 2017 01:25:50 +0000 (20:25 -0500)]
More json.el changes

* lisp/json.el (json-read-keyword, json-read-number, json-read-object):
(json-read-array): Just use = for char comparison.