]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agoAdd option `calendar-weekend-days'
Ingo Lohmar [Sun, 2 Aug 2015 15:20:53 +0000 (17:20 +0200)]
Add option `calendar-weekend-days'

Previously, the face `calendar-weekend-header' was invariably applied to
Sundays and Saturdays, although weekend days differ by region/culture.
Making the days freely customizable, independent of
`calendar-week-start-day', should cover all possible scenarios.

8 years agoede-proj-target-makefile docstring tweaks
Paul Eggert [Sun, 2 Aug 2015 15:27:13 +0000 (08:27 -0700)]
ede-proj-target-makefile docstring tweaks

* lisp/cedet/ede/proj.el (ede-proj-target-makefile):
Consistently use "all:" to describe the all: target,
replacing three different and confusingly-quoted usages.

8 years agoWhitespace fixes
Eli Zaretskii [Sun, 2 Aug 2015 14:56:39 +0000 (17:56 +0300)]
Whitespace fixes

; * src/w32fns.c (get_wm_chars, deliver_wm_chars, w32_wnd_proc):
Whitespace fixes.

8 years agoDon't abort emacsclientw when -a was specified
Evgeny Fraimovitch [Sun, 2 Aug 2015 14:48:42 +0000 (17:48 +0300)]
Don't abort emacsclientw when -a was specified

* lib-src/emacsclient.c (set_tcp_socket) [WINDOWSNT]: Don't error
out if we are in emacsclientw and -a was specified.

Copyright-paperwork-exempt: yes

8 years agoFix handling of 1st keystroke on MS-Windows
Eli Zaretskii [Sun, 2 Aug 2015 14:40:19 +0000 (17:40 +0300)]
Fix handling of 1st keystroke on MS-Windows

* src/w32fns.c (globals_of_w32fns): Initialize after_deadkey to -1.
This is needed to correctly handle the session's first keystroke,
if it has any modifiers.  (Bug#19994)

8 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 2 Aug 2015 10:23:54 +0000 (06:23 -0400)]
; Auto-commit of ChangeLog files.

8 years agoSubstitute some customization etc. doc strings
Paul Eggert [Sun, 2 Aug 2015 07:04:51 +0000 (00:04 -0700)]
Substitute some customization etc. doc strings

These changes apply substitute-command-keys to some
doc strings that were going through untranslated
when creating customization or other widgets.
* lisp/cus-edit.el (custom-group-value-create):
* lisp/wid-edit.el (widget-default-create):
(widget-push-button-value-create):
Treat the widget tag as a doc string.
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slot):
Treat the :documentation value as a doc string.
* lisp/wid-edit.el (widget-choose):
Treat the choice names as doc strings.
(widget-default-create): Treat the :doc value as a doc string.
(widget-toggle-value-create): Treat the :on and :off values
as doc strings.
(widget-documentation-string-value-create):
Substitute the doc string.

8 years agoAdd a second argument to project-ignores
Dmitry Gutov [Sat, 1 Aug 2015 22:01:28 +0000 (01:01 +0300)]
Add a second argument to project-ignores

* lisp/progmodes/project.el (project-ignores): Add a second
argument DIR.

* lisp/progmodes/project.el (project-ignores): Only include the VC
ignores if DIR is the VC root.

* lisp/progmodes/xref.el (xref-find-regexp): Update accordingly.

8 years agoPrevent incorrect display when 'line-spacing' variable is set
Eli Zaretskii [Sat, 1 Aug 2015 12:32:48 +0000 (15:32 +0300)]
Prevent incorrect display when 'line-spacing' variable is set

* src/xdisp.c (try_window_id): Give up this optimization if the
buffer has its 'line-spacing' variable set non-nil.

8 years agoDon't pass NOVISIT to find-file
Dmitry Gutov [Sat, 1 Aug 2015 11:40:14 +0000 (14:40 +0300)]
Don't pass NOVISIT to find-file

* lisp/progmodes/etags.el (next-file):
Don't pass NOVISIT to find-file (bug#21175).

8 years agoIgnore buffer restriction for tags-loop-eval
Dmitry Gutov [Sat, 1 Aug 2015 11:21:02 +0000 (14:21 +0300)]
Ignore buffer restriction for tags-loop-eval

* lisp/progmodes/etags.el (tags-loop-continue): Ignore buffer
restriction (bug#21167).

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sat, 1 Aug 2015 10:18:42 +0000 (06:18 -0400)]
; Auto-commit of loaddefs files.

8 years agoFix a thinko in 'ffap-gopher-at-point'
Eli Zaretskii [Sat, 1 Aug 2015 09:33:48 +0000 (12:33 +0300)]
Fix a thinko in 'ffap-gopher-at-point'

