]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoMerge from origin/emacs-25
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
Merge from origin/emacs-25

bd58c13 Improve documentation of focus-related hooks
00a4720 Further improve doc string of 'disable-point-adjustment'
c582def Further adaptions in file-notify-tests.el for w32notify
a1585e1 Don't bug out on localised dates in gnus-icalendar

8 years ago; Merge from origin/emacs-25
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
; Merge from origin/emacs-25

The following commits were skipped:

dfe1650 (ls-lisp-insert-directory): Make -B work
42bc065 Make buttons in header lines work

8 years agoMerge from origin/emacs-25
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
Merge from origin/emacs-25

7bc4820 Make setf for frame-height/width work again

8 years ago; Merge from origin/emacs-25
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

1af5e6e Encode header strings before printing

8 years agoMerge from origin/emacs-25
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
Merge from origin/emacs-25

6620944 (cl-union): Do not ignore :test argument when lists are equal.
17dd3fb Add `isearch' to `basic-faces'
c1ec743 Make $, : and @ "prefix characters" in ruby-mode
e72a26e Make find-tag-default-bounds more strict
1bc0e0a Minor fixes in filenotify.el

8 years agoFix issue of inserting images on some systems
Alain Schneble [Thu, 3 Mar 2016 05:31:11 +0000 (05:31 +0000)]
Fix issue of inserting images on some systems

* lisp/net/shr.el (shr-tag-img): Construct a non-empty range
to pass to shr-image-fetched, to indicate where to insert the
image.  Fixes the issue introduced with commit
80852f843e69b81618f29cfb9aa4b074946cb3c4
(bug#22789).

8 years agoEnsure TLS negotiation progress
Lars Ingebrigtsen [Thu, 3 Mar 2016 05:14:48 +0000 (05:14 +0000)]
Ensure TLS negotiation progress

* src/gnutls.h (GNUTLS_EMACS_HANDSHAKES_LIMIT): Increase the
number of retries so that we try for about a minute.

* src/process.c (wait_reading_process_output): Ensure progress
for DNS resolution and TLS negotiation.

8 years agoemacs-module.h slight simplification
Paul Eggert [Wed, 2 Mar 2016 22:31:01 +0000 (14:31 -0800)]
emacs-module.h slight simplification

* src/emacs-module.c (emacs_init_function, emacs_subr): Move here ...
* src/emacs-module.h: ... from here, as they don’t need to be public.
(enum emacs_arity): Remove useless enum tag.  The enum value is
used in ptrdiff_t contexts.

* src/emacs-module.c (CHECK_USER_PTR): Fix typo in previous change.

8 years ago* src/emacs-module.c (CHECK_USER_PTR): Fix typo in previous change.
Paul Eggert [Wed, 2 Mar 2016 22:16:08 +0000 (14:16 -0800)]
* src/emacs-module.c (CHECK_USER_PTR): Fix typo in previous change.

8 years agoemacs-module.c simplification and tuneup
Paul Eggert [Wed, 2 Mar 2016 18:47:27 +0000 (10:47 -0800)]
emacs-module.c simplification and tuneup

* src/emacs-module.c (CHECK_USER_PTR): New function.
(module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer): Use it.
(module_make_global_ref, module_copy_string_contents)
(module_make_string, module_vec_set, module_vec_get): Omit
unnecessary runtime tests.  For example, vector sizes are always
fixnums, so we don’t need to test that they are in fixnum range.

8 years agoUse standard checks whenever possible.
Philipp Stephani [Wed, 2 Mar 2016 18:47:27 +0000 (10:47 -0800)]
Use standard checks whenever possible.

This is possible in all functions where we catch signals anyway.

* emacs-module.c (module_make_global_ref, module_funcall)
(module_copy_string_contents, module_make_string): Use xsignal0
and CHECK macros for argument checks.

8 years agoDeterministic build improvements
Paul Eggert [Wed, 2 Mar 2016 18:21:45 +0000 (10:21 -0800)]
Deterministic build improvements

* configure.ac (BUILD_DETAILS): Rename from DETERMINISTIC_DUMP,
and negate its sense.  Use it via AC_SUBST, not AC_DEFINE,
and have its value be either empty or --no-build-details.
All uses changed.  Change option to --disable-build-details.
* doc/lispref/cmdargs.texi (Initial Options):
Document --no-build-details.
* doc/lispref/internals.texi (Building Emacs):
* etc/NEWS:
Document --disable-build-details.
* doc/lispref/intro.texi (Version Info): Say that
emacs-build-time can be nil.
* lisp/erc/erc-compat.el (erc-emacs-build-time):
Now nil if details are omitted.
* lisp/erc/erc.el (erc-cmd-SV):
* lisp/version.el (emacs-build-time):
Now nil if no build details.
(emacs-version):
Output build time only if build details.
* src/Makefile.in (BUILD_DETAILS): New macro.
(temacs, bootstrap-emacs): Use it.
* src/emacs.c (build_details): New var.
(standard_args, main): Support --no-build-details.
(Vdeterministic_dump): Remove; all uses replaced
by !build_details.
(syms_of_emacs): Set Vbuild_details to a boolean, not
to a Lisp_Object.
* src/lisp.h (build_details): New decl.
* src/sysdep.c (init_system_name): When !build_details,
set system-name to nil, not to "elided".

8 years agoRemove build system name from deterministic dumps
Philipp Stephani [Wed, 2 Mar 2016 18:21:45 +0000 (10:21 -0800)]
Remove build system name from deterministic dumps

* configure.ac (DETERMINISTIC_DUMP): New configuration option.
* lisp/version.el (emacs-build-time): Add a comment to make the
build time deterministic if requested.
(emacs-build-system): Make variable deterministic if requested.
* src/emacs.c (main): Initialize `deterministic-dump' from the
configuration option.
(syms_of_emacs): New constant `deterministic-dump'.
* src/sysdep.c (init_system_name): Use a constant
if a deterministic dump is requested.

8 years agoRemove buggy parse-time test
Lars Ingebrigtsen [Wed, 2 Mar 2016 17:00:05 +0000 (17:00 +0000)]
Remove buggy parse-time test

* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
Remove the iso parse test, since it doesn't work.

8 years ago* src/syntax.c (syntax_multibyte): Omit unnecessary parens.
Paul Eggert [Tue, 1 Mar 2016 17:23:12 +0000 (09:23 -0800)]
* src/syntax.c (syntax_multibyte): Omit unnecessary parens.

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Mar 2016 11:23:23 +0000 (06:23 -0500)]
; Auto-commit of loaddefs files.

