]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoTeach etags to process ENUM_BF correctly
Eli Zaretskii [Sun, 12 Mar 2017 15:36:41 +0000 (17:36 +0200)]
Teach etags to process ENUM_BF correctly

* lib-src/etags.c (sym_type): New enumeration value st_C_enum_bf.
(hash): Regenerated values for asso_values[] array.
(in_word_set): Update values of TOTAL_KEYWORDS and
MAX_HASH_VALUE.  Add "ENUM_BF" to the wordlist[] array.
(in_enum_bf): New file-global variable.
(consider_token): Skip ENUM_BF if not in a macro definition.
(C_entries): Reset the in_enum_bf flag when past its closing
parenthesis.

* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to changes in etags.

7 years ago; Update expected results of etags tests.
Eli Zaretskii [Sun, 12 Mar 2017 15:24:25 +0000 (17:24 +0200)]
; Update expected results of etags tests.

* test/manual/etags/CTAGS.good:
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Update.

7 years agoUse path/to/file instead of path/to.file in tramp.texi
Michael Albinus [Sun, 12 Mar 2017 09:28:18 +0000 (10:28 +0100)]
Use path/to/file instead of path/to.file in tramp.texi

* doc/misc/tramp.texi (Configuration, File name Syntax):
Use path/to/file instead of path/to.file.

7 years agoRemove some stray gnulib files
Paul Eggert [Sun, 12 Mar 2017 08:02:52 +0000 (00:02 -0800)]
Remove some stray gnulib files

* admin/merge-gnulib: rm m4/gnulib-tool.m4 too.
(GNULIB_MODULES): Remove unsetenv, as it is not needed and
the --avoid=unsetenv option avoided most of it anyway.
* lib/unsetenv.c, m4/gnulib-tool.m4, m4/setenv.m4: Remove.
* lib/gnulib.mk: Regenerate.

7 years agoMerge from gnulib
Paul Eggert [Sun, 12 Mar 2017 07:53:02 +0000 (23:53 -0800)]
Merge from gnulib

This incorporates:
2017-03-11 gnulib-common.m4: avoid aclocal.m4 bloat
* doc/misc/texinfo.tex, m4/gnulib-common.m4: Copy from gnulib.

7 years agoRemove trivial duplication in epg-config
Glenn Morris [Sun, 12 Mar 2017 01:22:56 +0000 (17:22 -0800)]
Remove trivial duplication in epg-config

* lisp/epg-config.el (epg-config--program-alist):
Use epg-gpg-minimum-version.

7 years agoSmall epg-find-configuration improvement
Glenn Morris [Sun, 12 Mar 2017 01:21:20 +0000 (17:21 -0800)]
Small epg-find-configuration improvement

