Paul Eggert [Fri, 3 Nov 2017 09:20:15 +0000 (02:20 -0700)]
Change GCALIGNMENT back to an integer literal
* src/lisp.h (GCALIGNMENT): Change it back to a macro
that expands to a literal integer constant, for older GCC.
I had mistakenly thought that only MSVC had the problem.
Problem repored by Eli Zaretskii (Bug#29040#69).
Hong Xu [Tue, 29 Nov 2016 23:17:27 +0000 (15:17 -0800)]
Improve the doc of eshell-cmpl-* custom variables (Bug#25069)
* lisp/eshell/em-cmpl.el (eshell-cmpl--custom-variable-docstring): New
function to generate the docstring for custom variables derived from
pcomplete-* variables.
(eshell-cmpl-file-ignore, eshell-cmpl-dir-ignore)
(eshell-cmpl-ignore-case, eshell-cmpl-autolist)
(eshell-cmpl-suffix-list, eshell-cmpl-recexact)
(eshell-cmpl-man-function, eshell-cmpl-compare-entry-function)
(eshell-cmpl-expand-before-complete, eshell-cmpl-cycle-completions)
(eshell-cmpl-cycle-cutoff-length, eshell-cmpl-restore-window-delay)
(eshell-command-completion-function, eshell-cmpl-command-name-function)
(eshell-default-completion-function, eshell-cmpl-use-paring): Use it
to set the docstring.
Paul Eggert [Thu, 2 Nov 2017 20:18:16 +0000 (13:18 -0700)]
Merge from Gnulib
This incorporates:
2017-10-29 timespec: prefer ‘assume’ to ‘assure’
2017-10-27 timespec.h: use "assure" to avoid a spurious warning
2017-10-09 getopt-posix: Fix build failure if ac_cv_header_getopt_h=no
* build-aux/config.guess, build-aux/config.sub:
* lib/timespec.h, lib/unistd.in.h:
Copy from Gnulib.
Paul Eggert [Thu, 2 Nov 2017 20:06:38 +0000 (13:06 -0700)]
Fix alignment portability problems
Do not assume that the natural alignment of Lisp objects is a
multiple of GCALIGNMENT. This improves on the portability of the
recent fix for Bug#29040.
* 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):
Use GCALIGNED, not alignas (GCALIGNMENT).
* src/alloc.c (COMMON_MULTIPLE):
Move back here from lisp.h, since it is no longer used elsewhere.
* src/lisp.h (GCALIGNMENT): No longer a macro, since we need not
worry about MSVC. Omit no-longer-needed consistency check.
* src/thread.c (THREAD_ALIGNMENT): Remove.
Martin Rudalics [Thu, 2 Nov 2017 08:28:25 +0000 (09:28 +0100)]
In frame parameters documentation mention desktop saving/restoring
* doc/lispref/frames.texi (Frame Parameters): Mention that
applications have to care about which parameters they want to
get saved and restored by the desktop library.
Phil Sainty [Mon, 16 Oct 2017 10:38:42 +0000 (23:38 +1300)]
Don't clobber docstrings of explicitly-defined mode hook variables
* lisp/emacs-lisp/derived.el (define-derived-mode):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): When defining the
mode hook variable, do not clobber pre-existing docstrings.
Alan Mackenzie [Mon, 30 Oct 2017 17:33:03 +0000 (17:33 +0000)]
Fix "Args out of range" error in c-determine-limit. Fixes bug #28598.
* lisp/progmodes/cc-engine.el (c-determine-limit-get-base): If the candidate
position for BASE is below point-min, scan forward to the end of the current
literal.
(c-determine-limit): Add an extra arm to the final cond form, testing for BASE
being at point-min.
Mark Oteiza [Sun, 29 Oct 2017 00:32:50 +0000 (20:32 -0400)]
Add ChkTeX flymake backend for latex-mode
* lisp/textmodes/tex-mode.el (tex-flymake): New custom group.
(tex-chktex-program, tex-chktex-extra-flags): New custom variables.
(latex-mode): Add backend to flymake-diagnostic-functions.
(tex-chktex--process): New variable.
(tex-chktex-command, tex-chktex): New functions.
Eli Zaretskii [Sat, 28 Oct 2017 16:39:48 +0000 (19:39 +0300)]
Avoid segfaults in 64-bit Windows builds
* src/lisp.h (COMMON_MULTIPLE): Move here from alloc.c.
* src/thread.c (THREAD_ALIGNMENT): New macro.
(main_thread): Use THREAD_ALIGNMENT to align propertly. (Bug#29040)
Eli Zaretskii [Fri, 27 Oct 2017 14:43:21 +0000 (17:43 +0300)]
Improve documentation of how faces are applied to display stings
* doc/lispref/display.texi (Displaying Faces): Describe how the
faces of the "underlying" text affect overlay and display strings.
(Display Margins): Add a cross-reference to "Displaying Faces".
Tak Kunihiro [Fri, 27 Oct 2017 14:17:42 +0000 (17:17 +0300)]
Improve pixel-scroll-mode
Scroll vertically by number of pixels returned by
'frame-char-height' with or without horizontally scrolled.
(Bug#28922)
* lisp/pixel-scroll.el (pixel-resolution-fine-flag): When t, scroll
by number of pixels returned by 'frame-char-height'.
(pixel-scroll-up): Scroll by 'frame-char-height'. Fix algorithm to
move cursor to avoid unexpected jump.
(pixel-scroll-down): Scroll by 'frame-char-height'.
(pixel-bob-at-top-p): Consider number of pixels that is about to
scroll.
(pixel-posn-y-at-point): Consider existence of an overlay string.
Return nil when horizontally scrolled.
(pixel-point-at-top-p): Consider number of pixels that is about to
scroll. Use different algorithm when horizontally scrolled.
(pixel-point-at-bottom-p): Consider number of pixels that is about
to scroll. Return nil when horizontally scrolled.
(pixel-scroll-pixel-down): Move cursor when horizontally scrolled.
(pixel--whistlestop-line-up): Change cosmetics and move cursor when
horizontally scrolled.
(pixel-line-height): Call 'pixel-visual-line-height' instead of
'line-pixel-height'.
(pixel-visual-line-height): New function to return height in pixels
of text line where cursor is with or without horizontally scrolled,
considering response of display engine.
(pixel-visible-pos-in-window): New function to return position of
a char shown on text line where cursor is on screen with or without
horizontally scrolled.
Katsumi Yamaoka [Fri, 27 Oct 2017 01:13:25 +0000 (01:13 +0000)]
Enable gnus-read-ephemeral-* to run multiple times (bug#29008)
NOTE: *DO NOT* merge this change to the trunk.
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-gmane-group)
(gnus-read-ephemeral-bug-group): Make it work for any number of times
for the case `url-automatic-caching' is set (bug#29008).
Alan Mackenzie [Thu, 26 Oct 2017 18:29:39 +0000 (18:29 +0000)]
Fix another "wrong side of point" error in CC Mode.
This fixes (a follow-up to) bug #28850.
A internal generated form for scanning text to fontify had a LIMIT parameter.
It also locally bound LIMIT to a value possibly beyond the original LIMIT,
allowing point to move beyond the original LIMIT, and to create the wrong side
error. Fix it by checking point is not beyond LIMIT in the outer context
before using it.
* lisp/progmodes/cc-fonts.el (c-make-font-lock-search-form): Add a new
parameter CHECK-POINT which, when non-nil, directs the function to generate a
check on point.
(c-make-font-lock-context-search-function): Invoke the above function with new
argument value t.
Michael Albinus [Thu, 26 Oct 2017 14:24:28 +0000 (16:24 +0200)]
Fix Bug#28959
* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use `tramp-tramp-file-p' rather than `tramp-file-name-p'. Add
hop to backup file name. (Bug#28959)
Paul Eggert [Thu, 26 Oct 2017 03:47:48 +0000 (20:47 -0700)]
Fix duplicate .o file on QNX
* configure.ac (CYGWIN_OBJ): Leave empty on QNX.
Problem reported by Elad Lahav in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00750.html
Dmitry Gutov [Wed, 25 Oct 2017 23:43:33 +0000 (02:43 +0300)]
Fix two js indentation problems
Fix intentation problems reported in
https://github.com/mooz/js2-mode/issues/463.
* lisp/progmodes/js.el (js--continued-expression-p):
Check syntax state after /.
(js--multi-line-declaration-indentation):
Check syntax state before "const".
Alan Mackenzie [Wed, 25 Oct 2017 18:14:00 +0000 (18:14 +0000)]
Fix a "wrong side of point" error in CC Mode. Fixes bug #28850.
The cause was a scanning over a bracket pair taking us beyond the supplied
LIMIT parameter in c-forward-declarator.
* lisp/progmodes/cc-engine.el (c-forward-declarator): Add three checks (<
(point) limit) whilst dealing with tokens after the declared identifier.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Don't supply a LIMIT
argument to `c-forward-declarator' (twice), since we want to fontify up till
the end of a declarator, not an arbitrary jit-lock chunk end.
Stefan Monnier [Wed, 25 Oct 2017 16:31:40 +0000 (12:31 -0400)]
Fix autoload of flymake from elisp-mode during bootstrap (bug#28994)
* lisp/loadup.el: add `progmodes` to load-path so we can find flymake.el.
* lisp/kmacro.el: Require `replace` since we use query-replace-map.
* lisp/replace.el: Require `text-mode` since we use text-mode-map.
Noam Postavsky [Tue, 24 Oct 2017 23:19:37 +0000 (19:19 -0400)]
Fix compile warning for non-w32 builds
Since 2017-07-25 "ls-lisp: Add an unload function and enable lexical
binding", the non-w32 builds would treat the undeclared
w32-collate-ignore-punctuation variable as lexical.
* lisp/ls-lisp.el (top-level): Declare it as a dynamic variable.
David Glasser [Tue, 10 Oct 2017 22:46:53 +0000 (15:46 -0700)]
Display commit in package description, if available (Bug#28637)
MELPA includes a :commit field in its
packages (https://github.com/melpa/package-build/pull/6). You can use
this to tell if MELPA has processed a recently-merged change. This
commit adds that metadata to the package description buffer.
* lisp/emacs-lisp/package.el: Display commit in package description.
Paul Eggert [Tue, 24 Oct 2017 19:54:28 +0000 (12:54 -0700)]
Port to QNX
Simplified version of a patch proposed by Elad Lahav in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00716.html
which is based on a previous patch I proposed in:
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00707.html
* configure.ac (opsys, CFLAGS, LIBS_SYSTEM, hybrid_malloc)
(system_alloc, FIRST_PTY_LETTER, CYGWIN_OBJ):
Set appropriately for QNX.
* src/unexelf.c [__QNX__]: Include <sys/elf.h> instead of <elf.h>.
(unexec): Check for sbrk failure, and fall back on old BSS end.
Martin Rudalics [Mon, 23 Oct 2017 07:53:41 +0000 (09:53 +0200)]
Fix some ‘window-normalize-’ prefixed functions (Bug#28947)
* lisp/window.el (window-normalize-buffer): Fix case where
BUFFER-OR-NAME is a string specifying a dead buffer. Fix
doc-string (Bug#28947).
(window-normalize-frame, window-normalize-window): Fix
doc-strings (Bug#28947).
Paul Eggert [Mon, 23 Oct 2017 05:44:42 +0000 (22:44 -0700)]
Port to OpenIndiana
Problem reported by Nelson H. F. Beebe (Bug#28893).
Also see Bug#23748, Bug#9736, and Bug#5735.
* configure.ac (tputs_library): Prefer libcurses to libtermcap,
since OpenIndiana libtermcap lacks tparm.
This approach does mean that keywords that have spaces before them
inside of docstrings aren't filled, but I think this is should be fine
until Bug#28937 is fixed.
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Add a colon to
paragraph-start unconditionally, but require that it follows at least
one space. (Bug#24622)
* test/lisp/emacs-lisp/lisp-tests.el: New tests for Bug#24622 and
Bug#7751.
Alan Mackenzie [Sun, 22 Oct 2017 14:18:20 +0000 (14:18 +0000)]
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.
Use the new function directly in several places where c-forward-token-2
wouldn't move over the last token in the buffer. This caused an infinite loop
in c-restore-<>-properties.
* lisp/progmodes/cc-engine.el (c-forward-over-token-and-ws): New function,
extracted from c-forward-token-2.
(c-forward-token-2): Refactor, calling the new function.
(c-restore-<>-properties): Fix infinite loop.
(c-forward-<>-arglist-recur, c-in-knr-argdecl)
(c-looking-at-or-maybe-in-bracelist): Call the new function directly in place
of c-forward-token-2.
* lisp/progmodes/cc-cmds.el (c-defun-name) Call the new function directly in
place of c-forward-token-2.
* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Call the new
function directly in place of c-forward-token-2.
Paul Eggert [Sun, 22 Oct 2017 07:29:04 +0000 (00:29 -0700)]
Fix xdg timestamp error on 32-bit Emacs
* lisp/xdg.el (xdg-thumb-mtime): Return an Emacs timestamp,
not an integer. This avoids signaling an error on 32-bit
Emacs, where timestamps typically do not fit into fixnums
(Bug#28921).
Noam Postavsky [Sat, 21 Oct 2017 15:52:24 +0000 (11:52 -0400)]
Another fix for unsafe directory error message (Bug#865)
* lisp/server.el (server-ensure-safe-dir): Put file owner's uid, not
current user's for the wrong owner case. Show expanded file name in
error message.
Noam Postavsky [Fri, 20 Oct 2017 00:07:05 +0000 (20:07 -0400)]
Handle https url for debbugs mbox (Bug#28831)
In 2017-09-13 "Prefer HTTPS to FTP and HTTP in documentation",
gnus-bug-group-download-format-alist was updated to use https for the
debbugs.gnu.org mbox links, but gnus-read-ephemeral-bug-group assumed
http links.
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use
url-parse functions to get the host name, instead of ad-hoc regexps.
Make flymake's mouse-wheel interaction portable (Bug#28732)
* lisp/progmodes/flymake.el (flymake--mode-line-format): Bind
'mouse-wheel-down-event' and 'mouse-wheel-up-event' instead of
'mouse-4' and 'mouse-5'. Update the tooltip text accordingly, and
remove a stray newline in it.