8 years ago* lisp/emacs-lisp/autoload.el (autoload-timestamps):
Glenn Morris [Tue, 1 Mar 2016 05:10:42 +0000 (21:10 -0800)]
* lisp/emacs-lisp/autoload.el (autoload-timestamps):
Experiment with setting to nil.

; * etc/NEWS: Mention this.

8 years agoMake the revert command in timer-list-mode work
Lars Ingebrigtsen [Tue, 1 Mar 2016 05:06:24 +0000 (16:06 +1100)]
Make the revert command in timer-list-mode work

* lisp/emacs-lisp/timer-list.el (timer-list): Make the revert
command work.

8 years ago* lisp/emacs-lisp/autoload.el (autoload-find-destination):
Glenn Morris [Tue, 1 Mar 2016 05:03:47 +0000 (21:03 -0800)]
* lisp/emacs-lisp/autoload.el (autoload-find-destination):
Fix 6-week old merge error.

8 years ago* lisp/emacs-lisp/autoload.el (update-file-autoloads):
Glenn Morris [Tue, 1 Mar 2016 04:51:47 +0000 (20:51 -0800)]
* lisp/emacs-lisp/autoload.el (update-file-autoloads):
Ensure timestamps.

8 years ago* lisp/emacs-lisp/package.el (package-generate-autoloads):
Glenn Morris [Tue, 1 Mar 2016 04:47:12 +0000 (20:47 -0800)]
* lisp/emacs-lisp/package.el (package-generate-autoloads):
Disable timestamps.

8 years agoAllow binding `url-mime-accept-string'
Lars Ingebrigtsen [Tue, 1 Mar 2016 03:49:26 +0000 (14:49 +1100)]
Allow binding `url-mime-accept-string'