* lisp/epg-config.el (epg-find-configuration):
Handle epg-gpg-program customized but not saved.  (Bug#25947)

7 years agoImprove last change
Stefan Monnier [Sat, 11 Mar 2017 21:36:23 +0000 (16:36 -0500)]
Improve last change

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Use ppss to check escaping and add help-echo.

7 years agoHighlight useless backslashes in Elisp strings
Stefan Monnier [Sat, 11 Mar 2017 16:35:14 +0000 (11:35 -0500)]
Highlight useless backslashes in Elisp strings

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Put warning face on backslashes that have no effect.

7 years agoFix generation of nt/gnulib.mk on macOS
Eli Zaretskii [Sat, 11 Mar 2017 11:34:08 +0000 (13:34 +0200)]
Fix generation of nt/gnulib.mk on macOS

* nt/Makefile.in (${srcdir}/gnulib.mk): Don't use the -f- option
to Sed, as that is not portable with non-GNU Sed variants.
(Bug#26043)

7 years agoAvoid aborts/assertion violations due to 'vim-empty-lines-mode'
Eli Zaretskii [Sat, 11 Mar 2017 08:25:05 +0000 (10:25 +0200)]
Avoid aborts/assertion violations due to 'vim-empty-lines-mode'

* src/xdisp.c (handle_single_display_spec): If position to be
restored after processing the display property comes from an
overlay, protect against that overlay's end point being outside of
the narrowed region.
Reported by Filipe Silva <filipe.silva@gmail.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00176.html.

7 years ago; * doc/lispref/processes.texi: Restore deleted FIXME comment.
Glenn Morris [Fri, 10 Mar 2017 20:39:52 +0000 (15:39 -0500)]
; * doc/lispref/processes.texi: Restore deleted FIXME comment.

7 years agoSmall improvement for epa-display-error (bug#24553)
Glenn Morris [Fri, 10 Mar 2017 20:14:33 +0000 (15:14 -0500)]
Small improvement for epa-display-error (bug#24553)

* lisp/epa.el (epa-display-error): Report the actual program in use.

7 years agoTweak X toolkit code to pacify modern GCC
Paul Eggert [Fri, 10 Mar 2017 17:30:30 +0000 (09:30 -0800)]
Tweak X toolkit code to pacify modern GCC

* lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c:
Don’t include <stdlib.h>, since this code now calls emacs_abort
rather than abort.
* lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback)
(wm_delete_window):
* lwlib/lwlib-Xm.c (make_menu_in_widget, do_call):
* lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget):
* lwlib/xlwmenu.c (abort_gracefully, draw_separator)
(separator_height, XlwMenuInitialize):
Use emacs_abort, not abort.  Without this change, some calls
to ‘abort’ were invalid, as stdlib.h was not always included.
* src/widget.c (resources, emacsFrameClassRec):
* src/xfns.c (x_window) [USE_X_TOOLKIT]:
* src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]:
* src/xterm.c (emacs_options) [USE_X_TOOLKIT}:
(x_term_init) [USE_X_TOOLKIT]:
Cast string constants to char * to pacify --enable-gcc-warnings.

7 years ago* doc/misc/tramp.texi (Android shell setup): Require adb program
Michael Albinus [Fri, 10 Mar 2017 15:13:39 +0000 (16:13 +0100)]
* doc/misc/tramp.texi (Android shell setup): Require adb program

7 years agoAdapt tramp-tests.el
Michael Albinus [Fri, 10 Mar 2017 13:34:23 +0000 (14:34 +0100)]
Adapt tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name)
(tramp-test24-file-name-completion): Call
`tramp-completion-mode-p' with argument.

7 years ago[doc] Replace bindat example: s/fortune cookie/rfc868 payload/
Thien-Thi Nguyen [Fri, 10 Mar 2017 12:25:41 +0000 (13:25 +0100)]
[doc] Replace bindat example: s/fortune cookie/rfc868 payload/

* doc/lispref/processes.texi (Bindat Examples):
Mention two examples in intro blurb; rewrite first example.

7 years agoSimplify checks for xdg-open and xdg-email
Paul Eggert [Fri, 10 Mar 2017 03:01:19 +0000 (19:01 -0800)]
Simplify checks for xdg-open and xdg-email

browse-url's xdg-open detection was too picky on some GNU/Linux
desktops; see Bug#25778.  Simplify the code by assuming xdg-open works
if it is executable, as nowadays this is more likely to be correct than
trying to use heuristics from a few years ago.  Don't test for nohup: it
is ineffective nowadays, as xdg-open's child uses the default action for
SIGHUP even if xdg-open's invoker ignores SIGHUP.  While we're at it,
allow for Wayland here, as "emacs -nw" might be running in a non-X
Wayland terminal.
* lisp/mail/emacsbug.el (report-emacs-bug-can-use-xdg-email):
* lisp/net/browse-url.el (browse-url-can-use-xdg-open):
Simplify to a test for DISPLAY and whether the helper program is
executable.  Allow WAYLAND_DISPLAY as an option.

7 years agoByte compile cond clauses without any bodies correctly.
Vibhav Pant [Thu, 9 Mar 2017 18:39:58 +0000 (00:09 +0530)]
Byte compile cond clauses without any bodies correctly.

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table): When a
cond clause has no body, push t on to the stack.

7 years agoFix bug#23006
Michael Albinus [Thu, 9 Mar 2017 18:44:37 +0000 (19:44 +0100)]
Fix bug#23006

* lisp/minibuffer.el (completion--nth-completion):
Let-bind `non-essential'.

