]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoMake eww-search-words prompt for query if nothing selected
Alex Branham [Sun, 2 Jul 2017 19:18:47 +0000 (21:18 +0200)]
Make eww-search-words prompt for query if nothing selected

* lisp/net/eww.el (eww-search-words): Make eww-search-words prompt the
user for a search query if the region is inactive or if the region is
just whitespace.

Copyright-paperwork-exempt: yes

7 years ago* lisp/emacs-lisp/cl-print.el (cl-print-compiled-button): t by default.
Noam Postavsky [Sun, 2 Jul 2017 00:54:41 +0000 (20:54 -0400)]
* lisp/emacs-lisp/cl-print.el (cl-print-compiled-button): t by default.

* lisp/emacs-lisp/debug.el (debugger-insert-backtrace):
* lisp/help-fns.el (describe-variable): No need to let-bind
`cl-print-compiled-button' to t anymore.

7 years agoElectric quotes: Improve support for Markdown mode (Bug#24709)
Philipp Stephani [Wed, 28 Jun 2017 21:47:57 +0000 (23:47 +0200)]
Electric quotes: Improve support for Markdown mode (Bug#24709)

Introduce a new user option 'electric-quote-context-sensitive'.  If
non-nil, have ' insert an opening quote if sensible.

Also introduce a new variable 'electric-quote-code-faces'.  Major
modes such as 'markdown-mode' can add faces to this list to treat text
as inline code and disable electric quoting.

* lisp/electric.el (electric-quote-context-sensitive): New user
option.
(electric-quote-code-faces): New variable.
(electric-quote-post-self-insert-function): Treat ' as ` if
desired and applicable; disable electric quoting for given faces.

* test/lisp/electric-tests.el (electric-quote-opening-single)
(electric-quote-closing-single, electric-quote-opening-double)
(electric-quote-closing-double)
(electric-quote-context-sensitive-backtick)
(electric-quote-context-sensitive-bob-single)
(electric-quote-context-sensitive-bob-double)
(electric-quote-context-sensitive-bol-single)
(electric-quote-context-sensitive-bol-double)
(electric-quote-context-sensitive-after-space-single)
(electric-quote-context-sensitive-after-space-double)
(electric-quote-context-sensitive-after-letter-single)
(electric-quote-context-sensitive-after-letter-double)
(electric-quote-context-sensitive-after-paren-single)
(electric-quote-context-sensitive-after-paren-double)
(electric-quote-markdown-in-text)
(electric-quote-markdown-in-code): New unit tests.

7 years ago* doc/misc/tramp.texi: Replace ftp:// and http:// URLs by https://.
Michael Albinus [Sun, 2 Jul 2017 15:11:12 +0000 (17:11 +0200)]
* doc/misc/tramp.texi: Replace ftp:// and http:// URLs by https://.

7 years agoAsk confirmation for all suspicious wildcards
Tino Calancha [Sun, 2 Jul 2017 13:09:21 +0000 (22:09 +0900)]
Ask confirmation for all suspicious wildcards

