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

7 years agoHandle object string name in eieio-persistent-convert-list-object
Eric Abrahamsen [Sun, 22 Oct 2017 14:59:29 +0000 (07:59 -0700)]
Handle object string name in eieio-persistent-convert-list-object

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Starting to phase out the printing of object names in
  `object-write', handle either case.

7 years agoFix handling of nil PRED2 arg for completion-table-with-predicate
Ryan C. Thompson [Wed, 26 Jul 2017 18:09:42 +0000 (11:09 -0700)]
Fix handling of nil PRED2 arg for completion-table-with-predicate

* lisp/minibuffer.el (completion-table-with-predicate): Don't act as
if strict is non-nil when pred2 is nil (Bug#27841).
* test/lisp/minibuffer-tests.el
(completion-table-with-predicate-test): Add a test for Bug#27841.

7 years ago; Minor comment copyedit in window.c
Eli Zaretskii [Tue, 7 Nov 2017 19:57:56 +0000 (21:57 +0200)]
; Minor comment copyedit in window.c

* src/window.c (Fset_window_configuration): Don't use non-ASCII
quotes in comments.

7 years agoDescribe Lao rendering problem
K. Handa [Tue, 7 Nov 2017 11:53:32 +0000 (20:53 +0900)]
Describe Lao rendering problem

* etc/PROBLEMS: Describe a workaround for the problem of Lao rendering
by OpenTyype font.

7 years agoFix docstring of arabic-shaper-ZWNJ-handling
K. Handa [Tue, 7 Nov 2017 11:50:46 +0000 (20:50 +0900)]
Fix docstring of arabic-shaper-ZWNJ-handling

* lisp/language/misc-lang.el (arabic-shaper-ZWNJ-handling): Adjusted
the doctstring for addition of :set (bug#28312).

7 years agoHandle single-line comments correctly (Bug#26049)
Antonin Houska [Mon, 6 Nov 2017 08:59:07 +0000 (09:59 +0100)]
Handle single-line comments correctly (Bug#26049)

* lisp/newcomment.el (comment-region-internal): Previously, the
comment text had to contain at least one line break character for the
ending extra line to be added.  Make the behavior more consistent by
looking for end of line instead.
(comment-region-internal): Remove trailing white space from the
comment's initial line.

Copyright-paperwork-exempt: yes

7 years ago* test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards):
Glenn Morris [Mon, 6 Nov 2017 23:50:53 +0000 (18:50 -0500)]
* test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards):
Clean up properly.

7 years ago* etc/PROBLEMS: Add URL to relevant issues for xterm+evil bug
Stefan Monnier [Mon, 6 Nov 2017 13:33:16 +0000 (08:33 -0500)]
* etc/PROBLEMS: Add URL to relevant issues for xterm+evil bug

7 years ago; In text.texi fix typo spotted by Štěpán Němec
Martin Rudalics [Mon, 6 Nov 2017 13:11:15 +0000 (14:11 +0100)]
; In text.texi fix typo spotted by Štěpán Němec

7 years agoDocument new treatment of 'comment-auto-fill-only-comments'
Martin Rudalics [Mon, 6 Nov 2017 07:45:52 +0000 (08:45 +0100)]
Document new treatment of 'comment-auto-fill-only-comments'

* doc/lispref/text.texi (Auto Filling): Add reference to Emacs
manual.  Add description of 'comment-auto-fill-only-comments'.
* etc/NEWS: Mention new treatment of
'comment-auto-fill-only-comments'.

7 years agoDo not load Tramp unless `tramp-mode' is non-nil
Michael Albinus [Sun, 5 Nov 2017 19:08:05 +0000 (20:08 +0100)]
Do not load Tramp unless `tramp-mode' is non-nil

* lisp/net/tramp.el (tramp-autoload-file-name-handler): Load Tramp only if
`tramp-mode' is non-nil.
(tramp-unload-file-name-handlers): Unload also
`tramp-autoload-file-name-handler'.

* test/lisp/net/tramp-tests.el (tramp-test42-delay-load): Extend test.

7 years agoPrefer `customize-set-variable' in tramp.texi
Michael Albinus [Sun, 5 Nov 2017 19:07:12 +0000 (20:07 +0100)]
Prefer `customize-set-variable' in tramp.texi

* doc/misc/tramp.texi (Configuration, Default Method, Default User)
(Default Host, Remote shell setup, Auto-save and Backup)
(Ad-hoc multi-hops, Frequently Asked Questions):
Prefer `customize-set-variable' over `custom-set-variables'.

7 years agoFix last change in hscroll_window_tree
Eli Zaretskii [Sun, 5 Nov 2017 18:10:38 +0000 (20:10 +0200)]
Fix last change in hscroll_window_tree

