]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoMinor change in NEWS.
Eli Zaretskii [Sat, 24 Jun 2017 18:10:04 +0000 (21:10 +0300)]
Minor change in NEWS.

7 years agoImprove documentation in NEWS.
Eli Zaretskii [Sat, 24 Jun 2017 17:11:56 +0000 (20:11 +0300)]
Improve documentation in NEWS.

7 years agoMove additional hscrolling code into a suitable 'if'
Eli Zaretskii [Sat, 24 Jun 2017 16:40:41 +0000 (19:40 +0300)]
Move additional hscrolling code into a suitable 'if'

* src/xdisp.c (hscroll_window_tree): Make additional calculations
regarding glyphs produced for line numbers conditional on
line-number display.

7 years agoPartial fix of hscroll of truncated lines with line numbers
Eli Zaretskii [Sat, 24 Jun 2017 16:03:39 +0000 (19:03 +0300)]
Partial fix of hscroll of truncated lines with line numbers

* src/xdisp.c (x_produce_glyphs, hscroll_window_tree): Adjust
hscroll calculations to line-number display.
* src/term.c (produce_glyphs): Adjust tab stop to window's
hscroll.  These two changes fix horizontal scrolling when line
numbers are displayed.  But there's still a bug: the horizontal
shift of lines that begin with a TAB is different from the rest.
* src/xdisp.c (move_it_in_display_line_to): Call
should_produce_line_number to determine whether a line number
should be produced for this screen line.

7 years agoAllow Lisp program to disable line-number display for specific lines
Eli Zaretskii [Sat, 24 Jun 2017 13:58:01 +0000 (16:58 +0300)]
Allow Lisp program to disable line-number display for specific lines

* etc/NEWS: Update the documentation.

* src/xdisp.c (syms_of_xdisp) <display-line-numbers-disable>: New
symbol.
(should_produce_line_number): New function.
(display_line): Use should_produce_line_number to determine
whether a line number should be produced for each glyph row.

7 years agoSupport a separate face for displaying the current line's number
Eli Zaretskii [Sat, 24 Jun 2017 12:45:23 +0000 (15:45 +0300)]
Support a separate face for displaying the current line's number

* lisp/faces.el (line-number-current-line): New face.

* src/xdisp.c (syms_of_xdisp) <line-number-current-line>: New
symbol.
(try_window_id, try_cursor_movement): Disable these optimizations
when the line-number-current-line face is different from
line-number face.
(maybe_produce_line_number): Display the current line in the
line-number-current-line face, if it's different from line-number.

7 years agoChange display of current line in relative mode
Eli Zaretskii [Sat, 24 Jun 2017 12:15:02 +0000 (15:15 +0300)]
Change display of current line in relative mode

* src/xdisp.c (maybe_produce_line_number): In relative mode
display the current line number as its absolute value, not as zero.

7 years agoRename display-line-width
Eli Zaretskii [Sat, 24 Jun 2017 11:53:35 +0000 (14:53 +0300)]
Rename display-line-width

* etc/NEWS:
* src/xdisp.c (syms_of_xdisp, maybe_produce_line_number):
* lisp/cus-start.el: Rename display-line-width to
display-line-number-width.

7 years agoFix tab stops when line numbers are displayed
Eli Zaretskii [Sat, 24 Jun 2017 11:29:32 +0000 (14:29 +0300)]
Fix tab stops when line numbers are displayed

* src/xdisp.c (x_produce_glyphs):
* src/term.c (produce_glyphs): Adjust tab stops for the horizontal
space taken by the line-number display.

7 years agoFix crashes on TTY frames due to negative lnum_width.
Eli Zaretskii [Sat, 24 Jun 2017 10:26:01 +0000 (13:26 +0300)]
Fix crashes on TTY frames due to negative lnum_width.

7 years agoDon't display line numbers in the minibuffer and in tooltip frames.
Eli Zaretskii [Sat, 24 Jun 2017 10:01:30 +0000 (13:01 +0300)]
Don't display line numbers in the minibuffer and in tooltip frames.

7 years agoFix problems with line-number updates in Follow mode
Eli Zaretskii [Sat, 24 Jun 2017 09:37:30 +0000 (12:37 +0300)]
Fix problems with line-number updates in Follow mode

* src/xdisp.c (redisplay_window): If forced window-start requires
to move a window's point, and the window is under relative
line-number display, force another round of redisplay to update
the relative line numbers.  This fixes follow-mode "redisplay" of
its window group.

* lisp/frame.el: Add display-line-numbers to the list of variables
that should trigger redisplay of the current buffer.

7 years agoFix display of line numbers with fonts larger than the default
Eli Zaretskii [Sat, 24 Jun 2017 08:34:52 +0000 (11:34 +0300)]
Fix display of line numbers with fonts larger than the default

* src/xdisp.c (maybe_produce_line_number): Update the metrics in
IT, not in IT->glyph_row, since the latter gets overwritten in
display_line.  Fixes display of line numbers when the font used
for them is larger than that of the default face.