* lisp/url/url-http.el (url-http): Allow binding
`url-mime-accept-string' (bug#22855).

8 years agoAdd a NEWS entry for the colorful VC indicator
Lars Ingebrigtsen [Tue, 1 Mar 2016 03:31:35 +0000 (14:31 +1100)]
Add a NEWS entry for the colorful VC indicator

8 years agoUse colors in the VC mode lines
Lars Ingebrigtsen [Tue, 1 Mar 2016 03:25:27 +0000 (14:25 +1100)]
Use colors in the VC mode lines

* lisp/vc/vc-hooks.el: Make the mode line faces default to
using colors to more clearly tell the user what the status is.

8 years agoSupport <bdo> and <bdi>
Lars Ingebrigtsen [Tue, 1 Mar 2016 00:19:52 +0000 (11:19 +1100)]
Support <bdo> and <bdi>

* lisp/net/shr.el (shr-tag-bdo): New function.
(shr-tag-bdi): Ditto.

8 years agoRespect <html dir=auto>
Lars Ingebrigtsen [Mon, 29 Feb 2016 23:48:36 +0000 (10:48 +1100)]
Respect <html dir=auto>

* lisp/net/shr.el (shr-tag-html): Respect the "auto"
directional HTML setting.

8 years agoDefault bidi paragraph direction to nil
Lars Ingebrigtsen [Mon, 29 Feb 2016 23:33:05 +0000 (10:33 +1100)]
Default bidi paragraph direction to nil

* lisp/net/eww.el (eww-display-html): Default bidi rendering
to nil, so that possibly more Arabic web pages render
correctly (bug#22786).
(eww-setup-buffer): Ditto.

8 years agoPreserve current column, going up/down in thumbnail view.
Mathias Dahl [Sat, 27 Feb 2016 13:11:02 +0000 (14:11 +0100)]
Preserve current column, going up/down in thumbnail view.

8 years agoHandle "noise" macros and compiler directives.
Alan Mackenzie [Mon, 29 Feb 2016 21:51:32 +0000 (21:51 +0000)]
Handle "noise" macros and compiler directives.

* lisp/progmodes/cc-langs.el (c-symbol-char-key): New language variable.

* lisp/progmodes/cc-vars.el (c-noise-macro-names)
(c-noise-macro-with-parens-names): New customizable variables.
(c-noise-macro-name-re, c-noise-macro-with-parens-name-re): New variables.
(c-make-noise-macro-regexps): New function.

* lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Adapt to treat
members of c-noise-macro-names as whitespace.
(c-forward-noise-clause): New function.
(c-forward-keyword-prefixed-id, c-forward-type, c-forward-declarator)
(c-forward-decl-or-cast-1, c-backward-over-enum-header)
(c-guess-basic-syntax CASE 5A.3, CASE 5A.5, CASE 9A):
Handle "noise clauses" in parallel with, e.g., "hangon key clauses".

* lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): Handle "noise clauses"
in parallel with "prefix-spec keywords".

* lisp/progmodes/cc-mode.el (c-mode, c++-mode, objc-mode): call
c-make-noise-macro-regexps to initialize the internal variables.

* doc/misc/cc-mode.texi ("Noise Macros"): New section documenting the new
facilities.

8 years agoStop calling res_init
Paul Eggert [Mon, 29 Feb 2016 17:39:45 +0000 (09:39 -0800)]
Stop calling res_init

Emacs shouldn’t need to call res_init any more, now that nscd or
equivalent is everywhere.  On modern systems, calling res_init
simply slows Emacs down.  On ancient systems lacking nscd Emacs
will still work well enough with this change; it’s just that it
won’t respond to changes in /etc/resolv.conf.
* configure.ac (HAVE_RES_INIT): Remove.  Worry about -lresolv only
when configured --with-hesiod.  Hesiod is still used; see, e.g.:
https://soylentnews.org/meta/article.pl?sid=15/07/13/0255214
* src/Makefile.in (LIBRESOLV): Remove.  All uses removed.

8 years ago* lisp/progmodes/grep.el (grep-save-buffers): Fix type, tweak doc.
Glenn Morris [Mon, 29 Feb 2016 16:51:12 +0000 (08:51 -0800)]
* lisp/progmodes/grep.el (grep-save-buffers): Fix type, tweak doc.

8 years ago* lisp/progmodes/grep.el (grep-save-buffers): Don't autoload defcustoms.
Glenn Morris [Mon, 29 Feb 2016 16:40:56 +0000 (08:40 -0800)]
* lisp/progmodes/grep.el (grep-save-buffers): Don't autoload defcustoms.

; (Unless there is a good, specific reason.)

8 years ago* src/process.c (Fdelete_process): Simplify cast.
Paul Eggert [Mon, 29 Feb 2016 15:42:54 +0000 (07:42 -0800)]
* src/process.c (Fdelete_process): Simplify cast.

8 years agoUse the correct background color when filling nested <divs>
Lars Ingebrigtsen [Mon, 29 Feb 2016 11:21:11 +0000 (22:21 +1100)]
Use the correct background color when filling nested <divs>

* lisp/net/shr.el (shr-face-background): Return the first
background, because that's the one that's visible (bug#22680).

8 years agoMake <div> in <li> not insert extra newlines
Lars Ingebrigtsen [Mon, 29 Feb 2016 07:06:36 +0000 (18:06 +1100)]
Make <div> in <li> not insert extra newlines

* lisp/net/shr.el (shr-tag-div): Make <div> in <li> not insert
extra newlines (bug#19587).

8 years agoAllow reading Gnus reports from an offline cache
Lars Ingebrigtsen [Mon, 29 Feb 2016 06:53:00 +0000 (17:53 +1100)]
Allow reading Gnus reports from an offline cache

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
Allow reading bug reports from an offline cache directory.

8 years agoMeta + shift + Fn combos are recognized by xterm>=216.
Tino Calancha [Mon, 29 Feb 2016 06:07:59 +0000 (17:07 +1100)]
Meta + shift + Fn combos are recognized by xterm>=216.

* lisp/term/xterm.el (xterm-alternatives-map): Meta + shift +
Fn combos are recognized by xterm>=216 (bug#22837).

8 years agoDeclare $ as an expression prefix in SCSS
Simen Heggestøyl [Mon, 29 Feb 2016 06:06:26 +0000 (17:06 +1100)]
Declare $ as an expression prefix in SCSS

* lisp/textmodes/css-mode.el (scss-mode-syntax-table): Declare $ as an
expression prefix (bug#22841).

8 years agoRevert "Declare $ as an expression prefix in SCSS"
Lars Ingebrigtsen [Mon, 29 Feb 2016 06:05:14 +0000 (17:05 +1100)]
Revert "Declare $ as an expression prefix in SCSS"

This reverts commit ffb33264f21e8af60b8055c47baffcf0f6c300df.

Revering to fix author name.

8 years agoDeclare $ as an expression prefix in SCSS
Simen [Mon, 29 Feb 2016 06:03:39 +0000 (17:03 +1100)]
Declare $ as an expression prefix in SCSS

* lisp/textmodes/css-mode.el (scss-mode-syntax-table): Declare $ as an
expression prefix (bug#22841).

8 years agoSave buffers before running grep commands
Hugh Brown [Mon, 29 Feb 2016 05:20:05 +0000 (16:20 +1100)]
Save buffers before running grep commands

* lisp/progmodes/grep.el (grep-ask-about-save): New variable (bug#96).
(grep, lgrep, rgrep): Use it (bug#96).

* doc/emacs/building.texi (Grep Searching): Document
`grep-save-buffers'.