* src/xdisp.c (hscroll_window_tree): When hscroll suspension is
being disabled, set the frame's garbaged flag less eagerly.
(Bug#29002)

7 years agoEdiff: add some missing documentation
Philipp Stephani [Sat, 23 Sep 2017 18:43:44 +0000 (20:43 +0200)]
Ediff: add some missing documentation

* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.

7 years agoSupport python virtualenv on w32 (Bug#24464)
Justin Timmons [Mon, 12 Dec 2016 00:39:56 +0000 (19:39 -0500)]
Support python virtualenv on w32 (Bug#24464)

According to the virtualenv docs only POSIX systems follow the
structure "/path/to/venv/bin/", while windows systems use
"/path/to/venv/Scripts" for the location of the binary files, most
importantly including the python interpreter (see:
https://virtualenv.pypa.io/en/stable/userguide/#windows-notes).
* lisp/progmodes/python.el (python-shell-calculate-exec-path): Use the
"/path/to/venv/Scripts" for `windows-nt' machines.

Copyright-paperwork-exempt: yes

7 years agoImprove dired deletion error handling (Bug#28797)
Noam Postavsky [Fri, 13 Oct 2017 03:12:00 +0000 (23:12 -0400)]
Improve dired deletion error handling (Bug#28797)

* lisp/dired.el (dired-internal-do-deletions): Use
`error-message-string' to produce a human readable error message.

7 years agoDon't replace user input when completion prefix is empty (Bug#18951)
Noam Postavsky [Sun, 5 Nov 2017 16:36:20 +0000 (11:36 -0500)]
Don't replace user input when completion prefix is empty (Bug#18951)

* lisp/pcomplete.el (pcomplete-parse-arguments): Only replace user
input if we produced a non-empty common completion stub.

7 years ago; Describe xt-mouse problems with Evil mode
Eli Zaretskii [Sun, 5 Nov 2017 15:49:43 +0000 (17:49 +0200)]
; Describe xt-mouse problems with Evil mode

* etc/PROBLEMS: Describe a workaround for xt-mouse problems with
Evil mode.  (Bug#29143)

7 years agoReturn non-nil from gnutls-available-p under GnuTLS 2.x
Eli Zaretskii [Sun, 5 Nov 2017 15:26:36 +0000 (17:26 +0200)]
Return non-nil from gnutls-available-p under GnuTLS 2.x

* doc/misc/emacs-gnutls.texi (Help For Users): Update the
documentation of 'gnutls-available-p'.

* etc/NEWS (GnuTLS): Mention the change in the value returned by
'gnutls-available-p'.

* src/gnutls.c (Fgnutls_available_p): Return non-nil when GnuTLS
2.x is available.  (Bug#29147)

7 years agoFix Flymake help-echo functions across windows (bug#29142)
João Távora [Sun, 5 Nov 2017 14:58:07 +0000 (14:58 +0000)]
Fix Flymake help-echo functions across windows (bug#29142)

* lisp/progmodes/flymake.el (flymake--highlight-line): Use
with-selected-window.
(flymake-goto-next-error): Call help-echo with a window and an
overlay.

7 years agoAdd tests for Flymake backends for Ruby and Perl
João Távora [Sun, 5 Nov 2017 12:51:30 +0000 (12:51 +0000)]
Add tests for Flymake backends for Ruby and Perl

* test/lisp/progmodes/flymake-tests.el (perl-backend)
(ruby-backend): New tests.
(warning-predicate-rx-perl, warning-predicate-function-perl):
Delete tests.

* test/lisp/progmodes/flymake-resources/test.pl: Include an
error the test file.

* test/lisp/progmodes/flymake-resources/test.rb: file.

7 years agoAdd a Flymake backend for Perl
João Távora [Fri, 3 Nov 2017 16:05:39 +0000 (16:05 +0000)]
Add a Flymake backend for Perl

Define a simple backend in perl-mode.el, which cperl-mode.el also
uses.

* lisp/progmodes/cperl-mode.el (cperl-mode): Add to
flymake-diagnostic-functions.

* lisp/progmodes/flymake-proc.el
(flymake-proc-allowed-file-name-masks): Disable legacy backend
for perl files.

* lisp/progmodes/perl-mode.el (perl-flymake-command): New
defcustom.
(perl--flymake-proc): New buffer-local variable.
(perl-flymake): New function.
(perl-mode): Add to flymake-diagnostic-functions.

7 years agoAdd a Flymake backend for Ruby
João Távora [Fri, 3 Nov 2017 12:43:11 +0000 (12:43 +0000)]
Add a Flymake backend for Ruby

* lisp/progmodes/ruby-mode.el (ruby-flymake-command): New
defcustom.
(ruby--flymake-proc): New buffer-local variable.
(ruby-flymake): New function.
(ruby-mode): Add flymake-diagnostic-functions.

7 years agoAdd a Flymake backend for Python (bug#28808)
Lele Gaifax [Fri, 3 Nov 2017 12:20:36 +0000 (12:20 +0000)]
Add a Flymake backend for Python (bug#28808)

Implement new Flymake backend with related customizable settings.

* lisp/progmodes/python.el (python-flymake-command)
(python-flymake-command-output-pattern)
(python-flymake-msg-alist): New defcustom.
(python--flymake-parse-output): New function, able to parse
python-flymake-command output accordingly to
python-flymake-command-output-pattern.
(python-flymake): New function implementing the backend
interface using python--flymake-parse-output for the real
work.
(python-mode): Add python-flymake to flymake-diagnostic-functions.

7 years agoAllow "%" in Tramp host names
Michael Albinus [Sun, 5 Nov 2017 11:40:58 +0000 (12:40 +0100)]
Allow "%" in Tramp host names

* lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name): Hexify also host.

* lisp/net/tramp.el (tramp-host-regexp): Allow "%" in host names.

7 years ago; Fix typo in test/file-organization.org
Michael Albinus [Sun, 5 Nov 2017 11:40:13 +0000 (12:40 +0100)]
; Fix typo in test/file-organization.org

7 years ago; Fix typo
Charles A. Roelli [Sun, 5 Nov 2017 09:18:00 +0000 (10:18 +0100)]
; Fix typo

* doc/misc/cc-mode.texi (Other Commands): Fix typo.

7 years agoUse hybrid malloc for FreeBSD (Bug#28308)
Noam Postavsky [Tue, 31 Oct 2017 17:31:46 +0000 (13:31 -0400)]
Use hybrid malloc for FreeBSD (Bug#28308)

FreeBSD aarch64 does not provide sbrk, so gmalloc cannot be used; when
using system malloc dumping does not work correctly (allocated data is
invalid after dumping).
* configure.ac: Set hybrid_malloc for freebsd.
* src/gmalloc.c (gdefault_morecore) [!HAVE_SBRK]: Don't call sbrk.

7 years agoAdd html-, mhtml- and python-mode support to semantic symref
Charles A. Roelli [Sat, 4 Nov 2017 21:19:08 +0000 (22:19 +0100)]
Add html-, mhtml- and python-mode support to semantic symref

* lisp/cedet/semantic/symref/grep.el
(semantic-symref-filepattern-alist): Fix the entry for
'html-mode', which used a regexp-like syntax where only glob
syntax is permitted.  As a result, 'xref-find-references' (M-?)
can now find references in HTML files.  Also duplicate the same
entry for the sake of 'mhtml-mode', and add a new one for
'python-mode'.
(semantic-symref-derive-find-filepatterns): In the documentation,
clarify that returned patterns must follow the glob syntax.  Fix
an 'if' test that always evaluates to nil.
(semantic-symref-tool-grep):
(semantic-symref-perform-search): Fix typos.

7 years agoImprove documentation of 'window-scroll-functions'
Eli Zaretskii [Sat, 4 Nov 2017 16:09:01 +0000 (18:09 +0200)]
Improve documentation of 'window-scroll-functions'

* doc/lispref/windows.texi (Window Hooks): Clarify the values of
arguments of 'window-scroll-functions' functions.

* src/xdisp.c (syms_of_xdisp) <window-scroll-functions>: Doc fix.

7 years agoFix subtle problems in tabulated-list-mode with line numbers
Eli Zaretskii [Sat, 4 Nov 2017 14:28:25 +0000 (16:28 +0200)]
Fix subtle problems in tabulated-list-mode with line numbers

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-watch-line-number-width): Call
tabulated-list-init-header instead of tabulated-list-revert.
(tabulated-list-window-scroll-function): New function.
(tabulated-list-mode): Put 'tabulated-list-window-scroll-function'
on the buffer-local 'window-scroll-functions' list.

7 years agoMake gdb-non-stop-setting default to nil on MS-Windows
Eli Zaretskii [Sat, 4 Nov 2017 11:56:39 +0000 (13:56 +0200)]
Make gdb-non-stop-setting default to nil on MS-Windows

* lisp/progmodes/gdb-mi.el (gdb-non-stop-setting): Now nil on
MS-Windows.

7 years agoFix gdb-mi prompt after "attach PID" command
Mike Gulick [Sat, 4 Nov 2017 11:34:40 +0000 (13:34 +0200)]
Fix gdb-mi prompt after "attach PID" command

* lisp/progmodes/gdb-mi.el (gdbmi-bnf-console-stream-output): Set
gdb-first-done-or-error non-nil.  (Bug#29020)

Copyright-paperwork-exempt: yes

7 years agoFix doc string of 'window-configuration-change-hook'
Eli Zaretskii [Sat, 4 Nov 2017 10:00:03 +0000 (12:00 +0200)]
Fix doc string of 'window-configuration-change-hook'

* src/window.c (syms_of_window) <window-configuration-change-hook>:
Doc fix.  (Bug#29049)

7 years agoImprove documentation of window hooks
Eli Zaretskii [Sat, 4 Nov 2017 09:56:26 +0000 (11:56 +0200)]
Improve documentation of window hooks

* doc/lispref/windows.texi (Window Hooks): Fix the description of
window-configuration-change-hook.  (Bug#29049)
<run-window-scroll-functions, run-window-configuration-change-hook>:
Document these functions.

7 years agoFix hscroll suspension after cursor motion
Eli Zaretskii [Sat, 4 Nov 2017 09:30:10 +0000 (11:30 +0200)]
Fix hscroll suspension after cursor motion

* src/xdisp.c (hscroll_window_tree): Trigger a thorough redisplay
of the window when temporary suspension of hscrolling is
disabled.  (Bug#29002)