1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
Commit graph

31280 commits

Author SHA1 Message Date
Juanma Barranquero
989bf36895 src/xdisp.c (single_display_spec_intangible_p): Remove declaration. 2011-06-05 02:14:08 +02:00
Chong Yidong
de65b42cbf * src/xselect.c (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790). 2011-06-04 18:08:32 -04:00
Chong Yidong
4b80f6746d Handle errors when saving to clipboard manager (Bug#8779).
* src/xselect.c (x_clipboard_manager_save): Remove redundant arg.
(x_clipboard_manager_save): Add return value.
(x_clipboard_manager_error_1, x_clipboard_manager_error_2): New
error handlers.
(x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
Obey Vx_select_enable_clipboard_manager.  Catch errors in
x_clipboard_manager_save (Bug#8779).
(Vx_select_enable_clipboard_manager): New variable.
2011-06-04 17:02:42 -04:00
Glenn Morris
99a33b77e1 Merge from emacs-23; up to 2010-06-12T17:12:15Z!cyd@stupidchicken.com. 2011-06-04 11:29:18 -07:00
Eli Zaretskii
8264569dfe src/bidi.c (bidi_level_of_next_char): Fix last change. 2011-06-04 11:04:48 +03:00
Eli Zaretskii
fec2107c58 Support bidi reordering of text covered by display properties.
src/bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
 (bidi_cache_search, bidi_cache_iterator_state)
 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
 (bidi_level_of_next_char, bidi_move_to_visually_next): Support
 character positions inside a run of characters covered by a
 display string.
 (bidi_paragraph_init, bidi_resolve_explicit_1)
 (bidi_level_of_next_char): Call bidi_fetch_char and
 bidi_fetch_char_advance instead of FETCH_CHAR and
 FETCH_CHAR_ADVANCE.
 (bidi_init_it): Initialize new members.
 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
 definitions.
 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
 instead of using explicit *_CHAR codes.
 (bidi_resolve_explicit, bidi_resolve_weak): Use
 FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
 bidirectional text is supported only in multibyte buffers.
 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
 it to initialize the frame_window_p member of struct bidi_it.
 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
 (bidi_resolve_explicit, bidi_resolve_weak)
 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
 bidi_it->nchars is non-positive.
 (bidi_level_of_next_char): Don't try to lookup the cache for the
 next/previous character if nothing is cached there yet, or if we
 were just reseat()'ed to a new position.
 src/xdisp.c (set_cursor_from_row): Set start and stop points
 according to the row's direction when priming the loop that looks
 for the glyph on which to display cursor.
 (single_display_spec_intangible_p): Function deleted.
 (display_prop_intangible_p): Reimplement to call
 handle_display_spec instead of single_display_spec_intangible_p.
 Accept 3 additional arguments needed by handle_display_spec.  This
 fixes incorrect cursor motion across display property with complex
 values: lists, `(when COND...)' forms, etc.
 (single_display_spec_string_p): Support property values that are
 lists with the argument STRING its top-level element.
 (display_prop_string_p): Fix the condition for processing a
 property that is a list to be consistent with handle_display_spec.
 (handle_display_spec): New function, refactored from the
 last portion of handle_display_prop.
 (compute_display_string_pos): Accept additional argument
 FRAME_WINDOW_P.  Call handle_display_spec to determine whether the
 value of a `display' property is a "replacing spec".
 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
 and FRAME_WINDOW_P.  If IT is NULL, don't set up the iterator from
 the display property, but just return a value indicating whether
 the display property will replace the characters it covers.
 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
 frame_window_p members of struct bidi_it.
 (compute_display_string_pos, compute_display_string_end): New
 functions.
 (push_it): Accept second argument POSITION, where pop_it should
 jump to continue iteration.
 (reseat_1): Initialize bidi_it.disp_pos.
 src/keyboard.c (adjust_point_for_property): Adjust the call to
 display_prop_intangible_p to its new signature.
 src/dispextern.h (struct bidi_it): New member frame_window_p.
 (bidi_init_it): Update prototypes.
 (display_prop_intangible_p): Update prototype.
 (compute_display_string_pos, compute_display_string_end): Declare
 prototypes.
 (struct bidi_it): New members nchars and disp_pos.  ch_len is now
 EMACS_INT.
2011-06-04 10:41:44 +03:00
Eli Zaretskii
57f97249c8 Cleanup. Tested in -nw and verified that bug #7616 didn't become worse.
src/bidi.c (bidi_fetch_char_advance): Remove unused and
 unimplemented function.
2011-06-03 16:34:52 +03:00
Dan Nicolaescu
8b3115e702 * src/emacs.c (main): Warn when starting a GTK emacs in daemon mode. 2011-06-02 09:56:04 -07:00
Paul Eggert
57f53182c0 Merge ChangeLog from trunk better. 2011-06-02 01:40:41 -07:00
Paul Eggert
7f5efba80e * alloc.c (allocate_vectorlike): Adjust to memory_full API change. 2011-06-02 01:35:28 -07:00
Paul Eggert
275a5dd650 Merge from trunk. 2011-06-02 01:25:28 -07:00
Paul Eggert
4008751468 Merge: Remove arbitrary limit of 2**31 entries in hash tables.
Fixes: debbugs:8771
2011-06-02 01:02:59 -07:00
Paul Eggert
af3c30cb28 Merge from trunk. 2011-06-02 00:42:55 -07:00
Dan Nicolaescu
698d32e2c3 Make it possible to build with GCC-4.6+ -O2 -flto.
* src/emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
2011-06-01 14:54:35 -07:00
Stefan Monnier
fd6fa53f88 * lisp/minibuffer.el (minibuffer-inactive-mode-map): New var.
(minibuffer-inactive-mode): New major mode.
* src/minibuf.c (get_minibuffer, read_minibuf_unwind): Call it.
* lisp/mouse.el (mouse-drag-region): Remove the "mouse-1 pops up
the *Messages* buffer" hack.
(mouse-popup-menubar): Don't burp if the event is a normal key.
2011-06-01 12:34:41 -03:00
Stefan Monnier
2462470b9e Miscellaneous tweaks.
* lisp/emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for
lexical scoping as in subr.el's dolist and dotimes.
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Silence compiler warning.
* lisp/thingatpt.el (forward-whitespace): Trivial coding style fix.
* lisp/subr.el (with-output-to-temp-buffer): Provide an edebug spec.
* lisp/international/ccl.el (ccl-compile): Trivial simplification.
* lisp/help-fns.el (help-do-arg-highlight): Silence compiler warning.
* lisp/emacs-lisp/testcover.el (testcover-end): Remove spurious
`printflag' argument.
* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy the whole obsolescence data.
2011-06-01 11:19:45 -03:00
YAMAMOTO Mitsuharu
14eca62f5c * fringe.c (update_window_fringes): Don't update overlay arrow bitmap in the current matrix if keep_current_p is non-zero. 2011-06-01 10:36:38 +09:00
Eli Zaretskii
662b2d1a70 src/xdisp.c (single_display_spec_string): Correct a FIXME comment. 2011-05-31 21:08:41 +03:00
Juanma Barranquero
864db017b0 src/makefile.w32-in: Update dependencies. 2011-05-31 19:03:24 +02:00
Dan Nicolaescu
2ad0baf4e6 * src/data.c (init_data): Remove code for UTS, this system is not
supported anymore.
2011-05-31 07:57:53 -07:00
Dan Nicolaescu
4fcc2638bf Don't force ./temacs to start in terminal mode.
* frame.c (make_initial_frame): Initialize faces in all cases, not
only when CANNOT_DUMP is defined.
* dispnew.c (init_display): Remove CANNOT_DUMP condition.
2011-05-31 07:52:10 -07:00
Dan Nicolaescu
c56e0fd53b Use const for a string pointer.
* src/dispnew.c (add_window_display_history): Use const for the string
pointer.  Remove declaration, not needed.
2011-05-31 07:44:16 -07:00
Paul Eggert
3870d91691 Adjust ChangeLog as per Stefan's suggestions. 2011-05-31 07:34:33 -07:00
Paul Eggert
ac32cd99d7 Add Bug#. 2011-05-30 23:10:46 -07:00
Paul Eggert
0de4bb688d Remove arbitrary limit of 2**31 entries in hash tables.
* category.c (hash_get_category_set): Use 'EMACS_UINT' and 'EMACS_INT'
for hashes and hash indexes, instead of 'unsigned' and 'int'.
* ccl.c (ccl_driver): Likewise.
* charset.c (Fdefine_charset_internal): Likewise.
* charset.h (struct charset.hash_index): Likewise.
* composite.c (get_composition_id, gstring_lookup_cache):
(composition_gstring_put_cache): Likewise.
* composite.h (struct composition.hash_index): Likewise.
* dispextern.h (struct image.hash): Likewise.
* fns.c (next_almost_prime, larger_vector, cmpfn_eql):
(cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql):
(hashfn_equal, hashfn_user_defined, make_hash_table):
(maybe_resize_hash_table, hash_lookup, hash_put):
(hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE):
(sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
(Fsxhash, Fgethash, Fputhash, Fmaphash): Likewise.
* image.c (make_image, search_image_cache, lookup_image):
(xpm_put_color_table_h): Likewise.
* lisp.h (struct Lisp_Hash_Table): Likewise, for 'count', 'cmpfn',
and 'hashfn' members.
* minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
Likewise.
* print.c (print): Likewise.
* alloc.c (allocate_vectorlike): Check for overflow in vector size
calculations.
* ccl.c (ccl_driver): Check for overflow when converting EMACS_INT
to int.
* fns.c, image.c: Remove unnecessary static decls that would otherwise
need to be updated by these changes.
* fns.c (make_hash_table, maybe_resize_hash_table): Check for integer
overflow with large hash tables.
(make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
(SXHASH_REDUCE): New macro.
(sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
Use it instead of discarding useful hash info with large hash values.
(sxhash_float): New function.
(sxhash): Use it.  No more need for "& INTMASK" due to above changes.
* lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
(MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK): Rewrite
to use FIXNUM_BITS, as this simplifies things.
(next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
Adjust signatures to match updated version of code.
(consing_since_gc): Now EMACS_INT, since a single hash table can
use more than INT_MAX bytes.
2011-05-30 23:05:00 -07:00
Paul Eggert
97f4ea9797 Fix ChangeLog entry order. 2011-05-30 22:47:57 -07:00
Paul Eggert
86f3178890 Merge from trunk. 2011-05-30 22:45:07 -07:00
Paul Eggert
12c69b84d1 Add bug#. 2011-05-30 22:43:11 -07:00
Paul Eggert
b9627cfb1d * ccl.c: Improve comment. (Bug#8751) 2011-05-30 22:38:59 -07:00
Paul Eggert
aa1a7eb834 Merge from trunk. 2011-05-30 22:24:53 -07:00
Paul Eggert
333d54dade Merge from trunk. 2011-05-30 22:15:34 -07:00
Dan Nicolaescu
738db17859 Make it possible to run ./temacs.
* callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
syms_of_callproc does the same thing.  Remove test for
"initialized", do it in the caller.
* emacs.c (main): Avoid calling set_initial_environment when dumping.
2011-05-30 22:12:19 -07:00
Stefan Monnier
620c53a664 * lisp/minibuffer.el: Add metadata method to completion tables.
(completion-category-overrides): New defcustom.
(completion-metadata, completion--field-metadata)
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): New functions.
(completion-try-completion, completion-all-completions):
Add `metadata' argument to choose completion-styles.
(completion--do-completion): Use metadata to choose cycling.
(completion-all-sorted-completions): Use metadata for sorting.
Remove :completion-cycle-penalty which is not needed any more.
(completion--try-word-completion): Add `metadata' argument.
(minibuffer-completion-help): Check metadata for annotation function
and sorting.
(completion-file-name-table): Return `category' metadata.
(minibuffer-completing-file-name): Make obsolete.
* lisp/simple.el (minibuffer-completing-symbol): Make obsolete.
* lisp/icomplete.el (icomplete-completions): Pass new `metadata' param to
completion-try-completion.
* src/minibuf.c (Finternal_complete_buffer): Return `category' metadata.
(read_minibuf): Use get_minibuffer.
(syms_of_minibuf): Use DEFSYM.
(Qmetadata): New var.
* src/data.c (Qbuffer): Don't make it static.
(syms_of_data): Use DEFSYM.
2011-05-31 00:03:38 -03:00
Paul Eggert
e003a29261 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
(CCL_CODE_MIN): New macro.
2011-05-30 19:12:01 -07:00
Paul Eggert
531b01656f [ChangeLog]
Malloc failure behavior now depends on size of allocation.
* lib/allocator.h (struct allocator.die): New size arg.
* lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
If the actual problem is an ssize_t limitation, not a size_t or
malloc failure, fail with errno == ENAMETOOLONG instead of calling 'die'.
[src/ChangeLog]
Malloc failure behavior now depends on size of allocation.
* alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
* lisp.h: Change signatures accordingly.
* alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
All callers changed.
2011-05-30 09:47:35 -07:00
Paul Eggert
de677ace77 Merge from trunk. 2011-05-30 09:12:16 -07:00
Paul Eggert
3687c2efb7 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests. 2011-05-30 09:09:29 -07:00
Paul Eggert
703f86387f Add Bug#. 2011-05-30 08:57:49 -07:00
Paul Eggert
9cf9f756a9 * gnutls.c: Use Emacs's memory allocators.
Without this change, the gnutls library would invoke malloc etc.
directly, which causes problems on non-SYNC_INPUT hosts, and which
runs afoul of improving memory_full behavior.
(fn_gnutls_global_set_mem_functions): New macro or function pointer.
(emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
xfree instead of the default malloc, realloc, free.
(Fgnutls_boot): No need to check for memory allocation failure,
since xmalloc does that for us.
2011-05-30 01:03:15 -07:00
Paul Eggert
ed008a6dd3 * eval.c (Qdebug): Now static.
* lisp.h (Qdebug): Remove decl.  This reverts a part of the
2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
2011-05-29 22:39:59 -07:00
Paul Eggert
90856fe0b8 Merge from trunk. 2011-05-29 18:12:12 -07:00
Eli Zaretskii
34809aa600 src/coding.c: Fix a typo in a comment. 2011-05-30 00:09:52 +03:00
Eli Zaretskii
56dd2d861f src/font.[ch]: Fix typos in comments and strings. 2011-05-29 22:04:01 +03:00
Chong Yidong
d66c4c7ce6 Doc fixes for imagemagick support code.
* lisp/image.el (imagemagick-types-inhibit)
(imagemagick-register-types): Doc fix.

* src/image.c: Various fixes to ImageMagick code comments.
(Fimagemagick_types): Doc fix.
2011-05-29 14:17:28 -04:00
Paul Eggert
0196f88a60 Minor fixes prompted by GCC 4.6.0 warnings.
* xselect.c (converted_selections, conversion_fail_tag): Now static.
2011-05-28 22:23:24 -07:00
Paul Eggert
5fbc202585 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
(x_clipboard_manager_save_all): Move extern decl to ...
* xterm.h: ... here, so that it can be checked for consistency.
2011-05-28 21:08:28 -07:00
Chong Yidong
1dd3c2d9b2 Move clipboard-manager functionality out of hooks.
* lisp/select.el: Don't perform clipboard-manager saving in hooks;
leave the hooks empty.

* src/emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
* src/frame.c (delete_frame): Call x_clipboard_manager_save_frame.

* src/xselect.c (x_clipboard_manager_save_frame)
(x_clipboard_manager_save_all): New functions.
(Fx_clipboard_manager_save): Lisp function deleted.

* src/xterm.h: Update prototype.
2011-05-28 20:45:00 -04:00
Paul Eggert
55d4c1b248 [ChangeLog]
Use 'inline', not 'INLINE'.
* configure.in, autogen/config.in (INLINE): Remove.
[lib-src/ChangeLog]
Use 'inline', not 'INLINE'.
* etags.c (hash): Now inline unconditionally.
* make-docfile.c (put_char): inline, not INLINE.
[nt/ChangeLog]
Use 'inline', not 'INLINE'.
* config.nt (INLINE): Remove.
[src/ChangeLog]
Use 'inline', not 'INLINE'.
* alloc.c, fontset.c (INLINE): Remove.
* alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
* intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
* xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
* gmalloc.c (register_heapinfo): Use inline unconditionally.
* lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
2011-05-28 15:39:39 -07:00
Eli Zaretskii
0e14fe90d8 Fix cursor motion across display strings covering reordered text.
src/xdisp.c (set_cursor_from_row): Set start and stop points
 according to the row's direction when priming the loop that looks
 for the glyph on which to display cursor.
 (single_display_spec_intangible_p): Function deleted.
 (display_prop_intangible_p): Reimplement to call
 handle_display_spec instead of single_display_spec_intangible_p.
 Accept 3 additional arguments needed by handle_display_spec.  This
 fixes incorrect cursor motion across display property with complex
 values: lists, `(when COND...)' forms, etc.
 (single_display_spec_string_p): Support property values that are
 lists with the argument STRING its top-level element.
 (display_prop_string_p): Fix the condition for processing a
 property that is a list to be consistent with handle_display_spec.
 src/keyboard.c (adjust_point_for_property): Adjust the call to
 display_prop_intangible_p to its new signature.
 src/dispextern.h (display_prop_intangible_p): Adjust prototype.
2011-05-28 20:23:44 +03:00
William Xu
5ba6571dd9 * src/nsterm.m (ns_term_shutdown): Synchronize user defaults before exiting (Bug#8239). 2011-05-28 12:56:53 -04:00