]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoReplace the mention of c-indent-defun with js-indent-line
Dmitry Gutov [Mon, 18 Dec 2017 00:30:41 +0000 (02:30 +0200)]
Replace the mention of c-indent-defun with js-indent-line

* doc/lispref/text.texi (Mode-Specific Indent):
Avoid mentioning c-indent-defun in the context of multi-mode
indentation.

6 years agoConsolidate 'widen' calls
Dmitry Gutov [Thu, 14 Dec 2017 09:18:51 +0000 (11:18 +0200)]
Consolidate 'widen' calls

* lisp/progmodes/prog-mode.el (prog-indentation-context):
Un-document all elements but the first.
(prog-widen): Remove.
(http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html)

* doc/lispref/text.texi (Mode-Specific Indent): Update.

* lisp/progmodes/ruby-mode.el (ruby-calculate-indent):
Don't call widen.

* lisp/progmodes/python.el
(python-indent-guess-indent-offset)
(python-info-current-defun): Replace prog-widen with widen;
these functions are not called during indentation.
(python-indent-context)
(python-indent--calculate-indentation)
(python-info-dedenter-opening-block-message)
(python-info-line-ends-backslash-p)
(python-info-beginning-of-backslash)
(python-info-continuation-line-p)
(python-info-current-defun): Remove 'widen' calls.

* lisp/indent.el (indent-according-to-mode)
(indent-for-tab-command, indent-region): Move them here.

* lisp/textmodes/mhtml-mode.el (mhtml-indent-line):
Bind prog-indentation-context to one-element list.

6 years agoShell-quote wildcards when invoking 'vc-git-grep'
Robert Pluim [Tue, 28 Nov 2017 17:46:38 +0000 (19:46 +0200)]
Shell-quote wildcards when invoking 'vc-git-grep'

