1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 15:52:00 -08:00
Commit graph

35252 commits

Author SHA1 Message Date
Stefan Monnier
511fa0d396 * lisp/frame.el (handle-focus-in, handle-focus-out): Move from frame.c.
Remove blink-cursor code.
(blink-cursor-timer-function, blink-cursor-suspend): Don't special-case GUIs.
(blink-cursor-mode): Use focus-in/out-hook.
* src/frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
(syms_of_frame): Don't defsubr them.
2013-11-24 21:41:02 -05:00
Glenn Morris
310294a383 Further tweaks to the setting of Vload_path
This is giving me a headache...

* src/lread.c (load_path_default): Change the sense of the argument.
(init_lread): When EMACSLOADPATH is set, do not ignore changes
from dump_path.  When it is not, avoid checking dump_path twice.
2013-11-24 18:36:41 -08:00
Glenn Morris
97bacf8c05 * src/lread.c (init_lread): Fix 2013-11-23 goof that was checking
uninstalled dump_path against installed Vload_path.

Fixes: debbugs:15964
2013-11-24 17:35:45 -08:00
Stefan Monnier
740bcff0c1 Export get_pos_property to Elisp.
* src/editfns.c (Fget_pos_property): Rename from get_pos_property.
(syms_of_editfns): Export it to Elisp.
2013-11-24 13:28:33 -05:00
Stefan Monnier
450533b07a * src/data.c (Fmake_variable_buffer_local): Mention `permanent-local'. 2013-11-24 13:20:18 -05:00
Romain Francoise
1db72ad330 Really initialize `write_region_inhibit_fsync' when interactive.
* fileio.c (init_fileio): Move `write_region_inhibit_fsync'
initialization here ...
(syms_of_fileio): ... from here.
2013-11-23 12:32:05 +01:00
Stefan Monnier
2c98e669ef * src/lread.c (init_lread): Fix int/Lisp_Object mixup.
Please use --enable-check-lisp-object-type.
2013-11-22 22:23:20 -05:00
Glenn Morris
50dca5dfd6 * src/process.c (get_process): Explicit error for dead buffers
That seems more in keeping with the existing behavior of this function
in other situations.
2013-11-22 18:58:28 -08:00
Glenn Morris
d7aff0d692 Merge from emacs-24; up to 2013-01-03T02:37:57Z!rgm@gnu.org 2013-11-22 18:24:50 -08:00
Glenn Morris
17e0445be4 Empty elements in EMACSLOADPATH now stand for the default
* src/lread.c (load_path_check): Take path to check as argument.
(load_path_default): New, split from init_lread.
(init_lread): Move calc of default load-path to load_path_default.
Empty elements in EMACSLOADPATH now stand for the default.
(load-path): Doc fix.

* src/emacs.c (decode_env_path): Add option to treat empty elements
as nil rather than ".".

* src/callproc.c (init_callproc_1, init_callproc):
* src/image.c (Vx_bitmap_file_path):
* src/lisp.h (decode_env_path):
* lread.c (Vsource_directory):
Update for new argument spec of decode_env_path.

* leim/Makefile.in (RUN_EMACS): Empty EMACSLOADPATH rather than unsetting.

* lisp/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting.

* test/automated/Makefile.in (emacs):
Empty EMACSLOADPATH rather than unsetting.

* doc/emacs/cmdargs.texi (General Variables):
Empty elements in EMACSLOADPATH now mean the default load-path.

* doc/lispref/loading.texi (Library Search):
Empty elements in EMACSLOADPATH now mean the default load-path.

* etc/NEWS: Mention this.

Fixes: debbugs:12100
2013-11-22 17:55:16 -08:00
Eli Zaretskii
cd88d68262 Fix bug #15951 with vertical-motion near beginning of narrowed region.
src/bidi.c (bidi_find_paragraph_start): Limit the returned positions
 to BEGV_BYTE..ZV_BYTE range.
2013-11-22 18:04:49 +02:00
Paul Eggert
4e8b693819 Use just LIBXMENU, not LIBXMENU_DIR and LIBXMENU_BASE.
This simplifies the previous change to configure.ac and src/Makefile.in.
2013-11-21 09:26:55 -08:00
Paul Eggert
7e8ed4f7f9 Fix some dependency problems that cause unnecessary recompiles.
Problem reported by RMS in
<http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
* configure.ac (OLDXMENU_TARGET, OLDXMENU, LIBXMENU, OLDXMENU_DEPS):
Remove.
(LIBXMENU_DIR, LIBXMENU_BASE): New vars.
* src/Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
(really-lwlib, really-oldXMenu, stamp-oldxmenu)
(../src/$(OLDXMENU), $(OLDXMENU)): Remove.
(LIBXMENU_DIR, LIBXMENU_BASE): New macros.
(LIBXMENU): Use them.
(temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
(boostrap-clean): No need to remove stamp-oldxmenu.
2013-11-20 23:50:57 -08:00
Paul Eggert
75360f19c3 Fix recently introduced bool vector overrun.
This was due to an optimization that went awry.
Reported by Glenn Morris in
<http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
* alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
for empty vectors, undoing the 2013-11-18 change.
* data.c (bool_vector_binop_driver): Rely on this.
Fix bug that occasionally overran the destination.
* lisp.h (struct Lisp_Bool_vector): Document this.
2013-11-20 22:46:59 -08:00
Jan Djärv
cab0d91dfb * nsterm.m (init, run, stop:): Enable again. stop calls super stop
to handle dialogs.
2013-11-20 19:33:12 +01:00
Jan Djärv
f03f7d3dc0 * nsterm.m (init, run, stop:): Comment out for now, does not work with dialogs. 2013-11-20 14:03:43 +01:00
Paul Eggert
12455b2fcb * charset.c (syms_of_charset): Don't read past end of string. 2013-11-19 00:57:22 -08:00
Glenn Morris
8d1c3af987 * src/frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes. 2013-11-18 21:32:26 -05:00
Brian Jenkins
8e01570501 Add hooks to run on gaining/losing focus (tiny change)
* src/frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
(Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
(syms_of_frame): Add focus-in-hook, focus-out-hook.

Fixes: debbugs:15029
2013-11-18 21:23:50 -05:00
Andreas Schwab
22ed928d06 Fixes: debbugs:15923
* process.c (get_process): Check that OBJ is a live buffer.
2013-11-19 00:55:05 +01:00
Paul Eggert
23e79746d1 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
The old names predated the API change that put destination at end.
2013-11-18 11:31:05 -08:00
Paul Eggert
ec2c4ee6d2 Improve API of recently-added bool vector functions.
The old API had (bool-vector-count-matches A B)
and (bool-vector-count-matches-at A B I), which gave the
misleading impression that the two functions were variants, one
with a location I.  The new API has (bool-vector-count-population A)
and (bool-vector-count-consecutive A B I) to make the distinction
clearer.  The first function no longer has a B argument, since the
caller can easily determine the number of nils if the length and
number of ts is known.
* src/data.c (Fbool_vector_count_population): Rename from
bool_vector_count_matches, and accept just 1 argument.
(Fbool_vector_count_consecutive): Rename from
Fbool_vector_count_matches_at.
* test/automated/data-tests.el: Adjust to API changes.

Fixes: debbugs:15912
2013-11-18 10:56:42 -08:00
Paul Eggert
87d8660102 Always allocate at least one bits_word per bool vector.
See Daniel Colascione in:
http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
* alloc.c (make_uninit_bool_vector): Always allocate at least one word.
* data.c (bool_vector_binop_driver): Rely on this.  Tune.
* lisp.h (struct Lisp_Bool_vector): Document this.
2013-11-18 10:37:25 -08:00
Eli Zaretskii
37c790b385 Fix bug #15841 with assertion violations due to newline cache.
src/insdel.c (invalidate_buffer_caches): New function, consolidated
 from part of prepare_to_modify_buffer.
 (insert_from_gap, prepare_to_modify_buffer):
 src/coding.c (code_convert_region, code_convert_string): Call
 invalidate_buffer_caches.
 src/lisp.h (invalidate_buffer_caches): Add prototype.
2013-11-18 18:29:49 +02:00
Eli Zaretskii
96e78d1fb3 Fix bug #15913 with disappearing mouse highlight on MS-Windows.
src/w32term.c (x_update_window_end): Don't invalidate the entire
 mouse-highlight info, just signal frame_up_to_date_hook that mouse
 highlight needs to be redisplayed.
2013-11-17 23:02:09 +02:00
Paul Eggert
d138982874 Spelling fixes.
* lisp/org/ob-python.el (org-babel-python-with-earmuffs):
Rename from org-babel-python-with-earmufs.  All uses changed.
(org-babel-python-without-earmuffs):
Rename from org-babel-python-without-earmufs.  All uses changed.
2013-11-16 23:51:24 -08:00
Paul Eggert
0f679e866c * configure.ac (DEBUGGER_SEES_C_MACROS): Remove.
* src/lisp.h (DEBUGGER_SEES_C_MACROS): Likewise.
It apparently doesn't work for GCC 3, and I suppose it's more
trouble than it's worth to worry about this.
2013-11-16 19:58:30 -08:00
Eli Zaretskii
d17f4dba9c Don't let unusual after-change-functions overwrite " prin1" buffer in use.
src/doc.c (Fsubstitute_command_keys): Inhibit modification hooks
 while we are using Vprin1_to_string_buffer.

Fixes: debbugs:15907
2013-11-16 12:23:09 +02:00
Eli Zaretskii
3d6dec8d1e Fix bug #15907 with crashes due to after-change-functions.
src/keymap.c (describe_map): Don't crash if PT is 1 both before and
 after inserting the description string.
2013-11-16 11:27:19 +02:00
Paul Eggert
2fcc742fc5 * data.c: Work around bogus GCC diagnostic about shift count.
Reported by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
(pre_value): New function.
(count_trailing_zero_bits): Use it.
2013-11-15 10:01:04 -08:00
Eli Zaretskii
73583a9978 Correct overly-optimistic assumptions about C macro support by "gcc -g3".
src/lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
 assume C macros are not supported even under -g3 in these old GCC
 versions.
2013-11-15 10:18:37 +02:00
Leo Liu
a1f03e8916 * lisp/loadhist.el (read-feature): Get rid of fake feature nil.
* src/minibuf.c (Ftry_completion, Fall_completions)
(Ftest_completion): Use FUNCTIONP.  (Bug#15889)
2013-11-15 14:52:40 +08:00
Paul Eggert
1a191e5c73 * configure.ac (DEBUGGER_SEES_C_MACROS): New macro.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
Define to empty if DEBUGGER_SEES_C_MACROS is defined.
This avoids placing unnecessary constants into the Emacs code.
2013-11-14 17:59:57 -08:00
Kazuhiro Ito
c9f630705d Fix bug #15892 with link failures of the Cygwin w32 build.
src/keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
 for Cygwin w32 build.
 src/xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
 for Cygwin w32 build.
2013-11-14 19:43:49 +02:00
Paul Eggert
2cf00efc1b Simplify, port and tune bool vector implementation.
* configure.ac (BITSIZEOF_SIZE_T, SIZEOF_SIZE_T): Remove.
* src/alloc.c (bool_vector_exact_payload_bytes)
(bool_vector_payload_bytes): Remove.
(bool_vector_fill): Return its argument.
* src/alloc.c (bool_vector_fill):
* src/lread.c (read1):
* src/print.c (print_object):
Simplify by using bool_vector_bytes.
* src/alloc.c (make_uninit_bool_vector):
New function, broken out from Fmake_bool_vector.
(Fmake_bool_vector): Use it.  Use tail call.
(make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
* src/data.c (BITS_PER_ULL): New constant.
(ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
if long long versions don't exist.
(shift_right_ull): New function.
(count_one_bits_word): New function, replacing popcount_bits_word
macro.  Don't assume that bits_word is no wider than long long.
(count_one_bits_word, count_trailing_zero_bits):
Don't assume that bits_word is no wider than long long.
* src/data.c (bool_vector_binop_driver, bool_vector_not):
* src/fns.c (Fcopy_sequence):
* src/lread.c (read1):
Create an uninitialized destination, to avoid needless work.
(internal_equal): Simplify.
(Ffillarray): Prefer tail call.
* src/data.c (bool_vector_binop_driver): Don't assume bit vectors always
contain at least one word.
(bits_word_to_host_endian): Prefer if to #if.  Don't assume
chars are narrower than ints.
* src/data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
* src/fns.c (Fcopy_sequence):
Simplify and tune.
* src/lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
Don't try to port to hosts where bits_word values have holes; the
code wouldn't work there anyway.  Verify this assumption, though.
(bool_vector_bytes): New function.
(make_uninit_bool_vector): New decl.
(bool_vector_fill): Now returns Lisp_Object.
2013-11-13 18:39:28 -08:00
Paul Eggert
d672ac3c61 Prefer tail calls.
* lib-src/ebrowse.c (xstrdup):
* lib-src/etags.c (savenstr):
* lwlib/lwlib.c (safe_strdup):
* src/xfns.c (xic_create_fontsetname):
* src/xrdb.c (gethomedir): Prefer tail calls.
* lib-src/etags.c (concat): Omit unnecessary assignment.
2013-11-13 17:52:18 -08:00
Paul Eggert
b367161707 * xterm.c (syms_of_xterm): staticpro Qalt, Qhyper, Qmeta, and Qsuper.
This is safer, and it's what w32fns.c does.
2013-11-11 22:07:37 -08:00
Paul Eggert
e3ac17b675 * xterm.c (syms_of_xterm): staticpro Qmodifier_value. 2013-11-11 19:09:48 -08:00
Paul Eggert
bd7cd30ac3 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
that requires a return value.
(Fset_buffer_modified_p): Take advantage of this change to do
a tail call.
2013-11-11 17:24:04 -08:00
Stefan Monnier
ecda65d4f7 * lisp/subr.el (force-mode-line-update): Delete, move to buffer.c.
* src/buffer.c (Frestore_buffer_modified_p): Sync it with
Fset_buffer_modified_p.
(Fforce_mode_line_update): New function, moved from subr.el.
(Fset_buffer_modified_p): Use them.
(syms_of_buffer): Defsubr Fforce_mode_line_update.
2013-11-11 13:05:47 -05:00
Paul Eggert
5389db9e71 * search.c (find_newline): Rewrite to prefer offsets to pointers.
This avoids undefined behavior when subtracting pointers into
different aways.  On my platform it also makes the code a tad
smaller and presumably faster.
2013-11-11 08:37:54 -08:00
Stefan Monnier
7818df11b8 * lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
* src/keyboard.c (command_loop_1): Use region-extract-function.
* src/insdel.c (Qregion_extract_function): Not static any more (can we
stop pretending that these vars can benefit from being marked static?).
2013-11-11 00:18:53 -05:00
Eli Zaretskii
85f37d1011 Fix bug #15841 with missing line numbers in linum-mode.
src/search.c (find_newline): If buffer text is relocated during the
 "dumb loop", adjust C pointers into buffer text to follow suit.
2013-11-09 23:24:10 +02:00
Jan Djärv
b24ac90f5d * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
for conversion.

Fixes: debbugs:15837
2013-11-09 12:19:53 +01:00
Eli Zaretskii
addccbd0c3 Fix bug #15841 with cache-long-scans, linum-mode, and non-ASCII chars.
src/fileio.c (Finsert_file_contents): Invalidate the newline cache
 for the entire range of inserted characters.
2013-11-09 13:12:33 +02:00
Jan Djärv
5b97b4c0df * lisp/faces.el (describe-face): Add distant-foreground.
* src/xfaces.c (lface_fully_specified_p): Let distant-foreground be
unspecified.
(realize_default_face): Remove assignment to distant-foreground if
unspecified.

Fixes: debbugs:15815
2013-11-08 18:26:03 +01:00
Paul Eggert
220a304ac3 Merge from gnulib.
This incorporates:
2013-11-08 extern-inline: port better to OS X 10.9
2013-11-08 fpending: fix regression on DragonFly BSD
* lib/fpending.h, m4/extern-inline.m4, m4/fpending.m4:
Update from gnulib.
2013-11-08 08:24:40 -08:00
Eli Zaretskii
080db47fc4 Switch cache-long-scans to t by default.
src/xdisp.c (message_dolog): Make sure the *Messages* buffer has its
 cache-long-scans disabled, since we don't want to call
 prepare_to_modify_buffer (in insert_1_both) for each message we
 display.
 src/buffer.h (bset_cache_long_scans): New INLINE function, moved
 from buffer.c.  Improve commentary to the buffer field setter
 functions.
 src/buffer.c (bset_cache_long_scans): Static function deleted.
 Improve commentary to the buffer field setter functions.
 (init_buffer_once): Default for cache-long-scans changed to t.
 (Bug#15797)
2013-11-08 12:21:35 +02:00
Paul Eggert
7f1913b2da * chartab.c (make_sub_char_table): Fix size typo.
This bug was introduced in my 2013-06-21 change, and caused
struct Lisp_Sub_Char_Table objects to be given too many slots,
which broke 'make -C admin/unidata'.

Fixes: debbugs:15825
2013-11-07 23:28:21 -08:00
Jan Djärv
5ee2921081 Import macfont changes from mac-port 4.5.
* macfont.h (kCTVersionNumber10_9): Define if not defined.

* macfont.m (mac_font_copy_default_descriptors_for_language)
(mac_font_copy_default_name_for_charset_and_languages): Declare.
(cf_charset_table): big-5-0 has uniquifier 0x4EDC.
(macfont_language_default_font_names): New.
(macfont_list): Rearrange language/charset code.
(macfont_close): Don't check for macfont_info->cache.
(mac_ctfont_create_preferred_family_for_attributes): New font
selection code, call
mac_font_copy_default_name_for_charset_and_languages.
(mac_font_copy_default_descriptors_for_language)
(mac_font_copy_default_name_for_charset_and_languages): New functions.
2013-11-07 23:21:08 +01:00