Eli Zaretskii [Sat, 13 Jan 2018 10:48:07 +0000 (12:48 +0200)]
Improve documentation of safe values of variables
* doc/lispref/variables.texi (File Local Variables): Mention the
autoload cookie as a means of defining safe values for variables.
See http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00261.html
for the details.
* doc/lispref/compile.texi (Compiler Errors): Document
'byte-compile-error-on-warn'.
Eli Zaretskii [Sat, 13 Jan 2018 09:45:04 +0000 (11:45 +0200)]
Improve the Emacs manual's "Misc" node
* doc/emacs/misc.texi (Gnus): A more descriptive section name.
(Invoking emacsclient): Mention how to avoid errors when there's
no Emacs server.
(EWW, Embedded WebKit Widgets): Now subsections under
"Hyperlinking and Web Navigation Features".
(Amusements): Add "games" to the section name. Suggested by Alex
Branham <alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
* doc/emacs/emacs.texi (Top): Adjust the top-level menus to the
above changes.
Eli Zaretskii [Thu, 11 Jan 2018 16:35:12 +0000 (18:35 +0200)]
Teach etags new interpreters for some languages
* lib-src/etags.c (Erlang_interpreters, Lua_interpreters)
(Prolog_interpreters, Python_interpreters, Ruby_interpreters): New
static variables.
(lang_names): Use them to set interpreters for Erlang, Lua,
Prolog, Python, and Ruby.
(find_entries): Support "/usr/bin/env FOO" form of specifying an
interpreter.
* test/manual/etags/perl-src/htlmify-cystic: Modify the has-bang
line to test the "env FOO" interpreter spec. (Bug#30075)
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to latest changes in test
files.
Eli Zaretskii [Wed, 10 Jan 2018 19:24:58 +0000 (21:24 +0200)]
Fix documentation of some x-* functions
* lisp/term/pc-win.el (x-display-pixel-width)
(x-display-pixel-height, x-display-planes)
(x-display-color-cells, x-server-max-request-size)
(x-server-vendor, x-server-version, x-display-screens)
(x-display-mm-height, x-display-mm-width)
(x-display-backing-store, x-display-visual-class): Provide doc
strings, so that 'makedoc' produces non-empty documentation in
etc/DOC for these functions. (Bug#30068)
Michael Albinus [Wed, 10 Jan 2018 12:39:17 +0000 (13:39 +0100)]
Fix Bug#30057
* test/lisp/filenotify-tests.el (file-notify--test-tmpdir): New defvar.
(file-notify--test-cleanup, file-notify--test-make-temp-name)
(file-notify-test01-add-watch, file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir)
(file-notify-test10-sufficient-resources): Use it. (Bug#30057)
Glenn Morris [Wed, 10 Jan 2018 03:59:04 +0000 (19:59 -0800)]
Tag some unstable tests, and skip by default (bug#24503)
* Makefile.in (check-all): New phony target.
* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE):
Also skip unstable tests.
(SELECTOR_ALL): New variable.
(check-all): New phony target.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-6):
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor):
Mark as unstable rather than skipping on hydra.nixos.org.
Tak Kunihiro [Sun, 7 Jan 2018 07:17:09 +0000 (09:17 +0200)]
Make pixel-wise scrolling less laggy
* lisp/pixel-scroll.el (pixel-dead-time, pixel-last-scroll-time):
New variables.
(pixel-scroll-up, pixel-scroll-down): Invoke 'scroll-up' or
'scroll-down' when called within 'pixel-dead-time'. (Bug#29737)
Alan Third [Wed, 3 Jan 2018 13:45:03 +0000 (13:45 +0000)]
Fix child frame placement issues (bug#29953)
* src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS):
(NS_PARENT_WINDOW_TOP_POS): Get the parent frame through the frame
struct as invisible child windows are detached from their parents in
NS.
* src/nsterm.m (x_set_offset): Offscreen frames have `nil' screen
value, so handle that gracefully. Child frames with negative left and
top should be positioned relative to the bottom right of the parent
frame.
Alan Mackenzie [Sat, 6 Jan 2018 18:55:08 +0000 (18:55 +0000)]
Describe the precise interaction of complex primitives with the change hooks
* doc/lispref/text.texi (Change Hooks): Document that most buffer changing
primitives call before- and after-change-functions in balanced pairs, but that
some complex primitives call b-c-f once, and a-c-f zero, one, or several
times.
Alan Mackenzie [Sat, 6 Jan 2018 11:48:32 +0000 (11:48 +0000)]
Fix mark-defun when there's no spaces between successive defuns.
The problem was a parse-partial-sexp call which tried to use the STOPBEFORE
argument to detect non-syntactic WS. This fails on a "}", which does not
begin a sexp.
* lisp/emacs-lisp/lisp.h (beginning-of-defun--in-emptyish-line-p): Enhance to
handle BOL being in a string.
(beginning-of-defun-comments): Call the above function in place of the call
to parse-partial-sexp.
Eli Zaretskii [Sat, 6 Jan 2018 08:56:21 +0000 (10:56 +0200)]
Fix Dired display and operations on file names with raw bytes
* src/coding.c (decode_coding): When flushing remaining raw bytes
from multibyte text, copy 2-byte forms of eight-bit-*
characters as single characters, not as 2 raw bytes. (Bug#29189)
Eli Zaretskii [Fri, 5 Jan 2018 09:22:27 +0000 (11:22 +0200)]
Fix failures in smerge-mode on MS-Windows
* lisp/vc/smerge-mode.el (smerge--refine-chopup-region): Use
utf-8-emacs-unix, not emacs-internal, to make the forced EOL
convention explicit.
(smerge-refine-regions): Use utf-8-emacs instead of
emacs-internal, to allow decoding of non-Unix EOL conventions.
(Bug#29916)
Noam Postavsky [Tue, 19 Dec 2017 01:30:10 +0000 (20:30 -0500)]
Don't bind dframe events on load (Bug#29599)
* lisp/dframe.el (dframe-setup-hook): New hook.
(dframe-set-special-events): New function, containing previous
top-level key binding code.
(top-level): Add it to dframe-setup-hook.
(dframe-frame-mode): Run the hook.
Ross Donaldson [Mon, 25 Dec 2017 20:51:19 +0000 (12:51 -0800)]
New customization variable for python-mode indentation (Bug#28475)
* lisp/progmodes/python.el (python-indent-def-block-scale): New variable.
(python-indent--calculate-indentation): Let it control how many indent
levels are inserted for multi-line function signatures.
Alan Third [Fri, 22 Dec 2017 12:27:05 +0000 (12:27 +0000)]
Fix menu keyboard shortcuts on macOS (Bug#29595)
* src/nsmenu.m (addItemWithWidgetValue)[NS_IMPL_COCOA]: It looks like
macOS 10.13 no longer ignores long modifier strings, so explicitly use
an empty string.
Paul Eggert [Mon, 1 Jan 2018 01:19:57 +0000 (01:19 +0000)]
Merge from Gnulib
This incorporates:
2018-01-01 maint: Run 'make update-copyright'
2017-12-29 Add cross-compilation results for GNU/Hurd.
2017-12-12 explicit_bzero: port to macOS + Clang 9.0.0
Eli Zaretskii [Sun, 31 Dec 2017 16:20:12 +0000 (18:20 +0200)]
Allow customization of decoding of "man" command
* lisp/man.el (Man-coding-system): New defcustom.
(Man-start-calling): Use it, and also pay attention to user
overriding coding-system-for-read. (Bug#29872)
Eli Zaretskii [Fri, 29 Dec 2017 21:41:20 +0000 (23:41 +0200)]
Fix subtle problem with scroll-down when scroll-margin is nonzero
* src/window.c (window_scroll_pixel_based): Account for
scroll-margin when scrolling down, i.e. moving window-start
towards the beginning of the buffer. Reported by zhang cc
<ccsmile2008@outlook.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
Eli Zaretskii [Thu, 28 Dec 2017 17:23:34 +0000 (19:23 +0200)]
Improve documentation of 'inhibit-modification-hooks' and friends
* src/buffer.c (Fset_buffer_modified_p)
(Frestore_buffer_modified_p): Doc fixes.
* src/insdel.c (syms_of_insdel) <inhibit-modification-hooks>:
Document in the doc string that this variable also inhibits file
locks and active region handling. (Bug#29846)
Eli Zaretskii [Wed, 27 Dec 2017 18:23:10 +0000 (20:23 +0200)]
Fix documentation of delsel and of killing text
* doc/emacs/killing.texi (Appending Kills): Make sure the text
with 2 spaces is not broken between 2 lines.
* doc/emacs/mark.texi (Using Region): Remove the sentence about
delsel mode that describes behavior which exists even without
delsel mode turned on. Suggested by Petteri Hintsanen
<petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Sun, 24 Dec 2017 18:47:06 +0000 (20:47 +0200)]
Adjudicate review comments for the "Text" chapter of user manual
* doc/emacs/text.texi (Text): Rearrange text for clarity. Add
cross-reference to the Org manual. Make the cross-reference to
Outline Mode appear in online manuals as well (the conditional was
a forgotten remnant from time immemoriam).
(Paragraphs): Add a note that 'paragraph-start' and
'paragraph-separate' should not be anchored.
(Auto Fill): Remove redundant text. Suggested by Petteri
Hintsanen <petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Alan Mackenzie [Sun, 24 Dec 2017 10:29:52 +0000 (10:29 +0000)]
In C-h k <mouse-n>, alert user to existence of any matching down-mouse-event
, and instruct her to hold the mouse button to display its documentation.
* lisp/help.el (help-downify-mouse-event-type): New function.
(help-read-key-sequence, describe-key): handle double-click-time being nil or
t.
(describe-key): Print out instructions for displaying documentation of
matching mouse down key sequence command when such exists.
Alan Mackenzie [Sat, 23 Dec 2017 18:00:10 +0000 (18:00 +0000)]
Make C-h c/k S-mouse-1 display message for mouse-appearance-menu, etc.
Currently, C-h c/k for S-mouse-1 reports that S-mouse-1 is unbound, ignoring
that S-down-mouse-1 is bound. We fix this by reporting on the "latest" mouse
event of a sequence which is bound.
* lisp/help.el (help-read-key-sequence): Save all encountered mouse events in
a list. Return the latest one which has a binding.
Tak Kunihiro [Sat, 23 Dec 2017 09:16:40 +0000 (11:16 +0200)]
Fix scrolling up in pixel-scroll.el
* lisp/pixel-scroll.el (pixel-scroll-up): Do not try to move cursor
down when EOB is shown at the top. This function is reverted to
commit 1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c. (bug#29737)
Eli Zaretskii [Fri, 22 Dec 2017 10:18:12 +0000 (12:18 +0200)]
Improve documentation of selecting windows
* doc/lispref/windows.texi (Basic Windows, Selecting Windows):
Clarify what selecting a window means for keyboard input, and that
input focus may need to be considered when selecting windows on
other frames. See
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00372.html
for more details.
Eli Zaretskii [Fri, 22 Dec 2017 10:04:23 +0000 (12:04 +0200)]
Improve documentation of records
* doc/lispref/Makefile.in (srcs): Add the forgotten records.texi.
* doc/lispref/records.texi (Records): Recommend that record type
names use package-naming conventions.
* etc/NEWS: Add the naming convention recommendation for record
types.
Eli Zaretskii [Fri, 22 Dec 2017 09:19:56 +0000 (11:19 +0200)]
Fix documentation of 'mouse-drag-and-drop-region' and friends
* doc/emacs/frames.texi (Drag and Drop): Index
'mouse-drag-and-drop-region-cut-when-buffers-differ',
'mouse-drag-and-drop-region-show-tooltip', and
'mouse-drag-and-drop-region-show-cursor'.
* etc/NEWS: Fix the format of the related entries.
Eli Zaretskii [Fri, 22 Dec 2017 09:11:29 +0000 (11:11 +0200)]
Improve detection of speller version in ispell.el
* lisp/textmodes/ispell.el (ispell-check-version): Accept more
general forms of version numbers for Aspell, Hunspell, and
Enchant, to include various beta and prereleases. (Bug#29801)
Alan Mackenzie [Thu, 21 Dec 2017 17:49:14 +0000 (17:49 +0000)]
Fontify a CPP construct correctly when a comment follows without spaces
Do this by removing a broken optimization in the state cache which put
category text properties on a character between the end of the CPP construct
and the beginning of the comment. This can't work when there's no such
character.
* lisp/progmodes/cc-engine.el (c-no-comment-end-of-macro): Return the comment
start position rather than one character before it.
(c-invalidate-state-cache, c-parse-state): Remove the invocations of
c-with-all-but-one-cpps-commented-out and c-with-cpps-commented-out.
* lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Rename to
c-neutralize-syntax-in-CPP and remove the bits which applied category
properties.
* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Incorporate the
new name of the function c-neutralize-syntax-in-CPP.
Alan Mackenzie [Thu, 21 Dec 2017 17:18:40 +0000 (17:18 +0000)]
Fix loss of documentation face in certain CC Mode doc comment situations
* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): Take into account
the possibility of font-lock-comment-delimiter-face. Test rigorously for
"/**" (etc.) being itself inside a literal, rather than just depending on the
face of the previous character.