* lisp/vc/vc-git.el (vc-git-grep): Apply shell quoting to
filename wildcards to ensure globbing is done by git rather
than the shell.  (Bug#29303)

6 years agoUpdate documentation of '.dir-locals-2.el'
Kaushal Modi [Tue, 28 Nov 2017 17:17:48 +0000 (19:17 +0200)]
Update documentation of '.dir-locals-2.el'

See https://lists.gnu.org/r/emacs-devel/2017-11/msg00649.html
for more details.
* lisp/files.el (dir-locals-file-2): Remove unused constant.
* lisp/files.el (dir-locals-file): Mention ".dir-locals-2.el" in
the doc string.
* doc/lispref/variables.texi (Directory Local Variables): Mention
".dir-locals-2.el".
* etc/NEWS: Replace `dir-locals-file-2' mention with
`dir-locals-file'.

6 years ago; Fix some tiny doc and comment typos
Glenn Morris [Tue, 28 Nov 2017 16:50:05 +0000 (08:50 -0800)]
; Fix some tiny doc and comment typos

6 years ago; Fix some comment typos
Glenn Morris [Tue, 28 Nov 2017 00:28:28 +0000 (19:28 -0500)]
; Fix some comment typos

6 years ago* src/w32heap.c (DUMPED_HEAP_SIZE) [_WIN64]: Bump to 22 MiB.
Noam Postavsky [Tue, 21 Nov 2017 19:12:55 +0000 (14:12 -0500)]
* src/w32heap.c (DUMPED_HEAP_SIZE) [_WIN64]: Bump to 22 MiB.

6 years ago; * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
Glenn Morris [Mon, 27 Nov 2017 19:25:35 +0000 (14:25 -0500)]
; * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
Fix typo in previous.

6 years agoA few small doc fixes for bytecomp.el
Glenn Morris [Mon, 27 Nov 2017 19:10:34 +0000 (14:10 -0500)]
A few small doc fixes for bytecomp.el

* lisp/emacs-lisp/bytecomp.el (emacs-lisp-file-regexp)
(byte-compile-dest-file-function, byte-compile-dest-file): Doc fixes.

6 years ago* src/lread.c (syms_of_lread): Fix thinko in commit b1573a97e17b5
Stefan Monnier [Mon, 27 Nov 2017 18:53:23 +0000 (13:53 -0500)]
* src/lread.c (syms_of_lread): Fix thinko in commit b1573a97e17b5

6 years ago* lisp/tree-widget.el (tree-widget-end-guide): Escape it. (Bug#27797)
Glenn Morris [Mon, 27 Nov 2017 18:52:07 +0000 (13:52 -0500)]
* lisp/tree-widget.el (tree-widget-end-guide): Escape it.  (Bug#27797)

6 years agoFix ELisp "Warning Tips"
Eli Zaretskii [Mon, 27 Nov 2017 16:24:29 +0000 (18:24 +0200)]
Fix ELisp "Warning Tips"

* doc/lispref/tips.texi (Warning Tips): Clarify when to use
'require' wrapped by 'eval-when-compile'.  (Bug#29462)

6 years agoFix Bug#29163
Michael Albinus [Mon, 27 Nov 2017 12:31:53 +0000 (13:31 +0100)]
Fix Bug#29163

* lisp/net/tramp.el (tramp-autoload-file-name-regexp):
Do not use "\\'" in regexp.  (Bug#29163)
(top) Do not run (tramp-register-autoload-file-name-handlers)
when loading tramp.el.

* test/lisp/net/tramp-tests.el (tramp--test-mock-p): New defun.
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test41-asynchronous-requests): Use it.
(tramp-test42-auto-load): New test.
(tramp-test43-recursive-load, tramp-test44-remote-load-path)
(tramp-test45-delay-load, tramp-test46-unload): Rename.

6 years agoHarden exec_byte_code against redefining 'error'
Paul Eggert [Mon, 27 Nov 2017 03:15:14 +0000 (19:15 -0800)]
Harden exec_byte_code against redefining 'error'

Problem discovered by configuring with --enable-gcc-warnings on
Ubuntu 17.10 x86-64 with gcc (Ubuntu 7.2.0-8ubuntu3).
* src/bytecode.c (exec_byte_code): Call the C error function
instead of the Lisp one, so that the Emacs interpreter does not go
haywire if the user redefines the Lisp error function.

6 years agoFix Edebug specs for if-let* and and-let* (Bug#29236)
Gemini Lasswell [Mon, 6 Nov 2017 05:36:58 +0000 (21:36 -0800)]
Fix Edebug specs for if-let* and and-let* (Bug#29236)

* test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug
spec to cause Edebug to instrument tests the results of which are
not bound to symbols (the (VALUEFORM) case).
(and-let*): Change Edebug spec to allow empty body.

*test/lisp/emacs-lisp/subr-x-tests.el:
(subr-x-and-let*-test-group-1): Add missing quote to erroneous
form so Edebug will work on this test.

6 years agoFix Edebug's handling of dotted specs (bug#6415)
Gemini Lasswell [Thu, 2 Nov 2017 04:13:02 +0000 (21:13 -0700)]
Fix Edebug's handling of dotted specs (bug#6415)

* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use
cl-macro-list1 instead of cl-macro-list in Edebug spec.

* lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete
unused variable.
(edebug-dotted-spec): Add docstring.
(edebug-match-specs): Allow &optional and &rest specs to
match nothing at the tail of a dotted form. Handle matches of
dotted form tails which return non-lists.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms):
New test.

* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
(edebug-test-code-use-destructuring-bind): New function.

6 years agoImprove documentation of "constant" symbols
Eli Zaretskii [Sun, 26 Nov 2017 18:23:15 +0000 (20:23 +0200)]
Improve documentation of "constant" symbols

* src/font.c (syms_of_font) <font-weight-table, font-slant-table>
<font-width-table>:
* src/data.c (syms_of_data) <most-positive-fixnum>
<most-negative-fixnum>:
* src/buffer.c (syms_of_buffer) <enable-multibyte-characters>:
Mention in the doc strings that these variables are read-only.

* doc/lispref/variables.texi (Creating Buffer-Local): Document
that making a constant variable buffer-local signals an error.
* doc/lispref/variables.texi (Constant Variables):
* doc/lispref/errors.texi (Standard Errors): More accurate and
up-to-date documentation of which symbols cannot be assigned
values.

6 years agomaint: shorten https://lists.gnu.org/archive/html/... links
Paul Eggert [Sun, 26 Nov 2017 06:45:41 +0000 (22:45 -0800)]
maint: shorten https://lists.gnu.org/archive/html/... links

6 years agoMerge from Gnulib
Paul Eggert [Sun, 26 Nov 2017 06:28:31 +0000 (22:28 -0800)]
Merge from Gnulib

This incorporates:
2017-11-23 stat: work around Solaris bug with tv_nsec < 0
2017-11-12 maint: shorten https://lists.gnu.org/archive/html/... links
* build-aux/config.sub, doc/misc/texinfo.tex, lib/allocator.h:
* lib/fstatat.c, lib/intprops.h, lib/lstat.c, lib/signal.in.h:
* lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/timespec.h, m4/alloca.m4, m4/extern-inline.m4:
* m4/faccessat.m4, m4/fstatat.m4, m4/gnulib-common.m4:
* m4/lstat.m4, m4/std-gnu11.m4, m4/sys_types_h.m4:
* m4/vararrays.m4:
Copy from Gnulib.

6 years agoWork around GCC bug 80776 on Fedora 27 x86
Paul Eggert [Sun, 26 Nov 2017 00:11:43 +0000 (16:11 -0800)]
Work around GCC bug 80776 on Fedora 27 x86

* src/buffer.c (Fgenerate_new_buffer_name): Pacify GCC 7.2.1
20170915 (Red Hat 7.2.1-2) on i686 with -Wformat-overflow -O2 by
using XINT rather than XFASTINT and by adding an eassume.  This
works around GCC bug 80776.

6 years agoTweak copy-file, rename-file doc
Paul Eggert [Sat, 25 Nov 2017 21:04:30 +0000 (13:04 -0800)]
Tweak copy-file, rename-file doc

* src/fileio.c (Fcopy_file, Frename_file): Tweak the recent change
slightly, as NEWNAME is treated as a directory name depending only
on the contents of the NEWNAME string, and independently of
whether NEWNAME names a directory (i.e., whether the directory
exists) (Bug#29362).

6 years agoChange font-lock-extend-region-multiline handling in mhtml-mode
Tom Tromey [Sat, 25 Nov 2017 19:11:21 +0000 (12:11 -0700)]
Change font-lock-extend-region-multiline handling in mhtml-mode

Bug#29159
* lisp/textmodes/mhtml-mode.el (mhtml-mode): Remove
font-lock-extend-region-multiline from
font-lock-extend-region-functions.
(mhtml--extend-font-lock-region): Call font-lock-extend-region-multiline.

6 years agoMinor cleanup in tramp-gvfs-handle-file-local-copy
Michael Albinus [Sat, 25 Nov 2017 15:09:55 +0000 (16:09 +0100)]
Minor cleanup in tramp-gvfs-handle-file-local-copy

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-local-copy):
Move error message up.

6 years agoAdd test for Bug#29423 in Tramp.
Michael Albinus [Sat, 25 Nov 2017 15:03:53 +0000 (16:03 +0100)]
Add test for Bug#29423 in Tramp.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add test for Bug#29423.

6 years agoAvoid jumbled order in HTML rendered by shr.el
Eli Zaretskii [Sat, 25 Nov 2017 11:31:51 +0000 (13:31 +0200)]
Avoid jumbled order in HTML rendered by shr.el

* lisp/net/shr.el (shr-render-td): Preserve point, as
shr-render-td-1 might move it as a side effect of
save-window-excursion.  (Bug#29348)

6 years agoMake sure 'dired-filename' property is always put by ls-lisp
Eli Zaretskii [Sat, 25 Nov 2017 10:35:09 +0000 (12:35 +0200)]
Make sure 'dired-filename' property is always put by ls-lisp

* lisp/ls-lisp.el (ls-lisp-classify): Do not put the
'dired-filename' text property on the file name here...
(ls-lisp-classify-file): ...put it here instead.  (Bug#29423)

6 years agoA better solution for bug#29347
Eli Zaretskii [Fri, 24 Nov 2017 21:37:42 +0000 (23:37 +0200)]
A better solution for bug#29347

* src/thread.c (really_call_select): Don't try to take the global
lock if the same thread is already holding it.  (Bug#29347)

6 years ago; * src/thread.c (acquire_global_lock): Fix thinko in last change.
Eli Zaretskii [Fri, 24 Nov 2017 21:11:55 +0000 (23:11 +0200)]
; * src/thread.c (acquire_global_lock): Fix thinko in last change.

6 years agoAvoid a hang after C-g while sit-for on a Unix TTY
Eli Zaretskii [Fri, 24 Nov 2017 16:13:57 +0000 (18:13 +0200)]
Avoid a hang after C-g while sit-for on a Unix TTY

* src/thread.c (acquire_global_lock): Don't try to take the global
lock if the same thread is already holding it.  (Bug#29347)

6 years agoImprove the doc string of 'list-packages'
Eli Zaretskii [Fri, 24 Nov 2017 14:49:10 +0000 (16:49 +0200)]
Improve the doc string of 'list-packages'

* lisp/emacs-lisp/package.el (list-packages): Describe in the doc
string the columns shown by the command.  (Bug#29420)

6 years agoImprove discoverability of 'defvar' for suppressing warnings
Eli Zaretskii [Fri, 24 Nov 2017 14:36:33 +0000 (16:36 +0200)]
Improve discoverability of 'defvar' for suppressing warnings

* doc/lispref/compile.texi (Compiler Errors): Add index entries.
* doc/lispref/variables.texi (Defining Variables): Mention that
defvar with no value is used for suppressing compiler warnings.
(Bug#29400)

6 years agoImprove discoverability of 'read-buffer-completion-ignore-case'
Eli Zaretskii [Fri, 24 Nov 2017 13:58:00 +0000 (15:58 +0200)]
Improve discoverability of 'read-buffer-completion-ignore-case'

* lisp/window.el (switch-to-buffer)
(switch-to-buffer-other-window, switch-to-buffer-other-frame):
Mention 'read-buffer' in the doc string.  (Bug#29389)

* doc/emacs/buffers.texi (Select Buffer): Add a cross-reference to
where 'read-buffer-completion-ignore-case' is documented.

6 years agoImprove documentation of self-insert-uses-region-functions
Eli Zaretskii [Fri, 24 Nov 2017 10:49:04 +0000 (12:49 +0200)]
Improve documentation of self-insert-uses-region-functions

* lisp/simple.el (self-insert-uses-region-functions): Clarify the
doc string.
* lisp/delsel.el (delete-selection-uses-region-p): Mention
'self-insert-command' in the doc string.  (Bug#29373)

* doc/lispref/text.texi (Commands for Insertion): Mention
'self-insert-uses-region-functions'.
* doc/lispref/modes.texi (Keymaps and Minor Modes): Add a
cross-reference to "Commands for Insertion".

6 years agoReflect changes in copy-file and rename-file in doc strings
Eli Zaretskii [Fri, 24 Nov 2017 08:49:29 +0000 (10:49 +0200)]
Reflect changes in copy-file and rename-file in doc strings

* src/fileio.c (Fcopy_file, Frename_file): Mention in the doc
strings that directory names must end in a slash.  (Bug#29362)

6 years ago* lisp/progmodes/cc-vars.el (c-offsets-alist): Doc fix. (Bug#29407)
Eli Zaretskii [Fri, 24 Nov 2017 08:41:49 +0000 (10:41 +0200)]
* lisp/progmodes/cc-vars.el (c-offsets-alist): Doc fix.  (Bug#29407)

6 years agoReorder type predicates in ELisp manual
Eli Zaretskii [Fri, 24 Nov 2017 08:07:40 +0000 (10:07 +0200)]
Reorder type predicates in ELisp manual

* doc/lispref/objects.texi (Type Predicates): Restore alphabetical
order of listed predicates.  (Bug#29411)

6 years agoFix backward scrolling in buffers with header-line
Eli Zaretskii [Thu, 23 Nov 2017 20:29:59 +0000 (22:29 +0200)]
Fix backward scrolling in buffers with header-line

* src/window.c (window_scroll_pixel_based): Account for the
header-line when comparing Y coordinate with the last_visible_y.
(Bug#29325)

6 years ago; Fix some doc typos
Glenn Morris [Wed, 22 Nov 2017 22:52:11 +0000 (17:52 -0500)]
; Fix some doc typos

6 years ago* lisp/bindings.el (buffer-file-coding-system):
Glenn Morris [Wed, 22 Nov 2017 21:36:07 +0000 (16:36 -0500)]
* lisp/bindings.el (buffer-file-coding-system):
Add explicit permanent-local mark.

; * src/buffer.c (init_buffer_once): Comment.

6 years ago* src/fns.c (syms_of_fns) <overriding-plist-environment>: Doc fix.
Glenn Morris [Wed, 22 Nov 2017 19:58:55 +0000 (14:58 -0500)]
* src/fns.c (syms_of_fns) <overriding-plist-environment>: Doc fix.

6 years agoFix incorrect interaction of drag/drop and double click (bug#29121)
Alan Third [Wed, 22 Nov 2017 16:44:38 +0000 (16:44 +0000)]
Fix incorrect interaction of drag/drop and double click (bug#29121)

* src/nsterm.m (EmacsView::performDragOperation): Drag and drop
doesn't use ns-input-file.

6 years ago* lisp/menu-bar.el (menu-bar-options-save):
Glenn Morris [Wed, 22 Nov 2017 01:18:01 +0000 (20:18 -0500)]
* lisp/menu-bar.el (menu-bar-options-save):
Add display-line-numbers-type.

6 years ago* lisp/menu-bar.el (menu-bar-options-save):
Glenn Morris [Wed, 22 Nov 2017 00:42:32 +0000 (19:42 -0500)]
* lisp/menu-bar.el (menu-bar-options-save):
Add global-display-line-numbers-mode.  (Bug#28396)

6 years ago* lisp/follow.el (follow-mode): Restore mode line lighter. (Bug#28495)
Glenn Morris [Wed, 22 Nov 2017 00:23:30 +0000 (19:23 -0500)]
* lisp/follow.el (follow-mode): Restore mode line lighter.  (Bug#28495)

6 years ago; Compare process status against 127 exactly
Dmitry Gutov [Tue, 21 Nov 2017 23:50:07 +0000 (01:50 +0200)]
; Compare process status against 127 exactly

6 years agoExtract the common part of ruby-flymake-simple and ruby-flymake-rubocop
Dmitry Gutov [Tue, 21 Nov 2017 23:44:52 +0000 (01:44 +0200)]
Extract the common part of ruby-flymake-simple and ruby-flymake-rubocop

* lisp/progmodes/ruby-mode.el (ruby-flymake-simple)
(ruby-flymake-rubocop):
Extract the common part as ruby-flymake--helper.
(ruby--rubocop-flymake-proc): Remove.  Use the first proc
variable instead.

6 years agoAdd Rubocop Flymake backend
Dmitry Gutov [Tue, 21 Nov 2017 23:04:27 +0000 (01:04 +0200)]
Add Rubocop Flymake backend

* lisp/progmodes/ruby-mode.el (ruby-flymake-command):
Inline the value.  There are no known substitutes.
(ruby-flymake): Rename to `ruby-flymake-simple' and simplify
the docstring.
(ruby-flymake-use-rubocop-if-available): New option.
(ruby--rubocop-flymake-proc): New variable.
(ruby-rubocop-config): New option.
(ruby-flymake-rubocop, ruby-flymake-auto): New functions.
(ruby-mode): Use `ruby-flymake-auto'.

6 years ago; Fix a typo
Dmitry Gutov [Tue, 21 Nov 2017 22:46:59 +0000 (00:46 +0200)]
; Fix a typo

6 years agoUpdate nt/INSTALL.W64 (Bug#28601)
Noam Postavsky [Tue, 7 Nov 2017 23:01:01 +0000 (18:01 -0500)]
Update nt/INSTALL.W64 (Bug#28601)

* nt/INSTALL.W64 (Download and install MinGW-w64 and MSYS2): Move
suggestion about modifying PATH to...
(Test Emacs): ... here.
(Run configure): Remove the unnecessary setting of PKG_CONFIG_PATH.
(Troubleshooting): New section, includes suggestion to check
PKG_CONFIG_PATH.

6 years agoRemove incorrect NEWS item about VC state indicator (Bug#28817)
Charles A. Roelli [Tue, 21 Nov 2017 19:36:19 +0000 (20:36 +0100)]
Remove incorrect NEWS item about VC state indicator (Bug#28817)

* etc/NEWS (VC and related modes): Remove news item about the VC
state indicator.  This should have been done with commit 7882dc6
of 2016-03-06 'Revert "Use colors in the VC mode lines"'.

6 years ago* lisp/emacs-lisp/byte-run.el (defsubst): Doc fix.
Glenn Morris [Tue, 21 Nov 2017 18:28:00 +0000 (13:28 -0500)]
* lisp/emacs-lisp/byte-run.el (defsubst): Doc fix.

6 years agoMake c-defun-name analyze more thoroughly a function type which is a struct
Alan Mackenzie [Tue, 21 Nov 2017 18:06:11 +0000 (18:06 +0000)]
Make c-defun-name analyze more thoroughly a function type which is a struct

This fixes bug #29293.

* lisp/progmodes/cc-cmds.el (c-defun-name): When a struct (etc.) type is
encountered, check whether it is the return type of a function rather than a
declaration of the struct itself.  Similarly adapt the cond arm which deals
with functions properly to recognize struct return types.

6 years agoAvoid bogus abbreviated file names if HOME changes
Glenn Morris [Tue, 21 Nov 2017 17:27:36 +0000 (12:27 -0500)]
Avoid bogus abbreviated file names if HOME changes

* lisp/files.el (abbreviate-file-name):
If HOME changes, ignore `abbreviated-home-dir'.  (Bug#19657#20)
* test/lisp/files-tests.el (files-test-abbreviated-home-dir): New.

6 years ago* lisp/emacs-lisp/byte-run.el (inline): Give it a doc.
Glenn Morris [Tue, 21 Nov 2017 16:53:31 +0000 (08:53 -0800)]
* lisp/emacs-lisp/byte-run.el (inline): Give it a doc.

6 years agoFix erc keep-place module with new defaults (Bug#29111)
Jay Kamat [Tue, 21 Nov 2017 07:31:40 +0000 (08:31 +0100)]
Fix erc keep-place module with new defaults (Bug#29111)

* lisp/erc/erc-goodies.el (erc-keep-place): Allow erc
keep-place to continue working with
switch-to-buffer-preserve-window-point set to t, the new default.

Copyright-paperwork-exempt: yes

6 years agoAdd window divider faces to NS (bug#29353)
Alan Third [Sun, 19 Nov 2017 11:45:55 +0000 (11:45 +0000)]
Add window divider faces to NS (bug#29353)

* src/nsterm.m (ns_draw_window_divider): Use
window-divider-first-pixel and window-divider-last-pixel faces.

6 years ago* src/keyboard.c: Undo last change, meant for master only
Stefan Monnier [Mon, 20 Nov 2017 17:45:20 +0000 (12:45 -0500)]
* src/keyboard.c: Undo last change, meant for master only

6 years agoFix Bug#29149
Michael Albinus [Mon, 20 Nov 2017 13:28:22 +0000 (14:28 +0100)]
Fix Bug#29149

* lisp/net/tramp.el (tramp-drop-volume-letter): Handle also
backup file names.
(tramp-handle-find-backup-file-name):
Call `tramp-drop-volume-letter' on the results.  (Bug#29149)

6 years agoMerge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26
Michael Albinus [Mon, 20 Nov 2017 13:16:28 +0000 (14:16 +0100)]
Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26

6 years agoFix misbehavior when drawing three-pixel high horizontal dividers (Bug#29353)
Martin Rudalics [Mon, 20 Nov 2017 08:18:59 +0000 (09:18 +0100)]
Fix misbehavior when drawing three-pixel high horizontal dividers (Bug#29353)

* src/xterm.c (x_draw_window_divider):
* src/w32term.c (w32_draw_window_divider): Fix misbehavior when
drawing three-pixel high horizontal dividers (Bug#29353).

The misbehavior was noted by Keith David Bershatsky and analyzed by Alan
Third.

6 years agoMH-E: don't automatically download external-body parts
Mike Kupfer [Sun, 19 Nov 2017 00:49:10 +0000 (16:49 -0800)]
MH-E: don't automatically download external-body parts

* lisp/mh-e/mh-mime.el (mh-mime-display-single): Use
mm-automatic-display-p to verify that a part should be
displayed before doing the inline checks (SF#475).

6 years ago; * lisp/emacs-lisp/byte-run.el: Fix a typo in a comment.
Eli Zaretskii [Sun, 19 Nov 2017 15:51:08 +0000 (17:51 +0200)]
; * lisp/emacs-lisp/byte-run.el: Fix a typo in a comment.

6 years ago; Fix last commit
Michael Albinus [Sun, 19 Nov 2017 11:50:05 +0000 (12:50 +0100)]
; Fix last commit

6 years ago; Fix last commit
Michael Albinus [Sun, 19 Nov 2017 11:22:30 +0000 (12:22 +0100)]
; Fix last commit

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)

6 years agoFurther fix for Bug#29291
Michael Albinus [Sun, 19 Nov 2017 11:11:18 +0000 (12:11 +0100)]
Further fix for Bug#29291

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)

6 years agoFix divider frame params on NS (bug#29352)
Alan Third [Sun, 19 Nov 2017 11:00:31 +0000 (11:00 +0000)]
Fix divider frame params on NS (bug#29352)

* src/nsfns.m (Fx_create_frame): Set right-divider-width and
bottom-divider-width parameters.

6 years agoSpelling fixes
Paul Eggert [Sun, 19 Nov 2017 08:19:51 +0000 (00:19 -0800)]
Spelling fixes

* lisp/help-fns.el (help-fns--analyze-function):
Rename from help-fns--analyse-function.
All uses changed.

6 years ago* src/keyboard.c: Make xterm-mouse clicks on mode-line work
Olaf Rogalsky [Sun, 19 Nov 2017 04:23:58 +0000 (23:23 -0500)]
* src/keyboard.c: Make xterm-mouse clicks on mode-line work

(read_key_sequence): Recompute first_event
after replay_sequence, since it might have changed (bug#29104).

6 years agoDon't let delete_frame select a tooltip frame (Bug#27647)
Martin Rudalics [Sat, 18 Nov 2017 18:19:32 +0000 (19:19 +0100)]
Don't let delete_frame select a tooltip frame (Bug#27647)

* src/frame.c (delete_frame): Don't select a tooltip
frame. (Bug#27647)

6 years agoFilter obtrusive events in help-read-key-sequence.
Alan Mackenzie [Sat, 18 Nov 2017 14:52:39 +0000 (14:52 +0000)]
Filter obtrusive events in help-read-key-sequence.

This fixes most of bug #29272.

* lisp/help.el (help-read-key-sequence): After a mouse event, pause for 0.01s,
discarding any events (such as <help-echo>) received in this time, before
polling for the double-click (etc.) events which may follow.  This fixes the
infinite loop which occurred whwn <help-echo> events triggered a sit-for
whilst handling menu events.

6 years agoFix symlink flag in tramp-gvfs-handle-file-attributes
Michael Albinus [Sat, 18 Nov 2017 14:08:32 +0000 (15:08 +0100)]
Fix symlink flag in tramp-gvfs-handle-file-attributes

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Set proper symlink file mode flag.

6 years agoFix bug in tramp-handle-file-truename
Michael Albinus [Sat, 18 Nov 2017 13:24:03 +0000 (14:24 +0100)]
Fix bug in tramp-handle-file-truename

* lisp/net/tramp.el (tramp-handle-file-truename): Expand localname.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Check also
relative symbolic links.

6 years agoFix a typo in doc string of electric-indent-functions-without-reindent
Eli Zaretskii [Sat, 18 Nov 2017 11:46:13 +0000 (13:46 +0200)]
Fix a typo in doc string of electric-indent-functions-without-reindent

* lisp/electric.el (electric-indent-functions-without-reindent):
Doc fix.  (Bug#29304)

6 years agoAvoid assertion violations in echo_area_display
Eli Zaretskii [Sat, 18 Nov 2017 11:41:03 +0000 (13:41 +0200)]
Avoid assertion violations in echo_area_display

* src/xdisp.c (echo_area_display): Don't try redisplaying the echo
area if the selected-frame's mini-window is nil.  (Bug#27647)

6 years ago; * lisp/ido.el (ido-find-alternate-file): Doc fix. (Bug#29278)
Eli Zaretskii [Sat, 18 Nov 2017 11:14:52 +0000 (13:14 +0200)]
; * lisp/ido.el (ido-find-alternate-file): Doc fix.  (Bug#29278)

6 years agoFix case-folding in Occur
Eli Zaretskii [Sat, 18 Nov 2017 11:06:22 +0000 (13:06 +0200)]
Fix case-folding in Occur

* lisp/replace.el (occur-engine): Bind case-fold-search in each
buffer we search.  (Bug#29254)

6 years agoFix quick-calc in C mode with hex values
OGAWA Hirofumi [Sat, 18 Nov 2017 10:29:41 +0000 (12:29 +0200)]
Fix quick-calc in C mode with hex values

* lisp/calc/calc-aent.el (math-read-token): Make sure the match
against "0[xX][0-9a-fA-F]+" is found at math-exp-pos.  See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00174.html
for the details.

Copyright-paperwork-exempt: yes

6 years agoImprove documentation of dired-next/prev-marked-file
Eli Zaretskii [Sat, 18 Nov 2017 09:42:06 +0000 (11:42 +0200)]
Improve documentation of dired-next/prev-marked-file

* lisp/dired.el (dired-next-marked-file, dired-prev-marked-file):
Doc fixes.  (Bug#29340)

6 years agoPrevent aborts in line-move-visual
Eli Zaretskii [Fri, 17 Nov 2017 19:37:04 +0000 (21:37 +0200)]
Prevent aborts in line-move-visual

* src/indent.c (line_number_display_width): Avoid assertion
violations in init_iterator when the window's buffer was
temporarily switched without updating window-start.  (Bug#29326)

6 years agoMore fixes in src/.gdbinit
Eli Zaretskii [Fri, 17 Nov 2017 15:41:23 +0000 (17:41 +0200)]
More fixes in src/.gdbinit

* src/.gdbinit (pwinx): Update to match 'struct window'.
(pcursorx): Use "." instead of "->" because the argument is a
struct, not a pointer.

6 years agoDocument how to enter whitespace when using grep-read-files
Robert Pluim [Fri, 17 Nov 2017 13:39:02 +0000 (15:39 +0200)]
Document how to enter whitespace when using grep-read-files

* lisp/progmodes/grep.el (lgrep, rgrep, grep-read-files): Explain
how to enter whitespace when using grep-read-files.  (Bug#29303)
* lisp/progmodes/project.el (project-find-regexp): Likewise.
* lisp/vc/vc-git.el (vc-git-grep): Likewise.

6 years ago; Remove Tramp test instrumentation. Do not merge
Michael Albinus [Fri, 17 Nov 2017 07:53:05 +0000 (08:53 +0100)]
; Remove Tramp test instrumentation.  Do not merge

* test/Makefile.in: Remove instrumentation for tramp-tests.

* test/lisp/net/tramp-tests.el (tramp-test41-asynchronous-requests):
Remove instrumentation.

6 years agoFix .gdbinit following lisp.h changes
Eli Zaretskii [Fri, 17 Nov 2017 10:08:06 +0000 (12:08 +0200)]
Fix .gdbinit following lisp.h changes

* src/.gdbinit (xsymname, pwinx, pgx, xbuffer, xcar, xcdr, xlist)
(xprintstr): Adapt to latest changes in Lisp object C structures.
(Bug#29332)

6 years ago; Spelling fixes
Paul Eggert [Thu, 16 Nov 2017 08:00:31 +0000 (00:00 -0800)]
; Spelling fixes

6 years ago* lisp/simple.el (shell-command): Doc fixes.
Charles A. Roelli [Wed, 15 Nov 2017 19:35:18 +0000 (20:35 +0100)]
* lisp/simple.el (shell-command): Doc fixes.

6 years agoFix marker adjustment for undo (Bug#29118)
Noam Postavsky [Wed, 15 Nov 2017 12:03:23 +0000 (07:03 -0500)]
Fix marker adjustment for undo (Bug#29118)

* lisp/simple.el (primitive-undo): Compare marker against absolute
value of POS, because the sign of POS is irrelevant to markers.

6 years ago; Fix last fix of 'mouse-drag-and-drop-region'
Martin Rudalics [Tue, 14 Nov 2017 17:36:12 +0000 (18:36 +0100)]
; Fix last fix of 'mouse-drag-and-drop-region'

* lisp/mouse.el (mouse-drag-and-drop-region): Use 'car-safe'
instead of 'car' to ignore 'select-window' events.  Thanks to
Stefan Monnier for spotting this.

6 years agoFix Bug#28139
Daniel Pittman [Tue, 14 Nov 2017 10:38:30 +0000 (11:38 +0100)]
Fix Bug#28139

* tramp-sh.el: Set TERM and INSIDE_EMACS environment earlier.
(tramp-remote-process-environment): Remove TERM and INSIDE_EMACS.
(tramp-remote-process-environment): Document their special handling.
(tramp-open-shell): Set TERM and INSIDE_EMACS prior to starting the
initial remote shell, so that it is also aware of the environment
in which it is operating.  (Bug#28139)

6 years agoFix Bug#29291
Michael Albinus [Tue, 14 Nov 2017 09:38:41 +0000 (10:38 +0100)]
Fix Bug#29291

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Preserve permissions when copying.  (Bug#29291)

6 years agoFix Bug#2928
Michael Albinus [Tue, 14 Nov 2017 09:21:55 +0000 (10:21 +0100)]
Fix Bug#2928

* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Enhance test.  (Bug#29287)
(tramp-test44-delay-load): Fix for older Emacsen.

6 years agoMake 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil
Martin Rudalics [Tue, 14 Nov 2017 09:09:24 +0000 (10:09 +0100)]
Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil

* lisp/mouse.el (mouse-drag-and-drop-region): Ignore
'select-window' events to make it work with
'mouse-autoselect-window'.

6 years ago* etc/PROBLEMS: Remove fixed xterm-mouse-mode problems
Alexander Gramiak [Mon, 13 Nov 2017 00:06:32 +0000 (18:06 -0600)]
* etc/PROBLEMS: Remove fixed xterm-mouse-mode problems

See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29143#26

6 years agoFix cookie handling (bug#29282)
Katsumi Yamaoka [Mon, 13 Nov 2017 23:56:26 +0000 (23:56 +0000)]
Fix cookie handling (bug#29282)

* lisp/url/url-cookie.el (url-cookie-handle-set-cookie):
Regard a Set-Cookie header as it contains a single cookie;
prefer Max-Age to Expires and convert it to Expires;
remove support for old time string styles (bug#29282).

6 years agoImprove documentation of Edebug and macros
Gemini Lasswell [Mon, 13 Nov 2017 21:22:39 +0000 (13:22 -0800)]
Improve documentation of Edebug and macros

* doc/lispref/edebug.texi (Instrumenting Macro Calls): Improve
discussion of when it might be necessary to find and evaluate macro
specifications before instrumenting.
(Specification List): Clarify what "defining form" means to Edebug
and when 'def-form' or 'def-body' should be used instead of 'form'
or 'body'.

6 years agoPort to IBM xlc 12.01
Paul Eggert [Mon, 13 Nov 2017 18:06:50 +0000 (10:06 -0800)]
Port to IBM xlc 12.01

Work around a compiler bug by using a separate enum for alignment.
* src/alloc.c (roundup_size): Declare in a separate enum.

6 years agoSimplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
Paul Eggert [Mon, 13 Nov 2017 16:51:41 +0000 (08:51 -0800)]
Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED

* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove.  No longer
needed, since we no longer rely on __attribute__ ((aligned (8))).
All uses removed.
* src/emacs-module.c (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove.
(lisp_to_value): Simplify now that we no longer need to worry
whether HAVE_STRUCT_ATTRIBUTE_ALIGNED is false.

6 years agoUse alignas to fix GCALIGN-related bugs
Paul Eggert [Mon, 13 Nov 2017 16:51:41 +0000 (08:51 -0800)]
Use alignas to fix GCALIGN-related bugs

Use alignas and unions to specify alignments of objects needing
addresses that are at least a multiple of GCALIGNMENT.  Using
these standard C facilities should be safer than relying on ad hoc
and poorly-understood features like GCC’s __attribute__
((aligned (N))), the root cause for recent porting bugs like
Bug#29040.  The alignas macro was standardized by C11 and Gnulib
supports alignas for pre-C11 platforms.  I have tested this on Sun
Studio 12 sparc (2007) and GCC 4.4.7 x86-64 (2012) as well as on
more recent platforms like GCC 7.2.1 (2017) on Fedora 26 (both
x86-64 and x86).
* lib-src/make-docfile.c (close_emacs_globals): lispsym is now
just an array of struct Lisp_Symbol, since struct Lisp_Symbol is
now properly aligned.  All uses changed.
* src/alloc.c (NEXT_FREE_LISP_STRING): Just use the new u.next
member; this is simpler and safer than casting a pointer that
might not be aligned properly.
(aligned_Lisp_Symbol): Remove.  No longer needed, now that struct
Lisp_Symbol is aligned properly.  All uses replaced with struct
Lisp_Symbol.
* src/lisp.h (GCALIGNED): Remove, as it does not work as expected:
it can cause the natural alignment to be ignored.  All uses
replaced by unions with a ‘char alignas (GCALIGNMENT)’ member as
described below.
(struct Lisp_Symbol, struct Lisp_Cons, struct Lisp_String):
Change definition from ‘struct TAG { MEMBERS };’ to
‘struct TAG { union { struct { MEMBERS } s; char alignas
(GCALIGNMENT) gcaligned; } u; };’.  This guarantees ‘struct TAG’
to have an alignment that at least max (GCALIGNMENT, N) where N is
its old alignment.  All uses like ‘PTR->MEMBER’ changed to
‘PTR->u.s.MEMBER’; these uses were supposed to be mostly private
anyway.  Verify that the resulting ‘struct TAG’ is properly
aligned for Emacs.
(union vectorlike_header): New member ‘gcaligned’ to guarantee
that this type, and its containing types like ‘struct Lisp_Subr’,
‘struct buffer’ and ‘struct thread_state’, are all properly
aligned for Emacs.
(struct Lisp_String): New union member ‘next’, for the benefit
of NEXT_FREE_LISP_STRING.
(union Aligned_Cons, union Aligned_String): Remove.  All uses
replaced by struct Lisp_Cons and struct Lisp_String, since they
are now properly aligned.
(USE_STACK_CONS, USE_STACK_STRING): Simplify now that we can
assume struct Lisp_Cons and struct Lisp_String are properly
aligned.

6 years agoChange vectorlike from struct to union
Paul Eggert [Mon, 13 Nov 2017 16:51:41 +0000 (08:51 -0800)]
Change vectorlike from struct to union

* src/lisp.h (vectorlike_headed): Change from struct to union.
All uses changed.  Since it has only one member, this does not
change semantics.  This is designed to simplify future changes
needed to fix bugs like Bug#29040.  All uses changed.

6 years agoDon't enable cursor-sensor-mode in mhtml-mode
Tom Tromey [Sun, 12 Nov 2017 18:56:05 +0000 (11:56 -0700)]
Don't enable cursor-sensor-mode in mhtml-mode

* lisp/textmodes/mhtml-mode.el (mhtml--last-submode): Update doc
string.
(mhtml-mode): Don't call cursor-sensor-mode.

6 years ago* lisp/files.el (abbreviate-file-name): Doc fix. (Bug#29267)
Eli Zaretskii [Sun, 12 Nov 2017 13:25:06 +0000 (15:25 +0200)]
* lisp/files.el (abbreviate-file-name): Doc fix.  (Bug#29267)