7 years agoFix background color beyond EOB and cursor display
Eli Zaretskii [Fri, 23 Jun 2017 15:13:53 +0000 (18:13 +0300)]
Fix background color beyond EOB and cursor display

* src/xdisp.c:  (maybe_produce_line_number): Use the default face
for background of the blank glyphs in the line-number area which
are drawn beyond EOB.
(display_line): Reset the glyph row's displays_text_p flag only on
empty lines that don't display line numbers.  This fixes cursor
display beyond EOB.  Fix the bidi information in the glyphs
produced for line numbers.  Set the avoid_cursor_p flag of glyphs
produced for line numbers.

7 years agoFix display of indicate-empty-lines when line numbers are displayed
Eli Zaretskii [Fri, 23 Jun 2017 14:13:01 +0000 (17:13 +0300)]
Fix display of indicate-empty-lines when line numbers are displayed

* src/xdisp.c (row_text_area_empty): New function.
(display_line): Call row_text_area_empty to verify that a glyph
row's text area is devoid of any glyphs that came from a buffer or
a string.  This fixes a bug with empty-lines indication
disappearing when line numbers or line-prefix are displayed.
(display_line): Delete the argument FORCE; all callers changed.
Remove the condition for actually producing the glyphs for the
line number, as even if the number didn't change we need to
produce empty space.

7 years agoFinish up native display of line numbers
Eli Zaretskii [Sat, 17 Jun 2017 14:42:44 +0000 (17:42 +0300)]
Finish up native display of line numbers

* src/xdisp.c (maybe_produce_line_number): Produce a blank before
the number, for R2L rows.  Increment 'g' in the loop even if
glyph_row is NULL.  Accept 2nd argument FORCE and produce the
line-number glyphs if it is non-zero.
(move_it_in_display_line_to): Account for the space taken by the
line-number glyphs.  Call maybe_produce_line_number with 2nd
argument non-zero.
(set_cursor_from_row): Fix calculation of cursor X coordinate in
R2L rows with display-produced glyphs at the beginning.
(syms_of_xdisp) <line-number>: New face symbol.
<relative, display-line-width>: New symbols.
(maybe_produce_line_number): Use the line-number face for
displaying line numbers.  Support relative line-number display.
Support user-defined width for displaying line numbers.
(try_cursor_movement, try_window_id): Disable these optimizations
when displaying relative line numbers.
* src/dispextern.h (struct it): New member 'pt_lnum'.

* lisp/faces.el (line-number): New face.
* lisp/cus-start.el (standard): Provide customization forms for
display-line-numbers and display-line-width.
* lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
turn display-line-numbers on and off.

* etc/NEWS: Document the new feature.

7 years agoInitial version of native display of line numbers
Eli Zaretskii [Fri, 16 Jun 2017 19:44:48 +0000 (22:44 +0300)]
Initial version of native display of line numbers

* src/xdisp.c (syms_of_xdisp) <display-line-numbers>: New
buffer-local variable.
Include <math.h>.
(maybe_produce_line_number): New function.
(DISP_INFINITY): Rename from INFINITY, since math.h defines INFINITY.
(try_window_reusing_current_matrix): Don't use this method when
display-line-numbers is in effect.
* src/dispextern.h (struct it): New members 'lnum'.

7 years agoCreate a toggle between block and line comments in CC Mode.
Alan Mackenzie [Thu, 15 Jun 2017 20:47:11 +0000 (20:47 +0000)]
Create a toggle between block and line comments in CC Mode.

Also (unrelated change) initialize the modes' keymaps at each loading.

* lisp/progmodes/cc-cmds.el (c-update-modeline): amend for the new information
on the modeline.
(c-block-comment-flag): New variable.
(c-toggle-comment-style): New function.

* lisp/progmodes/cc-langs.el (c-block-comment-starter)
(c-line-comment-starter): Make them c-lang-defvars.
(c-block-comment-is-default): New c-lang-defvar.
(comment-start, comment-end): Make the default values dependent on
c-block-comment-is-default.

* lisp/progmodes/cc-mode.el (c-mode-base-map): Define C-c C-k in this map.
(c-basic-common-init): Initialize c-block-comment-flag.
(c-mode-map, c++-mode-map, objc-mode-map, java-mode-map, idl-mode-map)
(pike-mode-map, awk-mode-map): Make entries in these key maps each time the
mode is loaded rather than just once per Emacs session.

* doc/misc/cc-mode.texi (Comment Commands): Introduce the notion of comment
style.
(Minor Modes): Define comment style.  Describe how comment style influences
the information displayed on the modeline.  Document c-toggle-comment-style.
(FAQ): Add a question about toggling the comment style.

7 years agoPacify clang without munging C source
Paul Eggert [Thu, 15 Jun 2017 20:29:04 +0000 (13:29 -0700)]
Pacify clang without munging C source

* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.

7 years agoNo need to complicate make-docfile.c for Clang
Paul Eggert [Thu, 15 Jun 2017 19:34:00 +0000 (12:34 -0700)]
No need to complicate make-docfile.c for Clang

* lib-src/make-docfile.c (put_filename): Undo recent change.
The Clang false alarm occurs only with CFLAGS=-save-temps and
we needn’t worry about pacifying unusual compiler configurations.