* lisp/progmodes/grep.el (grep-save-buffers): Rename from
`grep-ask-about-save'.
(grep--save-buffers): New function.
(grep, lgrep, rgrep): Use it.

8 years agoAllow sorting flyspell corrections
Lars Ingebrigtsen [Mon, 29 Feb 2016 04:13:30 +0000 (15:13 +1100)]
Allow sorting flyspell corrections

* lisp/textmodes/flyspell.el (flyspell-sort): New function (bug#2405).
(flyspell-sort-corrections-functionx): New variable.
(flyspell-sort-corrections-alphabetically): New function.
(flyspell-notify-misspell): Use them.
(flyspell-auto-correct-word): Ditto.
(flyspell-emacs-popup): Ditto.
(flyspell-xemacs-popup): Ditto.  Suggested by Sebastien Delafond.

8 years agoWait for async DNS to complete before freeing resources
Lars Ingebrigtsen [Mon, 29 Feb 2016 03:20:09 +0000 (14:20 +1100)]
Wait for async DNS to complete before freeing resources

* src/process.c (Fdelete_process): Wait for async DNS to
complete before freeing the data structures it needs.

8 years ago* lisp/faces.el: Remove duplicated functions from previous patch.
Lars Ingebrigtsen [Mon, 29 Feb 2016 02:31:45 +0000 (13:31 +1100)]
* lisp/faces.el: Remove duplicated functions from previous patch.

8 years agoFix TLS connections on MS-Windows
Eli Zaretskii [Sun, 28 Feb 2016 16:44:50 +0000 (18:44 +0200)]
Fix TLS connections on MS-Windows

* src/w32.c (sys_write): If 'send' returns with WSAENOTCONN, and
this is a non-blocking socket whose connection is in progress, set
errno to EWOULDBLOCK, as expected by GnuTLS and other callers.
Avoid overwriting the errno value from 'send' by 'ioctlsocket'.
Suggested by Alain Schneble <a.s@realize.ch>.  (Bug#22789)

8 years agoAdd a NEWS entry for the read-color change
Lars Ingebrigtsen [Sun, 28 Feb 2016 06:29:08 +0000 (17:29 +1100)]
Add a NEWS entry for the read-color change

8 years agoShow the face colours when completing in `read-color'
Jan Moringen [Sun, 28 Feb 2016 06:27:23 +0000 (17:27 +1100)]
Show the face colours when completing in `read-color'

* lisp/faces.el (defined-colors-with-face-attributes): New function.
(readable-foreground-color, defined-colors-with-face-attributes)
(readable-foreground-color): Ditto.
(read-color): Use them (bug#5305).

8 years agoClean up the code in parse-time-string-chars
Lars Ingebrigtsen [Sun, 28 Feb 2016 05:04:33 +0000 (15:34 +1030)]
Clean up the code in parse-time-string-chars

* lisp/calendar/parse-time.el (parse-time-string-chars):
Clean up the code a bit.

8 years agoAdd some tests for parse-time.el
Lars Ingebrigtsen [Sun, 28 Feb 2016 05:00:30 +0000 (15:30 +1030)]
Add some tests for parse-time.el

* test/lisp/calendar/parse-time-tests.el: New file.

8 years agoStrip out some leading whitespace when looking at logs
Dima Kogan [Sun, 28 Feb 2016 04:48:45 +0000 (15:18 +1030)]
Strip out some leading whitespace when looking at logs

* lisp/vc/vc-git.el (vc-git-expanded-log-entry): When looking
at expanded git logs with `vc-print-root-log' (C-x v L, then
<enter> by default), Emacs was stripping out all leading
whitespace from git logs.  I now strip exactly 2 leading
spaces, which retains the indentation in the logs (bug#18110).

8 years agoUse a separate history variable for align-regexp
Dima Kogan [Sun, 28 Feb 2016 04:45:18 +0000 (15:15 +1030)]
Use a separate history variable for align-regexp

* lisp/align.el (align-regexp-history): New variable (bug#16891).
(align-regexp): Use it.

8 years agoCreate subdirectories automatically in wdired
Phil Sung [Sun, 28 Feb 2016 04:37:02 +0000 (15:07 +1030)]
Create subdirectories automatically in wdired

* lisp/wdired.el (wdired-create-parent-directories): New
variable (bug#6817).
(wdired-create-parentdirs): New function.
(wdired-do-renames): Use it.
* doc/emacs/dired.texi (Wdired): Mention
`wdired-create-parent-directories'

8 years agoReturn the correct error values from gnutls.c
Lars Ingebrigtsen [Sun, 28 Feb 2016 03:33:50 +0000 (14:03 +1030)]
Return the correct error values from gnutls.c

* src/gnutls.c (emacs_gnutls_read): Set errno to the value
expected by process.c.
(gnutls_try_handshake): Set gnutls_p to true earlier to avoid
possible race condition with the process.c socket polling
functions.

8 years agoDon't make assumptions about mkdir. (Bug#22822)
Aaron S. Hawley [Sun, 28 Feb 2016 03:01:24 +0000 (19:01 -0800)]
Don't make assumptions about mkdir.  (Bug#22822)

* test/Makefile.in (MKDIR_P): New, set by configure.
(%.log): Use MKDIR_P.

8 years agoSupport switching to hexl-mode from image-mode
Alexander Kuleshov [Sat, 27 Feb 2016 17:27:31 +0000 (19:27 +0200)]
Support switching to hexl-mode from image-mode

* lisp/image-mode.el (image-toggle-hex-display)
(image-mode-to-text): New functions.
(image-mode-map, image-minor-mode-map): Bind "C-c C-x" to
image-toggle-hex-display.
(image-mode-map): New menu item "Show as Hex".
(image-mode): Update doc string and echo-area message.
(image-toggle-display): Support toggle to hex.  (Bug#22453)

* doc/emacs/files.texi (File Conveniences): Document
'image-toggle-hex-display'.

8 years agoRemove unused code in coding.c
Eli Zaretskii [Sat, 27 Feb 2016 11:58:16 +0000 (13:58 +0200)]
Remove unused code in coding.c

* src/coding.c (decode_eol): Remove unused code that handled the
case of coding->dst_object being nil.  Replace it with an
assertion.

8 years ago* src/syntax.c: Fix result of syntax_multibyte()
Aurelien Aptel [Fri, 26 Feb 2016 19:34:40 +0000 (20:34 +0100)]
* src/syntax.c: Fix result of syntax_multibyte()

The ?: operator has a lower precedence than ||.
Bug introduced by commit 45b683a.

8 years ago--enable-gcc-warnings now uses -Wjump-misses-init
Paul Eggert [Fri, 26 Feb 2016 16:22:36 +0000 (08:22 -0800)]
--enable-gcc-warnings now uses -Wjump-misses-init

When configuring with --enable-gcc-warnings, also enable
-Wjump-misses-init, as it’s confusing to use a goto to skip over
an initialization.  Fix the few places in the code that run afoul
of this warning.
* configure.ac (WERROR_CFLAGS): Add -Wjump-misses-init.
* src/doc.c (Fsubstitute_command_keys):
* src/image.c (svg_load_image):
* src/regex.c (re_match_2_internal):
* src/xdisp.c (redisplay_internal, redisplay_window):
Don’t jump over initialization.

8 years ago; Improve documentation in test Makefile
Phillip Lord [Fri, 26 Feb 2016 11:55:38 +0000 (11:55 +0000)]
; Improve documentation in test Makefile

* test/Makefile.in: Improve documentation.

8 years agoImprove the register-hotkey functionality on MS-Windows
Jussi Lahdenniemi [Fri, 26 Feb 2016 10:51:24 +0000 (12:51 +0200)]
Improve the register-hotkey functionality on MS-Windows

* src/w32fns.c (_WIN32_WINNT): Define to 0x0600, needed for
keyboard hook functionality.
Include w32inevt.h, basetyps.h and unknwn.h.
(VK_ANY, WM_WTSSESSION_CHANGE, WTS_SESSION_LOCK): New macros.
(kbdhook): A new struct definition.
(funhook, setup_w32_kbdhook, remove_w32_kbdhook, hook_w32_key)
(check_w32_winkey_state, reset_w32_kbdhook_state): New functions.
(modifier_set): Call check_w32_winkey_state if a Win key was
pressed and the keyboard hook is active.
(w32_wnd_proc): Don't handle Win key combinations if the keyboard
hook is active.  Only register/unregister the hotkeys if the
keyboard hook is not active.  When WM_CREATE is received, call
setup_w32_kbdhook.  When WM_DESTROY is received, call
reset_w32_kbdhook_state.
(lookup_vk_code): When the keyboard hook is active, map
alphanumeric characters to themselves.
(w32_parse_and_hook_hot_key): Renamed from w32_parse_hot_key.  Map
modified keys to VK_ANY if the keyboard hook is active.  Register
Alt-x and Win-x combinations.
(Fw32_shell_execute): Update doc string to reflect new
functionality.  Bypass the code that posts the
WM_EMACS_REGISTER_HOT_KEY message if the keyboard hook is active.
(Fw32_unregister_hot_key): Bypass the code that posts the
WM_EMACS_UNREGISTER_HOT_KEY message if the keyboard hook is active.
(syms_of_w32fns) <w32-pass-lwindow-to-system>
<w32-pass-rwindow-to-system, w32-phantom-key-code>
<w32-lwindow-modifier, w32-rwindow-modifier>: Update doc strings
to reflect the new functionality.
* src/w32console.c (initialize_w32_display): Install the low-level
keyboard hook.
* src/w32inevt.c (key_event): Handle Win-x combinations only if
the keyboard hook is not active.  If the hook is active, use
check_w32_winkey_state instead.
* src/w32term.h (setup_w32_kbdhook, remove_w32_kbdhook)
(check_w32_winkey_state): Add prototypes.
(w32_kbdhook_active): New macro.

* doc/emacs/msdos.texi (Windows Keyboard): Update to reflect the
new functionality.

8 years agoAdd forward-sexp (and related) tests
Aaron S. Hawley [Fri, 26 Feb 2016 05:48:58 +0000 (16:18 +1030)]
Add forward-sexp (and related) tests

* test/lisp/emacs-lisp/lisp-tests.el: New file for testing
forward-sexp and related functions (bug#22800).

8 years agoDon't use (localised) week days in dates
Jan Tatarik [Fri, 26 Feb 2016 05:36:43 +0000 (16:06 +1030)]
Don't use (localised) week days in dates

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:org-timestamp): Don't use (localised)
week days in the dates, because that messes up things later.

8 years agoUpdate pcomplete/find
Thierry Volpiatto [Fri, 26 Feb 2016 05:31:46 +0000 (16:01 +1030)]
Update pcomplete/find

* lisp/pcmpl-gnu.el (pcomplete/find): Update to newest version
(bug#10487).

8 years agoMake parse-time-string-chars more efficient
Lars Ingebrigtsen [Fri, 26 Feb 2016 03:30:06 +0000 (14:00 +1030)]
Make parse-time-string-chars more efficient

* lisp/calendar/parse-time.el (parse-time-string-chars): The
string has already been downcase, so don't care about case
(bug#18522).

8 years agoRemove killed buffers from the list of Gnus buffers
Lars Ingebrigtsen [Fri, 26 Feb 2016 03:24:41 +0000 (13:54 +1030)]
Remove killed buffers from the list of Gnus buffers

* lisp/gnus/gnus.el (gnus-prune-buffers): Remove killed
buffers from the list of Gnus buffers (bug#18522).

8 years agoInteger overflow cleanups for ports and socklen
Paul Eggert [Thu, 25 Feb 2016 19:57:10 +0000 (11:57 -0800)]
Integer overflow cleanups for ports and socklen

* src/process.c (struct sockaddr_and_len, conv_sockaddr_to_lisp)
(get_lisp_to_sockaddr_size, Fset_process_datagram_address)
(connect_network_socket):
Use ptrdiff_t, not int, for signed object sizes.
This addresses only a theoretical problem, as in practice these
object sizes are less than 2**31, but we might as well use the
same style here as elsewhere in Emacs.
(string_integer_p): Remove; all uses removed.
(Fmake_network_process): Check that port number is in range.
When converting an integer-string service, rely on strtol
rather than rechecking the string by hand.
* src/process.h, src/w32.c (conv_sockaddr_to_lisp):
Adjust prototypes to match.

8 years agoAdd pcomplete support for find
Thierry Volpiatto [Thu, 25 Feb 2016 06:13:52 +0000 (16:43 +1030)]
Add pcomplete support for find

* lisp/pcmpl-gnu.el (pcomplete/find): Add pcomplete support
for find (bug#10487).

8 years agoReplace XXX acronyms with draft standard ones
Per Starbäck [Thu, 25 Feb 2016 05:52:17 +0000 (16:22 +1030)]
Replace XXX acronyms with draft standard ones

* lisp/international/characters.el (c1-acronyms): Replace XXX
entries with the acronyms PAD, HOP, SGCI from draft DIS 10646
(bug#13745).

8 years agoMake checkdoc warn about variables described as "True"
Kevin Ryde [Thu, 25 Feb 2016 05:46:37 +0000 (16:16 +1030)]
Make checkdoc warn about variables described as "True"

* checkdoc.el (checkdoc-this-string-valid-engine): Docstrings for
variables "True...", and functions "Return true...", should usually be
"non-nil" (bug#15506).

8 years agoAdd NEWS entry for "number string" change
Lars Ingebrigtsen [Thu, 25 Feb 2016 05:24:29 +0000 (15:54 +1030)]
Add NEWS entry for "number string" change

8 years agoAllow using "number strings" as services on non-GNU systems
Lars Ingebrigtsen [Thu, 25 Feb 2016 05:24:03 +0000 (15:54 +1030)]
Allow using "number strings" as services on non-GNU systems

* src/process.c (string_integer_p): New function.
(Fmake_network_process): Use it to allow connecting to
services specified as "993" even when getaddrbyname isn't
available.

8 years agoFix problem in tramp.texi
Michael Albinus [Wed, 24 Feb 2016 10:02:48 +0000 (11:02 +0100)]
Fix problem in tramp.texi

* doc/misc/tramp.texi (File name completion): Do not use
@trampfn{} for IPv6 addresses.  Somehow, it results in errors
during PDF creation.

8 years agoMake image commands available in image-mode
Lars Ingebrigtsen [Wed, 24 Feb 2016 07:11:46 +0000 (18:11 +1100)]
Make image commands available in image-mode

* lisp/image-mode.el (image-mode-map): Inherit from
`image-map' so that the usual image commands work.

8 years agoMove `o' to `O' in shr-map
Lars Ingebrigtsen [Wed, 24 Feb 2016 07:07:49 +0000 (18:07 +1100)]
Move `o' to `O' in shr-map

* lisp/net/shr.el (shr-map): `shr-save-contents' has moved
from `o' to `O' to avoid collisions with `image-map'.

8 years agoMake setting the coding system non-blocking
Lars Ingebrigtsen [Wed, 24 Feb 2016 06:21:50 +0000 (17:21 +1100)]
Make setting the coding system non-blocking

* src/process.c (Fset_process_filter_multibyte): Defer
completing coding system setup in asynchronous processes.
(Fset_process_coding_system): Ditto.

8 years agoMention `proced-toggle-auto-update' in the proced-mode doc string
Gregoire Jadi [Wed, 24 Feb 2016 05:06:07 +0000 (16:06 +1100)]
Mention `proced-toggle-auto-update' in the proced-mode doc string

* lisp/proced.el (proced-mode): Mention
`proced-toggle-auto-update' (bug#14341).

8 years agoAdd a fortune-message command
Joshua Datko [Wed, 24 Feb 2016 04:42:28 +0000 (15:42 +1100)]
Add a fortune-message command

* lisp/play/fortune.el (fortune-message): Add a command to
display fortunes in the echo area (bug#14915).

Copyright-paperwork-exempt: yes

8 years agoAdd hideshow bindings analogous to outline mode
Susanne Oberhauser [Wed, 24 Feb 2016 04:13:41 +0000 (15:13 +1100)]
Add hideshow bindings analogous to outline mode

* lisp/progmodes/hideshow.el (hs-minor-mode-map): Add bindings
analogous to outline mode bindings (bug#15324).

Copyright-paperwork-exempt: yes

8 years agoAllow highlighting things like @math{2^{12}}
Bastien Guerry [Wed, 24 Feb 2016 03:35:28 +0000 (14:35 +1100)]
Allow highlighting things like @math{2^{12}}

* lisp/textmodes/texinfo.el (texinfo-font-lock-keywords):
Allow highlighting things like @math{2^{12}} (bug#16390).

8 years agoMake `C-{up,down,left,right}' work in term mode
Per Bothner [Wed, 24 Feb 2016 03:19:17 +0000 (14:19 +1100)]
Make `C-{up,down,left,right}' work in term mode

* lisp/term.el (term-raw-map): Define C-{up,down,left,right}
to send the same escape sequence that xterm sends.  This makes
backward-word and forward-word work in readline (bug#16746).

8 years agoAllow ff-find-other-file (etc) to work with indirect clone buffers
Dima Kogan [Wed, 24 Feb 2016 03:01:50 +0000 (14:01 +1100)]
Allow ff-find-other-file (etc) to work with indirect clone buffers

* lisp/find-file.el (ff-buffer-file-name): New function to
allow the feature to work with indirect buffers, too
(bug#16904).
(ff-find-the-other-file): Use it.
(ff-other-file-name): Ditto.
(ff-get-file-name): Ditto.

8 years agoFix error in add-change-log-entry when the entry has no newline
Lars Ingebrigtsen [Wed, 24 Feb 2016 02:08:48 +0000 (13:08 +1100)]
Fix error in add-change-log-entry when the entry has no newline

* lisp/vc/add-log.el (add-change-log-entry): The entry in the
ChangeLog may end without a new line starting with blanks.

8 years agoAvoid using mm-util functoins in gravatar.el
Lars Ingebrigtsen [Wed, 24 Feb 2016 02:07:34 +0000 (13:07 +1100)]
Avoid using mm-util functoins in gravatar.el

* lisp/image/gravatar.el (gravatar-retrieve): Avoid using
mm-util functions.
(gravatar-retrieve-synchronously): Ditto.

8 years agoMove low-level library files from the lisp/gnus directory
Lars Ingebrigtsen [Wed, 24 Feb 2016 02:04:03 +0000 (13:04 +1100)]
Move low-level library files from the lisp/gnus directory

The files moved from lisp/gnus are:

auth-source.el -> /
compface.el -> /image
ecomplete.el -> /
flow-fill.el -> /mail
gravatar.el -> /image
gssapi.el -> /net
html2text.el -> /net
ietf-drums.el -> /mail
mail-parse.el -> /mail
mail-prsvr.el -> /mail
mailcap.el -> /net
plstore.el -> /
pop3.el -> /net
qp.el -> /mail
registry.el -> /
rfc1843.el -> /international
rfc2045.el -> /mail
rfc2047.el -> /mail
rfc2231.el -> /mail
rtree.el -> /
sieve-manage.el -> /net
sieve-mode.el -> /net
sieve.el -> /net
starttls.el -> /net
utf7.el -> /international
yenc.el -> /mail

8 years agoAllow undoing changes while doing query-replace
Tino Calancha [Wed, 24 Feb 2016 01:35:46 +0000 (12:35 +1100)]
Allow undoing changes while doing query-replace

* doc/lispref/searching.texi (Search and Replace): Mention
undo (bug#21684).

* lisp/replace.el (query-replace-help): Document undo.
(perform-replace): Implement undo while replacing text.

8 years agoHighlight assignments in Makefiles more correctly
John F. Trudeau [Wed, 24 Feb 2016 01:21:06 +0000 (12:21 +1100)]
Highlight assignments in Makefiles more correctly

* lisp/progmodes/make-mode.el (makefile-macroassign-regex):
Highlight assignments preceded by a TAB character correctly
(bug#20787).

Copyright-paperwork-exempt: yes

8 years agoUse memmove instead of memcpy on overlapping regions
Fredrik Bergroth [Tue, 23 Feb 2016 11:41:16 +0000 (22:41 +1100)]
Use memmove instead of memcpy on overlapping regions

* src/editfns.c (Ftranspose_regions): Regions may overlap, so
use memmove instead of memcpy (bug#19213).

Copyright-paperwork-exempt: yes

8 years agoPort to --enable-gcc-warnings sans getaddrinfo_a
Paul Eggert [Tue, 23 Feb 2016 23:25:43 +0000 (15:25 -0800)]
Port to --enable-gcc-warnings sans getaddrinfo_a

* src/process.c (Fmake_network_process): Add ATTRIBUTE_UNUSED
to a local unused when getaddrinfo_a is missing.
Resize portbuf to size needed.  Do cheap test first.
Move local to block where it’s needed.

8 years agoMinor cleanups for async DNS etc.
Paul Eggert [Tue, 23 Feb 2016 17:42:05 +0000 (09:42 -0800)]
Minor cleanups for async DNS etc.

* src/frame.h (FRAME_WINDOW_CONFIGURATION_CHANGED):
Omit unnecessary parens.
* src/gnutls.c (gnutls_try_handshake, emacs_gnutls_deinit)
(gnutls_verify_boot):
Use bool for boolean.
(ATTRIBUTE_FORMAT_PRINTF): Add printf attribute.
* src/process.c (free_dns_request, Fmake_network_process):
Allocate and free async request control block all in one go.
(set_network_socket_coding_system, finish_after_tls_connection)
(connect_network_socket):
Now static.
(conv_numerical_to_lisp): 2nd arg is now int, not unsigned.
(Fmake_network_process): Use list1 for brevity.
(wait_for_socket_fds): 2nd arg is now const ptr.
* src/process.h (struct Lisp_Process.dns_request):
Now struct gaicb *, not struct gaicb **, since there was always
exactly one.  All uses changed.
* src/window.c, src/window.h (run_window_configuration_change_hook):
Now static.

8 years agoImprove documentation of focus-related hooks
Eli Zaretskii [Tue, 23 Feb 2016 17:42:14 +0000 (19:42 +0200)]
Improve documentation of focus-related hooks

* doc/lispref/commands.texi (Focus Events): Mention focus-related
hooks.  (Bug#21728)

8 years agoFurther improve doc string of 'disable-point-adjustment'
Eli Zaretskii [Tue, 23 Feb 2016 17:35:21 +0000 (19:35 +0200)]
Further improve doc string of 'disable-point-adjustment'

* src/keyboard.c (syms_of_keyboard): <disable-point-adjustment>
<global-disable-point-adjustment>: Clarify doc strings.  (Bug#22771)

8 years agoFurther adaptions in file-notify-tests.el for w32notify
Michael Albinus [Tue, 23 Feb 2016 12:51:36 +0000 (13:51 +0100)]
Further adaptions in file-notify-tests.el for w32notify

* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout, file-notify--test-timeout):
Decrease values.
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Run tests also for w32notify.
(file-notify-test08-watched-file-in-watched-dir):
Adapt expected events for w32notify.

8 years ago; Add NEWS entries for last commit
Martin Rudalics [Tue, 23 Feb 2016 11:27:45 +0000 (12:27 +0100)]
; Add NEWS entries for last commit

8 years agoAllow more shell script defun forms
Carlos Pita [Tue, 23 Feb 2016 11:15:00 +0000 (22:15 +1100)]
Allow more shell script defun forms

* lisp/progmodes/sh-script.el (sh-mode): Allow more shell
script defun forms, like function name () {...} (bug#19754).

8 years agoFix `window-configuration-change-hook' and `window-size-change-functions'
Martin Rudalics [Tue, 23 Feb 2016 11:08:55 +0000 (12:08 +0100)]
Fix `window-configuration-change-hook' and `window-size-change-functions'

(1) Run `window-configuration-change-hook' if and only if at least
one window was deleted or created or shows another buffer since
last redisplay.

(2) Run `window-size-change-functions' if and only if at least
one window changed its size since last redisplay (in a few cases
`window-size-change-functions' will also run when no window
changed its size).

(3) Provide two functions `window-pixel-height-before-size-change'
and `window-pixel-width-before-size-change' that allow to easily
detect which window changed size.

* src/frame.h (struct frame): New boolean member
window_configuration_changed.
(FRAME_WINDOW_SIZES_CHANGED): Remove macro.
(FRAME_WINDOW_CONFIGURATION_CHANGED): New macro.
* src/frame.c (adjust_frame_size): Don't run
`window-configuration-change-hook'.
* src/window.h (struct window): New fields
pixel_width_before_size_change and pixel_height_before_size_change.
(WINDOW_INTERNAL_P): New macro.
* src/window.c (Fwindow_pixel_width_before_size_change)
(Fwindow_pixel_height_before_size_change): New functions.
(Fdelete_other_windows_internal, Fwindow_resize_apply)
(resize_frame_windows, Fsplit_window_internal)
(Fdelete_window_internal, grow_mini_window)
(shrink_mini_window, Fresize_mini_window_internal): Don't call
FRAME_WINDOW_SIZES_CHANGED.
(window_size_changed, window_set_before_size_change_sizes)
(run_window_size_change_functions): New functions.
(make_window): Initialize pixel_width_before_size_change and
pixel_height_before_size_change.
(Fdelete_window_internal): Don't call
run_window_configuration_change_hook.
(struct saved_window): Add pixel_height_before_size_change and
pixel_width_before_size_change.
(Fset_window_configuration): Try to identify window configuration
changes correctly so run_window_configuration_change_hook and
run_window_size_change_functions run only if configuration and size
really changed.
(save_window_save): Set the pixel_height_before_size_change and
pixel_width_before_size_change fields.
(Vwindow_size_change_functions): Move here definiton from xdisp.c.
* src/xdisp.c (prepare_menu_bars, redisplay_internal): Call
run_window_size_change_functions.
(Vwindow_size_change_functions): Move definition to window.c.
* src/xfns.c (x_set_menu_bar_lines): Don't call
run_window_configuration_change_hook.
* doc/lispref/windows.texi (Window Sizes): Document new
functions `window-pixel-height-before-size-change' and
`window-pixel-width-before-size-change'.
(Window Configurations): Mention that this may trigger
execution of `window-size-change-functions' although no window
changed size.
(Window Hooks): Update descriptions of `window-size-change-functions'
and `window-configuration-change-hook'.

8 years agoDon't bug out on localised dates in gnus-icalendar
Jan Tatarik [Tue, 23 Feb 2016 10:17:41 +0000 (21:17 +1100)]
Don't bug out on localised dates in gnus-icalendar

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:org-timestamp): Don't bug out on
localised dates.

8 years ago(ls-lisp-insert-directory): Make -B work
Drew Adams [Tue, 23 Feb 2016 10:12:55 +0000 (21:12 +1100)]
(ls-lisp-insert-directory): Make -B work

* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work
(bug#20776).

Backport:

(cherry picked from commit ef52e66efd78aac4c4e5bd5e11870e5ba3b37a1e)

8 years ago(ls-lisp-insert-directory): Make -B work
Drew Adams [Tue, 23 Feb 2016 10:12:55 +0000 (21:12 +1100)]
(ls-lisp-insert-directory): Make -B work

* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work
(bug#20776).

8 years agoFix typo in message-setup-fill-variables
Lars Ingebrigtsen [Tue, 23 Feb 2016 09:58:54 +0000 (20:58 +1100)]
Fix typo in message-setup-fill-variables

* lisp/gnus/message.el (message-setup-fill-variables): Fix
typo in a recent checkin that used `setq-default' instead of
`setq-local' (bug#22781).

8 years ago`message-dont-reply-to-names' can also be a list of regexps
Lars Ingebrigtsen [Tue, 23 Feb 2016 09:54:42 +0000 (20:54 +1100)]
`message-dont-reply-to-names' can also be a list of regexps

* lisp/gnus/message.el (message-dont-reply-to-names):
`message-dont-reply-to-names' can also be a list of regexps (bug#22773).