Stefan Monnier [Sat, 28 Sep 2013 01:07:18 +0000 (21:07 -0400)]
* lisp/emacs-lisp/cl-macs.el:
(cl--loop-destr-temps): Remove.
(cl--loop-iterator-function): Rename from cl--loop-map-form and change
its convention.
(cl--loop-set-iterator-function): New function.
(cl-loop): Adjust accordingly, so as not to use cl-subst.
(cl--parse-loop-clause): Adjust all uses of cl--loop-map-form.
Bind `it' with `let' instead of substituting it with `cl-subst'.
(cl--unused-var-p): New function.
(cl--loop-let): Don't use the cl--loop-destr-temps hack any more.
Eliminate some unused variable warnings.
* doc-view.el (doc-view-scale-reset): Rename from
`doc-view-reset-zoom-level'.
(doc-view-scale-adjust): New command.
(doc-view-mode-map): Remap `text-scale-adjust' bindings to
`doc-view-scale-adjust'.
Barry O'Reilly [Thu, 26 Sep 2013 03:46:47 +0000 (23:46 -0400)]
Signal error when reading an empty byte-code object (Bug#15405)
* lread.c (read1): signal error
* alloc.c (make_byte_code): eassert header size
(sweep_vectors): change an int to size_t
Paul Eggert [Wed, 25 Sep 2013 03:44:34 +0000 (20:44 -0700)]
Merge from gnulib.
This incorporates:
2013-09-24 manywarnings: enable nicer gcc warning messages
2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
* configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
and -funit-at-a-time, since manywarnings does that for us now.
Sam Steingold [Tue, 24 Sep 2013 17:34:51 +0000 (13:34 -0400)]
* lisp/midnight.el (clean-buffer-list-kill-regexps)
(clean-buffer-list-kill-buffer-names): Update for the new Man
buffer naming which includes the object name.
Paul Eggert [Tue, 24 Sep 2013 14:53:49 +0000 (07:53 -0700)]
* data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
This is ugly, but it should fix the performance problem for older
GCC versions in the short run. I'll look into integrating the
Gnulib module for popcount, as a better fix.
See the thread starting in:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
(popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
(popcount_size_t_msc) [USE_MSC_POPCOUNT]:
(popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
(popcount_size_t): Use it.
Prefer signed to unsigned integers where either will do.
No need for 'const' on locals that do not escape.
Omit easserts with unnecessary and unportable assumptions about
alignment. Avoid unnecessary casts to char *.
Use union for the payload of struct Lisp_Vector.
This helps to avoid a few glitches dictated by C's aliasing rules.
* lisp.h (struct Lisp_Vector): Use union for next and
contents member. Adjust comment. Change related users.
* alloc.c (next_in_free_list, set_next_in_free_list): Remove.
Related users changed.
* buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
* composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
* lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
* xfaces.c, xfont.c, xmenu.c: Related users changed.
Optimize glyph row clearing and copying routines.
* dispextern.h (struct glyph_row): Change layout of struct
glyph_row to help copy_row_except_pointers. Adjust comment.
* dispnew.c (null_row): Remove.
(clear_glyph_row): Use offsetof and memset to find and clear
just the members that need clearing. Adjust comment.
(copy_row_except_pointers): Likewise for copying.
Paul Eggert [Tue, 24 Sep 2013 04:28:06 +0000 (21:28 -0700)]
Some minor cleanups of recently-added bool vector code.
* conf_post.h (assume): Always return void. Use lint version
only if GCC and MSC versions don't apply.
* conf_post.h (assume):
* data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
Depend on _MSC_VER, not __MSC_VER, for consistency with
the rest of Emacs.
* data.c (bool_vector_spare_mask, popcount_size_t_generic)
(popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
(bool_vector_binop_driver, count_trailing_zero_bits)
(size_t_to_host_endian): Now static, not static inline;
the latter isn't needed with modern compilers and doesn't
work with older compilers anyway.
Stefan Monnier [Mon, 23 Sep 2013 23:23:32 +0000 (19:23 -0400)]
* lisp/eshell/esh-cmd.el (eshell--sep-terms): New var.
(eshell-parse-command, eshell-parse-pipeline): Use it since
eshell-separate-commands requires a dynamic scoped var.
Reported by Jan Moringen <jmoringe@techfak.uni-bielefeld.de>.
Eli Zaretskii [Mon, 23 Sep 2013 09:18:38 +0000 (12:18 +0300)]
Fix bug #15437 with mouse highlight on overlay strings.
src/xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
computing the end column of mouse-highlight that comes from
display or overlay strings.
Remove references to universal-argument-num-events.
* lisp/autoarg.el (autoarg-kp-digit-argument):
* lisp/electric.el (Electric-command-loop):
* lisp/kmacro.el (kmacro-step-edit-insert):
Do not set universal-argument-num-events.
Tell valgrind about conservative GC regions and suppress spurious
warings.
* alloc.c (USE_VALGRIND): New macro; on by default
when ENABLE_CHECKING.
(mark_maybe_object,mark_maybe_pointer)
[USE_VALGRIND]: Mark conservatively-scanned regions valid for
valgrind purposes.
(valgrind_p) [USE_VALGRIND]: New variable.
(init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
* data.c (Qbool_vector_p): New symbol.
(bool_vector_spare_mask,popcount_size_t_generic)
(popcount_size_t_msc,popcount_size_t_gcc)
(popcount_size_t)
(bool_vector_binop_driver)
(count_trailing_zero_bits,size_t_to_host_endian)
(Fbool_vector_exclusive_or)
(Fbool_vector_union)
(Fbool_vector_intersection,Fbool_vector_set_difference)
(Fbool_vector_subsetp,Fbool_vector_not)
(Fbool_vector_count_matches)
(Fbool_vector_count_matches_at): New functions.
(syms_of_data): Intern new symbol, functions.
* alloc.c (bool_vector_payload_bytes): New function.
(Fmake_bool_vector): Instead of calling Fmake_vector,
which performs redundant initialization and argument checking,
just call allocate_vector ourselves. Make sure we clear any
terminating padding to zero.
(vector_nbytes,sweep_vectors): Use bool_vector_payload_bytes
instead of open-coding the size calculation.
(vroundup_ct): New macro.
(vroundup): Assume argument >= 0; invoke vroundup_ct.
* casetab.c (shuffle,set_identity): Change lint_assume to assume.
* composite.c (composition_gstring_put_cache): Change
lint_assume to assume.
* conf_post.h (assume): New macro.
(lint_assume): Remove.
* dispnew.c (update_frame_1): Change lint_assume to assume.
* ftfont.c (ftfont_shape_by_flt): Change lint_assume
to assume.
* image.c (gif_load): Change lint_assume to assume.
* lisp.h (eassert_and_assume): New macro.
(Qbool_vector_p): Declare.
(CHECK_BOOL_VECTOR,ROUNDUP,BITS_PER_SIZE_T): New macros.
(swap16,swap32,swap64): New inline functions.
* macfont.c (macfont_shape): Change lint_assume to assume.
* ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
* xsettings.c (parse_settings): Use new swap16 and
swap32 from lisp.h instead of file-specific macros.
Eli Zaretskii [Sun, 22 Sep 2013 07:13:14 +0000 (10:13 +0300)]
Fix bug #15365 with aborts in try_window_id.
src/xdisp.c (try_window_id): Don't abort if cursor row could not be
found (which can legitimately happen when the glyph row at the
window start is disabled in the current_matrix.
Paul Eggert [Sun, 22 Sep 2013 06:22:05 +0000 (23:22 -0700)]
Fix syntax.h bug introduced by recent INLINE change.
syntax.h defined an extern inline function SYNTAX_ENTRY that was
conditionally compiled one way in some modules, and a different
way in others. This doesn't work with extern inline functions,
which must have the same definition in all modules, because the
defining code might be shared across modules, depending on the
implementation. Symptoms reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
* regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
(SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
overriding the corresponding functions in syntax.h.
* syntax.h (syntax_property_entry, syntax_property_with_flags)
(syntax_property): New inline functions.
(SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
Rewrite in terms of these new functions.
Alan Mackenzie [Sat, 21 Sep 2013 17:21:29 +0000 (17:21 +0000)]
C++: fontify identifier in declaration following "public:" correctly.
* progmodes/cc-langs.el (c-decl-start-colon-kwd-re): New lang var
to match "public", etc.
(c-decl-prefix-re): Add ":" into the C++ value.
* progmodes/cc-engine.el (c-find-decl-prefix-search): Refactor a
bit. Add a check for a ":" preceded by "public", etc.
Eli Zaretskii [Sat, 21 Sep 2013 11:48:19 +0000 (14:48 +0300)]
Fix bug #15426 with directory-files invoked from a unibyte buffer.
src/dired.c (directory_files_internal): Use multibyte_chars_in_text,
not chars_in_text, whose result depends on the multibyteness of
the current buffer.
Paul Eggert [Fri, 20 Sep 2013 20:23:20 +0000 (13:23 -0700)]
Port recent change to hosts where pointers aren't 'long'.
* xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
Don't assume that pointers are the same width as 'long'.
Add a compile-time check that a pointer fits into two X slots.
Ryan [Fri, 20 Sep 2013 19:59:42 +0000 (15:59 -0400)]
* lisp/subr.el (internal--call-interactively): New const.
(called-interactively-p): Use it.
* test/automated/advice-tests.el (advice-test-called-interactively-p-around)
(advice-test-called-interactively-p-filter-args)
(advice-test-called-interactively-p-around): New tests.
Eli Zaretskii [Fri, 20 Sep 2013 07:21:20 +0000 (10:21 +0300)]
Avoid replacing 'struct timeval' and compiling lib/gettimeofday.c on MinGW.
nt/mingw-cfg.site (gl_cv_sys_struct_timeval_tv_sec): Set to "yes"
to avoid gnulib replacement of 'struct timeval' and the resulting
compilation of lib/gettimeofday.c with incompatible version of
gettimeofday. Related discussions on emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00286.html
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00361.html
Paul Eggert [Fri, 20 Sep 2013 03:41:37 +0000 (20:41 -0700)]
Work around performance bug on OS X 10.8 and earlier.
Perhaps Apple will fix this bug some day.
See the thread starting with Daniel Colascione's email in:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html
* configure.ac (FORTIFY_SOUR): New verbatim section.