]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 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".

7 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)

7 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)

7 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)

7 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)

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

7 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.

7 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.

7 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.

7 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.

7 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)

7 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)

7 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

7 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.

7 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'.

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

7 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.

7 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"'.

7 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.

7 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.

7 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.

7 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.

7 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

7 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.

7 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

7 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)

7 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

7 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.

7 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).

7 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.

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

7 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)

7 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)

7 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.

7 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.

7 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).

7 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)

7 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.

7 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.

7 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.

7 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)

7 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)

7 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)

7 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)

7 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

7 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)

7 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)

7 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.

7 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.

7 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.

7 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)

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

7 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.

7 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.

7 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.

7 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)

7 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)

7 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.

7 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'.

7 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

7 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).

7 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'.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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)

7 years agoUnbreak interactive run of a flymake test (bug#29267)
João Távora [Sun, 12 Nov 2017 12:32:25 +0000 (12:32 +0000)]
Unbreak interactive run of a flymake test (bug#29267)

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19657#20 for the
technique used here.

* test/lisp/progmodes/flymake-tests.el (ruby-backend):
Let-bind abbreviated-home-dir.

7 years agoFix Bug#29225
Michael Albinus [Sun, 12 Nov 2017 12:05:44 +0000 (13:05 +0100)]
Fix Bug#29225

* src/fileio.c (Fset_file_acl): Report error only when
acl_errno_valid returns true.  (Bug#29225)

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl)
(tramp-test25-file-selinux): New tests.
(tramp-test26-file-name-completion, tramp-test27-load)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-interrupt-process, tramp-test31-shell-command)
(tramp-test32-environment-variables)
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test33-explicit-shell-file-name)
(tramp-test34-vc-registered)
(tramp-test35-make-auto-save-file-name)
(tramp-test36-find-backup-file-name)
(tramp-test37-make-nearby-temp-file)
(tramp-test38-special-characters)
(tramp-test38-special-characters-with-stat)
(tramp-test38-special-characters-with-perl)
(tramp-test38-special-characters-with-ls, tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls, tramp-test40-file-system-info)
(tramp-test41-asynchronous-requests)
(tramp-test42-recursive-load, tramp-test43-remote-load-path)
(tramp-test44-delay-load, tramp-test45-unload): Rename.

7 years agoCC Mode: Fix defun-open being recognized as brace-list-open at EOB.
Alan Mackenzie [Sun, 12 Nov 2017 11:49:03 +0000 (11:49 +0000)]
CC Mode: Fix defun-open being recognized as brace-list-open at EOB.

* lisp/progmodes/cc-engine.el (c-looking-at-statement-block): Add handling
for an open brace at EOB and nested braces inside an unclosed brace block.

7 years agoMerge from Gnulib
Paul Eggert [Sun, 12 Nov 2017 07:11:03 +0000 (23:11 -0800)]
Merge from Gnulib