* lisp/net/tramp.el (tramp-completion-mode): Fix docstring.
(tramp-completion-mode-p): Optional parameter VEC.  Replace
check for `last-input-event' by analysing VEC argument.
(tramp-error-with-buffer, tramp-file-name-handler)
(tramp-connectable-p, tramp-handle-file-name-as-directory):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it.

7 years agoetc/NEWS: Add entry for new `switch' bytecode.
Vibhav Pant [Thu, 9 Mar 2017 14:32:03 +0000 (20:02 +0530)]
etc/NEWS: Add entry for new `switch' bytecode.

7 years ago* src/data.c (arithcompare): Add comments.
Paul Eggert [Wed, 8 Mar 2017 21:43:16 +0000 (13:43 -0800)]
* src/data.c (arithcompare): Add comments.

7 years agoUpdate a cl-print test
Glenn Morris [Wed, 8 Mar 2017 19:43:16 +0000 (14:43 -0500)]
Update a cl-print test

* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1):
Update for recent change in cl-print-object function output.

7 years agoReplace change-log-date-face -> change-log-date
Sam Steingold [Wed, 8 Mar 2017 18:32:21 +0000 (13:32 -0500)]
Replace change-log-date-face -> change-log-date

This fixes c430f7e23fc2c22f251ace4254e37dea1452dfc3.

7 years agoFix bug#26011
Michael Albinus [Wed, 8 Mar 2017 16:27:24 +0000 (17:27 +0100)]
Fix bug#26011

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer):
Check, whether file is too large.  (Bug#26011)

7 years ago* data.c (minmax_driver): Use CHECK_NUMBER_OR_FLOAT_COERCE_MARKER.
Andreas Schwab [Wed, 8 Mar 2017 08:25:09 +0000 (09:25 +0100)]
* data.c (minmax_driver): Use CHECK_NUMBER_OR_FLOAT_COERCE_MARKER.
(Fmax, Fmin): Restore documentation.

7 years ago* data.c (cons_to_unsigned, cons_to_signed, Fstring_to_number): Reorder
Andreas Schwab [Wed, 8 Mar 2017 08:36:26 +0000 (09:36 +0100)]
* data.c (cons_to_unsigned, cons_to_signed, Fstring_to_number): Reorder
comparisons that are written backward.

7 years ago[doc elisp] Add some index entries for "old" advice mechanism
Thien-Thi Nguyen [Wed, 8 Mar 2017 08:36:06 +0000 (09:36 +0100)]
[doc elisp] Add some index entries for "old" advice mechanism

* doc/lispref/functions.texi (Porting old advice):
Add one @cindex and two @findex entries.

7 years ago* etc/NEWS: Adjust to match previous patch.
Paul Eggert [Wed, 8 Mar 2017 06:05:53 +0000 (22:05 -0800)]
* etc/NEWS: Adjust to match previous patch.

7 years agomin and max should not return markers
Paul Eggert [Wed, 8 Mar 2017 05:23:08 +0000 (21:23 -0800)]
min and max should not return markers

Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00147.html
* src/data.c (minmax_driver): Convert any marker result to an
integer, since some callers assume this.
* test/src/data-tests.el (data-tests-max, data-tests-min):
Test for this.

7 years ago* lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
Stefan Monnier [Wed, 8 Mar 2017 01:35:40 +0000 (20:35 -0500)]
* lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.

7 years agoAdd missing timeout value in ns_select
Alan Third [Wed, 8 Mar 2017 00:40:05 +0000 (00:40 +0000)]
Add missing timeout value in ns_select

* src/nsterm.m (ns_select): Set timeout to distant future when relying
on fd_handler's timeout.

7 years ago* admin/update_autogen: Ensure nt/gnulib.mk exists, for autoreconf.
Glenn Morris [Tue, 7 Mar 2017 18:01:40 +0000 (13:01 -0500)]
* admin/update_autogen: Ensure nt/gnulib.mk exists, for autoreconf.

7 years ago; Update ldefs-boot.el
Glenn Morris [Tue, 7 Mar 2017 17:59:40 +0000 (12:59 -0500)]
; Update ldefs-boot.el

7 years agoRemove isnan hack for Solaris 10 gcc 3.4.3
Paul Eggert [Tue, 7 Mar 2017 17:50:15 +0000 (09:50 -0800)]
Remove isnan hack for Solaris 10 gcc 3.4.3

This seems to have been a false alarm (Bug#26018).
* src/data.c (isnan):
* src/floatfns.c (isfinite, isnan):
Use standard implementation if available.

7 years agoSupport browsing URLs with embedded spaces on MS-Windows
Eli Zaretskii [Tue, 7 Mar 2017 16:37:58 +0000 (18:37 +0200)]
Support browsing URLs with embedded spaces on MS-Windows

* lisp/net/browse-url.el (browse-url-default-windows-browser):
Unhex %XX hex-encoded characters, as w32-shell-execute doesn't
support that in file:// URLs.  (Bug#26014)

7 years agoDefine copysign on all platforms
Paul Eggert [Tue, 7 Mar 2017 16:29:19 +0000 (08:29 -0800)]
Define copysign on all platforms

* configure.ac (copysign): Remove test.
* src/floatfns.c (signbit): New macro, if not already defined.
(Fcopysign): Use it instead of copysign.
(Fcopysign, syms_of_floatfns): Define the function on all platforms.

7 years ago; Typo fixes in comment
Paul Eggert [Tue, 7 Mar 2017 15:44:13 +0000 (07:44 -0800)]
; Typo fixes in comment

7 years agoRevert "Replace ldefs-boot with a much smaller file"
Phillip Lord [Tue, 7 Mar 2017 13:25:45 +0000 (13:25 +0000)]
Revert "Replace ldefs-boot with a much smaller file"

This reverts commit c27b645956a11fab1dd8fa189254d525390958f5.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

See also 11436e2890d.

7 years agoRevert "Record autoloads till emacs dump"
Phillip Lord [Tue, 7 Mar 2017 13:24:10 +0000 (13:24 +0000)]
Revert "Record autoloads till emacs dump"

This reverts commit 72c668a9042ac6475eadedfee5c87fb1e6b2d753.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

See also 11436e2890d.

7 years agoRevert "Remove unused ldefs-boot.el"
Phillip Lord [Tue, 7 Mar 2017 13:22:47 +0000 (13:22 +0000)]
Revert "Remove unused ldefs-boot.el"

This reverts commit ef8c9f8fc922b615aca91b47820d1f1900fddc96.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

See also 11436e2890d.

7 years agoRevert "Remove conditional includes from bootstrap"
Phillip Lord [Tue, 7 Mar 2017 13:22:32 +0000 (13:22 +0000)]
Revert "Remove conditional includes from bootstrap"

This reverts commit 1b946305182312faa7fcd838caf55dcb07b2ab04.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

See also 11436e2890d.

7 years agoRevert "Speed generation of ldefs-boot-auto"
Phillip Lord [Tue, 7 Mar 2017 13:22:18 +0000 (13:22 +0000)]
Revert "Speed generation of ldefs-boot-auto"

This reverts commit 7b5e1c8238ef961fd3305b1dce053b9bced684ba.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

See also 11436e2890d.

7 years agoRevert "Fix minor problems with loaddefs autogeneration"
Phillip Lord [Tue, 7 Mar 2017 13:22:04 +0000 (13:22 +0000)]
Revert "Fix minor problems with loaddefs autogeneration"

This reverts commit f2bd2c1e6476acc71e71f6cb2a1c56c5edd900ba.

This commit has been reverted because the new mechanism was too
sensitive to changes in the lisp source, generation of new ldefs-boot
files was platform specific and resulted in warnings about undefined
variables.

7 years agoSet default when asking for send-mail-function (Bug#25874).
Noam Postavsky [Mon, 27 Feb 2017 03:17:28 +0000 (22:17 -0500)]
Set default when asking for send-mail-function (Bug#25874).

* lisp/mail/sendmail.el (sendmail-query-user-about-smtp): Pass first
option as default for `completing-read'.