* lisp/dired-aux.el (dired-do-shell-command): Check that all
the wildcards are right.  Otherwise, ask for confirmation (Bug#27496).

7 years agoExtend dired-do-shell-command substitutions
Tino Calancha [Sun, 2 Jul 2017 13:09:02 +0000 (22:09 +0900)]
Extend dired-do-shell-command substitutions

Substitute "`?`" inside command with the current file name.
See details in:
https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00618.html
* lisp/dired-aux.el (dired-quark-subst-regexp, dired-star-subst-regexp):
Mark as obsolete.
(dired-isolated-string-re): New defun.
(dired--star-or-qmark-p): New predicate.
(dired-do-shell-command): Use dired--star-or-qmark-p.  Substitute "`?`"
with the current file name.
* doc/emacs/dired.texi (Shell Commands in Dired): Update manual.
; * etc/NEWS: Mention it.

7 years agoFix bug in yesterday's CC Mode commit.
Alan Mackenzie [Sun, 2 Jul 2017 12:58:27 +0000 (12:58 +0000)]
Fix bug in yesterday's CC Mode commit.

* lisp/progmodes/cc-mode.el (c-quoted-number-head-before-point): Check a
search has succeded before using the match data.
(c-quoted-number-head-before-point, c-quoted-number-head-after-point):
Specify that the position of the extremity of the head or tail is in the
match data.

7 years agoRemove FIXME comments about sentinel values
Philipp Stephani [Sun, 2 Jul 2017 11:15:52 +0000 (13:15 +0200)]
Remove FIXME comments about sentinel values

These FIXMEs can't be addressed because they would require breaking
changes to the module API.  Furthermore, other module functions don't
return sentinel values as well, so users generally have to call
non_local_exit_check anyway.

* src/emacs-module.c (module_set_user_ptr)
(module_set_user_finalizer, module_vec_set, module_vec_size): Remove
FIXME comments.

7 years agoAdapt Lisp reference to reader changes
Philipp Stephani [Sun, 2 Jul 2017 10:31:12 +0000 (12:31 +0200)]
Adapt Lisp reference to reader changes

The reader now warns about some unescaped character literals, but
still allows them for compatibility reasons.  Slightly adapt the
manual to forbid them officially.

* doc/lispref/objects.texi (Basic Char Syntax): Document that
backslashes are now required before some characters.

7 years ago; Instrument tramp-tests.el
Michael Albinus [Sun, 2 Jul 2017 10:16:33 +0000 (12:16 +0200)]
; Instrument tramp-tests.el

7 years agoFix Bug#27502
Michael Albinus [Sun, 2 Jul 2017 09:41:58 +0000 (11:41 +0200)]
Fix Bug#27502

* lisp/autorevert.el (auto-revert-find-file-function): New defun.
(find-file-hook): Use it.  (Bug#27502)
(auto-revert-remove-current-buffer): New defun.
(auto-revert-mode, auto-revert-buffers): Use it.

7 years ago; Instrument tramp-tests.el
Michael Albinus [Sun, 2 Jul 2017 08:06:09 +0000 (10:06 +0200)]
; Instrument tramp-tests.el

7 years agoLet test summary go through even if some logs were not generated
Noam Postavsky [Sun, 2 Jul 2017 02:37:12 +0000 (22:37 -0400)]
Let test summary go through even if some logs were not generated

* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check
for existence of log files before reading.

7 years ago* src/module-env-25.h (copy_string_contents): Fix comment.
Philipp Stephani [Sat, 1 Jul 2017 18:00:34 +0000 (20:00 +0200)]
* src/module-env-25.h (copy_string_contents): Fix comment.

7 years agoAlso mark module init function as noexcept if possible
Philipp Stephani [Sat, 1 Jul 2017 17:58:57 +0000 (19:58 +0200)]
Also mark module init function as noexcept if possible

* src/emacs-module.h.in (emacs_module_init): Mark as noexcept if
possible.

7 years agoImprove C++98 compatibility
Philipp Stephani [Sat, 1 Jul 2017 17:57:41 +0000 (19:57 +0200)]
Improve C++98 compatibility

* src/emacs-module.h.in (emacs_funcall_exit): Lose trailing comma.
C++98 doesn't allow trailing commas in enumerations.

7 years agoMinor copyedits of manuals regarding bidi conformance
Eli Zaretskii [Sat, 1 Jul 2017 17:01:39 +0000 (13:01 -0400)]
Minor copyedits of manuals regarding bidi conformance

* doc/emacs/mule.texi (Bidirectional Editing):
* doc/lispref/display.texi (Bidirectional Display): Update the
bidi conformance text.

7 years agoMake C++ digit separators work. Amend the handling of single quotes generally
Alan Mackenzie [Sat, 1 Jul 2017 15:43:07 +0000 (15:43 +0000)]
Make C++ digit separators work.  Amend the handling of single quotes generally

Single quotes, even in strings and comments, are now marked with the
"punctuation" syntax-table property, except where they are validly bounding a
character literal.  They are font locked with font-lock-warning-face except
where they are valid.  This is done in C, C++, ObjC, and Java Modes.

* lisp/progmodes/cc-defs.el (c-clear-char-property-with-value-on-char-function)
(c-clear-char-property-with-value-on-char, c-put-char-properties-on-char): New
functions/macros.

* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes): New function.
(c-basic-matchers-before): invoke c-font-lock-invalid-single-quotes.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Remove
c-before-after-change-digit-quote from wherever it occurs.  Insert
c-parse-quotes-before-change into the entries for the languages where it is
needed.
(c-before-font-lock-functions): Remove c-before-after-change-digit-quote from
wherever it occurs.  Insert c-parse-quotes-after-change into the entries for
the languages which need it.
(c-has-quoted-numbers): New lang-defconst/-defvar.

* lisp/progmodes/cc-mode.el (c-before-after-change-digit-quote): Remove.
(c-maybe-quoted-number-head, c-maybe-quoted-number-tail)
(c-maybe-quoted-number): New defconsts.
(c-quoted-number-head-before-point, c-quoted-number-tail-after-point)
(c-quoted-number-straddling-point, c-parse-quotes-before-change)
(c-parse-quotes-after-change): New functions.

7 years agoIgnore mouse-movement for describe-key-briefly (Bug#12204)
Noam Postavsky [Sun, 18 Jun 2017 04:39:05 +0000 (00:39 -0400)]
Ignore mouse-movement for describe-key-briefly (Bug#12204)

* lisp/help.el (help-read-key-sequence): Add optional argument ot
ignore `mouse-movement' events.
(describe-key-briefly): Use it.
* doc/emacs/help.texi (Key Help):
* etc/NEWS: Mention that mouse movement is ignored.

7 years agoRefactor key describing commands
Noam Postavsky [Sun, 18 Jun 2017 00:33:56 +0000 (20:33 -0400)]
Refactor key describing commands

* lisp/help.el (help-read-key-sequence, help--analyze-key): New
functions, extracted from `describe-key' and `describe-key-briefly'.
(describe-key, describe-key-briefly): Use them.

7 years agoFix threads on NS (bug#25265)
Alan Third [Sat, 1 Jul 2017 11:58:49 +0000 (12:58 +0100)]
Fix threads on NS (bug#25265)

src/nsterm.h (ns_select): Compiler doesn't like sigmask being const.
(ns_run_loop_break) [HAVE_PTHREAD]: New function.
src/nsterm.m (ns_select): Call thread_select from within ns_select.
(ns_run_loop_break) [HAVE_PTHREAD]: New function.
(ns_send_appdefined): Don't wait for main thread when sending app
defined event.
src/process.c (wait_reading_process_output): Call thread_select from
within ns_select.
src/systhread.c (sys_cond_broadcast) [HAVE_NS]: Break ns_select out of
its event loop using ns_run_loop_break.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sat, 1 Jul 2017 10:26:53 +0000 (06:26 -0400)]
; Auto-commit of loaddefs files.

7 years ago; Fix last commit
Michael Albinus [Sat, 1 Jul 2017 08:32:27 +0000 (10:32 +0200)]
; Fix last commit

7 years ago; Instrument test/Makefile.in for tramp-tests output on hydra
Michael Albinus [Sat, 1 Jul 2017 08:30:34 +0000 (10:30 +0200)]
; Instrument test/Makefile.in for tramp-tests output on hydra

7 years ago* lisp/help-fns.el (describe-variable): Let-bind cl-print-compiled-button.
Noam Postavsky [Sat, 1 Jul 2017 03:25:42 +0000 (23:25 -0400)]
* lisp/help-fns.el (describe-variable): Let-bind cl-print-compiled-button.

7 years ago* lisp/emacs-lisp/cl-extra.el (cl--random-state): New defstruct
Stefan Monnier [Sat, 1 Jul 2017 02:01:38 +0000 (22:01 -0400)]
* lisp/emacs-lisp/cl-extra.el (cl--random-state): New defstruct

(cl--random-state, cl--random-time): Move from cl-lib.el.
(cl-random): Use struct accessors.
(cl-random-state-p): Remove, provided by the defstruct.
(cl-make-random-state): Rewrite to struct constructor.

7 years ago* lisp/emacs-lisp/debug.el (debugger-list-functions): Remove obsolete msg
Stefan Monnier [Fri, 30 Jun 2017 22:01:01 +0000 (18:01 -0400)]
* lisp/emacs-lisp/debug.el (debugger-list-functions): Remove obsolete msg

7 years agoRelease Tramp 2.3.2
Michael Albinus [Fri, 30 Jun 2017 16:38:32 +0000 (18:38 +0200)]
Release Tramp 2.3.2

* doc/misc/tramp.texi (Android shell setup): Show default file name.
Structure section.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.2".

* test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
Offer home directory for mock method if it doesn't exist.

7 years ago; Merge: Backtrace printing improvements (Bug#6991)
Noam Postavsky [Thu, 29 Jun 2017 23:42:32 +0000 (19:42 -0400)]
; Merge: Backtrace printing improvements (Bug#6991)

7 years agoEscape NUL bytes in X selections (Bug#6991)
Noam Postavsky [Sun, 12 Feb 2017 00:47:55 +0000 (19:47 -0500)]
Escape NUL bytes in X selections (Bug#6991)

* lisp/term/w32-win.el (w32--set-selection):
* lisp/select.el (xselect--encode-string): Replace NUL bytes with
"\0".
* doc/emacs/killing.texi: Document new behavior.
* etc/NEWS (times): Announce it.

7 years agoHide byte code in backtraces (Bug#6991)
Noam Postavsky [Wed, 28 Jun 2017 11:23:47 +0000 (07:23 -0400)]
Hide byte code in backtraces (Bug#6991)

* lisp/emacs-lisp/debug.el (debugger-print-function): New defcustom,
defaulting to `cl-print'.
(debugger-insert-backtrace, debugger-setup-buffer): Use it instead of
`prin1'.
* etc/NEWS: Announce it.

7 years agoDon't redundantly cl-print arglist in function docstring again
Noam Postavsky [Sun, 28 May 2017 02:40:46 +0000 (22:40 -0400)]
Don't redundantly cl-print arglist in function docstring again

* lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist
part of docstring.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update
test accordingly.

7 years agoEscape control characters in backtraces (Bug#6991)
Noam Postavsky [Sat, 11 Feb 2017 23:13:54 +0000 (18:13 -0500)]
Escape control characters in backtraces (Bug#6991)

* src/print.c (syms_of_print): Add new variable,
print-escape-control-characters.
(print_object): Print control characters with octal escape codes when
print-escape-control-characters is true.
* lisp/subr.el (backtrace):
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Bind
`print-escape-control-characters' to t.

7 years agoImprove ert backtrace recording
Noam Postavsky [Sat, 11 Feb 2017 22:19:41 +0000 (17:19 -0500)]
Improve ert backtrace recording

Change ert to use the new `backtrace-frames' function instead of
collecting frames one by one with `backtrace-frame'.  Additionally,
collect frames starting from `signal' instead the somewhat arbitrary
"6 from the bottom".  Skipping 6 frames would skip the expression that
actually caused the signal that triggered the debugger.  Possibly 6
was chosen because in the case of a failed test, the triggering frame
is an `ert-fail' call, which is not so interesting.  But in case of a
test throwing an error, this drops the `error' call which is too much.

* lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove.
* lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant
code from `debugger-make-xrefs'.
(ert--print-backtrace): Add DO-XREFS parameter, delegate to
`debugger-insert-backtrace'.
(ert--run-test-debugger): Record the backtrace frames starting from
the instigating `signal' call.
(ert-run-tests-batch): Pass nil for `ert--print-backtrace's new
DO-XREFS parameter.
(ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS
to `ert--print-backtrace' and remove call to `debugger-make-xrefs'.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check
the backtrace list instead of comparing its string representation.
Expect `signal' to be the first frame.

7 years agoOperate on frame list instead of printed backtrace
Noam Postavsky [Sat, 11 Feb 2017 14:19:00 +0000 (09:19 -0500)]
Operate on frame list instead of printed backtrace

* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function,
prints the given backtrace frames.
(debugger-setup-buffer): Use it instead of editing the backtrace
buffer text.

7 years agoImprove timer handling when Tramp accepts output
Michael Albinus [Thu, 29 Jun 2017 16:22:38 +0000 (18:22 +0200)]
Improve timer handling when Tramp accepts output

* lisp/net/tramp-compat.el: Avoid compiler warning.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler):
Remove lock machinery.

* lisp/net/tramp.el (tramp-locked, tramp-locker): Move up.
(tramp-file-name-handler): Add lock machinery from
`tramp-sh-file-name-handler'.  Allow timers to run.
(tramp-accept-process-output): Remove nasty workaround.
Suppress timers.

* test/lisp/net/tramp-tests.el (shell-command-sentinel):
Suppress run in tests.
(tramp--instrument-test-case-p): New defvar.
(tramp--instrument-test-case): Use it in order to allow nested calls.
(tramp--test-message, tramp--test-backtrace): New defsubst,
will be used for occasional test instrumentation.
(tramp-test00-availability, tramp-test31-vc-registered): Use them.
(tramp-test28-shell-command)
(tramp--test-shell-command-to-string-asynchronously): Suppress
nasty messages.  Don't overwrite sentinel.
(tramp-test36-asynchronous-requests): Rewrite major parts.
Expect :passed.

7 years ago* lisp/url/url-history.el: Use lexical-binding
Stefan Monnier [Wed, 28 Jun 2017 14:44:18 +0000 (10:44 -0400)]
* lisp/url/url-history.el: Use lexical-binding

(url-completion-function): Mark as obsolete.
Mark unused args accordingly.

7 years agoDon't assume url structs are vectors (Bug#27333)
Noam Postavsky [Thu, 15 Jun 2017 00:23:29 +0000 (20:23 -0400)]
Don't assume url structs are vectors (Bug#27333)

* lisp/url/url-history.el (url-history-update-url): Use `url-p'
instead of `vectorp'.

7 years agoReplace with dolist some uses of while
Mark Oteiza [Wed, 28 Jun 2017 03:59:24 +0000 (23:59 -0400)]
Replace with dolist some uses of while

* lisp/calc/calc-units.el (calc-permanent-units):
(math-compare-unit-names, math-simplify-units-quotient):
(math-build-units-table-buffer): Use dolist to replace extra bindings
and some while loops.

7 years agoMake tcl-auto-fill-mode obsolete (Bug#10772)
Noam Postavsky [Sun, 2 Apr 2017 01:02:50 +0000 (21:02 -0400)]
Make tcl-auto-fill-mode obsolete (Bug#10772)

* lisp/progmodes/tcl.el (tcl-auto-fill-mode): Declare obsolete.
* etc/NEWS: Announce it.

7 years agoDon't read eshell/which output from *Help* buffer (Bug#26894)
Noam Postavsky [Sun, 4 Jun 2017 02:15:19 +0000 (22:15 -0400)]
Don't read eshell/which output from *Help* buffer (Bug#26894)

* lisp/help-fns.el (help-fns--analyse-function)
(help-fns-function-description-header): New functions, extracted from
describe-function-1.
(describe-function-1): Use them.
* lisp/eshell/esh-cmd.el (eshell/which): Use
`help-fns-function-description-header' instead of
`describe-function-1'.

7 years agoAvoid segfaults when some display vector is an empty string
Eli Zaretskii [Tue, 27 Jun 2017 15:45:22 +0000 (11:45 -0400)]
Avoid segfaults when some display vector is an empty string

* src/xdisp.c (next_element_from_display_vector): Don't try
accessing the dpvec[] array if its size is zero.  (Bug#27504)

7 years agoFix bug in handling GnuPG's TRUST_MARGINAL status
Teemu Likonen [Sun, 25 Jun 2017 17:50:54 +0000 (20:50 +0300)]
Fix bug in handling GnuPG's TRUST_MARGINAL status

* lisp/epg.el (epg--status-TRUST_MARGINAL): Change symbol `marginal'
to `good'.

7 years ago; * src/emacs-module.c (module_make_string): Add another FIXME
Philipp Stephani [Mon, 26 Jun 2017 09:24:25 +0000 (11:24 +0200)]
; * src/emacs-module.c (module_make_string): Add another FIXME

7 years agoPrefer `when' instead of 1-branch `if'
Tino Calancha [Mon, 26 Jun 2017 08:20:42 +0000 (17:20 +0900)]
Prefer `when' instead of 1-branch `if'

* lisp/dired-aux.el (dired-do-shell-command): Store condition value
in local variable ok.
Use `when' instead of 1-branch `if'.

7 years agoUse #' instead of (function ...)
Tino Calancha [Mon, 26 Jun 2017 05:22:34 +0000 (14:22 +0900)]
Use #' instead of (function ...)

* lisp/dired-aux.el (dired-do-chxxx, dired-clean-directory)
(dired-mark-confirm, dired-query, dired-byte-compile)
(dired-load, dired-update-file-line, dired-after-subdir-garbage)
(dired-relist-file, dired-rename-subdir, dired-do-create-files)
(dired-mark-read-file-name, dired-do-copy, dired-do-symlink)
(dired-do-hardlink, dired-do-rename, dired-do-rename-regexp)
(dired-do-copy-regexp, dired-do-hardlink-regexp)
(dired-do-symlink-regexp, dired-create-files-non-directory)
(dired-upcase, dired-downcase)

* lisp/dired.el (dired-mode, dired-copy-filename-as-kill)
(dired-internal-do-deletions, dired-internal-do-deletions):
Prefer #' instead of (function ...).

7 years agoDon't quote lambda forms
Tino Calancha [Mon, 26 Jun 2017 05:22:27 +0000 (14:22 +0900)]
Don't quote lambda forms

* lisp/dired.el (dired-re-maybe-mark, dired-map-over-marks)
(dired-mark, dired-desktop-buffer-misc-data)

* lisp/dired-aux.el (dired-do-create-files, dired-do-create-files-regexp)
(dired-create-files-non-directory, dired-insert-subdir-validate)
(dired-alist-sort, dired-do-shell-command): Don't quote lambda forms.

7 years ago* lisp/progmodes/cc-fonts.el: Remove/mark unused vars
Stefan Monnier [Sun, 25 Jun 2017 22:47:57 +0000 (18:47 -0400)]
* lisp/progmodes/cc-fonts.el: Remove/mark unused vars

(c-font-lock-declarators): Remove unused vars `id-end', `paren-depth',
and `brackets-after-id'.
(c-font-lock-objc-methods): Mark unused args.

7 years agoOmit null-pointer test in intervals.h FRAME
Paul Eggert [Sun, 25 Jun 2017 19:52:37 +0000 (12:52 -0700)]
Omit null-pointer test in intervals.h FRAME

* src/intervals.h (ROOT_INTERVAL_P, ONLY_INTERVAL_P)
(INTERVAL_LAST_POS): Omit unnecessary parens.
(LENGTH): Omit test for null pointer.  The argument is never null.
The unnecessary test causes GCC 7.1.0 to assume that the argument
might be null, and therefore to issue false alarms when the
argument is dereferenced in other expressions.

7 years agoParenthesize frame.h macro definitions
Paul Eggert [Sun, 25 Jun 2017 19:49:01 +0000 (12:49 -0700)]
Parenthesize frame.h macro definitions

* src/frame.h (FRAME_TOOL_BAR_POSITION)
(FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT)
(FRAME_OVERRIDE_REDIRECT, FRAME_UNDECORATED, FRAME_PARENT_FRAME)
(FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
(FRAME_NO_ACCEPT_FOCUS, FRAME_NO_SPECIAL_GLYPHS, FRAME_Z_GROUP)
(FRAME_Z_GROUP_NONE, FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_BELOW)
(FRAME_HAS_HORIZONTAL_SCROLL_BARS): Parenthesize macro definiens
to allow arbitrary expression arguments.

7 years agoPort recent frame changes to GCC 7
Paul Eggert [Sun, 25 Jun 2017 19:46:50 +0000 (12:46 -0700)]
Port recent frame changes to GCC 7

* src/frame.c (keep_ratio): New arg P.  Caller changed.  Since it
is non-null, it avoids a GCC 7 warning that FRAME_PARENT_FRAME
might return null.  This also avoids a run-time test.

7 years agoFix Android 6/7 problems in Tramp
Michael Albinus [Sun, 25 Jun 2017 17:49:53 +0000 (19:49 +0200)]
Fix Android 6/7 problems in Tramp

* lisp/net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): Fix link part.
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Insert "."  and
".." only when needed.
(tramp-adb-get-ls-command): Force one column output for toybox.

7 years ago* lisp/subr.el (setq-local): Add debug declaration (Bug#27408).
Stefan-W. Hahn [Sun, 18 Jun 2017 07:09:19 +0000 (09:09 +0200)]
* lisp/subr.el (setq-local): Add debug declaration (Bug#27408).

Copyright-paperwork-exempt: yes

7 years agoMake CC Mode load cl-lib rather than cl in Emacs 26.
Alan Mackenzie [Sun, 25 Jun 2017 13:55:50 +0000 (13:55 +0000)]
Make CC Mode load cl-lib rather than cl in Emacs 26.

* lisp/progmodes/cc-cmds.el (c-declaration-limits): Remove unused local
variable.

* lisp/progmodes/cc-defs.el (c--mapcan-status): Remove.
(c--cl-library): New variable.
(Top level): Amend the form which requires library cl or cl-lib.
(c--mapcan, c--set-difference, c--intersection, c--macroexpand-all)
(c--delete-duplicate): Amend to use c--cl-library instead of
c--mapcan-status.

* lisp/progmodes/cc-engine.el (c-syntactic-skip-backward)
(c-back-over-compound-identifier): Remove unused local variables.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove an unused
local variable.

* lisp/progmodes/cc-langs.el (Top level): Amend to use c--cl-library instead
of c--mapcan-status.

* lisp/progmodes/cc-styles.el (Top level): Add a cc-bytecomp-defun to try to
silence a compiler warning.

7 years agoProvide additional support for child frames
Martin Rudalics [Sun, 25 Jun 2017 09:33:25 +0000 (11:33 +0200)]
Provide additional support for child frames

Provide mouse dragging and resizing of frames.  Allow resizing
frames proportionally.  Provide additional functionality for
child frames.  Minor bug fixes.

* lisp/frame.el (frame-border-width, frame-pixel-width)
(frame-pixel-height): Alias to `frame-internal-border-width',
`frame-native-width' and `frame-native-height'.
(frame-inner-width, frame-inner-height, frame-outer-width)
(frame-outer-height): New functions.
* lisp/minibuffer.el (completion-auto-help): Fix typo.
* lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
(mouse-drag-header-line): Allow moving a frame by dragging the
mode line of its bottommost window (on a minibuffer-less frame)
or the header line of its topmost window.
(mouse-drag-vertical-line): Mention argument in doc-string.
(mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
(mouse-drag-top-left-corner, mouse-drag-top-edge)
(mouse-drag-top-right-corner, mouse-drag-right-edge)
(mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
(mouse-drag-bottom-left-corner): New functions for resizing a
frame by dragging its internal border together with
corresponding key bindings.
* lisp/tooltip.el (tooltip-frame-parameters): Add
'no-special-glyphs' to default parameters and update version
tag.
* lisp/window.el (frame-auto-hide-function): Add choice to make
frame invisible and update version tag.
(window--delete): Handle 'auto-hide-function' frame parameter.
(window--maybe-raise-frame): Respect 'no-focus-on-map' and
'no-accept-focus' frame parameters.
(display-buffer--action-function-custom-type): Add
`display-buffer-in-child-frame'.
(display-buffer): Mention `display-buffer-in-child-frame' in
doc-string.
(display-buffer-in-child-frame): New action function for
`display-buffer'.
(window--sanitize-margin): Return zero when MARGIN cannot be
sanitized.
(fit-frame-to-buffer): Major rewrite to handle child frames and
'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
frame parameters.
(window-largest-empty-rectangle--maximums-1)
(window-largest-empty-rectangle--maximums)
(window-largest-empty-rectangle--disjoint-maximums)
(window-largest-empty-rectangle): New functions.

* src/dispextern.h (WINDOW_WANTS_MODELINE_P)
(WINDOW_WANTS_HEADER_LINE_P): Remove.  Functionality is now
provided by corresponding functions window_wants_modeline and
window_wants_header_line in window.c.  Adjust users.
* src/dispnew.c (adjust_glyph_matrix)
(buffer_posn_from_coords): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.
* src/frame.c (keep_ratio): New function.
(adjust_frame_size): Call keep_ratio for each of F's child
frames.
(make_frame): Initialize no_special_glyphs slot.
(frame_internal_border_part): New function.
(Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
to Fframe_native_width, Fframe_native_height mand
Fframe_internal_border_width.
(frame_parm_table): Add Qno_special_glyphs entry.
(frame_float_type): New enumeration type.
(frame_float): New function to handle frame size and position
ratios.
(x_set_frame_parameters): Handle size and position ratios.
(x_set_no_special_glyphs): New function
(x_figure_window_size): Handle size and position ratios.
(syms_of_frame): Add Qdisplay_monitor_attributes_list,
Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
Qheight_only, Qleft_only and Qtop_only.
* src/frame.h (internal_border_part): New enumeration type.
(struct frame): New slot no_special_glyphs.
(FRAME_NO_SPECIAL_GLYPHS): New macro.
* src/gtkutil.c (xg_frame_restack): Return immediately for
GTK versions before 2.18.0.
* src/keyboard.c (internal_border_parts): New array constant.
(make_lispy_position): For frames with border dragging enabled
return internal border part.
(syms_of_keyboard): New symbols Qdrag_internal_border,
Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
Qright_edge, Qbottom_right_corner, Qbottom_edge and
Qbottom_left_corner.
* src/minibuf.c (read_minibuf_unwind): When exiting the
minibuffer deal with frames that have the 'minibuffer-exit'
parameter set.
(syms_of_minibuf): New symbol Qminibuffer_exit.
* src/nsfns.m (frame_parm_handler): Add entry for
x_set_no_special_glyphs.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
Intitialize new cursor types for dragging frame borders.
* src/nsterm.h (struct ns_output): Add new cursor types for
dragging frame borders.
* src/w32fns.c (w32_frame_parm_handlers): Add entry for
x_set_no_special_glyphs.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
Intitialize new cursor types for dragging frame borders.
* src/w32term.h (struct w32_output): Add new cursor types for
dragging frame borders.
* src/window.c (coordinates_in_window)
(Fwindow_line_height, window_internal_height): Use
window_wants_modeline and window_wants_header_line instead of
WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
(Fwindow_lines_pixel_dimensions): New function.
(window_parameter): New function.
(Fwindow_parameter): Call window_parameter.
(window_wants_mode_line, window_wants_header_line): New
functions replacing the macros WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
(syms_of_window): New symbols Qmode_line_format and
Qheader_line_format.
* src/window.h: Reorganize and re-comment macros.  Use
window_wants_modeline and window_wants_header_line instead of
WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
(MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
(WINDOW_BUFFER): New macro.
(WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
* src/xdisp.c (window_text_bottom_y, window_box_height)
(window_box, start_display)
(compute_window_start_on_continuation_line)
(try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id)
(display_line, expose_window): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.
(pos_visible_p, display_mode_lines): Respect W's
'mode-line-format' and 'header-line-format' window parameters.
(init_iterator): Use window_wants_modeline and
window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
WINDOW_WANTS_HEADER_LINE_P.  For tip frames respect
no_special_glyphs value.
(note_mouse_highlight): Set frame border cursors when on
internal border.
(x_draw_right_divider, x_draw_bottom_divider): Try to improve
drawing of window dividers.
* src/xfns.c (mouse_cursor): Add entries for border parts.
(mouse_cursor_types): Add entries for cursor types to drag
frame borders.
(INSTALL_CURSOR): Add entries for new cursor types to drag
frame borders.
(Fx_create_frame): Handle 'no-special-glyphs' parameter.
(x_frame_parm_handlers): Add entry for
x_set_no_special_glyphs.
(Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
(Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
(Vx_window_right_edge_shape)
(Vx_window_bottom_right_corner_shape)
(Vx_window_bottom_edge_shape)
(Vx_window_bottom_left_corner_shape): New variables.
(x_frame_restack): Call xg_frame_restack only for GTK versions
starting with 2.18.0.
* src/xterm.c (x_free_frame_resources): Remove new cursors for
dragging frame borders.
* src/xterm.h (struct x_output): Add new cursor types for
dragging frame borders.

* doc/lispref/display.texi (Size of Displayed Text): Document
`window-lines-pixel-dimensions'.
* doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
Parameters".
* doc/lispref/frames.texi (Frame Size): Replace
frame-pixel-width/-height by frame-native-width/-height.  Add
frame-inner-width/-height and frame-outer-width/-height docs.
(Position Parameters): Describe specifying position as ratios.
Clarify remark about positions relative to bottom/ridge display
edge.
(Size Parameters): Describe specifying sizes as ratios.
Describe 'fit-frame-to-buffer-margins' and
'fit-frame-to-buffer-sizes' parameters.
(Layout Parameters): Describe 'no-special-glyphs' parameter.
(Frame Interaction Parameters): Describe 'auto-hide-function',
'minibuffer-exit' and 'keep-ratio' parameters.
(Mouse Dragging Parameters): New section describing
'drag-internal-border', 'drag-with-header-line',
'drag-with-mode-line', 'snap-width', 'top-visible' and
'bottom-visible' parameters.
(Management Parameters): Mention that `override-redirect' has
no effect on MS Windows.
(Font and Color Parameters): Mention child frames for `alpha'
parameter.
(Child Frames): Rewrite section with description and cross
references to new frame parameters added.
* doc/lispref/modes.texi (Mode Line Basics): Mention
'mode-line-format' and 'header-line-format' window parameters.
* doc/lispref/windows.texi (Resizing Windows): Mention effect
of `fit-frame-to-buffer-margins' for child frames.
(Display Action Functions): New action function
`display-buffer-in-child-frame'.
(Quitting Windows): Mention `make-frame-invisible' as optional
value of `frame-auto-hide-function' and `auto-hide-function'
frame paameter.
(Coordinates and Windows): Describe new function
`window-largest-empty-rectangle'.
(Window Parameters): Describe new parameters 'mode-line-format'
and 'header-line-format'.  Index all window parameters described
in this section.

7 years agoAdjust lm-verify to accept current notices
Paul Eggert [Sun, 25 Jun 2017 00:54:21 +0000 (17:54 -0700)]
Adjust lm-verify to accept current notices

Problem reported by Mike Kupfer in:
http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00512.html
* lisp/emacs-lisp/lisp-mnt.el (lm-crack-copyright):
Do not require later lines in a copyright notice to have more
indentation than earlier lines.

7 years agoDon't change byte-compile-delete-errors at runtime (Bug#27340)
Noam Postavsky [Fri, 16 Jun 2017 11:43:29 +0000 (07:43 -0400)]
Don't change byte-compile-delete-errors at runtime (Bug#27340)

* lisp/emacs-lisp/eieio-core.el: Confine `cl-declaim' calls to compile
time.

7 years ago* lisp/net/html2text.el: Move to obsolete/.
Stefan Monnier [Sat, 24 Jun 2017 12:59:20 +0000 (08:59 -0400)]
* lisp/net/html2text.el: Move to obsolete/.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche [Fri, 23 Jun 2017 20:08:10 +0000 (22:08 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoFix symbol relocation when the relocated cell is renamed.
Vincent Belaïche [Fri, 23 Jun 2017 09:16:37 +0000 (11:16 +0200)]
Fix symbol relocation when the relocated cell is renamed.

* lisp/ses.el (ses-sym-rowcol):  Check that the renamed cell
hashmap has been instantiated before getting data from it.  When
editing several spreadsheets, and you have spreadsheet #1 with a
cell named `foo', and no renamed cell in spreadsheet #2, then if
you make a formula with `foo' in spreadsheet #2, not doing this
check will make an error.
(ses-cell-set-formula): Robustify versus incorrect cell references
given in the user provided formula.  An explicit error message is
provided after the action when the user gives an incorrect cell
reference, but the formula edition is not changed.  This means that
if the incorrect reference is to a cell that is created someday,
then this new cell will not have the edited cell in its reference
list.  Fixing this can still be done by editing again the first
cell formula.
(ses-relocate-symbol): Do not create symbol of referred-to cell
when this is a renamed cell.

7 years agoRemove getc_unlocked configure-time check
Paul Eggert [Thu, 22 Jun 2017 20:19:13 +0000 (13:19 -0700)]
Remove getc_unlocked configure-time check

* configure.ac (getc_unlocked): Remove check, as unlocked-io now
does this for us.

7 years agoUse unlocked stdio more systematically
Paul Eggert [Thu, 22 Jun 2017 18:21:20 +0000 (11:21 -0700)]
Use unlocked stdio more systematically

This can improve performance significantly on stdio-bottlenecked code.
E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
* admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
* lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
* lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
* lib-src/profile.c, lib-src/update-game-score.c:
Include unlocked-io.h instead of stdio.h, since these programs are
single-threaded.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
* src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
* src/lread.c, src/term.c:
Include sysstdio.h, possibly instead of stdio.h, to define
the unlocked functions if the system does not provide them.
* src/charset.c, src/lread.c (getc_unlocked):
Remove, since sysstdio.h now defines it if needed.
* src/cm.c (cmputc, cmcheckmagic):
* src/dispnew.c (update_frame, update_frame_with_menu)
(update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
* src/emacs.c (main, Fdump_emacs):
* src/fileio.c (Fdo_auto_save, Fset_binary_mode):
* src/image.c (slurp_file, png_read_from_file, png_load_body)
(our_stdio_fill_input_buffer):
* src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
* src/lread.c (readbyte_from_file):
* src/minibuf.c (read_minibuf_noninteractive):
* src/print.c (printchar_to_stream, strout)
(Fredirect_debugging_output):
* src/sysdep.c (reset_sys_modes, procfs_ttyname)
(procfs_get_total_memory):
* src/term.c (tty_ring_bell, tty_send_additional_strings)
(tty_set_terminal_modes, tty_reset_terminal_modes)
(tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
(tty_write_glyphs_with_face, tty_insert_glyphs)
(tty_menu_activate):
* src/xfaces.c (Fx_load_color_file):
Use unlocked stdio when it should be safe.
* src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
(fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
(fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
(putc_unlocked, putchar_unloced): Provide substitutes if not declared.

7 years ago* lisp/net/shr.el (shr-fill-text): Actually fill the text. (Bug#27399)
Glenn Morris [Thu, 22 Jun 2017 18:11:29 +0000 (14:11 -0400)]
* lisp/net/shr.el (shr-fill-text): Actually fill the text.  (Bug#27399)

7 years agounidata: don’t check special casing in unidata-check (bug#26656)
Michal Nazarewicz [Mon, 19 Jun 2017 19:34:25 +0000 (21:34 +0200)]
unidata: don’t check special casing in unidata-check  (bug#26656)

* admin/unidata/unidata-gen.el (unidata-check): Do not test special
casing mapping of characters since that mapping is not constructed from
the unidata.txt file.
Also, check for integer decoder and cons char earlier so that less
unnecessary processing is performed.

7 years ago* lisp/descr-text.el (describe-char): Avoid string-*-multibyte
Stefan Monnier [Thu, 22 Jun 2017 13:47:48 +0000 (09:47 -0400)]
* lisp/descr-text.el (describe-char): Avoid string-*-multibyte

Avoid string-to-multibyte and string-as-unibyte.
Don't make *Help* unibyte just because the char was in a unibyte buffer.

7 years agoDo not hard code A1 cell reference, as it may be renamed.
Vincent Belaïche [Thu, 22 Jun 2017 07:27:17 +0000 (09:27 +0200)]
Do not hard code A1 cell reference, as it may be renamed.

* lisp/ses.el (ses-recalculate-all): `A1' -> `(ses-cell-symbol 0 0)'

7 years agoFix make_hash_table calls in lread.c
Martin Rudalics [Thu, 22 Jun 2017 07:24:06 +0000 (09:24 +0200)]
Fix make_hash_table calls in lread.c

* src/lread.c (readevalloop, read_internal_start): Fix
make_hash_table calls to make build succeed.

7 years agoMerge several Lisp reader speedups.
Ken Raeburn [Thu, 22 Jun 2017 02:45:14 +0000 (22:45 -0400)]
Merge several Lisp reader speedups.

7 years agoCreate less garbage to collect while reading symbols.
Ken Raeburn [Mon, 19 Dec 2016 21:01:09 +0000 (16:01 -0500)]
Create less garbage to collect while reading symbols.

* src/lread.c (read1): When interning a symbol, only create a new
string object for the name if we're going to use it for a new symbol
object.

7 years agoReplace read_objects assoc list with two hash tables.
Ken Raeburn [Sun, 30 Oct 2016 13:05:46 +0000 (09:05 -0400)]
Replace read_objects assoc list with two hash tables.

For larger input files with lots of shared data structures, an
association list is too slow.

* src/lread.c (read_objects_map, read_objects_completed): New
variables, replacing read_objects.
(readevalloop): Initialize them with hash tables before starting a
top-level read, if they're not already empty hash tables, and reset
them to Qnil afterwards if something was added to the hash tables.
(read_internal_start): Likewise.
(read1): Store first the placeholder and later the newly read object
into read_objects_map under the specified object number.  If the new
object can contain a reference to itself, store it in
read_objects_completed.
(substitute_objects_recurse): Check read_objects_completed instead of
read_objects for the known possibly-recursive objects.
(syms_of_lread): Update initializations.

7 years agoUse getc_unlocked.
Ken Raeburn [Thu, 27 Oct 2016 04:50:07 +0000 (00:50 -0400)]
Use getc_unlocked.

* configure.ac: Check for getc_unlocked.
* src/charset.c (read_hex, load_charset_map_from_file): Use
getc_unlocked instead of getc.
(getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
* src/lread.c (readbyte_from_file, Fget_file_char, read1,
getc_unlocked): Likewise.

7 years agoReduce lread substitutions.
Stefan Monnier [Thu, 27 Oct 2016 05:18:16 +0000 (01:18 -0400)]
Reduce lread substitutions.

* src/lread.c (read1): After reading an object using the "#n=" syntax,
if the read object is a cons cell, instead of recursively substituting
the placeholder with the new object, mutate the placeholder cons cell
itself to have the correct car and cdr values.

7 years agoShort-circuit substitutions for some simple types.
Ken Raeburn [Thu, 27 Oct 2016 06:53:07 +0000 (02:53 -0400)]
Short-circuit substitutions for some simple types.

Values that don't contain other values cannot be circular, so checking
for circular objects is a waste of cycles.

* src/lread.c (substitute_object_recurse): If the subtree being
examined is a symbol, number, or property-less string, just return
it.

7 years agoLimit style_format to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:26:46 +0000 (17:26 -0700)]
Limit style_format to MAX_ALLOCA

* src/editfns.c (styled_format): Subtract initial buffer size
from sa_avail, since it is nontrivial.

7 years agoLimit bidi_find_bracket_pairs to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:18:30 +0000 (17:18 -0700)]
Limit bidi_find_bracket_pairs to MAX_ALLOCA

* src/bidi.c (MAX_BPA_STACK): Now a constant, not a macro.
Shrink it to allow for the two struct bidi_it objects in
the same frame.
(PUSH_BPA_STACK): Avoid integer overflow with enormous bidi cache.
(bidi_find_bracket_pairs): Use compile-time check instead of runtime.

7 years agoLimit insert-file-contents to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:15:49 +0000 (17:15 -0700)]
Limit insert-file-contents to MAX_ALLOCA

* src/fileio.c (READ_BUF_SIZE): Don’t allocate more than
MAX_ALLOCA bytes in a single stack array.

7 years agoRemove malloc_find_address relic
Paul Eggert [Wed, 21 Jun 2017 18:49:48 +0000 (11:49 -0700)]
Remove malloc_find_address relic

* src/gmalloc.c (register_heapinfo, _malloc_internal_nolock):
Omit unnecessary initialization.

7 years agoFix temacs hybrid_malloc core dump
Paul Eggert [Wed, 21 Jun 2017 18:45:05 +0000 (11:45 -0700)]
Fix temacs hybrid_malloc core dump

Without this patch, ./temacs would dump core sometimes on Fedora
25 x86-64.  The problem was that the hybrid allocator assumed that
all pointers into bss_sbrk_buffer are allocated via gmalloc.  This
assumption is not true on Fedora, because the standard memory
allocator calls gdefault_morecore, which means its blocks are
interleaved with our blocks.  Usually the code happened to work,
because our data structures agreed with the glibc data structures,
but this was merely luck due to a shared pedigree, and as glibc
mutates our luck has run out.
* src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]:
Remove; no longer needed.
(BLOCK): Use unsigned division, as that does the right thing near zero.
(register_heapinfo, __malloc_internal_nolock, __free_internal_nolock)
(_realloc_internal_nolock):
Big blocks now have type -1, not 0, as 0 now means the block is
not ours.
(morecore_nolock): Omit now-unnecessary casts to size_t.
(allocated_via_gmalloc) [HYBRID_MALLOC]: New function.
(hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to
avoid calling the wrong free or realloc function in some cases.

7 years agoMake gnus-article-date-user work
Katsumi Yamaoka [Wed, 21 Jun 2017 08:12:10 +0000 (08:12 +0000)]
Make gnus-article-date-user work

* lisp/gnus/gnus-art.el (article-date-ut):
Work for unfolded multi-line Date header.
(article-transform-date):
Refactor; add header name if it is missing in user-defined date line.
(article-date-user): Fix name of date type.

7 years agoKeep order of completion candidates (Bug#25995, Bug#24676)
Noam Postavsky [Wed, 21 Jun 2017 02:19:51 +0000 (22:19 -0400)]
Keep order of completion candidates (Bug#25995, Bug#24676)

* lisp/minibuffer.el (completion-pcm--filename-try-filter)
(completion-pcm--all-completions): Use nreverse to undo the reversing
caused by using push in the loop.

7 years ago* src/lread.c (syms_of_lread) <load-history>: Doc fix.
Glenn Morris [Wed, 21 Jun 2017 01:35:42 +0000 (21:35 -0400)]
* src/lread.c (syms_of_lread) <load-history>: Doc fix.

7 years agoMark prolog indent variables as safe (bug#27369)
Alex Gramiak [Wed, 21 Jun 2017 01:05:38 +0000 (21:05 -0400)]
Mark prolog indent variables as safe (bug#27369)

* lisp/progmodes/prolog.el (prolog-indent-width)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent): Add :safe property.

7 years agoRemove `:options' from `css-electric-keys'
Simen Heggestøyl [Tue, 20 Jun 2017 18:57:48 +0000 (20:57 +0200)]
Remove `:options' from `css-electric-keys'

* lisp/textmodes/css-mode.el (css-electric-keys): Remove `:options`
since it just duplicates the default value.

7 years agoFix crash when built by GNU Gold linker on x86
Paul Eggert [Tue, 20 Jun 2017 15:48:14 +0000 (08:48 -0700)]
Fix crash when built by GNU Gold linker on x86

Problem reported by Andrés Musetti (Bug#27248).
* src/widget.c (emacsFrameClassRec): Do not initialize superclass here.
(emacsFrameClass): Now a function (which initializes the
superclass) instead of a variable.  All uses changed.

7 years agoSimplify autogen.sh version checking
Paul Eggert [Tue, 20 Jun 2017 15:18:08 +0000 (08:18 -0700)]
Simplify autogen.sh version checking

* autogen.sh (get_version): Simplify and make more reliable
by using expr rather than echo | sed.  Check exit status of program.
Run program in subshell in case it cannot be executed.
(check_version): Check exit status of command rather than its output.
Check return status of get_version.

7 years agoDelete old Date header in a simple way
Katsumi Yamaoka [Tue, 20 Jun 2017 09:11:07 +0000 (09:11 +0000)]
Delete old Date header in a simple way

* lisp/gnus/gnus-art.el (article-date-ut): Don't rely on text prop
when searching the old Date header boundary in order to delete it.

7 years agoRevert "Don't bind org-agenda key to an anonymous function"
Bastien [Tue, 20 Jun 2017 05:54:19 +0000 (07:54 +0200)]
Revert "Don't bind org-agenda key to an anonymous function"

This reverts commit 49c0ff29c2e0243ba35ec17e3e3af49369be43db.

7 years agoBind enable-local-variables to nil globally (fix dbe3e41)
Katsumi Yamaoka [Tue, 20 Jun 2017 03:46:21 +0000 (03:46 +0000)]
Bind enable-local-variables to nil globally (fix dbe3e41)

* lisp/gnus/mm-view.el (mm-display-inline-fontify):
Bind enable-local-variables to nil globally instead of making it
buffer-local; remove let-bind of local-enable-local-variables.
cf. <b4mtw3bbfp5.fsf@jpl.org> in the emacs-devel list.

7 years ago; * lisp/eshell/em-basic.el: Fix commentary.
Glenn Morris [Tue, 20 Jun 2017 02:24:29 +0000 (22:24 -0400)]
; * lisp/eshell/em-basic.el: Fix commentary.
This file has never provided any such "version" command.

7 years agokill-matching-buffers to optionally not confirm
Glenn Morris [Tue, 20 Jun 2017 01:31:50 +0000 (21:31 -0400)]
kill-matching-buffers to optionally not confirm

* lisp/files.el (kill-matching-buffers):
Add option to not confirm killing.  (Bug#27286)

7 years ago* lisp/files.el (local-enable-local-variables): Doc fix.
Glenn Morris [Tue, 20 Jun 2017 01:28:18 +0000 (21:28 -0400)]
* lisp/files.el (local-enable-local-variables): Doc fix.

7 years agoautogen.sh: try to check for tool being present but broken
Glenn Morris [Tue, 20 Jun 2017 01:13:08 +0000 (21:13 -0400)]
autogen.sh: try to check for tool being present but broken

* autogen.sh (get_version): Check return status of "--version".
(check_version): Try to distinguish between a missing tool
and a broken one.  (Bug#27288)

7 years agoAvoid a custom-variable-type error (bug#27363)
Glenn Morris [Mon, 19 Jun 2017 18:53:47 +0000 (14:53 -0400)]
Avoid a custom-variable-type error (bug#27363)

* lisp/cus-edit.el (custom-variable-type):
Avoid an error due to plist-put becoming stricter of late.

7 years agoDon't put deleted packages in the trash (bug#14967)
Glenn Morris [Mon, 19 Jun 2017 18:39:25 +0000 (14:39 -0400)]
Don't put deleted packages in the trash (bug#14967)

* lisp/emacs-lisp/package.el (package-delete):
Don't pay attention to delete-by-moving-to-trash.

; * etc/NEWS: Mention this.

7 years agoRevert "Add current-line in simple.el"
Nicolas Petton [Mon, 19 Jun 2017 12:43:39 +0000 (14:43 +0200)]
Revert "Add current-line in simple.el"

This reverts commit ae98cdf9431604d0f722f1db217ca06debfbb7b6.

7 years agoAdd current-line in simple.el
Damien Cassou [Sun, 9 Apr 2017 10:46:57 +0000 (12:46 +0200)]
Add current-line in simple.el

* lisp/simple.el (current-line): New function.
* test/list/simple-tests.el: Add tests for current-line.

7 years agoDon't try to eval local variables in Gnus article
Katsumi Yamaoka [Mon, 19 Jun 2017 02:10:22 +0000 (02:10 +0000)]
Don't try to eval local variables in Gnus article

* lisp/gnus/mm-view.el (mm-display-inline-fontify): Disable local vars.

7 years agoFix emacs-module.h cleaning
Paul Eggert [Sun, 18 Jun 2017 18:51:55 +0000 (11:51 -0700)]
Fix emacs-module.h cleaning

* src/Makefile.in (clean): Do not remove emacs-module.h.in.
(bootstrap-clean): Remove emacs-module.h.

7 years ago* url/url-util.el (url-get-url-at-point): Add missing group in
Andreas Schwab [Sun, 18 Jun 2017 07:09:34 +0000 (09:09 +0200)]
* url/url-util.el (url-get-url-at-point): Add missing group in
regex.

7 years ago* lib/gettext.h: Merge from gnulib.
Paul Eggert [Sat, 17 Jun 2017 22:21:53 +0000 (15:21 -0700)]
* lib/gettext.h: Merge from gnulib.