Paul Eggert [Sun, 7 Jun 2015 22:40:10 +0000 (15:40 -0700)]
Move gen_origin from program to data
That way, 'make change-history' needs to change only ChangeLog.2,
instead of having to change two files.
* ChangeLog.2: Add commit info for range that this file covers.
* Makefile.in (new_commit_regexp): New macro.
(change-history-nocommit): Simplify, by putting what used to be
the gen_origin value into the data (ChangeLog.2) rather than
into the program (gitlog-to-emacslog).
* build-aux/gitlog-to-emacslog (gen_origin): Calculate from
the input file (e.g., ChangeLog.2) rather than by having a
constant in the program. Substitute it into the output.
Paul Eggert [Sun, 7 Jun 2015 01:37:45 +0000 (18:37 -0700)]
Merge from gnulib
This incorporates:
2015-06-06 acl-permissions: pacify -Wsuggest-attribute=const
2015-06-05 stdio: Don't redefine gets when using C++
2015-06-05 acl-permissions: port to AIX, C89 HP-UX
2015-06-02 file-has-acl: fix build on Mac OS X 10
2015-06-01 gnulib-tool: concatenate lib_SOURCES to a single line
2015-06-01 pthread_sigmask: discount system version if a simple macro
2015-05-31 readlinkat: avoid OS X 10.10 trailing slash bug
* doc/misc/texinfo.tex, lib/acl-internal.h, lib/get-permissions.c:
* lib/readlinkat.c, lib/set-permissions.c, lib/stdio.in.h:
* m4/acl.m4, m4/pthread_sigmask.m4, m4/readlinkat.m4: Copy from gnulib.
* lib/gnulib.mk: Regenerate.
Eli Zaretskii [Sat, 6 Jun 2015 12:55:15 +0000 (15:55 +0300)]
Fix display when a font claims large values of ascent and descent
This fixes bug#20628.
* src/xdisp.c (get_phys_cursor_geometry): Correct the Y
coordinate of a hollow cursor glyph when the original glyph's
ascent is too small.
(get_font_ascent_descent, normal_char_ascent_descent)
(normal_char_height): New functions.
(handle_single_display_spec, append_space_for_newline)
(calc_pixel_width_or_height, produce_stretch_glyph)
(calc_line_height_property): Use normal_char_ascent_descent and
normal_char_height.
(x_produce_glyphs): When font-global values of ascent and descent
are too large, use per-character glyph metrics instead, if
possible. But don't allow the glyph row's ascent and descent
values become smaller than the values from the metrics of the
font's "normal" character.
* src/xftfont.c (xftfont_draw):
* src/w32font.c (w32font_draw): Correct the values of ascent and
descent used to draw glyphless characters' hex code in a box.
* src/xterm.c (x_draw_glyph_string_background):
* src/xdisp.c (x_produce_glyphs):
* src/w32term.c (x_draw_glyph_string_background):
* src/nsterm.m (ns_maybe_dumpglyphs_background): Use FONT_TOO_HIGH
to detect fonts whose global ascent and descent values are too
large to be used in layout decision, and redraw the background
when that happens.
* src/dispextern.h (FONT_TOO_HIGH): New macro.
(get_font_ascent_descent): Add prototype.
* src/xterm.c (x_new_font):
* src/w32term.c (x_new_font):
* src/nsterm.m (x_new_font):
* src/font.c (font_open_entity):
* src/composite.c (composition_gstring_width): Use
get_font_ascent_descent to obtain reasonable values for ascent and
descent of a font.
Eli Zaretskii [Sat, 6 Jun 2015 09:52:56 +0000 (12:52 +0300)]
Fix Dired display of an explicit list of files by ls-lisp.el
* lisp/ls-lisp.el (ls-lisp-uid-d-fmt, ls-lisp-uid-s-fmt)
(ls-lisp-gid-d-fmt, ls-lisp-gid-s-fmt): Make the initial values be
correct for when displaying individual files separately, not as
part of listing a directory, in which case these values are not
recomputed by 'ls-lisp-insert-directory', but used verbatim.
Glenn Morris [Fri, 5 Jun 2015 20:10:18 +0000 (16:10 -0400)]
Tweak some build messages.
* lisp/Makefile.in ($(lisp)/loaddefs.el):
* lisp/cus-dep.el (custom-make-dependencies):
* lisp/finder.el (finder-compile-keywords): Say what we are doing.
* lisp/international/titdic-cnv.el (batch-titdic-convert):
Don't say how to compile.
Paul Eggert [Fri, 5 Jun 2015 06:44:38 +0000 (23:44 -0700)]
Fix curved quotes in a few places
* lisp/calc/calc-misc.el (calc-help): Fix quoting.
The strings in question are not doc strings, so this partially
undoes the recent change that assumed they were doc strings.
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/info.el (Info-finder-find-node):
Use curved quotes.
* lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
Also allow curved quotes in doc strings.
Nicolas Petton [Thu, 4 Jun 2015 16:20:18 +0000 (18:20 +0200)]
Add new function string-greaterp
* lisp/subr.el (string-greaterp): New function. Also aliased to
`string>'.
* test/automated/subr-tests.el (string-comparison-test): Add unit
tests for `string>'and `string<'.
* src/fns.c (string-lessp): Better docstring.
Eli Zaretskii [Thu, 4 Jun 2015 15:28:29 +0000 (18:28 +0300)]
Fix timezone-related functions on MS-Windows
* src/editfns.c (set_time_zone_rule) [WINDOWSNT]: Always call
'xputenv', even if no reallocation of tzvalbuf was necessary.
This fixes a bug in timezone-related functions on MS-Windows.
Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
Michael Albinus [Wed, 3 Jun 2015 18:03:42 +0000 (20:03 +0200)]
Fix error introduced recently in file-notify-tests.el
* test/automated/file-notify-tests.el
(file-notify--test-remote-enabled): Do not use `file-notify--test-desc'.
(file-notify--deftest-remote): Revert previous patch, not
necessary anymore.
* src/indent.c (Fvertical_motion): Amend motion by 0 lines.
Starting from a display string after a newline, point went to the
previous line. Also, fix an inadvertent use of a buffer position
with FETCH_BYTE. (Bug#20701)
Paul Eggert [Wed, 3 Jun 2015 05:50:57 +0000 (22:50 -0700)]
Support quotes 'like this' in info files
This is possible when 'makeinfo --disable-encoding' is used
in Texinfo 5.
* lisp/calc/calc-help.el (calc-describe-thing):
* lisp/gnus/gnus-art.el (gnus-button-alist):
* lisp/info.el (Info-find-index-name):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
Also support quotes 'like this'.
* lisp/calc/calc-help.el (calc-describe-thing): Simplify.
* lisp/finder.el (finder-font-lock-keywords): Remove var that
hasn't been used in years, instead of bothering to fix its quoting.
Dmitry Gutov [Wed, 3 Jun 2015 02:44:48 +0000 (05:44 +0300)]
Restore <D> instead of '.' in grep-find-template
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep-use-template): Update a comment.
* lisp/progmodes/grep.el (grep-compute-defaults): Restore <D>
instead of '.' in grep-find-template (bug#20719).
(rgrep): Pass nil as the directory to rgrep-default-command.
* lisp/progmodes/grep.el (grep-expand-keywords): Use '.' as the
default value for DIR.
* lisp/progmodes/xref.el (xref-collect-matches): Drop the
workaround.
Michael Albinus [Tue, 2 Jun 2015 21:47:17 +0000 (23:47 +0200)]
Ensure, that autorevert works for remote files in file-notify-tests.el
* test/automated/file-notify-tests.el (file-notify--test-desc):
New defvar.
(file-notify--test-remote-enabled)
(file-notify-test00-availability, file-notify-test01-add-watch)
(file-notify-test02-events): Use it.
(file-notify--test-event-test): Check proper descriptor.
(file-notify-test03-autorevert): Ensure, that
`visited-file-modtime' has changed.
Nicolas Petton [Tue, 2 Jun 2015 20:13:38 +0000 (22:13 +0200)]
Add a pcase pattern for maps and `map-let' based on it
* lisp/emacs-lisp/map.el (map-let): New macro.
(map--make-pcase-bindings, map--make-pcase-patterns): New functions.
* test/automated/map-tests.el: New test for `map-let'.
Dmitry Gutov [Tue, 2 Jun 2015 15:46:42 +0000 (18:46 +0300)]
Reuse rgrep mechanics in xref-find-regexp
* lisp/progmodes/grep.el (rgrep-default-command):
Extract from `rgrep'.
* lisp/progmodes/xref.el (xref-collect-references): Split from
`xref-collect-matches'. Only handle the case of symbol search.
(xref-collect-matches): Instead of Semantic Symref, use
`rgrep-default-command', to take advantage of its directory and
file ignore settings.
(xref--collect-match): Remove the last argument, leaving the
regexp construction up to the caller.
* lisp/progmodes/elisp-mode.el (elisp--xref-find-matches):
Change to take the xref-collect- function to use as an argument.
(elisp-xref-find): Update accordingly.
Dmitry Gutov [Mon, 1 Jun 2015 19:45:15 +0000 (22:45 +0300)]
Move xref-elisp-location to elisp-mode.el
* lisp/progmodes/xref.el (xref-elisp-location)
(xref-make-elisp-location, xref-location-marker): Remove here.
(xref--xref): Don't limit the type of the location slot.
* lisp/progmodes/elisp-mode.el (xref-elisp-location):
Define as a cl-struct here.
(xref-location-marker): Move here.
Eli Zaretskii [Tue, 2 Jun 2015 15:27:28 +0000 (18:27 +0300)]
Minor tweaks for .gitignore
* .gitignore: Don't ignore versioned *.html and *.ps files. Don't
ignore admin/notes/tags that might be ignored as TAGS on
case-insensitive filesystems. (Bug#20710)
Nicolas Richard [Fri, 29 May 2015 08:32:05 +0000 (10:32 +0200)]
Avoid confusion in query-replace history when replacing NUL chars
* lisp/replace.el (query-replace--split-string): New function.
(query-replace-read-from): Rely on the 'separator' property
instead of searching for the NUL character (Bug#20690).
Glenn Morris [Tue, 2 Jun 2015 06:16:39 +0000 (23:16 -0700)]
; Merge from origin/emacs-24
The following commits were skipped:
82e2ce9 Bump Emacs version to 24.5.50. 866501e * lisp/ChangeLog: Remove a duplicate 8272c1d lisp/ldefs-boot.el: Update for the 24.5 release 7cad9d5 Update the 24.5 release date in all ChangeLog files
Eli Zaretskii [Mon, 1 Jun 2015 14:46:20 +0000 (17:46 +0300)]
NS equivalents of xterm.c and w32term.c changes
* src/nsterm.m (ns_maybe_dumpglyphs_background): Force redraw of
glyph string background also when the font in use claims
preposterously large global height value. Helps to remove
artifacts left from previous displays when glyphless characters
are displayed as hex code in a box.
(x_new_font): Call get_font_ascent_descent to obtain a reasonable
value for FRAME_LINE_HEIGHT, even when a font claims very large
value for its height.
Paul Eggert [Mon, 1 Jun 2015 06:52:09 +0000 (23:52 -0700)]
Avoid grave accent quoting in stderr diagnostics
A few Emacs diagnostics go directly to stderr, and so can't easily
contain curved quotes (as non-UTF-8 locales might mishandle them).
Instead of bothering to add support for this rarity, reword the
diagnostics so that they don't use grave accent to quote.
* src/alloc.c (mark_memory): Fix comment.
* src/buffer.c (init_buffer):
* src/dispnew.c (init_display):
* src/emacs.c (main, sort_args):
* src/lread.c (dir_warning):
* src/term.c (init_tty):
* src/unexmacosx.c (unexec):
* src/xfns.c (select_visual):
* src/xterm.c (cvt_string_to_pixel, x_io_error_quitter):
Reword stderr diagnostics to avoid quoting `like this'.
* src/unexmacosx.c: Include errno.h.
* src/xfns.c (select_visual): Encode value for locale.
Paul Eggert [Mon, 1 Jun 2015 03:04:05 +0000 (20:04 -0700)]
Treat batch stdout/stderr like standard display
Calls like (print FOO) could generate improperly encoded or
hard-to-read output if FOO contains characters outside the system
locale. Fix this by treating batch stdout and stderr like
interactive standard display, when it comes to transliterating and
encoding characters (Bug#20545).
* doc/emacs/mule.texi (Communication Coding):
* doc/lispref/display.texi (Active Display Table):
* doc/lispref/nonascii.texi (Locales):
* etc/NEWS:
* src/coding.c (syms_of_coding):
* src/dispnew.c (syms_of_display):
Document this.
* src/print.c: Include disptab.h.
(printchar_to_stream): New function, with much of the guts of the
old Fexternal_debugging_output, except this one also uses the
standard display table.
(printchar, strout, Fexternal_debugging_output): Use it.
Paul Eggert [Sun, 31 May 2015 18:47:35 +0000 (11:47 -0700)]
Remove unused DEFSYMs
Remove DEFSYMs that aren't used at the C level. Also:
* src/decompress.c (Qzlib_dll):
* src/font.c (Qunicode_sip):
* src/frame.c (Qtip_frame):
* src/ftfont.c (Qserif):
* src/gnutls.c (Qgnutls_dll):
* src/xml.c (Qlibxml2_dll):
Move from here ...
* src/w32fns.c (syms_of_w32fns): ... to here,
as these are used only on MS-Windows.
Eli Zaretskii [Sun, 31 May 2015 14:41:35 +0000 (17:41 +0300)]
Attempt to fix crashes due to accesses beyond glyph matrix end
* src/xdisp.c (x_produce_glyphs): When it->ascent and it->descent
are determined from per-character metrics, don't let the
max_ascent and max_descent become smaller than values returned by
normal_char_ascent_descent, to avoid unpleasant dynamic resizing
of screen line heights when text changes.
* src/xterm.c (x_new_font)
* src/w32term.c (x_new_font): Call get_font_ascent_descent to
obtain a reasonable value for FRAME_LINE_HEIGHT, even when a font
claims very large value for its height.
* src/font.c (font_open_entity): Call get_font_ascent_descent to
obtain a reasonable value for FRAME_SMALLEST_FONT_HEIGHT, even
when a font claims very large value for its height.
Paul Eggert [Sat, 30 May 2015 22:29:41 +0000 (15:29 -0700)]
Remove format2
* src/editfns.c, src/lisp.h (format2): Remove.
It is more trouble than it's worth, now that we have CALLN.
This is just a minor refactoring.
* src/buffer.c (Fkill_buffer):
* src/dbusbind.c (XD_OBJECT_TO_STRING):
* src/fileio.c (barf_or_query_if_file_exists):
Adjust to format2 going away.
Paul Eggert [Sat, 30 May 2015 18:17:56 +0000 (11:17 -0700)]
Don't misencode C-generated messages
Also, be more consistent about calls to 'Fmessage' vs 'message'.
* src/alloc.c (Fgc_status):
Prefer AUTO_STRING to build_string for Fmessage call.
* src/data.c (Fmake_variable_buffer_local)
(Fmake_local_variable, Fmake_variable_frame_local):
* src/doc.c (store_function_docstring):
Use Fmessage, not message, since the argument can contain
non-ASCII characters, and this can cause the resulting message
to be incorrectly encoded for the current environment.
* src/fns.c (maybe_resize_hash_table):
* src/xselect.c (x_clipboard_manager_save_all):
Use message, not Fmessage, since Fmessage's power isn't needed here.
* src/process.c (Fmake_network_process): Reword message to avoid %s.
* src/xdisp.c (vmessage): Document restrictions on message contents.
(message_nolog) [false]: Remove unused code.
Paul Eggert [Sat, 30 May 2015 16:33:41 +0000 (09:33 -0700)]
Update .gitattributes to match current sources
http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00879.html
* .gitattributes: Accommodate tests that insist on DOS format.
Remove test/automated/data/decompress/foo-gzipped.
Add etc/e/eterm-color.
Eli Zaretskii [Sat, 30 May 2015 16:25:53 +0000 (19:25 +0300)]
Fix display of composite characters with large fonts
* src/xdisp.c (x_produce_glyphs): Call normal_char_ascent_descent
for reasonable values of font ascent and descent.
(get_font_ascent_descent): New function.
* src/composite.c (composition_gstring_width): Call
get_font_ascent_descent for reasonable values of font ascent and
descent.
* dispextern.h: Add prototype for get_font_ascent_descent.
Dmitry Gutov [Sat, 30 May 2015 11:35:55 +0000 (14:35 +0300)]
Use list for the tags completion table, not obarray
* lisp/progmodes/etags.el (etags-tags-completion-table): Return a
list instead of an obarray
(http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00876.html).
(tags-completion-table): Combine those lists.
(tags-completion-table): Update the docstring.
Vitaly Takmazov [Sat, 30 May 2015 10:28:53 +0000 (13:28 +0300)]
Declare Emacs on MS-Windows to be DPI-aware
* nt/emacs-x86.manifest (asmv3:windowsSettings): Add dpiAware.
* nt/emacs-x64.manifest (asmv3:windowsSettings): Add dpiAware.
This avoids Windows entering compatibility mode for Emacs,
which causes fonts to look less nice.