7 years agoPort './configure CC=clang' to Fedora 25
Paul Eggert [Thu, 15 Jun 2017 18:25:23 +0000 (11:25 -0700)]
Port './configure CC=clang' to Fedora 25

* configure.ac (HAVE_IMAGEMAGICK): Disable if even a
standard function like MagickRelinquishMemory does not link.

7 years agoDon’t worry about __STDC_VERSION__ in emacs-module
Paul Eggert [Thu, 15 Jun 2017 17:33:10 +0000 (10:33 -0700)]
Don’t worry about __STDC_VERSION__ in emacs-module

* src/emacs-module.h: Remove __STDC_VERSION__ check.  In the past
we’ve found that some compilers do not define this symbol even
when they work well enough.  If necessary features like stdbool.h
are missing the compiler will complain eventually anyway.

7 years agoPort cleanup check to Oracle Studio 12.5
Paul Eggert [Wed, 14 Jun 2017 18:01:02 +0000 (11:01 -0700)]
Port cleanup check to Oracle Studio 12.5

* src/conf_post.h (__has_attribute_cleanup): Resurrect.
* src/emacs-module.c: Verify __has_attribute (cleanup), but in an
#if this time.

7 years agoFix misformatted changelog entry
Bastien [Wed, 14 Jun 2017 16:54:38 +0000 (18:54 +0200)]
Fix misformatted changelog entry

7 years agoAvoid compiler warning in image.c on MS-Windows
Eli Zaretskii [Wed, 14 Jun 2017 16:09:21 +0000 (19:09 +0300)]
Avoid compiler warning in image.c on MS-Windows

* src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
compilation warning under -Warray-bounds by temporarily disabling
the -Warray-bounds option.

7 years agoFix Bug#27315
Michael Albinus [Wed, 14 Jun 2017 12:17:22 +0000 (14:17 +0200)]
Fix Bug#27315

* lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
New defvar.
(top): Use it.

* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Check for connected, not for connectable.  (Bug#27315)
(tramp-process-actions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Use `tramp-cache-read-persistent-data'.

* test/lisp/net/tramp-tests.el (top): Set also
`tramp-cache-read-persistent-data'.

7 years agoGive a fixed default value for icomplete-prospects-height (Bug#26939)
Noam Postavsky [Mon, 5 Jun 2017 23:18:14 +0000 (19:18 -0400)]
Give a fixed default value for icomplete-prospects-height (Bug#26939)

* lisp/icomplete.el (icomplete-prospects-height): Default to 2.
(icomplete-prospects-length): Remove.
* etc/NEWS: Announce removal.

7 years agoRemove some tautological comparisons involving rlim_t
Philipp Stephani [Wed, 14 Jun 2017 10:35:58 +0000 (12:35 +0200)]
Remove some tautological comparisons involving rlim_t

Clang on macOS warns about these with -Wtautological-compare.  POSIX
guarantees that rlim_t is
unsigned (cf.
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html),
so these resource limits can never be negative.

* src/emacs.c (main): Remove tautological comparisons.

7 years agoUse --module-assertions if modules are available
Philipp Stephani [Wed, 14 Jun 2017 10:18:36 +0000 (12:18 +0200)]
Use --module-assertions if modules are available

Using --module-assertions helps us find bugs in the test module.  But
we can use it only if Emacs was compiled with module support.

* test/Makefile.in (MODULES_EMACSOPT): New variable.
(emacs): Use it.

7 years agoDefine --module-assertions only of modules are available
Philipp Stephani [Wed, 14 Jun 2017 08:46:45 +0000 (10:46 +0200)]
Define --module-assertions only of modules are available

Fixes Bug#27352.

* src/emacs.c (usage_message, standard_args): Define
--module-assertions only if Emacs has been compiled with module
support.

7 years ago; Fix typo in INSTALL
Michael Albinus [Wed, 14 Jun 2017 07:08:45 +0000 (09:08 +0200)]
; Fix typo in INSTALL

7 years agognus-article-read-summary-keys: Don't move point for WDD and WDW commands
Katsumi Yamaoka [Wed, 14 Jun 2017 05:35:39 +0000 (05:35 +0000)]
gnus-article-read-summary-keys: Don't move point for WDD and WDW commands

* lisp/gnus/gnus-art.el (gnus-article-read-summary-keys):
No need to restore window config for WDD and WDW commands.

7 years agolisp/net/soap-client.el: Bump version to 3.1.3
Thomas Fitzsimmons [Wed, 14 Jun 2017 00:56:25 +0000 (20:56 -0400)]
lisp/net/soap-client.el: Bump version to 3.1.3

* lisp/net/soap-client.el: Bump version to 3.1.3.
(soap-name-p): Fix checkdoc issue.

7 years agoFix an HTTP encoding error in soap-client.el
Alex Harsanyi [Wed, 14 Jun 2017 00:49:59 +0000 (20:49 -0400)]
Fix an HTTP encoding error in soap-client.el

* lisp/net/soap-client.el (soap-invoke-internal): Make
SOAPAction header a UTF-8 encoded string.

7 years agoPort cleanup attribute to Oracle Studio 12.5
Paul Eggert [Wed, 14 Jun 2017 01:19:30 +0000 (18:19 -0700)]
Port cleanup attribute to Oracle Studio 12.5

* INSTALL (--with-modules): List cleanup attribute as prereq.
* src/conf_post.h (__has_attribute_cleanup): Remove; no longer needed.
* src/emacs-module.c (MODULE_SETJMP_1): Don’t attempt to verify
(__has_attribute (cleanup)), as Oracle Studio 12.5 supports
__has_attribute only inside preprocessor expressions.  The C
compiler should check the cleanup attribute in the next line anyway.
(module_reset_handlerlist): Remove an unnecessary ‘const’
that causes Oracle Studio 12.5 to refuse to compile.

7 years agoFix running tests in without-modules builds
Glenn Morris [Tue, 13 Jun 2017 22:53:38 +0000 (18:53 -0400)]
Fix running tests in without-modules builds

* test/Makefile.in (EMACSOPT): Remove option that is only defined
with-modules.  emacs-module-tests.el passes it where needed.

7 years ago* test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.
Glenn Morris [Tue, 13 Jun 2017 19:41:56 +0000 (15:41 -0400)]
* test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.

7 years agoInline test module Makefile into main test Makefile
Philipp Stephani [Tue, 13 Jun 2017 18:46:03 +0000 (20:46 +0200)]
Inline test module Makefile into main test Makefile

The test/data/emacs-module/Makefile only built a single target, and
inlining it into test/Makefile simplifies dependency tracking and
reduces code duplication.

* configure.ac: Don't build test/data/emacs-module/Makefile.

* Makefile.in ($(test_module)): Inline compilation.
(clean): Also clean test module outputs.

7 years ago* lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not handle locally on w32.
Michael Albinus [Tue, 13 Jun 2017 13:54:09 +0000 (15:54 +0200)]
* lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not handle locally on w32.

7 years agoMinor tweaks in Tramp manual
Michael Albinus [Tue, 13 Jun 2017 13:20:43 +0000 (15:20 +0200)]
Minor tweaks in Tramp manual

* doc/misc/trampver.texi: Add prefixwithspace flag.

* doc/misc/tramp.texi (Password handling): Harmonize example.
(File name completion): Use prefixwithspace flag.
(Frequently Asked Questions): Explain `tramp-histfile-override'.

7 years agoSilence two Clang warnings by introducing additional local variables
Philipp Stephani [Tue, 13 Jun 2017 11:55:44 +0000 (13:55 +0200)]
Silence two Clang warnings by introducing additional local variables

* lib/strftime.c (libc_hidden_def):
* lib-src/make-docfile.c (put_filename): Introduce local variables to
silence Clang warnings.

7 years agoFix wrong indentation after string literal (Bug#27306)
Noam Postavsky [Sat, 10 Jun 2017 13:50:48 +0000 (09:50 -0400)]
Fix wrong indentation after string literal (Bug#27306)

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-state)
(lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-region-after-string-literal): New test.

7 years agoFix version checks for emacs-module.h
Philipp Stephani [Tue, 13 Jun 2017 07:53:33 +0000 (09:53 +0200)]
Fix version checks for emacs-module.h

We don't need C11 or C++11 because stdbool.h is in C99, and for C++ we
don't need it at all.

7 years ago; Fix docstring
Lele Gaifax [Tue, 13 Jun 2017 05:31:53 +0000 (14:31 +0900)]
; Fix docstring

* lisp/bindings.el (mode-line-percent-position):
End docstring first sentence with a period (Bug#27339).

Copyright-paperwork-exempt: yes

7 years agoButtonize #<bytecode> part of printed functions (Bug#25226)
Noam Postavsky [Sun, 11 Jun 2017 13:49:44 +0000 (09:49 -0400)]
Buttonize #<bytecode> part of printed functions (Bug#25226)

* lisp/emacs-lisp/cl-print.el: Autoload `disassemble-1'.
(cl-print-compiled-button): New variable.
(help-byte-code): New button type, calls `disassemble' in its action.
(cl-print-object): Use it if `cl-print-compiled-button' is
non-nil.

7 years agoPrint module structure sizes when initializing test module
Philipp Stephani [Mon, 12 Jun 2017 21:45:18 +0000 (23:45 +0200)]
Print module structure sizes when initializing test module

* test/data/emacs-module/mod-test.c (emacs_module_init): Print
compile-time and runtime sizes of module structures to ease debugging

7 years agoSmall portability fix for emacs-module.h (bug#27346)
Glenn Morris [Mon, 12 Jun 2017 21:43:28 +0000 (17:43 -0400)]
Small portability fix for emacs-module.h (bug#27346)

* src/emacs-module.h (EMACS_ATTRIBUTE_NONNULL) [!__has_attribute]:
Avoid 'error: missing binary operator before token "("'.

7 years agoGive a more informative failure in module assertion test
Glenn Morris [Mon, 12 Jun 2017 21:37:30 +0000 (17:37 -0400)]
Give a more informative failure in module assertion test

* test/src/emacs-module-tests.el (module--test-assertions):
Rephrase final check to give a more informative failure.

7 years agoFix off-by-one error
Philipp Stephani [Mon, 12 Jun 2017 21:35:23 +0000 (23:35 +0200)]
Fix off-by-one error

* test/data/emacs-module/mod-test.c (emacs_module_init): Fix
off-by-one error.

7 years agoClean up after module assertion tests
Glenn Morris [Mon, 12 Jun 2017 21:31:25 +0000 (17:31 -0400)]
Clean up after module assertion tests

* test/src/emacs-module-tests.el (module--test-assertions):
Use a temporary directory to contain any core dumps.

7 years agoSmall improvement for module assertion test
Glenn Morris [Mon, 12 Jun 2017 21:17:20 +0000 (17:17 -0400)]
Small improvement for module assertion test

* test/src/emacs-module-tests.el (module--test-assertions):
Don't rely on the precise form of an "Abort" message.

7 years agoImprove previous test/data/emacs-module/Makefile change
Glenn Morris [Mon, 12 Jun 2017 20:52:49 +0000 (16:52 -0400)]
Improve previous test/data/emacs-module/Makefile change

* test/data/emacs-module/Makefile.in (clean):
Avoid doing unpleasant things if run in a build without modules.

7 years agoSmall improvements for test/data/emacs-module/Makefile
Glenn Morris [Mon, 12 Jun 2017 20:35:39 +0000 (16:35 -0400)]
Small improvements for test/data/emacs-module/Makefile

* test/data/emacs-module/Makefile.in (%.o):
Fix emacs-module dependency.
(SECONDARY): Stop make automatically deleting *.o.
(clean): New rule.

7 years ago* make-dist: Skip some more generated files in test/.
Glenn Morris [Mon, 12 Jun 2017 17:53:38 +0000 (13:53 -0400)]
* make-dist: Skip some more generated files in test/.

7 years agoNote how fullscreen differs on the NS port
Alan Third [Mon, 12 Jun 2017 17:26:23 +0000 (18:26 +0100)]
Note how fullscreen differs on the NS port

doc/lispref/frames.texi (Size Parameters):
doc/emacs/frames.texi (Tool Bars): Add a description of how macOS
hides the tool-bar and menu-bar in fullscreen.

7 years agoAdd no-focus-on-map to NS build (bug#25408)
Alan Third [Sun, 11 Jun 2017 16:07:28 +0000 (17:07 +0100)]
Add no-focus-on-map to NS build (bug#25408)

* src/nsfns.m (ns_frame_parm_handlers): Add x_set_no_focus_on_map.
(x-create-frame): Check for no-focus-on-map.
* src/nsterm.h (x_set_no_focus_on_map): New function.
* src/nsterm.m (x_set_no_focus_on_map): New function.
(ns_raise_frame): Add parameter for specifying whether to focus the
frame.
(ns_frame_raise_lower):
(x_make_frame_visible): Handle new parameter for ns_raise_frame.

7 years ago_Noreturn not noreturn
Paul Eggert [Mon, 12 Jun 2017 17:38:27 +0000 (10:38 -0700)]
_Noreturn not noreturn

_Noreturn is more portable to non-C11 platforms.  See:
https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
* src/emacs-module.c: Use _Noreturn, not noreturn.  No need to
include <stdnoreturn.h>.  Reindent to fit in 80 columns.

7 years agoUpdate make-dist for recent test/ changes
Glenn Morris [Mon, 12 Jun 2017 16:33:37 +0000 (12:33 -0400)]
Update make-dist for recent test/ changes

* make-dist: No longer distribute test/data/emacs-module/Makefile.

7 years ago; Instrument `tramp-handle-file-name-case-insensitive-p' for debugging
Michael Albinus [Mon, 12 Jun 2017 15:54:53 +0000 (17:54 +0200)]
; Instrument `tramp-handle-file-name-case-insensitive-p' for debugging

7 years agoHandle port and domain in Tramp's password cache
Michael Albinus [Mon, 12 Jun 2017 15:52:42 +0000 (17:52 +0200)]
Handle port and domain in Tramp's password cache

* doc/misc/tramp.texi (Password handling): Explain port and
domain handling in authinfo.

* lisp/net/tramp.el (tramp-process-actions, tramp-clear-passwd):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askpassword):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection): Handle also domain and port.

7 years agoAvoid compilation warnings with pre-C99 libc
Eli Zaretskii [Mon, 12 Jun 2017 15:04:04 +0000 (18:04 +0300)]
Avoid compilation warnings with pre-C99 libc

* src/emacs-module.c (module_free_global_ref)
(module_assert_runtime, module_assert_env, value_to_lisp): Use 'pD'
instead of C99 't' format descriptor.

7 years agoFlush all output streams before aborting
Philipp Stephani [Mon, 12 Jun 2017 14:39:15 +0000 (16:39 +0200)]
Flush all output streams before aborting

Maybe the stdout buffer still contains something interesting that
should be flushed.

* src/emacs-module.c (module_abort): Flush all output streams before
aborting.

7 years agoRemove an assertion that doesn't test Emacs invariants
Philipp Stephani [Mon, 12 Jun 2017 14:37:45 +0000 (16:37 +0200)]
Remove an assertion that doesn't test Emacs invariants

* src/emacs-module.c (module_copy_string_contents): Remove an
assertion that doesn't test Emacs invariants.

7 years agoTest module: add necessary version checks
Philipp Stephani [Mon, 12 Jun 2017 14:28:16 +0000 (16:28 +0200)]
Test module: add necessary version checks

* test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
version checks.

7 years agoUse additional CFLAGS from configure
Philipp Stephani [Mon, 12 Jun 2017 14:18:01 +0000 (16:18 +0200)]
Use additional CFLAGS from configure

7 years agoUse Autoconf to generate the test module Makefile
Philipp Stephani [Mon, 12 Jun 2017 14:09:37 +0000 (16:09 +0200)]
Use Autoconf to generate the test module Makefile

This makes it easier to pass compilation flags around.

* configure.ac: Also build test module Makefile.

* test/data/emacs-module/Makefile.in: New makefile template.

* test/Makefile.in ($(test_module)): No longer necessary to pass
@MODULES_SUFFIX@ around.

* .gitignore: Test module Makefile can now be ignored.

7 years agoAlso compile test module as C11
Philipp Stephani [Mon, 12 Jun 2017 13:27:18 +0000 (15:27 +0200)]
Also compile test module as C11

* test/data/emacs-module/Makefile (CFLAGS): Compile test module as C11

7 years agoImplement module assertions for users
Philipp Stephani [Mon, 5 Jun 2017 11:29:14 +0000 (13:29 +0200)]
Implement module assertions for users

Add a new command-line option '-module-assertions' that users can
enable developing or debugging a module.  If this option is present,
Emacs performs additional checks to verify that modules fulfill their
requirements.  These checks are expensive and crash Emacs if modules
are invalid, so disable them by default.

This is a command-line option instead of an ordinary variable because
changing it while Emacs is running would cause data structure
imbalances.

* src/emacs.c (main): New command line option '-module-assertions'.

* src/emacs-module.c (module_assert_main_thread)
(module_assert_runtime, module_assert_env, module_assert_value):
New functions to assert module requirements.
(syms_of_module): New uninterned variable 'module-runtimes'.
(init_module_assertions, in_main_thread, module_abort): New helper
functions.
(initialize_environment): Initialize value list.  If assertions are
enabled, use a heap-allocated environment object.
(finalize_environment): Add assertion that environment list is never
empty.
(finalize_runtime_unwind): Pop module runtime object stack.
(value_to_lisp): Assert that the value is valid.
(lisp_to_value): Record new value if assertions are enabled.
(mark_modules): Mark allocated object list.
(MODULE_FUNCTION_BEGIN_NO_CATCH)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw): Assert thread and environment.
(module_get_environment): Assert thread and runtime.
(module_make_function, module_funcall, module_intern)
(module_funcall, module_make_integer, module_make_float)
(module_make_string, module_make_user_ptr, module_vec_get)
(funcall_module, Fmodule_load): Adapt callers.
(module_make_global_ref): If assertions are enabled, use the global
environment to store global values.
(module_free_global_ref): Remove value from global value list.

* test/Makefile.in (EMACSOPT): Enable module assertions when testing
modules.

* test/data/emacs-module/mod-test.c (Fmod_test_invalid_store)
(Fmod_test_invalid_load): New functions to test module assertions.
(emacs_module_init): Bind the new functions.

* test/src/emacs-module-tests.el (mod-test-emacs): New constant for
the Emacs binary file.
(mod-test-file): New constant for the test module file name.
(module--test-assertions): New unit test.

7 years agoemacs-module: Use __attribute__((nonnull))
Philipp Stephani [Mon, 12 Jun 2017 08:57:39 +0000 (10:57 +0200)]
emacs-module: Use __attribute__((nonnull))

Annotate all parameters with __attribute__((nonnull)) that may not be
NULL.

7 years agoExplicitly require C11 or C++11 in emacs-module.h
Philipp Stephani [Mon, 12 Jun 2017 08:54:29 +0000 (10:54 +0200)]
Explicitly require C11 or C++11 in emacs-module.h

We already implicitly require them by including stdbool.h.  Just make
the error message a bit clearer, and remove an unnecessary version
comparison.

7 years agoAdd missing 'require' forms to prevent compiler warnings.
Philipp Stephani [Mon, 12 Jun 2017 08:01:25 +0000 (10:01 +0200)]
Add missing 'require' forms to prevent compiler warnings.

* lisp/eshell/esh-ext.el (esh-arg, esh-proc): Add missing
requirements.

7 years agoMerge from gnulib
Paul Eggert [Mon, 12 Jun 2017 00:29:21 +0000 (17:29 -0700)]
Merge from gnulib

This incorporates:
2017-06-11 getopt-posix: port to glibc 2.25.90
2017-06-04 same-inode: port better to VMS 8.2 and later
* doc/misc/texinfo.tex, lib/getopt-pfx-core.h, lib/getopt-pfx-ext.h:
* m4/sys_types_h.m4: Copy from gnulib.

7 years agoRemove Lisp_Misc_Float
Paul Eggert [Mon, 12 Jun 2017 00:05:03 +0000 (17:05 -0700)]
Remove Lisp_Misc_Float

* src/data.c (Ftype_of): Do not worry about Lisp_Misc_Float.
* src/lisp.h (Lisp_Misc_Float): Remove.  This placeholder has been
unused for two decades; if we ever want to change floats to be a
misc type we can bring it back then.

7 years agoMake two symbols private to emacs-module.c
Paul Eggert [Mon, 12 Jun 2017 00:02:10 +0000 (17:02 -0700)]
Make two symbols private to emacs-module.c

* src/lisp.h (allocate_module_function, XSET_MODULE_FUNCTION):
Move from here ...
* src/emacs-module.c: ... to here.

7 years agoMerge from origin/emacs-25
Glenn Morris [Sun, 11 Jun 2017 23:20:41 +0000 (16:20 -0700)]
Merge from origin/emacs-25

da62c1532e4 (origin/emacs-25) Improve the documentation of filesets

7 years ago; Merge from origin/emacs-25
Glenn Morris [Sun, 11 Jun 2017 23:20:41 +0000 (16:20 -0700)]
; Merge from origin/emacs-25

The following commits were skipped:

16ef7539cb3 Don't advertise s_client in tls.el docs
94a6c964a45 Remove s_client usage from tls.el

7 years agoMerge from origin/emacs-25
Glenn Morris [Sun, 11 Jun 2017 23:20:41 +0000 (16:20 -0700)]
Merge from origin/emacs-25

e80f6a210b0 Describe problems with Microsoft Intellipoint
a73ec1edb07 More accurate documentation of the ':box' face attribute

7 years ago; Merge from origin/emacs-25
Glenn Morris [Sun, 11 Jun 2017 23:20:40 +0000 (16:20 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

50b4f85720a ; Bump Emacs version past 25.2

7 years agoMerge from origin/emacs-25
Glenn Morris [Sun, 11 Jun 2017 23:20:40 +0000 (16:20 -0700)]
Merge from origin/emacs-25

eaa00584ceb Improve documentation of 'gnutls-verify-error'
908498cc01b ; etc/PROBLEMS: Describe GTK-related crashes on elementar...
741daec617e ; Describe the problem with ksh when resizing shell window

7 years agoSome further improvements for tramp-gvfs.el
Michael Albinus [Sun, 11 Jun 2017 21:16:13 +0000 (23:16 +0200)]
Some further improvements for tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes)
(tramp-gvfs-maybe-open-connection): Handle davs? properly.
(tramp-gvfs-handler-askquestion): Improve `yes-or-no-p' prompt.
Show question also in batch mode.  Cache result.

* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Support completion for host names and ports.

7 years agoFix highlighting of CSS selectors with double hyphens
Simen Heggestøyl [Sun, 11 Jun 2017 15:41:09 +0000 (17:41 +0200)]
Fix highlighting of CSS selectors with double hyphens

* lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix
highlighting of selectors that contain double hyphens.  They would be
mistaken for a variable.

7 years agoSupport threads in modules
Philipp Stephani [Sat, 22 Apr 2017 14:51:44 +0000 (16:51 +0200)]
Support threads in modules

Rather than checking for the main thread, check for the current
thread.

* emacs-module.c (check_thread): New function.
(MODULE_FUNCTION_BEGIN_NO_CATCH, module_get_environment)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw, module_is_not_nil, module_eq): Use it.

7 years agoAllow non-local exits in module initializers
Philipp Stephani [Sun, 11 Jun 2017 12:50:20 +0000 (14:50 +0200)]
Allow non-local exits in module initializers

Previously signals, throws, and quits from module initialization
functions were ignored.  These function aren't special, and better
errors can be reported using signals than with the initialization
return code, so allow non-local exits.

* src/emacs-module.c (module_signal_or_throw): New helper function.
(Fmodule_load, funcall_module): Use it.
(Fmodule_load): Also allow quitting.

7 years agoLet eshell/sudo handle absolute command names (Bug#27167)
Noam Postavsky [Wed, 7 Jun 2017 22:48:39 +0000 (18:48 -0400)]
Let eshell/sudo handle absolute command names (Bug#27167)

* lisp/eshell/esh-ext.el (eshell-find-interpreter): Don't change
absolute paths into relative ones.

7 years agoDon't wait for toolbar in NS native fullscreen
Alan Third [Sat, 10 Jun 2017 21:44:01 +0000 (22:44 +0100)]
Don't wait for toolbar in NS native fullscreen

* src/nsterm.m (EmacsView:updateFrameSize): Don't short-circuit the
function when in fullscreen.

7 years ago; Spelling fixes
Paul Eggert [Sat, 10 Jun 2017 18:44:27 +0000 (11:44 -0700)]
; Spelling fixes

7 years agoFix the placement of GTK menus on multi-monitor systems
Alexander Gramiak [Sat, 10 Jun 2017 09:28:03 +0000 (12:28 +0300)]
Fix the placement of GTK menus on multi-monitor systems

menu_position_func did not properly use the current monitor's
resolution.  Also see commit '2016-02-06 22:12:53 +0100'.

* lisp/frame.el (frame-monitor-attribute, frame-monitor-geometry)
(frame-monitor-workarea): New functions.

* src/xmenu.c (menu_position_func): Take into account the workarea of
the monitor that contains the mouse.  (Bug#23568)

7 years agoClarify documentation of 'face-spec-set'
Eli Zaretskii [Sat, 10 Jun 2017 09:08:45 +0000 (12:08 +0300)]
Clarify documentation of 'face-spec-set'

* lisp/faces.el (face-spec-set): Clarify the description of
SPEC-TYPE in the doc string.

* doc/lispref/display.texi (Defining Faces): Clarify the
description of 'face-spec-set's SPEC-TYPE argument.  (Bug#27246)

7 years agoFix domain port and handling in tramp-gvfs.el
Michael Albinus [Sat, 10 Jun 2017 08:57:19 +0000 (10:57 +0200)]
Fix domain port and handling in tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
Return nil if BYTE-ARRAY is nil.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Fix domain and port handling.

* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Ignore errors.

7 years agoImprove documentation of 'face-spec-set-2'
Eli Zaretskii [Sat, 10 Jun 2017 08:39:59 +0000 (11:39 +0300)]
Improve documentation of 'face-spec-set-2'

* lisp/faces.el (face-spec-recalc, face-spec-set-2): Rename 'spec'
to 'face-attrs'.
(face-spec-choose, face-spec-set-2): Doc fix.  (Bug#27238)

7 years agoFix handling of Python/Guile commands with arguments in gdb-mi.el
Eli Zaretskii [Sat, 10 Jun 2017 08:29:58 +0000 (11:29 +0300)]
Fix handling of Python/Guile commands with arguments in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-python-guile-commands-regexp): New
variable.
(gdb-control-commands-regexp): Use it.
(gdb-send): Don't increment gdb-control-level if the command
matches gdb-python-guile-commands-regexp and has non-empty
arguments.  Reported by David Boles <boles@ieee.org> in
http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00009.html.

7 years agoPreserve point in Dired windows under 'dired-auto-revert-buffer'
Eli Zaretskii [Sat, 10 Jun 2017 08:22:50 +0000 (11:22 +0300)]
Preserve point in Dired windows under 'dired-auto-revert-buffer'

* lisp/dired.el (dired-find-file): When dired-auto-revert-buffer
is non-nil, bind switch-to-buffer-preserve-window-point to nil
while calling find-file.  (Bug#27243)

7 years agoGive test files a -tests.el suffix
Philipp Stephani [Fri, 19 May 2017 08:58:58 +0000 (10:58 +0200)]
Give test files a -tests.el suffix

Rename a couple of test files that have the same name as the library
they test.  This harmonizes the naming pattern and makes it possible
to have the tests directories in the load path.

7 years agoFix another compiler warning on macOS
Philipp Stephani [Thu, 8 Jun 2017 23:27:39 +0000 (01:27 +0200)]
Fix another compiler warning on macOS

* src/image.c (x_query_frame_background_color): Don't define if we
have NextStep but no image support.

7 years agoAdd garbage collection support for module environments
Philipp Stephani [Thu, 8 Jun 2017 23:25:47 +0000 (01:25 +0200)]
Add garbage collection support for module environments

* src/emacs-module.c (mark_modules): New function.
(initialize_environment): Properly initialize Lisp objects.
* src/alloc.c (garbage_collect_1): Call it.

7 years agoMake autogen.sh report relevant environment variables
Glenn Morris [Thu, 8 Jun 2017 16:48:59 +0000 (12:48 -0400)]
Make autogen.sh report relevant environment variables

* autogen.sh (check_version):
Indicate if using an environment variable.

7 years agoSplit variable macro env from function env
Noam Postavsky [Sat, 22 Apr 2017 03:37:05 +0000 (23:37 -0400)]
Split variable macro env from function env

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove.
(cl-symbol-macrolet): Instead of adding each binding directly into the
main environment with a special key format, put all symbol macro
bindings into a single entry in the main environment under
`:cl-symbol-macros'.
(cl--sm-macroexpand): Look up symbol bindings in the
`:cl-symbol-macros' entry of the environment.

7 years ago; ChangeLog fixes
Glenn Morris [Wed, 7 Jun 2017 19:55:33 +0000 (15:55 -0400)]
; ChangeLog fixes

7 years ago* make-dist: Directory modules/mod-test no longer exists.
Glenn Morris [Wed, 7 Jun 2017 18:39:59 +0000 (14:39 -0400)]
* make-dist: Directory modules/mod-test no longer exists.

7 years agoMore authors.el updates
Glenn Morris [Wed, 7 Jun 2017 18:27:21 +0000 (14:27 -0400)]
More authors.el updates

* admin/authors.el (authors-ignored-files, authors-valid-file-names)
(authors-renamed-files-alist): Additions.

; ChangeLog fixes