* lisp/ffap.el (ffap-gopher-at-point): Fix last change.  (Bug#21168)

8 years agoHonor 'line-spacing' for empty lines
Eli Zaretskii [Sat, 1 Aug 2015 09:10:45 +0000 (12:10 +0300)]
Honor 'line-spacing' for empty lines

* src/xdisp.c (append_space_for_newline): Honor 'line-height'
property and 'line-spacing' frame parameter or variable or
property for empty lines, by doing the same processing as in
x_produce_glyph for newline characters.  (Bug#21165)

8 years agoSimplify by assuming C99 integer division
Paul Eggert [Sat, 1 Aug 2015 07:26:37 +0000 (00:26 -0700)]
Simplify by assuming C99 integer division

* src/floatfns.c (ceiling2, floor2, truncate2):
Assume C99 (i.e., Fortran) semantics for integer division.
This simplifies the code.

8 years agoDon't overflow if computing approximate percentage
Paul Eggert [Fri, 31 Jul 2015 17:12:37 +0000 (10:12 -0700)]
Don't overflow if computing approximate percentage

* lisp/align.el (align-region):
* lisp/cedet/semantic.el (semantic-repeat-parse-whole-stream):
* lisp/cedet/semantic/wisent.el (wisent-parse-region):
* lisp/cus-edit.el (custom-buffer-create-internal):
* lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-ispell-loop)
(checkdoc-message-interactive-ispell-loop, checkdoc-next-error)
(checkdoc-next-message-error):
* lisp/emacs-lisp/eieio-opt.el (eieio-display-method-list):
* lisp/epa.el (epa-progress-callback-function):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/ffap.el (ffap-menu-rescan):
* lisp/gnus/nnbabyl.el (nnbabyl-retrieve-headers):
* lisp/gnus/nndiary.el (nndiary-retrieve-headers):
* lisp/gnus/nneething.el (nneething-retrieve-headers):
* lisp/gnus/nnmbox.el (nnmbox-retrieve-headers):
* lisp/gnus/nnmh.el (nnmh-retrieve-headers):
* lisp/gnus/nnml.el (nnml-retrieve-headers):
* lisp/gnus/nnspool.el (nnspool-retrieve-headers):
* lisp/gnus/nntp.el (nntp-retrieve-headers)
(nntp-retrieve-articles):
* lisp/imenu.el (imenu--relative-position):
* lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi)
(skkdic-convert-okuri-nasi):
* lisp/net/ange-ftp.el (ange-ftp-process-handle-hash):
* lisp/nxml/rng-valid.el (rng-compute-mode-line-string):
* lisp/org/org-list.el (org-update-checkbox-count):
* lisp/org/org.el (org-table-map-tables)
(org-update-parent-todo-statistics):
* lisp/play/decipher.el (decipher-insert-frequency-counts)
(decipher-analyze-buffer):
* lisp/profiler.el (profiler-format-percent):
* lisp/progmodes/cc-cmds.el (c-progress-update):
* lisp/progmodes/cpp.el (cpp-highlight-buffer):
* lisp/progmodes/idlwave.el (idlwave-convert-xml-system-routine-info)
(idlwave-list-load-path-shadows):
* lisp/progmodes/opascal.el (opascal-step-progress):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-scan-directory-contents):
* lisp/textmodes/bibtex.el (bibtex-progress-message):
* lisp/textmodes/flyspell.el (flyspell-small-region)
(flyspell-external-point-words):
* lisp/textmodes/table.el (table-recognize):
Prefer (floor (* 100.0 NUMERATOR) DENOMINATOR) when calculating
progress-report percentages and the like.  This avoids problems
if (* 100 NUMERATOR) would overflow.
* lisp/gnus/gnus-registry.el (gnus-registry-import-eld):
* lisp/gnus/registry.el (registry-reindex):
Use (* 100.0 ...) rather than (* 100 ...) to avoid int overflow issues.
* lisp/descr-text.el (describe-char):
* lisp/org/org-colview.el (org-nofm-to-completion):
* lisp/ps-print.el (ps-plot):
* lisp/simple.el (what-cursor-position):
Prefer (round (* 100.0 NUMERATOR) DENOMINATOR) to a
more-complicated and less-accurate approximation.

8 years agoFix some int overflows in profiler.c
Paul Eggert [Fri, 31 Jul 2015 16:55:49 +0000 (09:55 -0700)]
Fix some int overflows in profiler.c

* src/profiler.c (make_log): Make args EMACS_INT, not int,
to avoid unwanted behavior on 'int' overflow.
(make_log, evict_lower_half, record_backtrace):
Use ptrdiff_t, not int, for object indexes.

8 years agoPort to pedantic memcpy
Paul Eggert [Fri, 31 Jul 2015 16:46:45 +0000 (09:46 -0700)]
Port to pedantic memcpy

* src/keyboard.c (menu_bar_items, tool_bar_items):
* src/xrdb.c (magic_db):
Port to pedantic memcpy implementations that reject memcpy (0, 0, 0).

8 years agoMerge from gnulib
Paul Eggert [Fri, 31 Jul 2015 16:44:47 +0000 (09:44 -0700)]
Merge from gnulib

This incorporates:
2015-07-29 time_rz: port to pedantic memcpy
* lib/time_rz.c: Copy from gnulib.

8 years ago* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Fix bug
Artur Malabarba [Fri, 31 Jul 2015 11:51:04 +0000 (12:51 +0100)]
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Fix bug

