Eli Zaretskii [Sat, 24 Dec 2016 18:12:06 +0000 (20:12 +0200)]
Revert to pre-25.1 behavior in ffap
* lisp/ffap.el (ffap-lax-url): Change the default to t, to produce
the same behavior as in Emacs 24.x. (Bug#25264)
Explain the trade-offs of customizing this in the doc string.
Noam Postavsky [Tue, 20 Dec 2016 00:49:47 +0000 (19:49 -0500)]
Improve skeleton docstrings
* lisp/skeleton.el (skeleton-end-newline): Remove mention of
`skeleton-end-hook', its default code was moved into `skeleton-insert'.
(skeleton-insert): Mention `skeleton-end-newline' and move reference to
`skeleton-end-hook' above the explanation of skeleton syntax.
Eli Zaretskii [Sat, 17 Dec 2016 17:05:21 +0000 (19:05 +0200)]
Repair desktop restoration on text terminals
* lisp/desktop.el (desktop-restoring-frameset-p): Test for the GUI
frame here, instead of in desktop-restoring-frameset. That's
because desktop-read wants to know whether frameset will actually
be restored, and has fallback procedures up its sleeve when it
won't be; these fallbacks need to be invoked when the frameset is
not going to be restored. (Bug#24298)
Eli Zaretskii [Fri, 16 Dec 2016 08:49:31 +0000 (10:49 +0200)]
Improve documentation of 'define-coding-system'
* lisp/international/mule.el (define-coding-system): Warn against
possible infinite recursion in pre-write-conversion and
post-read-conversion functions. (Bug#25203)
Glenn Morris [Sun, 11 Dec 2016 02:23:51 +0000 (18:23 -0800)]
Bump makeinfo requirement from 4.7 to 4.13
* configure.ac: Bump makeinfo version requirement from 4.7 to 4.13.
We need at least 4.8, and that may be buggy, so go for the last
of the 4 series, which is 8 years old. (Bug#25108)
Noam Postavsky [Fri, 2 Dec 2016 05:03:57 +0000 (00:03 -0500)]
Define struct predicate before acccesors
The accessor functions use the predicate function, which causes problems
when reloading after unload-feature: the compiler-macro property is
still present on the predicate symbol, and the compiler fails to find
the definition when trying to inline it into the accessor
function (Bug#25088).
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Move predicate definition
before field accessor definitions.
Glenn Morris [Thu, 8 Dec 2016 00:13:05 +0000 (19:13 -0500)]
Make make-dist --snapshot do some sanity checks
* make-dist: Snapshot mode no longer disables checks.
Checks now includes checks for freshness. (Bug#25084)
Checks now exits with an error if problems were found.
Noam Postavsky [Sun, 4 Dec 2016 06:06:52 +0000 (01:06 -0500)]
Don't assume window-point and point are the same
The function `cursor-sensor--detect' calls `bobp' to decide whether to
check properties at (1- (window-point)). However, (window-point) may be
at beginning of buffer, even if (point) is not. In this case an
`args-out-of-range' error will be signaled (Bug#25104).
* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Check the
value of (window-point) against (point-min), rather than (bobp) to
decide if (1- (window-point)) is accessible.
Eli Zaretskii [Fri, 2 Dec 2016 09:10:04 +0000 (11:10 +0200)]
Improve indexing of 'man'
* doc/emacs/programs.texi (Man Page): Index 'man', not
'manual-entry', as the latter is an alias for the former.
Suggested by Hong Xu <hong@topbug.net>. (Bug#25033)
Paul Eggert [Fri, 2 Dec 2016 07:13:31 +0000 (23:13 -0800)]
Port to Sun C 5.14
Backport from master. Sun C 5.14 supports C11 but not GCC
extensions, and so refuses to compile Emacs without this patch.
* src/alloc.c (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on
size_t, as in general this macro is restricted to signed types.
Eli Zaretskii [Mon, 28 Nov 2016 15:43:25 +0000 (17:43 +0200)]
Fix 'expand-file-name' during startup on MS-Windows
* src/w32.c (w32_init_file_name_codepage): New function, resets
file_name_codepage and w32_ansi_code_page to undo the values
recorded during dumping.
(codepage_for_filenames): Fix an embarrassing typo. Ignore the
cached value of file-name encoding if it is nil, i.e. not
initialized yet. Actually cache the last used file-name encoding
to avoid calling APIs when not necessary.
* src/w32term.c (syms_of_w32term): Set the value of
w32_unicode_filenames according to the OS version. This avoids
resetting it during startup, which then causes temacs to run with
the incorrect value.
* src/emacs.c (main): Call w32_init_file_name_codepage early
during the startup.
* src/fileio.c (Fexpand_file_name) [WINDOWSNT]: Update 'newdir'
after converting $HOME to a UTF-8 string, so that 'newdirlim' is
consistent with it. (Bug#25038)
* lisp/international/mule-cmds.el (set-locale-environment): Set
'default-file-name-coding-system' to the ANSI codepage even in
non-interactive sessions.
* lisp/files.el (directory-abbrev-alist, abbreviated-home-dir):
Doc fix.
(abbreviate-file-name): Decode 'abbreviated-home-dir' if it is a
unibyte string.
* doc/lispref/files.texi (Directory Names): Index
'directory-abbrev-alist'.
Karl Fogel [Sat, 26 Nov 2016 05:44:48 +0000 (23:44 -0600)]
Handle TeX comments when making new paragraph
* lisp/textmodes/tex-mode.el (tex-handle-newline): New function.
Handle comment case directly, and dispatch to `tex-terminate-paragraph'
for original behavior in non-comment case.
(tex-mode-map): Bind above to C-j, replacing `tex-terminate-paragraph'.
Eli Zaretskii [Thu, 24 Nov 2016 17:37:38 +0000 (19:37 +0200)]
; Minor copyedit in the Emacs manual
* doc/emacs/maintaining.texi (Select Tags Table): Remove text that
is no longer pertinent. (The "explained above" part was moved to
another place in the manual a long time ago.)
Philipp Stephani [Tue, 22 Nov 2016 20:32:11 +0000 (21:32 +0100)]
Guard terminal parameter in XTerm mouse mode
It has been observed (in the HTerm terminal emulator) that the
event stored in the 'xterm-mouse-last-down' terminal parameter gets
overwritten during a mouse drag operation, causing Emacs to attempt to
synthesize the non-existing <drag-mouse-0> event. Copy the event into
the terminal parameter to protect against such modifications.
* lisp/xt-mouse.el (xterm-mouse-translate-1): Guard against modification
of input event list.
Eli Zaretskii [Mon, 21 Nov 2016 16:22:10 +0000 (18:22 +0200)]
Fix menu bindings of Dired 'A' and 'Q' commands
* lisp/dired.el (dired-mode-map): Rebind "Search Files" and "Query
Replace in Files" menu items to 'dired-do-find-regexp' and
'dired-do-find-regexp-and-replace', respectively. (Bug#24977)
Eli Zaretskii [Sun, 20 Nov 2016 19:08:47 +0000 (21:08 +0200)]
Avoid errors in shr-pixel-column due to dedicated windows
* lisp/net/shr.el (shr-pixel-column): If we are switching to
another buffer in the selected window, make that window
temporarily non-dedicated. (Bug#24950)
Eli Zaretskii [Fri, 18 Nov 2016 11:02:34 +0000 (13:02 +0200)]
Improve documentation of functions that accept time values
* doc/lispref/os.texi (Time Calculations): Mention the meaning of
'nil' or a scalar number as the time-value argument. Add a
cross-reference to 'float-time' for computing a time difference as
a scalar number of seconds.
* src/editfns.c (Fformat_time_string, Ftime_less_p)
(Ftime_subtract, Ftime_add, Fdecode_time, Fcurrent_time_string)
(Fcurrent_time_zone): Mention in the doc strings the meaning of
nil argument and the fact that a time value can be a scalar number
of seconds since the epoch.
(Ftime_subtract): Mention 'float-time'.
Eli Zaretskii [Wed, 16 Nov 2016 16:11:33 +0000 (18:11 +0200)]
Fix sluggish display of symbols in UTF-8 language environment
* lisp/international/fontset.el (setup-default-fontset): Make sure
Symbola and FreeMono are set up in the default fontset as belonging
to the "iso10646-1" registry. In the UTF-8 locale, this avoids a
long and futile search for a suitable font, whose side effect is a
lot of consing, which then hits the font-cache compacting issue,
and causes very sluggish redisplay of characters displayed by
these fonts. All this happens because the default for the
registry is "iso8859-1". (Bug#24953)
Glenn Morris [Wed, 16 Nov 2016 00:18:28 +0000 (19:18 -0500)]
Don't confuse how Texinfo outputs @var with the input
* doc/emacs/rmail.texi (Movemail):
* doc/lispref/control.texi (Pattern matching case statement):
* doc/lispref/frames.texi (Size and Position):
* doc/lispref/processes.texi (Asynchronous Processes):
* doc/lispref/text.texi (Document Object Model):
* doc/lispref/windows.texi (Coordinates and Windows):
Do not upper-case the argument of @var.
Alan Mackenzie [Thu, 10 Nov 2016 21:22:05 +0000 (21:22 +0000)]
Correct the statement about programming modes always running prog-mode-hook.
doc/emacs/modes.texi (Major Modes): Amend the statement about programming
modes running prog-mode-hook to say that it applies to many (not all) such
modes, and specifying exactly which modes.
Noam Postavsky [Tue, 8 Nov 2016 01:03:48 +0000 (20:03 -0500)]
Do call debugger on failed cl-assert
"Don't call debug on failed cl-assert..." removed the call to `debug' in
cl--assertion-failed because `debug' calls `kill-emacs' in batch mode,
thus messing up ert test runs. However, calling the debugger is useful
because it allows catching failed assertions even inside
`condition-case' calls. The problem with ert can be avoided by calling
`debugger' instead of `debug' directly, since ert installs its own
debugger while running tests.
* lisp/emacs-lisp/cl-preloaded.el (cl--assertion-failed): Call
`debugger' if `debug-on-error' is non-nil.
* lisp/progmodes/python.el (python-info-docstring-p): Improve
infloop avoidance: replace (bobp) with generic test for
forward progress.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
test for bug#24905
* doc/emacs/abbrevs.texi (Dynamic Abbrevs): Mention
'dabbrev-check-all-buffers', 'dabbrev-check-other-buffers', and
'dabbrev-ignored-buffer-names' and their purpose. (Bug#24890)
Noam Postavsky [Wed, 2 Nov 2016 03:24:33 +0000 (23:24 -0400)]
Fix python-mode hideshow regexp
2015-02-07 "Fix hideshow integration[...]" changed the regexp added to
`hs-special-modes-alist' so that it worked when not searching from the
beginning of the line. However, this allows matching tokens ending in
"def" or "class", not just those keywords. This results in an infinite
loop in hs-hide-all (Bug #24815).
* lisp/progmodes/python.el (python-mode): Add symbol boundaries around
the def|class matching part of the regexp added to
hs-special-modes-alist.