7 years agomin and max now return one of their arguments
Paul Eggert [Mon, 6 Mar 2017 23:14:32 +0000 (15:14 -0800)]
min and max now return one of their arguments

* doc/lispref/numbers.texi (Comparison of Numbers):
* etc/NEWS: Document this.
* src/data.c (Amax, Amin): Remove constants.  All uses removed.
(minmax_driver): New function.
(Fmax, Fmin): Use it instead of arith_driver.
* test/src/data-tests.el (data-tests-max, data-tests-min): New tests.

7 years agoRemove NSEvent loop from ns_select (bug#25265)
Alan Third [Mon, 6 Mar 2017 19:50:47 +0000 (19:50 +0000)]
Remove NSEvent loop from ns_select (bug#25265)

* src/nsterm.m (ns_select): Remove event processing loop and replace
with simple test for a new event.

7 years agoA better fix for bug#25845
Eli Zaretskii [Mon, 6 Mar 2017 16:22:53 +0000 (18:22 +0200)]
A better fix for bug#25845

* src/xdisp.c (font_for_underline_metrics): New function.
* src/dispextern.h: Add its prototype.
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string):
* src/nsterm.m (ns_draw_text_decoration): Call it.  This avoids
having identical code 3 times in 3 different files.

7 years agoFix typos in EIEIO manual
Tom Tromey [Mon, 6 Mar 2017 00:16:00 +0000 (17:16 -0700)]
Fix typos in EIEIO manual

* doc/misc/eieio.texi (Slot Options, Class Options): Fix typos.

7 years agoMerge from gnulib
Paul Eggert [Sun, 5 Mar 2017 21:30:32 +0000 (13:30 -0800)]
Merge from gnulib

This incorporates:
2017-03-04 dtotimespec: simplify
* lib/dtotimespec.c: Copy from gnulib.

7 years agoffloor etc. now accept only floats
Paul Eggert [Sun, 5 Mar 2017 21:29:28 +0000 (13:29 -0800)]
ffloor etc. now accept only floats

* etc/NEWS: Say why.
* src/floatfns.c (Ffceiling, Fffloor, Ffround, Fftruncate):
Require arg to be float.
* test/src/floatfns-tests.el (fround-fixnum): Check this.

7 years ago; Spelling fixes
Paul Eggert [Sun, 5 Mar 2017 16:18:40 +0000 (08:18 -0800)]
; Spelling fixes

7 years ago; * doc/misc/cl.texi (Top): Add Concept Index to the main menu.
Eli Zaretskii [Sun, 5 Mar 2017 15:56:12 +0000 (17:56 +0200)]
; * doc/misc/cl.texi (Top): Add Concept Index to the main menu.

7 years agoFix display of cursor on underlined text
Eli Zaretskii [Sun, 5 Mar 2017 15:49:22 +0000 (17:49 +0200)]
Fix display of cursor on underlined text

* src/nsterm.m (ns_draw_text_decoration):
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string): Compute the position and
thickness of the underline by looking for the first glyph of the
run of underlined glyphs that includes the glyph string we are
drawing.  (Bug#25845)

7 years agoAdd more CL concept index items, print Concept Index
Mark Oteiza [Sun, 5 Mar 2017 15:45:11 +0000 (10:45 -0500)]
Add more CL concept index items, print Concept Index

* doc/misc/cl.texi: Print concept index.
(Generalized Variables, Variable Bindings):
(Dynamic Bindings, Function Bindings, Macro Bindings, Conditionals):
(Blocks and Exits, Iteration, Multiple Values): Add concept index
items.

7 years agoAdd 'loop facility' to the CL concept index
Mark Oteiza [Sun, 5 Mar 2017 15:28:53 +0000 (10:28 -0500)]
Add 'loop facility' to the CL concept index

* doc/misc/cl.texi (Loop Facility): Add "loop facility" as a concept
index item.

7 years agoIn `window--display-buffer' fix behavior reported in Bug#25946
martin rudalics [Sun, 5 Mar 2017 11:26:26 +0000 (12:26 +0100)]
In `window--display-buffer' fix behavior reported in Bug#25946

* lisp/window.el (window--display-buffer): Set the dedicated
status of the window used and clear its history of previous
buffers also for the case that the window already shows the
buffer to be displayed.  (Bug#25946)

7 years agoCompare and round more carefully
Paul Eggert [Sun, 5 Mar 2017 07:14:52 +0000 (23:14 -0800)]
Compare and round more carefully

* etc/NEWS: Document this.
* src/data.c (store_symval_forwarding):
* src/sound.c (parse_sound):
Do not botch NaN comparison.
* src/data.c (cons_to_unsigned, cons_to_signed):
Signal an error if a floating-point arg is not integral.
* src/data.c (cons_to_unsigned, cons_to_signed):
* src/fileio.c (file_offset):
Use simpler overflow check.
* src/dbusbind.c (xd_extract_signed, xd_extract_unsigned):
Avoid rounding error in overflow check.
(Fcar_less_than_car): Use arithcompare directly.
* test/src/charset-tests.el: New file.

7 years agoFewer rounding errors with (format "%f" fixnum)
Paul Eggert [Sun, 5 Mar 2017 07:14:52 +0000 (23:14 -0800)]
Fewer rounding errors with (format "%f" fixnum)

* etc/NEWS: Document this.
* src/editfns.c (styled_format): When formatting integers via a
floating-point format, use long double instead of double
conversion, if long double’s extra precision might help.

7 years ago* src/floatfns.c (Fftruncate): Simplify via emacs_trunc.
Paul Eggert [Sun, 5 Mar 2017 07:14:51 +0000 (23:14 -0800)]
* src/floatfns.c (Fftruncate): Simplify via emacs_trunc.

7 years ago* src/editfns.c (styled_format): Omit unnecessary code for "%0d" etc.
Paul Eggert [Sun, 5 Mar 2017 07:14:51 +0000 (23:14 -0800)]
* src/editfns.c (styled_format): Omit unnecessary code for "%0d" etc.

7 years ago; Fix typo in etc/PROBLEMS
Michael Albinus [Sat, 4 Mar 2017 19:32:39 +0000 (20:32 +0100)]
; Fix typo in etc/PROBLEMS

7 years agoFix header shown by Info 'L' command
Eli Zaretskii [Sat, 4 Mar 2017 15:37:53 +0000 (17:37 +0200)]
Fix header shown by Info 'L' command

* lisp/info.el (Info-history-find-node): A better heading for the
list of visited nodes.  (Bug#25876)

7 years agoAdd a section about incorrect Bengali rendering.
K. Handa [Sat, 4 Mar 2017 13:56:50 +0000 (22:56 +0900)]
Add a section about incorrect Bengali rendering.

7 years agoFix minor problems with loaddefs autogeneration
Eli Zaretskii [Sat, 4 Mar 2017 11:23:52 +0000 (13:23 +0200)]
Fix minor problems with loaddefs autogeneration

* admin/ldefs-clean.el (ldefs-clean): Bind coding-system-for-read
and coding-system-for-write, to produce a UTF-8 file with Unix
EOLs on MS-Windows.

* lisp/ldefs-boot-manual.el (image-type): Add autoload cookie.

7 years agoFix issues with dedicated windows in shr.el
David Bremner [Sat, 4 Mar 2017 10:19:32 +0000 (12:19 +0200)]
Fix issues with dedicated windows in shr.el

* lisp/net/shr.el (shr-pixel-buffer-width, shr-render-td-1): Make
the window not dedicated, to avoid errors if it was, before
setting its buffer temporarily.  (Bug#25828)

Copyright-paperwork-exempt: yes

7 years agoAvoid duplicate gud menu items with gdb-mi
Glenn Morris [Sat, 4 Mar 2017 00:46:57 +0000 (19:46 -0500)]
Avoid duplicate gud menu items with gdb-mi

* lisp/progmodes/gud.el (gud-menu-map): Avoid duplicate "Run"
entries in gdbmi mode.  (Bug#23923)

7 years ago* src/editfns.c (styled_format): Omit unnecessary code.
Paul Eggert [Fri, 3 Mar 2017 22:48:46 +0000 (14:48 -0800)]
* src/editfns.c (styled_format): Omit unnecessary code.

7 years agologb now works correctly on large integers
Paul Eggert [Fri, 3 Mar 2017 17:17:51 +0000 (09:17 -0800)]
logb now works correctly on large integers

* admin/merge-gnulib (GNULIB_MODULES): Add count-leading-zeros.
* etc/NEWS: Document the change.
* lib/count-leading-zeros.c, lib/count-leading-zeros.h:
* m4/count-leading-zeros.m4: New files, copied from Gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/floatfns.c: Include count-leading-zeros.h.
(Flogb): Do not convert fixnum to float before taking the log,
as the rounding error can cause the answer to be off by 1.
* src/lisp.h (EMACS_UINT_WIDTH): New constant.
* test/src/floatfns-tests.el (logb-extreme-fixnum): New test.

7 years agoMerge from gnulib
Paul Eggert [Fri, 3 Mar 2017 16:45:10 +0000 (08:45 -0800)]
Merge from gnulib

This incorporates:
2017-02-25 maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
2017-02-24 ftoastr: port to -Wdouble-promotion
* lib/ftoastr.c, m4/gnulib-common.m4: Copy from gnulib.

7 years agoAvoid duplicating characters recorded in macros
Eli Zaretskii [Fri, 3 Mar 2017 14:19:28 +0000 (16:19 +0200)]
Avoid duplicating characters recorded in macros

* src/keyboard.c (record_char): Don't store in macro definitions
characters that came from executing a macro.  (Bug#25860)

7 years agoFix color component calculations in color.el
Eli Zaretskii [Fri, 3 Mar 2017 14:05:02 +0000 (16:05 +0200)]
Fix color component calculations in color.el

* lisp/color.el (color-name-to-rgb): Use 16 bits per color component.
(color-rgb-to-hex): Accept an optional argument
DIGITS-PER-COMPONENT, defaulting to 4, and format the hexadecimal
notation either for 8 or 16 bits per component.  (Bug#25890)
* lisp/net/shr-color.el (shr-color->hexadecimal): Call
color-rgb-to-hex with the optional argument of 2, to match color
processing on the Web.

7 years agoUse lexical binding in benchmark.el
Tino Calancha [Fri, 3 Mar 2017 09:26:30 +0000 (18:26 +0900)]
Use lexical binding in benchmark.el

* lisp/emacs-lisp/benchmark.el: Enable lexical binding.
(benchmark-elapse): Use 'declare'.
* test/lisp/emacs-lisp/benchmark-tests.el: Add test suite.

7 years agoSwitch pp.el to lexical binding
Noam Postavsky [Fri, 3 Mar 2017 03:37:03 +0000 (22:37 -0500)]
Switch pp.el to lexical binding

Additionally, do some minor code cleanup.

* lisp/emacs-lisp/pp.el: Set lexical-binding.
(pp-buffer): Use skip-syntax-forward.
(pp-eval-expression): Use push.
(pp-last-sexp): Use with-syntax-table.
* test/lisp/emacs-lisp/pp-tests.el: New tests.

7 years agoFix completing-read call in reb-change-syntax
Chunyang Xu [Sat, 11 Feb 2017 06:17:26 +0000 (14:17 +0800)]
Fix completing-read call in reb-change-syntax

* lisp/emacs-lisp/re-builder.el (reb-change-syntax): Use 'default' arg
of completing-read.

Copyright-paperwork-exempt: yes

7 years agosql-mode w/ sqlite: In-memory database
Rolf Ade [Sun, 5 Feb 2017 18:46:24 +0000 (19:46 +0100)]
sql-mode w/ sqlite: In-memory database

Enable the usage of an in-memory database. Prior to this, sql-mode w/
sqlite could only be used with file databases.
* list/progmodes/sql.el (sql-get-login-ext): Don't expand an empty
file name provided by the user, but call sub-process sqlite with that,
in which case it uses an in-memory database.

Copyright-paperwork-exempt: yes

7 years agoStop abbrev-prefix-mark from adding extra newline (Bug#25767)
Allen Li [Thu, 2 Mar 2017 12:56:53 +0000 (07:56 -0500)]
Stop abbrev-prefix-mark from adding extra newline (Bug#25767)

`abbrev--before-point' does not adjust `pos' to account for when it
deletes the "-" left by abbrev-prefix-mark.  Therefore, when
`abbrev-before-point' goes to restore point, it moves point one
character too far forward.

* lisp/abbrev.el (abbrev--before-point): Adjust pos when deleting "-".

7 years ago* lisp/subr.el (apply-partially): Move to 'Basic Lisp functions' section.
Tino Calancha [Thu, 2 Mar 2017 23:37:23 +0000 (08:37 +0900)]
* lisp/subr.el (apply-partially): Move to 'Basic Lisp functions' section.

7 years agoRestore XFLOATINT but with restricted args
Paul Eggert [Thu, 2 Mar 2017 21:48:47 +0000 (13:48 -0800)]
Restore XFLOATINT but with restricted args

Turn instances of extract_float into XFLOAT_DATA when possible,
and to a resurrected XFLOATINT when the arg is a number.
The resurrected XFLOATINT is more like XFLOAT and XINT in
that is valid only if its arg is a number.  This clarifies
the ways in which floats can be extracted at the C level.
* src/editfns.c (styled_format):
* src/floatfns.c (extract_float, Fexpt):
Use XFLOATINT rather than open-coding it.
* src/fns.c (internal_equal):
* src/image.c (imagemagick_load_image):
* src/xdisp.c (resize_mini_window):
Prefer XFLOAT_DATA to extract_float on values known to be floats.
* src/frame.c (x_set_screen_gamma):
* src/frame.h (NUMVAL):
* src/image.c (x_edge_detection, compute_image_size):
* src/lread.c (read_filtered_event):
* src/window.c (Fset_window_vscroll):
* src/xdisp.c (handle_single_display_spec, try_scrolling)
(redisplay_window, calc_pixel_width_or_height, x_produce_glyphs)
(on_hot_spot_p):
Prefer XFLOATINT to extract_float on values known to be numbers.
* src/lisp.h (XFLOATINT): Bring back this function, except
it now assumes its argument is a number.

7 years agoErt commands to error if no test at point (bug#25931)
Glenn Morris [Thu, 2 Mar 2017 20:40:15 +0000 (15:40 -0500)]
Ert commands to error if no test at point (bug#25931)

* lisp/emacs-lisp/ert.el (ert-results-mode-menu):
Deactivate some items if no test at point.
(ert--results-test-at-point-no-redefinition):
Add option to signal an error rather than return nil.
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-results-describe-test-at-point): Error if no test at point.

7 years agoRemove XFLOATINT
Paul Eggert [Thu, 2 Mar 2017 17:21:19 +0000 (09:21 -0800)]
Remove XFLOATINT

* src/lisp.h (XFLOATINT): Remove this alias for extract_float.
All callers changed to use extract_float.
* src/frame.h (NUMVAL): Now an inline function, not a macro.

7 years agoFix rounding errors in <, =, etc.
Paul Eggert [Thu, 2 Mar 2017 17:11:11 +0000 (09:11 -0800)]
Fix rounding errors in <, =, etc.

* etc/NEWS: Document this.
* src/bytecode.c (exec_byte_code):
* src/data.c (arithcompare):
Do not lose information when comparing floats to integers.
* test/src/data-tests.el (data-tests-=, data-tests-<)
(data-tests->, data-tests-<=, data-tests->=):
Test this.

7 years agoFix display of mouse-highlight produced by overlapping overlays
Eli Zaretskii [Thu, 2 Mar 2017 15:46:25 +0000 (17:46 +0200)]
Fix display of mouse-highlight produced by overlapping overlays

* src/xfaces.c (face_at_buffer_position): If called to find the
mouse-face, only consider the highest-priority source for that
face, and ignore the rest.  Previously, all the mouse-face
definitions at POS were merged in that case.
* src/xdisp.c (note_mouse_highlight): Record the overlay that
specifies mouse-face _after_ clearing the info about the previous
overlay, so as not to clear the information about the just-recorded
overlay.  (Bug#25906)

7 years agoFix display of strike-through text in variable-height lines
Eli Zaretskii [Thu, 2 Mar 2017 15:37:18 +0000 (17:37 +0200)]
Fix display of strike-through text in variable-height lines

* src/nsterm.m (ns_draw_text_decoration):
* src/xterm.c (x_draw_glyph_string):
* src/w32term.c (x_draw_glyph_string): Fix calculation of the
strike-through y-coordinate for a glyph row which is taller than
the strike-through text.  (Bug#25907)

7 years agoDon't call x_net_wm_state for scroll bar windows (Bug#24963, Bug#25887)
Martin Rudalics [Thu, 2 Mar 2017 10:31:20 +0000 (11:31 +0100)]
Don't call x_net_wm_state for scroll bar windows (Bug#24963, Bug#25887)

* src/xterm.c (handle_one_xevent): For ConfigureNotify events
don't call x_net_wm_state when the window is a scroll bar window.
(Bug#24963, Bug#25887)

7 years agognus-summary-select-article-buffer: Don't re-render existing article
Katsumi Yamaoka [Thu, 2 Mar 2017 07:56:31 +0000 (07:56 +0000)]
gnus-summary-select-article-buffer: Don't re-render existing article

* lisp/gnus/gnus-sum.el (gnus-summary-select-article-buffer):
Don't re-render existing article.

7 years agoDon't add debbugs address to message body (bug#25896)
Katsumi Yamaoka [Thu, 2 Mar 2017 07:55:57 +0000 (07:55 +0000)]
Don't add debbugs address to message body (bug#25896)

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
Don't add debbugs address to message body (bug#25896), and
don't add it to message header either if it already exists.

7 years ago* lisp/cedet/semantic/db-global.el: Make dynbind use explicit
Stefan Monnier [Thu, 2 Mar 2017 07:23:45 +0000 (02:23 -0500)]
* lisp/cedet/semantic/db-global.el: Make dynbind use explicit

(semanticdb--ih): Declare.
(semanticdb-enable-gnu-global-databases): Use it instead of `ih'.
(semanticdb-enable-gnu-global-in-buffer, semanticdb-get-database-tables)
(semanticdb-find-tags-for-completion-method): Silence compiler warning.

7 years ago* lisp/help-fns.el (describe-variable): Use cl-print for the value
Stefan Monnier [Thu, 2 Mar 2017 07:08:08 +0000 (02:08 -0500)]
* lisp/help-fns.el (describe-variable): Use cl-print for the value

Use `pp-buffer' rather than `pp' so as to avoid calling prin1 twice.

7 years ago* test/lisp/net/puny.el: New file.
Glenn Morris [Thu, 2 Mar 2017 01:36:19 +0000 (20:36 -0500)]
* test/lisp/net/puny.el: New file.

7 years agoSmall puny.el fix
Glenn Morris [Thu, 2 Mar 2017 01:35:41 +0000 (20:35 -0500)]
Small puny.el fix

* lisp/net/puny.el (puny-decode-string-internal):
Handle strings with no ascii parts.  (Bug#23688)

7 years agoSmall recover-this-file improvement
Glenn Morris [Wed, 1 Mar 2017 23:29:48 +0000 (18:29 -0500)]
Small recover-this-file improvement

* lisp/files.el (recover-this-file): Explicit error if not
visiting a file.  (Bug#23671)

7 years agoFix for coding-system completion (bug#23670)
Glenn Morris [Wed, 1 Mar 2017 21:53:08 +0000 (16:53 -0500)]
Fix for coding-system completion (bug#23670)

* lisp/international/mule.el (read-buffer-file-coding-system):
Ensure that completion-pcm--delim-wild-regex is enclosed in parens,
so that completion-pcm--pattern->regex can append "*?".

7 years agoFix rounding error in ‘ceiling’ etc.
Paul Eggert [Wed, 1 Mar 2017 20:29:37 +0000 (12:29 -0800)]
Fix rounding error in ‘ceiling’ etc.

Without this fix, (ceiling most-negative-fixnum -1.0) returns
most-negative-fixnum instead of correctly signaling range-error,
and similarly for floor, round, and truncate.
* configure.ac (trunc): Add a check, since Gnulib’s doc says
‘trunc’ is missing from MSVC 9.  The Gnulib doc says ‘trunc’ is
also missing from some other older operating systems like Solaris
9 which I know we don’t care about any more, so MSVC is the only
reason to worry about ‘trunc’ here.
* src/editfns.c (styled_format): Formatting a float with %c is now an
error.  The old code did not work in general, because FIXNUM_OVERFLOW_P
had rounding errors.  Besides, the "if (FLOATP (...))" was in there
only as a result of my misunderstanding old code that I introduced
2011.  Although %d etc. is sometimes used on floats that represent
huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
happen with characters.
* src/floatfns.c (rounding_driver): Rework to do the right thing
when the intermediate result equals 2.305843009213694e+18, i.e.,
is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
Simplify so that only one section of code checks for overflow,
rather than two.
(double_identity): Remove.  All uses changed to ...
(emacs_trunc): ... this new function.  Add replacement for
platforms that lack ‘trunc’.
* src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
Make it clear that the arg cannot be floating point.
* test/src/editfns-tests.el (format-c-float): New test.
* test/src/floatfns-tests.el: New file, to test for this bug.

7 years agoSmall help--loaded-p fix
Glenn Morris [Wed, 1 Mar 2017 19:35:29 +0000 (14:35 -0500)]
Small help--loaded-p fix

* lisp/help-fns.el (help--loaded-p): Handle entry in load-history
with nil file name.  (Bug#25847)

7 years ago* src/fns.c (Fbuffer_hash): Doc fix.
Leo Liu [Thu, 16 Feb 2017 10:38:13 +0000 (18:38 +0800)]
* src/fns.c (Fbuffer_hash): Doc fix.

7 years agoDon't use mapconcat with chars in gnus registry marks (Bug#25839)
Eric Abrahamsen [Thu, 23 Feb 2017 01:26:11 +0000 (17:26 -0800)]
Don't use mapconcat with chars in gnus registry marks (Bug#25839)

* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
Instead, use a plain concat, which will create a string out of a list
of characters.

7 years agoFix epg-tests with dummy-pinentry program (Bug#23619)
Noam Postavsky [Wed, 22 Feb 2017 01:46:15 +0000 (20:46 -0500)]
Fix epg-tests with dummy-pinentry program (Bug#23619)

* test/data/epg/dummy-pinentry: New file.
* test/lisp/epg-tests.el (with-epg-tests): Add it to gpg-agent.conf
when a passphrase is required.  Add debug declaration.  Set
GPG_AGENT_INFO non-destructively.

7 years agoSpeed generation of ldefs-boot-auto
Phillip Lord [Mon, 27 Feb 2017 21:23:35 +0000 (21:23 +0000)]
Speed generation of ldefs-boot-auto

Previously, generation of ldefs-boot-auto required at least one full
bootstrap and, in extreme cases, two. Now, from build system, it
requires the same time as taken to dump Emacs.

* Makefile.in: Remove all calls, pass to src.
* admin/ldefs-clean.el: Update for changed messages.
* lisp/Makefile.in (compile-first-delete): Add.
* lisp/ldefs-boot-auto.el: Update.
* src/Makefile.in (generate-ldefs-boot): Add.

7 years agoAdd error handling to magic-mode-alist
Phillip Lord [Sat, 21 Jan 2017 16:43:38 +0000 (16:43 +0000)]
Add error handling to magic-mode-alist

* lisp/files.el (set-auto-mode): Add explicit error handling in two
  places.