When updating the very last entry, tabulated-list-print would
erase it and then try to look at the next one (which obviously
isn't there).

8 years ago;* src/w32fns.c (syms_of_w32fns): Fix last commit.
Eli Zaretskii [Fri, 31 Jul 2015 09:18:10 +0000 (12:18 +0300)]
;* src/w32fns.c (syms_of_w32fns): Fix last commit.

8 years agoAllow to use the old key processing code on MS-Windows
Eli Zaretskii [Fri, 31 Jul 2015 09:14:07 +0000 (12:14 +0300)]
Allow to use the old key processing code on MS-Windows

* src/w32fns.c (syms_of_w32fns) <w32-use-fallback-wm-chars-method>:
New variable.
(w32_wnd_proc): Use it to invoke the old code that processed
character keys, as fallback, when this variable is non-nil.  Fix
typos in comments.  (Bug#19994)

8 years agoImprove handling of Unicode keyboard input on MS-Windows
Ilya Zakharevich [Fri, 31 Jul 2015 08:50:23 +0000 (11:50 +0300)]
Improve handling of Unicode keyboard input on MS-Windows

* src/w32fns.c (get_wm_chars, deliver_wm_chars): New functions.
(FPRINTF_WM_CHARS) [DEBUG_WM_CHARS]: New macro for debugging.
(w32_wnd_proc): Call deliver_wm_chars to process non-special keys
upon receiving WM_KEYDOWN or WM_SYSKEYDOWN messages.  If that is
successful, don't call TranslateMessage.  (Bug#19994)

8 years agoFix default-directory in changeset diffs after vc-print-log
Dmitry Gutov [Fri, 31 Jul 2015 02:52:53 +0000 (05:52 +0300)]
Fix default-directory in changeset diffs after vc-print-log

* lisp/vc/log-view.el (log-view-diff-common): Move the
revision-granularity check back into log-view-diff-changeset.
(log-view-diff-changeset): Bind default-directory to the current
VC root.

8 years agoRename project-directories to project-roots
Dmitry Gutov [Fri, 31 Jul 2015 02:37:28 +0000 (05:37 +0300)]
Rename project-directories to project-roots

* lisp/progmodes/project.el (project-search-path-function)
(project-search-path): Update the docstring.
(project-directories): Rename to `project-roots', update all
callers and implementations accordingly.
(project-root): Remove.

* lisp/progmodes/xref.el (xref-find-regexp): Use * instead of *.*
as the default file mask.

8 years agoSupport long URLs in w32-shell-execute
Eli Zaretskii [Thu, 30 Jul 2015 16:50:51 +0000 (19:50 +0300)]
Support long URLs in w32-shell-execute

* src/w32fns.c (Fw32_shell_execute): Don't use filename_to_utf16
and filename_to_ansi to convert the DOCUMENT argument, as it could
be a URL that is not limited to MAX_PATH characters.  Instead, use
MultiByteToWideChar directly, and allocate heap storage as
required to accommodate the converted string.  Likewise with
non-Unicode operation.  Ensure OPERATION is null-terminated, even
if it is longer than 32K bytes.  (Bug#21158)

8 years agovc-mtn-find-revision handle null rev.
Stephen Leake [Thu, 30 Jul 2015 06:25:47 +0000 (01:25 -0500)]
vc-mtn-find-revision handle null rev.

* lisp/vc/vc-mtn.el (vc-mtn-find-revision): handle null rev

8 years agoAdd docs for display-buffer action display-buffer-use-some-frame
Stephen Leake [Thu, 30 Jul 2015 00:23:19 +0000 (19:23 -0500)]
Add docs for display-buffer action display-buffer-use-some-frame

* lisp/window.el (display-buffer-use-some-frame): improve doc string

* doc/lispref/windows.texi (Display Action Functions): add
  display-buffer-use-some-frame

* etc/NEWS: mention display-buffer-use-some-frame

8 years agoAdd display-buffer action display-buffer-use-some-frame
Stephen Leake [Wed, 29 Jul 2015 23:30:36 +0000 (18:30 -0500)]
Add display-buffer action display-buffer-use-some-frame

* lisp/window.el (display-buffer-use-some-frame): new

8 years agoHandle vc-mtn error more gently
Stephen Leake [Fri, 24 Jul 2015 16:01:16 +0000 (11:01 -0500)]
Handle vc-mtn error more gently

* lisp/vc/vc-mtn.el (vc-mtn-mode-line-string): return "" when branch is nil

8 years agoFix Tramp problems with multihops, and nc.
Michael Albinus [Wed, 29 Jul 2015 19:07:01 +0000 (21:07 +0200)]
Fix Tramp problems with multihops, and nc.

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property, tramp-flush-file-property)
(tramp-get-connection-property, tramp-set-connection-property)
(tramp-flush-connection-property): Remove hop from vector.

* lisp/net/tramp-gw.el (tramp-gw-process-filter): Ignore errors.

* lisp/net/tramp-sh.el (tramp-methods) <nc>: Separate STDERR.
(tramp-do-copy-or-rename-file-out-of-band): Increase timeout of
netstat to 60".
(tramp-sh-handle-start-file-process): Do not show hops in prompt.

* lisp/net/tramp.el (tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory, tramp-handle-file-remote-p):
Keep hop in result.

* test/automated/tramp-tests.el (tramp-test02-file-name-dissect):
Add hop tests.

8 years agoResurrect highlighting of repeated words by Flyspell Mode
Eli Zaretskii [Wed, 29 Jul 2015 17:52:23 +0000 (20:52 +0300)]
Resurrect highlighting of repeated words by Flyspell Mode

* lisp/textmodes/flyspell.el (flyspell-word): Leave some non-word
characters between point and the doublon candidate, so that
flyspell-word-search-backward finds it.  (Bug#21157)

8 years agoFix redisplay of large images on expose events
Eli Zaretskii [Wed, 29 Jul 2015 17:02:56 +0000 (20:02 +0300)]
Fix redisplay of large images on expose events

* src/xdisp.c (expose_window, expose_area): Avoid comparisons
between signed negative values and unsigned values.  This
prevented redisplay on expose events when the window showed a very
large image.

8 years agoRemove unnecessary stack overflow dependency
Paul Eggert [Wed, 29 Jul 2015 04:41:59 +0000 (21:41 -0700)]
Remove unnecessary stack overflow dependency

* configure.ac (HAVE_STACK_OVERFLOW_HANDLING):
Don't worry about $ac_cv_header_sys_resource_h and
$ac_cv_func_getrlimit, as they're no longer needed for this.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00443.html

8 years agoPacify compilation -Wincompatible-pointer-types warnings
Andy Moreton [Tue, 28 Jul 2015 13:37:31 +0000 (16:37 +0300)]
Pacify compilation -Wincompatible-pointer-types warnings

* src/w32proc.c (Fw32_get_codepage_charset): Avoid compilation
warning.
(CompareStringW_Proc): New typedef.
(w32_compare_strings): Use it, to pacify compiler warnings under
"-Wincompatible-pointer-types".
* src/w32fns.c (GetDiskFreeSpaceExW_Proc)
(GetDiskFreeSpaceExA_Proc): New typedefs.
(Ffile_system_info): Use them, to pacify compiler warnings under
"-Wincompatible-pointer-types".

Copyright-paperwork-exempt: yes

8 years agoFix subscript error in calculate_direct_scrolling
Paul Eggert [Tue, 28 Jul 2015 06:36:48 +0000 (23:36 -0700)]
Fix subscript error in calculate_direct_scrolling

Use slightly-longer cost vectors.  Without this change,
calculate_direct_scrolling can have a subscript violation when
FRAME_LINES (frame) <= delta.
* src/scroll.c (calculate_scrolling, calculate_direct_scrolling)
(line_ins_del, do_line_insertion_deletion_costs):
Allocate and use slightly-larger cost vectors, ones based on
FRAME_TOTAL_LINES instead of FRAME_LINES.

8 years agoFix uninitalized value in encode_coding_object
Paul Eggert [Tue, 28 Jul 2015 06:18:14 +0000 (23:18 -0700)]
Fix uninitalized value in encode_coding_object

* src/coding.c (encode_coding_object): Also initialize
coding->src_pos and coding->src_pos_byte when NILP (src_object).
This avoids later use of uninitialized storage.

8 years ago* doc/lispref/variables.texi (Variable Aliases): Typo fix. (Bug#21141)
Xue Fuqiao [Tue, 28 Jul 2015 00:25:33 +0000 (08:25 +0800)]
* doc/lispref/variables.texi (Variable Aliases): Typo fix.  (Bug#21141)

8 years agoMerge from gnulib
Paul Eggert [Mon, 27 Jul 2015 23:50:44 +0000 (16:50 -0700)]
Merge from gnulib

This incorporates:
2015-07-27 time_rz: port better to MinGW
2015-07-27 time: port __need_time_t to MinGW
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/strftime.c, lib/time.in.h, lib/time_rz.c: Copy from gnulib.
* lib/time-internal.h: New file, from gnulib.

8 years agoHandle NULL pointers in w32heap.c allocation routines
Eli Zaretskii [Mon, 27 Jul 2015 18:16:46 +0000 (21:16 +0300)]
Handle NULL pointers in w32heap.c allocation routines

* src/w32heap.c (FREEABLE_P): Consider a NULL pointer "not
freeable".
(realloc_after_dump, realloc_before_dump, free_before_dump):
Handle NULL pointers gracefully, as Emacs now seems to expect
that.

8 years agoFix Cairo build without PNG
Eli Zaretskii [Mon, 27 Jul 2015 12:32:18 +0000 (15:32 +0300)]
Fix Cairo build without PNG

* src/image.c: Define PNG function when USE_CAIRO is defined, even
if HAVE_PNG is not.  (Bug#21133)

8 years agoMS-Windows follow-up for recent TZ-related changes
Eli Zaretskii [Mon, 27 Jul 2015 12:16:06 +0000 (15:16 +0300)]
MS-Windows follow-up for recent TZ-related changes

* nt/mingw-cfg.site (ac_cv_header_pthread_h)
(gl_cv_sys_struct_timespec_in_pthread_h): Force to "no", to avoid
picking up 'struct timespec' from pthread.h, if it is installed on
the user's system.  We want either the definitions from MinGW
system headers, if available, or the Gnulib replacements if not.

* nt/inc/ms-w32.h <struct timespec>: Don't define, as we now use
lib/time.h.

* lib/time.in.h: Don't let __need_* symbols affect what happens on
MinGW.  These symbols are defined by MinGW system headers, but we
don't want that to affect whether Gnulib portions of the header
are or aren't used.

8 years ago* src/ftfont.c (ftfont_close): Add comment re Bug#20890.
Paul Eggert [Sun, 26 Jul 2015 20:23:08 +0000 (13:23 -0700)]
* src/ftfont.c (ftfont_close): Add comment re Bug#20890.

8 years agoNew optional ZONE arg for format-time-string etc.
Paul Eggert [Sun, 26 Jul 2015 07:01:34 +0000 (00:01 -0700)]
New optional ZONE arg for format-time-string etc.

This simplifies time conversions in other time zones.
It also prevents display-time-world tampering with TZ (Bug#21020).
* admin/admin.el (add-release-logs):
Use improved add-log-time-format API.
* admin/merge-gnulib (GNULIB_MODULES): Add time_rz, timegm.
(GNULIB_TOOL_FLAGS): Avoid flexmember, setenv, unsetenv.
* configure.ac (tzalloc): Remove test for this, since
Emacs no longer uses HAVE_TZALLOC directly.
* doc/lispref/os.texi (Time of Day, Time Conversion)
(Time Parsing):
* etc/NEWS: Document the new behavior.
Merge from gnulib, incorporating:
2015-07-25 strftime: fix newly-introduced bug on Solaris
2015-07-23 fprintftime, strftime: use timezone_t args
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/strftime.c, lib/strftime.h, lib/time.in.h, m4/sys_time_h.m4:
* m4/time_h.m4:
Update from gnulib.
* lib/time_rz.c, lib/timegm.c, m4/time_rz.m4, m4/timegm.m4:
New files from gnulib.
* lisp/time-stamp.el (time-stamp-string):
* lisp/time.el (display-time-world-list)
(display-time-world-display):
Use new API, with time zone arg.
* lisp/time.el (display-time-world-display):
Fix race when current-time advances while we're running.
* lisp/vc/add-log.el (add-log-iso8601-time-zone)
(add-log-iso8601-time-string): Accept optional time zone arg.
* lisp/vc/add-log.el (add-change-log-entry):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p): Use new arg.
* nt/gnulib.mk: Propagate lib/gnulib.mk changes here.
Add rules for the time module, since they're now needed
for tzalloc etc.
* src/conf_post.h (getenv_TZ, setenv_TZ): New macros.
(emacs_getenv_TZ, emacs_setenv_TZ): New decls.
* src/editfns.c: Include errno.h.
(set_time_zone_rule): Omit unnecessary forward decl.
(initial_tz): Remove, replacing with ...
(local_tz, wall_clock_tz, utc_tz): New static vars and constants.
(tzeqlen): New constant; prefer it to (sizeof "TZ=" - 1).
(emacs_localtime_rz, emacs_mktime_z, xtzalloc, xtzfree)
(tzlookup): New static functions.
(init_editfns): New arg DUMPING.  All uses changed.
(init_editfns): Omit most initialization if dumping, not if
!initialized.  Initialize wall_clock_tz and local_tz.
(emacs_nmemftime, format_time_string): Time zone argument can now
be any time zone, not just a boolean for UTC or local time.  All
callers changed.
(Fformat_time_string, Fencode_time, Fcurrent_time_string)
(Fcurrent_time_zone): New optional arg ZONE.
(Fdecode_time, Fset_time_zone_rule): ZONE arg can now also take
the same form as with the other new additions.
(decode_time_zone): Remove; no longer needed.
(tzvalbuf): Now file-scope.
(emacs_getenv_TZ, emacs_setenv_TZ): New functions.
(syms_of_editfns): Define Qwall.
* src/editfns.c (mktime_z) [!HAVE_TZALLOC]:
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree)
[!HAVE_TZALLOC]:
Remove; now supplied by gnulib.
* src/emacs.c (main):
* src/lisp.h (init_editfns): Adjust to init_editfns API change.

8 years agoFix infinite loop in delete-consecutive-dups
Shigeru Fukaya [Sun, 26 Jul 2015 17:43:10 +0000 (10:43 -0700)]
Fix infinite loop in delete-consecutive-dups

* lisp/subr.el (delete-consecutive-dups): Work even if the last
element is nil (Bug#20588).  Avoid rescan of a circular list in
deletion of last element.

8 years agoHave `x-frame-geometry' return nil for terminal and initial frames (Bug#21132)
Martin Rudalics [Sun, 26 Jul 2015 10:41:16 +0000 (12:41 +0200)]
Have `x-frame-geometry' return nil for terminal and initial frames (Bug#21132)

* src/nsfns.m (Fx_frame_geometry):
* src/xfns.c (Fx_frame_geometry): Return nil for initial and
terminal frames.
* src/w32fns.c (Fw32_frame_menu_bar_size, Fw32_frame_rect)
(Fx_frame_geometry): Return nil for terminal frames

8 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 26 Jul 2015 10:24:02 +0000 (06:24 -0400)]
; Auto-commit of ChangeLog files.

8 years ago* etc/tutorials/TUTORIAL.ja: Improve translation.
HOSOYA Kei [Sun, 26 Jul 2015 07:25:05 +0000 (00:25 -0700)]
* etc/tutorials/TUTORIAL.ja: Improve translation.

Copyright-paperwork-exempt: yes

8 years agoAvoid crashes when w32 GUI functions are called in -batch
Eli Zaretskii [Sat, 25 Jul 2015 16:33:51 +0000 (19:33 +0300)]
Avoid crashes when w32 GUI functions are called in -batch

* src/w32fns.c (Fx_frame_geometry, Fw32_frame_rect)
(Fw32_frame_menu_bar_size, Fw32_send_sys_command): Don't call
FRAME_W32_WINDOW for initial frame.  (Bug#21132)

8 years agoFix flyspell-check-previous-highlighted-word
Eli Zaretskii [Sat, 25 Jul 2015 09:35:16 +0000 (12:35 +0300)]
Fix flyspell-check-previous-highlighted-word

* lisp/textmodes/flyspell.el
(flyspell-check-previous-highlighted-word): Really accept a
numeric argument, as the doc string describes.  Fix an off-by-one
error in looking up overlays, so invocation with point immediately
after a word would check that word.  Clarify the doc string as
Suggested by N. Jackson <nljlistbox2@gmail.com>.  (Bug#21129)

8 years agoMinor cleanup in tramp-tests.el
Michael Albinus [Fri, 24 Jul 2015 18:02:59 +0000 (20:02 +0200)]
Minor cleanup in tramp-tests.el

* test/automated/tramp-tests.el (tramp-test31-*, tramp-test32-*):
Implement using the documented interface
`tramp-connection-properties', rather than with internal functions.

8 years agoPass lambdas to `skeleton-read'
Harald Hanche-Olsen [Thu, 23 Jul 2015 16:09:44 +0000 (18:09 +0200)]
Pass lambdas to `skeleton-read'

* lisp/skeleton.el (skeleton-read): Allow PROMPT to be a function.

* lisp/textmodes/sgml-mode.el (sgml-attributes, sgml-value): Pass
lambdas to `skeleton-read' (bug#20386).

Copyright-paperwork-exempt: yes

8 years ago* INSTALL (DETAILED BUILDING AND INSTALLATION): Mention --without-imagemagick.
Eli Zaretskii [Fri, 24 Jul 2015 13:42:08 +0000 (16:42 +0300)]
* INSTALL (DETAILED BUILDING AND INSTALLATION): Mention --without-imagemagick.

8 years agoDon't require GUI frames and mouse for Flyspell menus
Eli Zaretskii [Fri, 24 Jul 2015 07:47:05 +0000 (10:47 +0300)]
Don't require GUI frames and mouse for Flyspell menus

* lisp/textmodes/flyspell.el (flyspell-correct-word-before-point)
(flyspell-emacs-popup): Require neither a GUI frame nor mouse
support, since pop-up menus work with text terminals and can be
controlled via the keyboard.

8 years agoImprove documentation of Flyspell commands
Eli Zaretskii [Fri, 24 Jul 2015 07:29:16 +0000 (10:29 +0300)]
Improve documentation of Flyspell commands

* doc/emacs/fixit.texi (Spelling): Mention Flyspell commands that
can be invoked via the keyboard.  Mention those commands by name
and add them to the fn index.  (Bug#21125)

8 years agoFix some Tramp problems with HP-UX
Michael Albinus [Thu, 23 Jul 2015 19:49:40 +0000 (21:49 +0200)]
Fix some Tramp problems with HP-UX

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Add "tab0" to stty call.

* test/automated/tramp-tests.el (tramp-persistency-file-name):
Set to nil.
(tramp--test-hpux-p): New defun.
(tramp--test-utf8): Use it.

8 years ago* build-aux/update-subdirs: Put "no-update-autoloads: t" in output.
Glenn Morris [Wed, 22 Jul 2015 23:22:49 +0000 (19:22 -0400)]
* build-aux/update-subdirs: Put "no-update-autoloads: t" in output.

8 years ago; xref-find-regexp: (require 'grep), for grep-read-files
Dmitry Gutov [Wed, 22 Jul 2015 20:08:50 +0000 (23:08 +0300)]
; xref-find-regexp: (require 'grep), for grep-read-files

8 years agoFix point positioning in ffap-next-guess
Eli Zaretskii [Wed, 22 Jul 2015 15:35:16 +0000 (18:35 +0300)]
Fix point positioning in ffap-next-guess

* lisp/ffap.el (ffap-url-at-point): Set ffap-string-at-point-region,
as our callers expect.  This was clobbered as part of fixing
bug#5673.  (Bug#21107)
(ffap-gopher-at-point): Set ffap-string-at-point-region.

8 years agoFix customization type of `even-window-sizes'.
Martin Rudalics [Wed, 22 Jul 2015 10:34:41 +0000 (12:34 +0200)]
Fix customization type of `even-window-sizes'.

* lisp/window.el (even-window-sizes): Fix customization type.

8 years ago2015-07-22 Martin Rudalics <rudalics@gmx.at>
Martin Rudalics [Wed, 22 Jul 2015 10:20:13 +0000 (12:20 +0200)]
2015-07-22  Martin Rudalics  <rudalics@gmx.at>

Optionally even widths of `display-buffer' windows.  (Bug#21100)

* lisp/window.el (quit-restore-window): Restore width if
requested.
(display-buffer-record-window): Record width when window is
reused and horizontally combined.
(even-window-sizes): New option to allow evening window widths.
(even-window-heights): Defalias to `even-window-sizes'.
(window--even-window-heights): Rename to
`window--even-window-sizes'.  Handle side-by-side windows.
(display-buffer-use-some-window): Call `window--even-window-sizes'
instead of `window--even-window-heights'.
* lisp/help.el (resize-temp-buffer-window): Fix indentation.

* doc/lispref/windows.texi (Choosing Window Options): Describe
`even-window-sizes'.
(Coordinates and Windows): Fix typo.

8 years agoadd file name to autoload error messages.
Stephen Leake [Wed, 22 Jul 2015 09:29:38 +0000 (04:29 -0500)]
add file name to autoload error messages.

* lisp/emacs-lisp/autoload.el (autoload-save-buffers): add condition-case
  to add file name to error message.

8 years agoUse 0.0.0.1 as test host in Tramp
Michael Albinus [Wed, 22 Jul 2015 05:54:48 +0000 (07:54 +0200)]
Use 0.0.0.1 as test host in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Use 0.0.0.1 as test host.

8 years ago(advice--called-interactively-skip): Fix inf-loop (bug#21083)
Stefan Monnier [Tue, 21 Jul 2015 23:09:12 +0000 (19:09 -0400)]
(advice--called-interactively-skip): Fix inf-loop (bug#21083)

* lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip):
Fix inf-loop (bug#21083).

8 years ago* test/automated/package-test.el (package-test-signed):
Glenn Morris [Tue, 21 Jul 2015 16:03:46 +0000 (09:03 -0700)]
* test/automated/package-test.el (package-test-signed):

Update for recent changes.

8 years ago* test/automated/elisp-mode-tests.el
Glenn Morris [Tue, 21 Jul 2015 15:54:17 +0000 (08:54 -0700)]
* test/automated/elisp-mode-tests.el

(elisp-xref-finds-both-function-and-variable)
(elisp-xref-finds-only-function-for-minor-mode):
Update for recent xref name changes.

8 years agoMake eldoc timer non-repeatable
Dmitry Gutov [Tue, 21 Jul 2015 13:57:58 +0000 (16:57 +0300)]
Make eldoc timer non-repeatable

* lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer): Make the timer
non-repeatable.  Since it's on post-command hook, that just wasted
CPU cycles.

8 years agoMention `tramp-connection-properties' in NEWS
Michael Albinus [Tue, 21 Jul 2015 13:23:08 +0000 (15:23 +0200)]
Mention `tramp-connection-properties' in NEWS

8 years agoSync with Tramp repository
Michael Albinus [Tue, 21 Jul 2015 12:59:18 +0000 (14:59 +0200)]
Sync with Tramp repository

* doc/misc/tramp.texi (Configuration): Note, that Tramp must be
required prior changing its configuration.
(Connection caching, Predefined connection information)
(Remote shell setup): Fix typos.
(Predefined connection information): Describe, how to overwrite
parameters of `tramp-methods'.
(Remote programs, Remote processes, Traces and Profiles):
Simplify example.
(Remote programs): Remove superfluous comment.

* doc/misc/trampver.texi: Update release number.

* lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun.
(tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it.
(tramp-gvfs-handle-make-directory): Reimplement PARENTS handling,
"gvfs-mkdir -p ..." does not work robust.
(tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call.

* lisp/net/tramp-sh.el (tramp-methods):
Add `tramp-remote-shell-login' parameter where it fits.
(tramp-get-remote-path): Use it.
(tramp-make-copy-program-file-name): Fix quoting for "psftp" method.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-get-method-parameter): Replace argument METHOD by VEC.
Check also for hits in `tramp-connection-properties'.  Adapt docstring.
(tramp-get-remote-tmpdir): Cache only the local name of tmpdir.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/trampver.el Update release number.

* test/automated/tramp-tests.el (tramp--instrument-test-case):
Add "^make-symbolic-link not supported$" to `debug-ignored-errors'.
(tramp-test13-make-directory, tramp--test-adb-p)
(tramp--test-smb-or-windows-nt-p): Simplify.
(tramp--test-ftp-p, tramp--test-gvfs-p): New defuns.
(tramp--test-special-characters): Fix docstring.  Add gvfs and ftp tests.
(tramp--test-utf8): Fix docstring.

8 years agoAdd new xref-query-replace command
Dmitry Gutov [Tue, 21 Jul 2015 00:25:24 +0000 (03:25 +0300)]
Add new xref-query-replace command

* lisp/progmodes/xref.el (xref--match-buffer-bounds): New
function, extracted from xref-pulse-momentarily.
(xref-query-replace): New command.
(xref--query-replace-1): New helper function.
(xref--xref-buffer-mode-map): Add `r' binding.

8 years ago; Fix a typo
Dmitry Gutov [Mon, 20 Jul 2015 21:44:41 +0000 (00:44 +0300)]
; Fix a typo

8 years agoSimplify icalendar decoding of Z dates
Paul Eggert [Mon, 20 Jul 2015 16:47:39 +0000 (09:47 -0700)]
Simplify icalendar decoding of Z dates

* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Simplify calculation of time strings with trailing "Z".

8 years agoDo not corrupt grep-find-ignored-files
Dmitry Gutov [Mon, 20 Jul 2015 01:42:53 +0000 (04:42 +0300)]
Do not corrupt grep-find-ignored-files

* lisp/progmodes/project.el (project-ignores): Change the order of
the arguments to nconc, in order not to corrupt grep-find-ignored-files.

8 years agoAdd xref-match-item, and use it
Dmitry Gutov [Mon, 20 Jul 2015 01:32:58 +0000 (04:32 +0300)]
Add xref-match-item, and use it

* lisp/progmodes/xref.el (xref-match-bounds): New generic function.
(xref-file-location): Add reader for the column slot.
(xref-match-item): New class.
(xref-match-bounds): A method implementation for it.
(xref-make-match): New constructor function.
(xref--current-item): New private variable.
(xref-pulse-momentarily): Use it.
(xref--pop-to-location): Change the first argument to an xref
item, instead of location, bind xref--current-item.
Update all callers.
(xref-next-line, xref-prev-line, xref--next-error-function)
(xref--mouse-2): Look for the property `xref-item',
instead of `xref-location'.
(xref--item-at-point): Likewise.  This function replaces
`xref-location-at-point'.  Update all callers.
(xref--insert-xrefs): Add the `xref-item' text property, instead
of `xref-location'.
(xref--collect-match): Use xref-make-match.

8 years agoRename xref--xref to xref-item
Dmitry Gutov [Mon, 20 Jul 2015 00:26:01 +0000 (03:26 +0300)]
Rename xref--xref to xref-item

* lisp/progmodes/xref.el (xref-item): Rename from `xref--xref'.
Update all references.

8 years agoRename xref description slot to summary
Dmitry Gutov [Mon, 20 Jul 2015 00:12:32 +0000 (03:12 +0300)]
Rename xref description slot to summary

* lisp/progmodes/xref.el (xref--xref): Rename the `description'
slot to `summary'.

8 years agovc-hg: Perform the print-log call asynchronously
Dmitry Gutov [Sun, 19 Jul 2015 17:49:59 +0000 (20:49 +0300)]
vc-hg: Perform the print-log call asynchronously

* lisp/vc/vc-hg.el (vc-hg-print-log): Perform the call
asynchronously (bug#21067).

8 years agoAdd xref-after-jump-hook and xref-after-return-hook
Dmitry Gutov [Sun, 19 Jul 2015 17:40:18 +0000 (20:40 +0300)]
Add xref-after-jump-hook and xref-after-return-hook

* lisp/progmodes/xref.el (xref-after-jump-hook)
(xref-after-return-hook): New hooks.
(xref-pulse-on-jump): Remove, in favor of the above.
(xref-pulse-momentarily): Rename from xref--maybe-pulse.
(xref--pop-to-location, xref--display-position)
(xref-pop-marker-stack): Use the new hooks, as requested in
http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00213.html

8 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 19 Jul 2015 10:23:59 +0000 (06:23 -0400)]
; Auto-commit of ChangeLog files.

8 years agoCorrect js-mode's lighter
Bozhidar Batsov [Sun, 19 Jul 2015 05:18:56 +0000 (08:18 +0300)]
Correct js-mode's lighter

* lisp/progmodes/js.el (js-mode): Correct the lighter.

8 years agoFix a bug in cfengine3-mode
Leo Liu [Sun, 19 Jul 2015 04:39:37 +0000 (12:39 +0800)]
Fix a bug in cfengine3-mode

* progmodes/cfengine.el (cfengine3-mode): Handle nil
  eldoc-documentation-function.

8 years agosieve-mode: support "body" test command
Julien Danjou [Sun, 19 Jul 2015 00:11:02 +0000 (00:11 +0000)]
sieve-mode: support "body" test command

* lisp/gnus/sieve-mode.el (sieve-font-lock-keywords):
Add missing "body" test command.

8 years agoFix info-apropos when the default encoding is Latin-N
Eli Zaretskii [Sat, 18 Jul 2015 18:43:21 +0000 (21:43 +0300)]
Fix info-apropos when the default encoding is Latin-N

* lisp/info.el (Info-find-node-2): Reset the buffer's encoding to
'undecided', so that it is set to the encoding of the Info file we
are about to insert.  Otherwise, 'info-apropos' will fail to find
some index nodes in some UTF-8 encoded files, if the buffer's
previous encoding is Latin-N or some such.

8 years ago* epg.el (epg--start): Check that gpgconf can be found before calling it.
Ivan Andrus [Thu, 16 Jul 2015 21:44:20 +0000 (15:44 -0600)]
* epg.el (epg--start): Check that gpgconf can be found before calling it.

8 years agoExpose more file types to OS X that Emacs understands.
Ivan Andrus [Fri, 12 Dec 2014 05:18:20 +0000 (22:18 -0700)]
Expose more file types to OS X that Emacs understands.

* Cocoa/Emacs.base/Contents/Info.plist: Add editor role for sty, dtx,
json, and org files.  Export UTIs for el, elc, and org files.

8 years agoFix visual-order cursor movement when lines are truncated
Eli Zaretskii [Sat, 18 Jul 2015 12:17:26 +0000 (15:17 +0300)]
Fix visual-order cursor movement when lines are truncated

* src/xdisp.c (Fmove_point_visually): When lines are truncated,
simulate display in a window of infinite width, to allow move_it_*
functions reach positions outside of normal window dimensions.
Remove code that tried to handle a subset of these situations by
manual iteration of buffer text.  (Bug#17777)

8 years agoFix following Info cross-references to anchors
Eli Zaretskii [Sat, 18 Jul 2015 10:23:22 +0000 (13:23 +0300)]
Fix following Info cross-references to anchors

* lisp/info.el (Info-read-subfile): Add to the returned value the
length of subfile preamble, after converting it to file's byte
offset, as expected by the caller.  Use bufferpos-to-filepos.
(Info-find-node-2): If searching for a node with a
1000-character slop fails, try again with a 10000-character slop,
to account for known bugs in Texinfo 5.0 and 5.1.  (Bug#21055)

* lisp/international/mule-util.el (bufferpos-to-filepos): New
function.
* etc/NEWS: Mention bufferpos-to-filepos.

8 years agoFix scrolling backwards on TTY frames under scroll-conservatively
Eli Zaretskii [Sat, 18 Jul 2015 10:02:06 +0000 (13:02 +0300)]
Fix scrolling backwards on TTY frames under scroll-conservatively

* src/xdisp.c (move_it_vertically_backward): Fix off-by-one error
in moving backwards on TTY frames.  (Bug#21080)

8 years agoConsider a jsdoc tag to be a beginning of a paragraph as well
Dmitry Gutov [Sat, 18 Jul 2015 01:01:01 +0000 (04:01 +0300)]
Consider a jsdoc tag to be a beginning of a paragraph as well

* lisp/progmodes/js.el (js-mode): Change c-paragraph-start to
consider a jsdoc tag to be a beginning of a paragraph as well.

8 years ago* lisp/emacs-lisp/package.el: Fix warnings
Artur Malabarba [Fri, 17 Jul 2015 22:51:32 +0000 (23:51 +0100)]
* lisp/emacs-lisp/package.el: Fix warnings

8 years ago* lisp/emacs-lisp/package.el (package-buffer-info):
Artur Malabarba [Fri, 17 Jul 2015 18:24:15 +0000 (19:24 +0100)]
* lisp/emacs-lisp/package.el (package-buffer-info):

Add author and maintainers to `package-buffer-info'.

8 years ago* lisp/emacs-lisp/package.el: Many small changes
Artur Malabarba [Fri, 17 Jul 2015 18:25:39 +0000 (19:25 +0100)]
* lisp/emacs-lisp/package.el: Many small changes

Replace all instances of 'face with 'font-lock-face.
(describe-package-1): Improve some strings and move the summary up the
list.
(package-install-file): Update docstring.
(package-menu-hide-package): Bind to `H'.

8 years ago* lisp/emacs-lisp/package.el (package--with-work-buffer-async):
Artur Malabarba [Fri, 17 Jul 2015 22:00:24 +0000 (23:00 +0100)]
* lisp/emacs-lisp/package.el (package--with-work-buffer-async):

Fix error handling.

8 years agoFix hang with large yanks This should fix the bug fixed by Mike
Paul Eggert [Fri, 17 Jul 2015 18:54:24 +0000 (11:54 -0700)]
Fix hang with large yanks This should fix the bug fixed by Mike

Crowe's patch in:
https://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00106.html
A problem in this area has been reported by several users; see
Bug#16737, Bug#17101, Bug#17026, Bug#17172, Bug#19320, Bug#20283.
This fix differs from Mike Crowe's patch in that it should avoid a
race condition that could lose SIGIO signals.  ignore_sigio dates
back to the 1980s when some platforms couldn't block signals, and
could only ignore them, which led to races when signals arrived
while being ignored.  We shouldn't have to worry about those old
platforms now.
* src/dispextern.h, src/sysdep.c (ignore_sigio): Remove.
* src/emacs.c (shut_down_emacs):
Don't call ignore_sigio; unrequest_sigio should suffice.
* src/keyboard.c (kbd_buffer_store_buffered_event):
Use unrequest_sigio, not ignore_sigio.
(kbd_buffer_get_event):
Call request_sigio when getting the ball rolling again.

8 years ago* lisp/obsolete/longlines.el (longlines-search-function):
Artur Malabarba [Fri, 17 Jul 2015 11:22:24 +0000 (12:22 +0100)]
* lisp/obsolete/longlines.el (longlines-search-function):

Fallback on `isearch-search-fun-default'.

8 years agoSupport @-mentions
Tassilo Horn [Fri, 17 Jul 2015 11:18:38 +0000 (13:18 +0200)]
Support @-mentions

* rcirc.el (rcirc-completion-at-point): Support completion of
mentions/messages with @nick instead of just nick.

8 years agoFix Bug#20943.
Michael Albinus [Thu, 16 Jul 2015 18:04:07 +0000 (20:04 +0200)]
Fix Bug#20943.

* lisp/autorevert.el (auto-revert-handler): Do not check for
`buffer-modified-p'.

* lisp/files.el (buffer-stale--default-function): Check for
`buffer-modified-p'.

* test/automated/auto-revert-tests.el
(auto-revert-test02-auto-revert-mode-dired): Adapt test.

8 years agoFix delete-dups bug on long lists
Ari Roponen [Thu, 16 Jul 2015 14:52:30 +0000 (07:52 -0700)]
Fix delete-dups bug on long lists

* lisp/subr.el (delete-dups):
Don't mistakenly keep some dups when applied to long lists.

8 years agoBetter heuristic for C stack overflow
Paul Eggert [Thu, 16 Jul 2015 07:48:40 +0000 (00:48 -0700)]
Better heuristic for C stack overflow

Improve the heuristic for distinguishing stack overflows from
other SIGSEGV causes (Bug#21004).  Corinna Vinschen explained that
the getrlimit method wasn't portable to Cygwin; see:
https://www.cygwin.com/ml/cygwin/2015-07/msg00092.html
Corinna suggested pthread_getattr_np but this also has problems.
Instead, replace the low-level system stuff with a simple
heuristic based on known good stack addresses.
* src/eval.c, src/lisp.h (near_C_stack_top): New function.
* src/sysdep.c: Don't include <sys/resource.h>.
(stack_direction): Remove.  All uses removed.
(stack_overflow): New function.
(handle_sigsegv): Use it instead of incorrect getrlimit heuristic.
Make SEGV fatal in non-main threads.

8 years agoepg: Automatically start pinentry server
Daiki Ueno [Thu, 16 Jul 2015 06:43:03 +0000 (15:43 +0900)]
epg: Automatically start pinentry server

* epg-config.el (epg-gpgconf-program): New variable.
* epg.el (epg--start): Call `pinentry-start' if
allow-emacs-pinentry is set in ~/.gnupg/gpg-agent.conf.