This incorporates:
2017-11-11 faccessat: port to macOS (Bug#29231)
2017-11-05 fstatat: pacify GCC on unusual platform
* build-aux/config.guess, build-aux/config.sub:
* doc/misc/texinfo.tex, lib/faccessat.c, lib/fstatat.c:
* lib/unistd.in.h, m4/faccessat.m4, m4/unistd_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

7 years agoPacify GCC when configured --with-x-toolkit=no
Paul Eggert [Sun, 12 Nov 2017 06:59:41 +0000 (22:59 -0800)]
Pacify GCC when configured --with-x-toolkit=no

Without these changes, Emacs does not build on Fedora 26 x86-64
when configured --with-x-toolkit=no --enable-gcc-warnings.
* oldXMenu/Activate.c (XMenuActivate): Add FALLTHROUGH.
* src/xterm.c (x_dispatch_event): Define only if
USE_X_TOOLKIT || USE_MOTIF || USE_GTK.

7 years ago* lisp/find-dired.el (find-grep-dired): Doc fix. (Bug#29262)
Eli Zaretskii [Sun, 12 Nov 2017 05:03:48 +0000 (07:03 +0200)]
* lisp/find-dired.el (find-grep-dired): Doc fix.  (Bug#29262)

7 years agoFix more flymake-diag-region eob corner cases and add tests (bug#29201)
João Távora [Sat, 11 Nov 2017 23:44:52 +0000 (23:44 +0000)]
Fix more flymake-diag-region eob corner cases and add tests (bug#29201)

* lisp/progmodes/flymake.el (flymake-diag-region): Correct
more eob corner cases.

* test/lisp/progmodes/flymake-tests.el
(eob-region-and-trailing-newline): New test.

7 years agoKeep Man sections in natural order (bug#28998)
Basil L. Contovounesios [Wed, 25 Oct 2017 15:57:43 +0000 (16:57 +0100)]
Keep Man sections in natural order (bug#28998)

* lisp/man.el (Man-build-section-alist): Reverse sections.

7 years ago* lisp/minibuffer.el: Install a workaround for bug#16274
Stefan Monnier [Sat, 11 Nov 2017 15:25:20 +0000 (10:25 -0500)]
* lisp/minibuffer.el: Install a workaround for bug#16274

* lisp/minibuffer.el (completion--nth-completion): Avoid signaling an
error when `md` is applied to another table.

7 years agoFix comparisons with tip_frame in GTK builds
Eli Zaretskii [Sat, 11 Nov 2017 12:42:30 +0000 (14:42 +0200)]
Fix comparisons with tip_frame in GTK builds

* src/xterm.c (x_update_begin, x_new_font):
* src/xfns.c (Fx_display_monitor_attributes_list):
* src/frame.c (Fframe_list) [USE_GTK]: Don't consider tip_frame a
tooltip frame unless its 'tooltip' parameter is non-nil.  (Bug#26747)

7 years agoImprove the documentation of M-n for entering file names
Eli Zaretskii [Sat, 11 Nov 2017 11:48:37 +0000 (13:48 +0200)]
Improve the documentation of M-n for entering file names

* lisp/files.el (find-file, find-file-other-window)
(find-file-other-frame): Mention file-name-at-point-functions in
the doc string.  Reported by Florian Weimer <fw@deneb.enyo.de> in
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00224.html.

* doc/emacs/mini.texi (Minibuffer History): Document
file-name-at-point-functions and its effect on M-n when typing
file names in the minibuffer.
* doc/emacs/files.texi (File Names):
* doc/emacs/mini.texi (Minibuffer File): Add a cross-reference to
"Minibuffer History", where special features of M-n regarding
files are described.

7 years agoFix desktop auto-save timer when linum-mode is used
Eli Zaretskii [Sat, 11 Nov 2017 09:53:42 +0000 (11:53 +0200)]
Fix desktop auto-save timer when linum-mode is used

* lisp/desktop.el (desktop-read): Use toplevel value of
window-configuration-change-hook when deciding whether desktop
auto-saving is enabled.  Suggested by Peter Neidhardt
<pe.neidhardt@googlemail.com>.  (Bug#28945)

7 years agoFix "C-h k" in xterm-mouse-mode
Olaf Rogalsky [Sat, 11 Nov 2017 09:05:53 +0000 (11:05 +0200)]
Fix "C-h k" in xterm-mouse-mode

* lisp/help.el (help-read-key-sequence): Support "C-h k" for
xterm-mouse-mode by calling read-key-sequence-vector instead of
read-event.  (Bug#29150)

7 years agoFix off-by-1 bug in --enable-checking=stringbytes
Paul Eggert [Fri, 10 Nov 2017 23:16:50 +0000 (15:16 -0800)]
Fix off-by-1 bug in --enable-checking=stringbytes

Evidently nobody builds Emacs with --enable-checking=all,
which is no surprise as it is so slow as to be unusable nowadays.
Perhaps we should remove the slowest checks, or move them into
another category, or speed them up, or something.
* src/alloc.c (SDATA_SIZE) [GC_CHECK_STRING_BYTES]: Fix off-by-one
error in size calculation, which caused a failure when
--enable-checking=stringbytes was used.  I introduced this bug in
2016-09-08T01:08:45!eggert@cs.ucla.edu "Port flexible array
members to GCC + valgrind".

7 years agoCorrect the indentation of C99's compound literals.
Alan Mackenzie [Fri, 10 Nov 2017 17:45:22 +0000 (17:45 +0000)]
Correct the indentation of C99's compound literals.

* lisp/progmodes/cc-engine.el (c-looking-at-statement-block): Amend so that
if there is only syntactic whitespace in a brace block, it is regarded as a
statement block.  Also, if there is no semicolon or comma delimiter, treat as
a statement block when there is a keyword.
(c-guess-basic-syntax): CASE 9 test: Regard a brace as starting a brace block
when its contents indicate a brace block.

7 years agoImprove the doc string of 'dired-isearch-filter-filenames'
Eli Zaretskii [Fri, 10 Nov 2017 10:12:46 +0000 (12:12 +0200)]
Improve the doc string of 'dired-isearch-filter-filenames'

* lisp/dired-aux.el (dired-isearch-filter-filenames): Doc fix.
(Bug#29215)

7 years ago* lisp/isearch.el (search-invisible): Doc fix. (Bug#29222)
Eli Zaretskii [Fri, 10 Nov 2017 10:05:08 +0000 (12:05 +0200)]
* lisp/isearch.el (search-invisible): Doc fix.  (Bug#29222)

7 years agoFix display of line numbers in GTK builds
Eli Zaretskii [Fri, 10 Nov 2017 08:35:31 +0000 (10:35 +0200)]
Fix display of line numbers in GTK builds

* src/xdisp.c (should_produce_line_number) [USE_GTK]: Make sure
tip_frame is indeed a tooltip frame, before disabling line numbers
on it.  (Bug#27647)

* src/dispextern.h (tip_frame): Add commentary describing the
kludgey usage of this variable in GTK builds.

7 years agoFix previous change to flymake-diag-region (bug#29174)
João Távora [Fri, 10 Nov 2017 05:10:18 +0000 (05:10 +0000)]
Fix previous change to flymake-diag-region (bug#29174)

* lisp/progmodes/flymake.el (flymake-diag-region):
Pass line and col to commit.

7 years agoflymake-diag-region really returns nil if region is invalid (bug#29174)
João Távora [Thu, 9 Nov 2017 21:25:36 +0000 (21:25 +0000)]
flymake-diag-region really returns nil if region is invalid (bug#29174)

Reported by Lele Gaifax <lele@metapensiero.it>.

* lisp/progmodes/flymake.el (flymake-diag-region): Really
return nil if the region is invalid.

7 years agoFlymake correctly highlights whole last line if eob (bug#29201)
João Távora [Thu, 9 Nov 2017 21:16:40 +0000 (21:16 +0000)]
Flymake correctly highlights whole last line if eob (bug#29201)

If a line/column pair indicates an end-of-buffer position, flymake
should behave like the case where the last line of the buffer is
referenced without a column indication.  This behavior is currently
to highlight the whole last line.

* lisp/progmodes/flymake.el (flymake-diag-region): Correct
conditions of fallback to the fallback-eol local function.

7 years agoProtect Flymake checkdoc backend against checkdoc errors (bug#29176)
João Távora [Thu, 9 Nov 2017 20:44:11 +0000 (20:44 +0000)]
Protect Flymake checkdoc backend against checkdoc errors (bug#29176)

The function checkdoc-current-buffer may error if there are unbalanced
parens, for example, but this shouldn't disable the
elisp-flymake-checkdoc backend.

* lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc): Use
ignore-errors.

7 years agoSort entries of the Flymake diagnostics buffer (bug#29175)
João Távora [Thu, 9 Nov 2017 20:33:02 +0000 (20:33 +0000)]
Sort entries of the Flymake diagnostics buffer (bug#29175)

Reported by Lele Gaifax <lele@metapensiero.it>.

* lisp/progmodes/flymake.el
(flymake--diagnostics-buffer-entries): Sort results of flymake-diagnostics.

7 years agoCorrectly indent C++14 brace lists which are a second argument to a function.
Alan Mackenzie [Thu, 9 Nov 2017 18:34:13 +0000 (18:34 +0000)]
Correctly indent C++14 brace lists which are a second argument to a function.

In particular, don't indent contained brace lists in "staircase" fashion.
This fixes bug #28623.

* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): When
testing for being enclosed in parens, recognise also a brace directly
following a comma, as well as a brace being the first thing inside the paren.
Enhance the return value, by indicating when we're directly inside an open
paren.
(c-inside-bracelist-p): Add an extra argument ACCEPT-IN-PARAM which indicates
whether we will accept a bracelist directly inside an open parenthesis.
Simplify the manipulation of PAREN-STATE by dispensing with variable LIM and
using c-pull-open-brace.  Enhance the return value, respecting the new argument.
(c-guess-basic-syntax): Save a copy of the initial parse-state in the new
variable STATE-CACHE.  Use this variable in place of C-STATE-CACHE throughout
the function.  At CASE 7B, call c-inside-bracelist-p with extra argument nil.
At CASE 9, call that function with extra argument t.

7 years agoFix redisplay of overlay-arrows on GUI frames
Eli Zaretskii [Thu, 9 Nov 2017 16:22:42 +0000 (18:22 +0200)]
Fix redisplay of overlay-arrows on GUI frames

* src/xdisp.c (try_window_reusing_current_matrix)
(try_cursor_movement): Disallow these optimizations if the buffer
has overlay arrow(s) shown on the fringe(s).  (Bug#29198)

7 years agoProtect Flymake tests against older Ruby and Perl (bug#29187)
João Távora [Thu, 9 Nov 2017 09:34:58 +0000 (09:34 +0000)]
Protect Flymake tests against older Ruby and Perl (bug#29187)

* test/lisp/progmodes/flymake-tests.el (perl-backend): Search
for the error from the bottom.
(ruby-backend): Protect against situation of bug#29187

7 years agoFix URL cookie expiration bug
Paul Eggert [Thu, 9 Nov 2017 05:30:26 +0000 (21:30 -0800)]
Fix URL cookie expiration bug

Problem reported by Damien Cassou (Bug#29223).
* lisp/url/url-cookie.el (url-cookie-expired-p):
Fix typo in previous change, which caused unexpired cookies
to be treated as expired and vice versa.

7 years agoUse GCALIGNED properly for GCC
Paul Eggert [Thu, 9 Nov 2017 03:11:18 +0000 (19:11 -0800)]
Use GCALIGNED properly for GCC

Apparently GCC requires that ‘__attribute__ ((aligned (8)))’ must
immediately follow the ‘struct’ keyword when aligning a structure.
The attribute silently does not work if it follows a tag after the
‘struct’ keyword.  Who knew?  Anyway, this patch is designed to
fix a SIGSEGV problem reported by John Mastro (Bug#29183).
* lib-src/make-docfile.c (close_emacs_globals):
* src/buffer.c (buffer_defaults, buffer_local_symbols):
* src/lisp.h (DEFUN):
* src/thread.c (main_thread):
Put 'GCALIGNED' immediately after 'struct'.

7 years agoIn f90.el, set fill-paragraph-function to a useful value
Glenn Morris [Thu, 9 Nov 2017 01:16:38 +0000 (20:16 -0500)]
In f90.el, set fill-paragraph-function to a useful value

* lisp/progmodes/f90.el (f90-mode-map) <menu>: Add fill-paragraph.
(f90-mode): Set fill-paragraph-function.
(f90-fill-paragraph): New command.

7 years agoFix to 2fddfb7ce7
Eric Abrahamsen [Sun, 22 Oct 2017 23:46:49 +0000 (16:46 -0700)]
Fix to 2fddfb7ce7

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Fix bogus paren wrapping.

7 years ago* admin/gitmerge.el (gitmerge-resolve-unmerged): Fix doc typo.
Glenn Morris [Wed, 8 Nov 2017 20:36:45 +0000 (15:36 -0500)]
* admin/gitmerge.el (gitmerge-resolve-unmerged): Fix doc typo.

7 years agoFurther workaround for faulty localtime() under macOS 10.6
Charles A. Roelli [Wed, 8 Nov 2017 19:51:48 +0000 (20:51 +0100)]
Further workaround for faulty localtime() under macOS 10.6

* lisp/org/org-clock.el (org-clock--oldest-date): Fix an issue
when compiling on macOS 10.6 with a western time zone (a
continuation of Bug#27736).  In particular, see:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27736#74

and the first commit that attempted to work around this problem,
"Workaround for faulty localtime() under macOS 10.6", bd49b6f1 of
2017-09-30.