Eli Zaretskii [Thu, 18 Dec 2014 16:07:26 +0000 (18:07 +0200)]
Allow querying font by name for its height and other info. (Bug#19395)
src/font.c (Ffont_info): Add more font information to the vector
returned by the function, inspired by query-font. Doc fix.
doc/lispref/display.texi (Low-Level Font): Document font-info and query-font.
lisp/international/mule-diag.el (describe-font-internal): Display
additional info returned by font-info.
lisp/linum.el (linum--face-width): Rename from linum--face-height,
and use the new functionality of font-info.
(linum-update-window): Use linum--face-width and frame-char-width,
instead of approximating with height.
Eric Abrahamsen [Thu, 18 Dec 2014 11:22:02 +0000 (11:22 +0000)]
Fix Gnus registry pruning and sorting, and rename file
* lisp/gnus/gnus-registry.el (gnus-registry-prune-factor): Add new variable.
(gnus-registry-max-pruned-entries): Remove obsolete variable.
(gnus-registry-cache-file): Change default
filename extension to "eieio".
(gnus-registry-read): Add new function, split out from
`gnus-registry-load', that does the actual object reading.
(gnus-registry-load): Use it. Add condition case handler to check for
old filename extension and rename to the new one.
(gnus-registry-default-sort-function): New variable to specify a sort
function to use when pruning.
(gnus-registry-save, gnus-registry-insert): Use it.
(gnus-registry-sort-by-creation-time): Define a default sort function.
* lisp/gnus/registry.el (registry-db): Consolidate the :max-hard and
:max-soft slots into a :max-size slot.
(registry-db-version): Add new variable for database version number.
(registry-prune): Use :max-size slot. Accept and use a sort-function
argument.
(registry-collect-prune-candidates): Add new function for finding
non-precious pruning candidates.
(registry-prune-hard-candidates, registry-prune-soft-candidates):
Remove obsolete functions.
(initialize-instance): Upgrade registry version when starting.
Dmitry Gutov [Thu, 18 Dec 2014 10:10:34 +0000 (12:10 +0200)]
Don't reload packages at startup
Fixes: debbugs:19390
* lisp/emacs-lisp/package.el (package-activate-1): Add RELOAD argument
and a docstring.
(package-activate): Call itself on dependencies on PACKAGE with
the same FORCE argument. Pass FORCE as RELOAD into
`package-activate-1' .
Ulf Jasper [Wed, 17 Dec 2014 19:50:12 +0000 (20:50 +0100)]
Fix problem with images referenced within svg files. (bug#19373)
Fixes: debbugs:19373
* src/image.c: Additional parameter 'filename' for
svg_load_image. Include "buffer.h". Define library function
rsvg_handle_set_base_uri for WINDOWSNT.
(init_svg_functions): Initialize rsvg_handle_set_base_uri.
(fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
(svg_load): Pass a filename to svg_load_image: either name of
actual file or of current buffer's file.
(svg_load_image): New parameter 'filename', used for setting
base_uri, necessary for loading referenced images.
Juri Linkov [Mon, 15 Dec 2014 23:45:12 +0000 (01:45 +0200)]
Lazy-highlight the whole string at point
* lisp/isearch.el (isearch-lazy-highlight-search): Extend the bound of
the wrapped search by the length of the search string to be able
to lazy-highlight the whole search string at point.
Stefan Monnier [Mon, 15 Dec 2014 20:41:11 +0000 (15:41 -0500)]
* src/: Various fixes to use bool type and constants.
* src/dispnew.c (update_single_window): Remove arg `force_p' since it's
always true.
* src/xfaces.c (clear_face_cache): Use bool for the argument type.
Paul Eggert [Mon, 15 Dec 2014 08:00:50 +0000 (00:00 -0800)]
Correct same_at_end when restoring window points
* fileio.c (Finsert_file_contents): Compute same_at_end character
position using the old buffer size, not the new one, since
restore_window_points wants the old size. Fixes: debbugs:19161
Alan Mackenzie [Sun, 14 Dec 2014 18:26:44 +0000 (18:26 +0000)]
New feature optionally to accelerate auto-repeated scrolling.
src/xdisp.c: Remove "static" from declaration of
Qfontification_functions.
src/window.c (window_scroll): bind fontification-functions to nil when
scrolling by whole screens and fast-but-imprecise-scrolling is non-nil.
(syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.
Dmitry Gutov [Sun, 14 Dec 2014 10:59:05 +0000 (12:59 +0200)]
Fix Semantic completion-at-point functions in non-Semantic buffers
Fixes: debbugs:19077
* lisp/cedet/semantic.el (semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): Do
nothing if the current buffer is not using Semantic.
Paul Eggert [Sun, 14 Dec 2014 07:40:04 +0000 (23:40 -0800)]
Spelling fixes
All uses changed.
* lib-src/etags.c (analyze_regex): Rename from analyse_regex.
* lisp/cedet/semantic/lex-spp.el:
(semantic-lex-spp-analyzer-do-replace):
Rename from semantic-lex-spp-anlyzer-do-replace.
* lisp/emacs-lisp/cconv.el (cconv--analyze-use):
Rename from cconv--analyse-use.
(cconv--analyze-function): Rename from cconv--analyse-function.
(cconv-analyze-form): Rename from cconv-analyse-form.
* src/regex.c (analyze_first): Rename from analyze_first.
Paul Eggert [Sat, 13 Dec 2014 01:51:03 +0000 (17:51 -0800)]
Replace union hack with C11-style max_align_t
* admin/merge-gnulib (GNULIB_MODULES): Add stddef, for max_align_t.
* lib/gnulib.mk: Regenerate.
* src/alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
a hack involving a union.
Ted Zlatanov [Sat, 13 Dec 2014 00:15:10 +0000 (19:15 -0500)]
Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens. 16d4c1c A better fix for bug#19346 82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files. 3cf7629 Git ignore lib/std*.h 301a401 Always define `gnutls-available-p' even if GnuTLS is not available. d76b9b2 Don't break example string between 2 lines (bug#19257) 75b4857 Port commit-msg to mawk 9ac0332 Improve commit-msg messages and autosquash 0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300) 935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'. c2db939 python.el: Support interpreter paths with spaces d83f329 ChangeLog fix 0f9fbb9 Port commit-message checking to FreeBSD 9. 3db1ada admin/MAINTAINERS: Update my interests and responsibilities. 6382f24 * .gitignore: Ignore autosave files.
Paul Eggert [Fri, 12 Dec 2014 07:16:37 +0000 (23:16 -0800)]
Merge from gnulib
2014-12-12 stddef: support C11's max_align_t
2014-12-08 apply _GL_ATTRIBUTE_PURE to some inline functions
2014-12-02 support GNU format printf and scanf on mingw
* doc/misc/texinfo.tex, lib/stat-time.h, lib/stddef.in.h:
* lib/timespec.h, m4/extensions.m4, m4/stddef_h.m4, m4/stdio_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
Stefan Monnier [Fri, 12 Dec 2014 14:55:42 +0000 (09:55 -0500)]
* lisp/progmodes/python.el (python-indent-line): Use `noindent' in strings.
(python-indent-levels): Document extra value.
(python-indent-calculate-indentation): Return `noindent' in strings.
(python-indent-post-self-insert-function)
(python-indent-calculate-levels): Handle new value.
Eric S. Raymond [Fri, 12 Dec 2014 03:44:32 +0000 (22:44 -0500)]
Remove VC rollback method.
* vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el,
vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: rrollback
method removed, to be replaced in the future by uncommit.
Ted Zlatanov [Thu, 11 Dec 2014 22:55:36 +0000 (17:55 -0500)]
Always define `gnutls-available-p' even if GnuTLS is not available.
Fixes: debbugs:19346
* gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
clarity. Let the availability check return Qnil when the GnuTLS
integration is not available, instead of erroring out.
* gnutls.h: Always declare syms_of_gnutls.
* emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
Stefan Monnier [Thu, 11 Dec 2014 21:07:23 +0000 (16:07 -0500)]
Fixes: debbugs:19161
* src/fileio.c: Better preserve window-points during revert.
(Qget_buffer_window_list): New var.
(get_window_points_and_markers, restore_window_points): New functions.
(Finsert_file_contents): Use them to save and restore window-points.
Dmitry Antipov [Thu, 11 Dec 2014 13:26:00 +0000 (16:26 +0300)]
Never pass an invalid X connection descriptor to an input reading loop
Fixes: debbugs:19147
* xterm.c (x_delete_terminal): Call emacs_close for X connection
descriptor if called from x_connection_closed and always delete
this descriptor from keyboard waiting set (Bug#19147).
Michael Albinus [Thu, 11 Dec 2014 12:01:45 +0000 (13:01 +0100)]
* automated/vc-tests.el (vc-test--revision-granularity-function):
New defun.
(vc-test--create-repo-function): Rename from
`vc-test--create-repo-if-not-supported'. Adapt all callees.
(vc-test--create-repo): Check also for revision-granularity.
(vc-test--unregister-function): Additional argument FILE. Adapt
all callees.
(vc-test--working-revision): New defun.
(vc-test-*-working-revision): New tests.
Paul Eggert [Thu, 11 Dec 2014 07:17:04 +0000 (23:17 -0800)]
Port commit-msg to mawk
Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg01093.html
* build-aux/git-hooks/commit-msg (space, non_space, non_print):
New vars. Use them as approximations to POSIX bracket expressions,
on implementations like mawk that do not support POSIX regexps.
Paul Eggert [Thu, 11 Dec 2014 04:44:35 +0000 (20:44 -0800)]
Improve commit-msg messages and autosquash
Problem reported by Michal Nazarewicz in Bug#19337.
* build-aux/git-hooks/commit-msg: Add "commit message" to
diagnostics. Distinguish better between tabs and other
unprintable chars in diagnostics. Don't complain if a prefix
"fixup! " or "squash! " makes a summary line too long.
Eli Zaretskii [Wed, 10 Dec 2014 17:39:37 +0000 (19:39 +0200)]
Fix out-of-memory condition in display of long bracketed lines (bug#19322)
src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
(bidi_cache_max_elts): New global variable.
(bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
(bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
its initial value.
(bidi_cache_search): Handle overflown cache. Improve commentary.
(bidi_cache_ensure_space): Limit allocations to the current value
of bidi_cache_max_elts. Force xpalloc not to over-allocate. If
less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
the increment to not exceed the limit.
(bidi_cache_iterator_state): Now returns non-zero if succeeded to
cache, zero otherwise (meaning the cache overflowed). In the
latter case, set bidi_cache_last_idx to -1.
(bidi_peek_at_next_level): Handle overflown cache.
(bidi_push_it): Increase the cache limit for iterating the new
object.
(bidi_pop_it): Decrease the cache limit back to previous value.
(bidi_shelve_cache): Shelve the current value of the cache limit.
(bidi_unshelve_cache): Restore the value of cache limit.
(bidi_find_bracket_pairs): If the cache overflows while looking
for the paired bracket, give up and let bidi_resolve_neutrals
process the bracket as a simple neutral.
(bidi_find_other_level_edge): If the cache overflows, fall back on
Plan B, which effectively stops the reordering and restarts it on
the next character (after resetting the cache).
(bidi_move_to_visually_next): When the cache overflows, reset it
after processing the last cached character.
(ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp.
Fixes: debbugs:19192
* net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing
trouble with ls over ftp. These flags result in ls returning no
output, causing Tramp-breakage.