diff options
| author | Joakim Verona | 2012-03-06 09:23:09 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-03-06 09:23:09 +0100 |
| commit | 28485daaf752ff5264ed2f6a32ec15588beaa929 (patch) | |
| tree | a480205aa664c61b1d212833144c0a2d44f7ac01 /src | |
| parent | e8e42079e76ca6255bbd53312994ba8e1b3b0ee8 (diff) | |
| parent | 2e86d8576c668e149cc100f3222bcf19b38019dc (diff) | |
| download | emacs-28485daaf752ff5264ed2f6a32ec15588beaa929.tar.gz emacs-28485daaf752ff5264ed2f6a32ec15588beaa929.zip | |
upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 50 | ||||
| -rw-r--r-- | src/ChangeLog.10 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.11 | 6 | ||||
| -rw-r--r-- | src/ChangeLog.7 | 11 | ||||
| -rw-r--r-- | src/alloc.c | 43 | ||||
| -rw-r--r-- | src/buffer.c | 6 | ||||
| -rw-r--r-- | src/fileio.c | 19 | ||||
| -rw-r--r-- | src/lisp.h | 18 | ||||
| -rw-r--r-- | src/xdisp.c | 32 | ||||
| -rw-r--r-- | src/xselect.c | 16 |
10 files changed, 147 insertions, 56 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8e439f1a1d4..ef57223b9ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,48 @@ | |||
| 1 | 2012-03-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes. | ||
| 4 | |||
| 5 | 2012-03-02 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * xdisp.c (try_window_reusing_current_matrix): Don't move cursor | ||
| 8 | position past the first glyph_row that ends at ZV. (Bug#10902) | ||
| 9 | (redisplay_window, next_element_from_string): Fix typos in | ||
| 10 | comments. | ||
| 11 | (redisplay_window): Pass to move_it_vertically the margin in | ||
| 12 | pixels, not in screen lines. | ||
| 13 | |||
| 14 | 2012-03-02 Glenn Morris <rgm@gnu.org> | ||
| 15 | |||
| 16 | * buffer.c (buffer-list-update-hook): Doc fix. | ||
| 17 | |||
| 18 | 2012-02-29 Eli Zaretskii <eliz@gnu.org> | ||
| 19 | |||
| 20 | * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call | ||
| 21 | push_it before setting up the iterator for the first overlay | ||
| 22 | string, even if we have an empty string loaded. | ||
| 23 | (next_overlay_string): If there's an empty string on the iterator | ||
| 24 | stack, pop the stack. (Bug#10903) | ||
| 25 | |||
| 26 | 2012-02-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 27 | |||
| 28 | Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780). | ||
| 29 | Suggested by Stefan Monnier in | ||
| 30 | <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>. | ||
| 31 | * alloc.c (widen_to_Lisp_Object): New static function. | ||
| 32 | (mark_memory): Also mark Lisp_Objects by fetching pointer words | ||
| 33 | and widening them to Lisp_Objects. This would work even if | ||
| 34 | USE_LSB_TAG is defined and wide integers are used, which might | ||
| 35 | happen in a future version of Emacs. | ||
| 36 | |||
| 37 | 2012-02-25 Chong Yidong <cyd@gnu.org> | ||
| 38 | |||
| 39 | * fileio.c (Ffile_selinux_context, Fset_file_selinux_context): | ||
| 40 | Doc fix. | ||
| 41 | |||
| 42 | * xselect.c (Fx_selection_exists_p): Doc fix. | ||
| 43 | (x_clipboard_manager_save_all): Print an informative message | ||
| 44 | before saving to clipboard manager. | ||
| 45 | |||
| 1 | 2012-02-24 Chong Yidong <cyd@gnu.org> | 46 | 2012-02-24 Chong Yidong <cyd@gnu.org> |
| 2 | 47 | ||
| 3 | * keyboard.c (process_special_events): Handle all X selection | 48 | * keyboard.c (process_special_events): Handle all X selection |
| @@ -6764,7 +6809,7 @@ | |||
| 6764 | conversion specifiers. For example, use "...%"pI"d..." rather | 6809 | conversion specifiers. For example, use "...%"pI"d..." rather |
| 6765 | than "...%"pEd"...". | 6810 | than "...%"pEd"...". |
| 6766 | (pEd): Remove. All uses replaced with similar uses of pI. | 6811 | (pEd): Remove. All uses replaced with similar uses of pI. |
| 6767 | * src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h: Likewise. | 6812 | * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise. |
| 6768 | * alloc.c (check_pure_size): Don't overflow by converting size to int. | 6813 | * alloc.c (check_pure_size): Don't overflow by converting size to int. |
| 6769 | * bidi.c (bidi_dump_cached_states): Use pI to avoid cast. | 6814 | * bidi.c (bidi_dump_cached_states): Use pI to avoid cast. |
| 6770 | * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort. | 6815 | * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort. |
| @@ -7746,8 +7791,7 @@ | |||
| 7746 | Without this change, on typical 64-bit hosts error ("...%d...", N) | 7791 | Without this change, on typical 64-bit hosts error ("...%d...", N) |
| 7747 | was used to print both 32- and 64-bit integers N, which relied on | 7792 | was used to print both 32- and 64-bit integers N, which relied on |
| 7748 | undefined behavior. | 7793 | undefined behavior. |
| 7749 | * lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd): | 7794 | * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro. |
| 7750 | New macro. | ||
| 7751 | * lisp.h (error, verror): Mark as printf-like functions. | 7795 | * lisp.h (error, verror): Mark as printf-like functions. |
| 7752 | * eval.c (verror): Use vsnprintf, not doprnt, to do the real work. | 7796 | * eval.c (verror): Use vsnprintf, not doprnt, to do the real work. |
| 7753 | Report overflow in size calculations when allocating printf buffer. | 7797 | Report overflow in size calculations when allocating printf buffer. |
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 5baeb877939..10de7e53794 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -20972,7 +20972,7 @@ | |||
| 20972 | 20972 | ||
| 20973 | 2002-12-30 Richard Dawe <rich@phekda.freeserve.co.uk> | 20973 | 2002-12-30 Richard Dawe <rich@phekda.freeserve.co.uk> |
| 20974 | 20974 | ||
| 20975 | * src/config.in (!HAVE_SIZE_T): Fix order of arguments in | 20975 | * config.in (!HAVE_SIZE_T): Fix order of arguments in |
| 20976 | type definition of size_t. | 20976 | type definition of size_t. |
| 20977 | 20977 | ||
| 20978 | 2003-01-02 Steven Tamm <steventamm@mac.com> | 20978 | 2003-01-02 Steven Tamm <steventamm@mac.com> |
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index e8bfd964312..2e5404779b1 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 | |||
| @@ -533,8 +533,8 @@ | |||
| 533 | * deps.mk (getloadavg.o): Remove; gnulib now does this. | 533 | * deps.mk (getloadavg.o): Remove; gnulib now does this. |
| 534 | * lisp.h (getloadavg) [!defined HAVE_GETLOADAVG]: Remove; gnulib | 534 | * lisp.h (getloadavg) [!defined HAVE_GETLOADAVG]: Remove; gnulib |
| 535 | now does this. | 535 | now does this. |
| 536 | * src/s/freebsd.h (HAVE_GETLOADAVG): Remove; gnulib now does this. | 536 | * s/freebsd.h (HAVE_GETLOADAVG): Remove; gnulib now does this. |
| 537 | * src/s/netbsd.h (HAVE_GETLOADAVG): Likewise. | 537 | * s/netbsd.h (HAVE_GETLOADAVG): Likewise. |
| 538 | * config.in: Regenerate. | 538 | * config.in: Regenerate. |
| 539 | 539 | ||
| 540 | 2011-02-15 Eli Zaretskii <eliz@gnu.org> | 540 | 2011-02-15 Eli Zaretskii <eliz@gnu.org> |
| @@ -12539,7 +12539,7 @@ | |||
| 12539 | 12539 | ||
| 12540 | 2009-06-23 Jim Meyering <meyering@redhat.com> | 12540 | 2009-06-23 Jim Meyering <meyering@redhat.com> |
| 12541 | 12541 | ||
| 12542 | * src/ftfont.c (setup_otf_gstring, ftfont_shape_by_flt): | 12542 | * ftfont.c (setup_otf_gstring, ftfont_shape_by_flt): |
| 12543 | Use xmalloc and xrealloc (not malloc and realloc), so subsequent heap | 12543 | Use xmalloc and xrealloc (not malloc and realloc), so subsequent heap |
| 12544 | pointer dereferences are guaranteed to be valid. | 12544 | pointer dereferences are guaranteed to be valid. |
| 12545 | 12545 | ||
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index 891c1ca081a..0952826e8c6 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 | |||
| @@ -331,7 +331,7 @@ | |||
| 331 | 331 | ||
| 332 | 1998-07-30 Paul Eggert <eggert@twinsun.com> | 332 | 1998-07-30 Paul Eggert <eggert@twinsun.com> |
| 333 | 333 | ||
| 334 | * src/Makefile.in (widget.o, xfns.o, xmenu.o): | 334 | * Makefile.in (widget.o, xfns.o, xmenu.o): |
| 335 | Prepend $(srcdir)/ to rule dependencies outside this dir. | 335 | Prepend $(srcdir)/ to rule dependencies outside this dir. |
| 336 | 336 | ||
| 337 | 1998-07-29 Kenichi Handa <handa@etl.go.jp> | 337 | 1998-07-29 Kenichi Handa <handa@etl.go.jp> |
| @@ -4884,14 +4884,13 @@ | |||
| 4884 | The new GNU C library strftime needs the underlying host's | 4884 | The new GNU C library strftime needs the underlying host's |
| 4885 | strftime for locale dependent formats. | 4885 | strftime for locale dependent formats. |
| 4886 | 4886 | ||
| 4887 | * configure.in (AC_CHECK_FUNCS): Add strftime. | 4887 | * config.in (HAVE_STRFTIME): New undef. |
| 4888 | * src/config.in (HAVE_STRFTIME): New undef. | 4888 | * editfns.c (emacs_strftime): New decl. |
| 4889 | * src/editfns.c (emacs_strftime): New decl. | ||
| 4890 | (Fformat_time_string): Doc fix: %b, %h, %B, %a, %A, and %p depend on | 4889 | (Fformat_time_string): Doc fix: %b, %h, %B, %a, %A, and %p depend on |
| 4891 | locale; don't use actual chars to describe %n and %t. | 4890 | locale; don't use actual chars to describe %n and %t. |
| 4892 | 4891 | ||
| 4893 | * src/Makefile.in (strftime.o): | 4892 | * Makefile.in (strftime.o): |
| 4894 | * src/makefile.nt ($(BLD)\strftime.obj): | 4893 | * makefile.nt ($(BLD)\strftime.obj): |
| 4895 | No need to compile with -Dstrftime=emacs_strftime any more. | 4894 | No need to compile with -Dstrftime=emacs_strftime any more. |
| 4896 | 4895 | ||
| 4897 | 1997-11-22 Richard Stallman <rms@gnu.org> | 4896 | 1997-11-22 Richard Stallman <rms@gnu.org> |
diff --git a/src/alloc.c b/src/alloc.c index 044e750413b..f85661415cd 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -1582,6 +1583,21 @@ make_number (EMACS_INT n) | |||
| 1582 | } | 1583 | } |
| 1583 | #endif | 1584 | #endif |
| 1584 | 1585 | ||
| 1586 | /* Convert the pointer-sized word P to EMACS_INT while preserving its | ||
| 1587 | type and ptr fields. */ | ||
| 1588 | static Lisp_Object | ||
| 1589 | widen_to_Lisp_Object (void *p) | ||
| 1590 | { | ||
| 1591 | intptr_t i = (intptr_t) p; | ||
| 1592 | #ifdef USE_LISP_UNION_TYPE | ||
| 1593 | Lisp_Object obj; | ||
| 1594 | obj.i = i; | ||
| 1595 | return obj; | ||
| 1596 | #else | ||
| 1597 | return i; | ||
| 1598 | #endif | ||
| 1599 | } | ||
| 1600 | |||
| 1585 | /*********************************************************************** | 1601 | /*********************************************************************** |
| 1586 | String Allocation | 1602 | String Allocation |
| 1587 | ***********************************************************************/ | 1603 | ***********************************************************************/ |
| @@ -4293,7 +4309,19 @@ mark_memory (void *start, void *end) | |||
| 4293 | 4309 | ||
| 4294 | for (pp = start; (void *) pp < end; pp++) | 4310 | for (pp = start; (void *) pp < end; pp++) |
| 4295 | for (i = 0; i < sizeof *pp; i += GC_POINTER_ALIGNMENT) | 4311 | for (i = 0; i < sizeof *pp; i += GC_POINTER_ALIGNMENT) |
| 4296 | mark_maybe_pointer (*(void **) ((char *) pp + i)); | 4312 | { |
| 4313 | void *w = *(void **) ((char *) pp + i); | ||
| 4314 | mark_maybe_pointer (w); | ||
| 4315 | |||
| 4316 | #ifdef USE_LSB_TAG | ||
| 4317 | /* A host where a Lisp_Object is wider than a pointer might | ||
| 4318 | allocate a Lisp_Object in non-adjacent halves. If | ||
| 4319 | USE_LSB_TAG, the bottom half is not a valid pointer, so | ||
| 4320 | widen it to to a Lisp_Object and check it that way. */ | ||
| 4321 | if (sizeof w < sizeof (Lisp_Object)) | ||
| 4322 | mark_maybe_object (widen_to_Lisp_Object (w)); | ||
| 4323 | #endif | ||
| 4324 | } | ||
| 4297 | } | 4325 | } |
| 4298 | 4326 | ||
| 4299 | /* setjmp will work with GCC unless NON_SAVING_SETJMP is defined in | 4327 | /* setjmp will work with GCC unless NON_SAVING_SETJMP is defined in |
| @@ -4983,11 +5011,12 @@ Garbage collection happens automatically if you cons more than | |||
| 4983 | `gc-cons-threshold' bytes of Lisp data since previous garbage collection. | 5011 | `gc-cons-threshold' bytes of Lisp data since previous garbage collection. |
| 4984 | `garbage-collect' normally returns a list with info on amount of space in use: | 5012 | `garbage-collect' normally returns a list with info on amount of space in use: |
| 4985 | ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) | 5013 | ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) |
| 4986 | (USED-MARKERS . FREE-MARKERS) USED-STRING-CHARS USED-VECTOR-SLOTS | 5014 | (USED-MISCS . FREE-MISCS) USED-STRING-CHARS USED-VECTOR-SLOTS |
| 4987 | (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) | 5015 | (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) |
| 4988 | (USED-STRINGS . FREE-STRINGS)) | 5016 | (USED-STRINGS . FREE-STRINGS)) |
| 4989 | However, if there was overflow in pure space, `garbage-collect' | 5017 | However, if there was overflow in pure space, `garbage-collect' |
| 4990 | returns nil, because real GC can't be done. */) | 5018 | returns nil, because real GC can't be done. |
| 5019 | See Info node `(elisp)Garbage Collection'. */) | ||
| 4991 | (void) | 5020 | (void) |
| 4992 | { | 5021 | { |
| 4993 | register struct specbinding *bind; | 5022 | register struct specbinding *bind; |
| @@ -6417,7 +6446,9 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); | |||
| 6417 | doc: /* Number of string characters that have been consed so far. */); | 6446 | doc: /* Number of string characters that have been consed so far. */); |
| 6418 | 6447 | ||
| 6419 | DEFVAR_INT ("misc-objects-consed", misc_objects_consed, | 6448 | DEFVAR_INT ("misc-objects-consed", misc_objects_consed, |
| 6420 | doc: /* Number of miscellaneous objects that have been consed so far. */); | 6449 | doc: /* Number of miscellaneous objects that have been consed so far. |
| 6450 | These include markers and overlays, plus certain objects not visible | ||
| 6451 | to users. */); | ||
| 6421 | 6452 | ||
| 6422 | DEFVAR_INT ("intervals-consed", intervals_consed, | 6453 | DEFVAR_INT ("intervals-consed", intervals_consed, |
| 6423 | doc: /* Number of intervals that have been consed so far. */); | 6454 | doc: /* Number of intervals that have been consed so far. */); |
diff --git a/src/buffer.c b/src/buffer.c index 71a5e199c6f..1577254d92a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Buffer manipulation primitives for GNU Emacs. | 1 | /* Buffer manipulation primitives for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1717,7 +1717,7 @@ record_buffer (Lisp_Object buffer) | |||
| 1717 | /* Move BUFFER to the end of the buffer (a)lists. Do nothing if the | 1717 | /* Move BUFFER to the end of the buffer (a)lists. Do nothing if the |
| 1718 | buffer is killed. For the selected frame's buffer list this moves | 1718 | buffer is killed. For the selected frame's buffer list this moves |
| 1719 | BUFFER to its end even if it was never shown in that frame. If | 1719 | BUFFER to its end even if it was never shown in that frame. If |
| 1720 | this happens we have a feature, hence `unrecord-buffer' should be | 1720 | this happens we have a feature, hence `bury-buffer-internal' should be |
| 1721 | called only when BUFFER was shown in the selected frame. */ | 1721 | called only when BUFFER was shown in the selected frame. */ |
| 1722 | 1722 | ||
| 1723 | DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal, | 1723 | DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal, |
| @@ -5996,7 +5996,7 @@ The function `kill-all-local-variables' runs this before doing anything else. * | |||
| 5996 | doc: /* Hook run when the buffer list changes. | 5996 | doc: /* Hook run when the buffer list changes. |
| 5997 | Functions running this hook are `get-buffer-create', | 5997 | Functions running this hook are `get-buffer-create', |
| 5998 | `make-indirect-buffer', `rename-buffer', `kill-buffer', | 5998 | `make-indirect-buffer', `rename-buffer', `kill-buffer', |
| 5999 | `record-buffer' and `unrecord-buffer'. */); | 5999 | and `bury-buffer-internal'. */); |
| 6000 | Vbuffer_list_update_hook = Qnil; | 6000 | Vbuffer_list_update_hook = Qnil; |
| 6001 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); | 6001 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); |
| 6002 | 6002 | ||
diff --git a/src/fileio.c b/src/fileio.c index 839dc07b6ce..7efe919a9f0 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2798,9 +2798,13 @@ See `file-symlink-p' to distinguish symlinks. */) | |||
| 2798 | 2798 | ||
| 2799 | DEFUN ("file-selinux-context", Ffile_selinux_context, | 2799 | DEFUN ("file-selinux-context", Ffile_selinux_context, |
| 2800 | Sfile_selinux_context, 1, 1, 0, | 2800 | Sfile_selinux_context, 1, 1, 0, |
| 2801 | doc: /* Return SELinux context of file named FILENAME, | 2801 | doc: /* Return SELinux context of file named FILENAME. |
| 2802 | as a list ("user", "role", "type", "range"). Return (nil, nil, nil, nil) | 2802 | The return value is a list (USER ROLE TYPE RANGE), where the list |
| 2803 | if file does not exist, is not accessible, or SELinux is disabled */) | 2803 | elements are strings naming the user, role, type, and range of the |
| 2804 | file's SELinux security context. | ||
| 2805 | |||
| 2806 | Return (nil nil nil nil) if the file is nonexistent or inaccessible, | ||
| 2807 | or if SELinux is disabled, or if Emacs lacks SELinux support. */) | ||
| 2804 | (Lisp_Object filename) | 2808 | (Lisp_Object filename) |
| 2805 | { | 2809 | { |
| 2806 | Lisp_Object absname; | 2810 | Lisp_Object absname; |
| @@ -2853,9 +2857,12 @@ if file does not exist, is not accessible, or SELinux is disabled */) | |||
| 2853 | 2857 | ||
| 2854 | DEFUN ("set-file-selinux-context", Fset_file_selinux_context, | 2858 | DEFUN ("set-file-selinux-context", Fset_file_selinux_context, |
| 2855 | Sset_file_selinux_context, 2, 2, 0, | 2859 | Sset_file_selinux_context, 2, 2, 0, |
| 2856 | doc: /* Set SELinux context of file named FILENAME to CONTEXT | 2860 | doc: /* Set SELinux context of file named FILENAME to CONTEXT. |
| 2857 | as a list ("user", "role", "type", "range"). Has no effect if SELinux | 2861 | CONTEXT should be a list (USER ROLE TYPE RANGE), where the list |
| 2858 | is disabled. */) | 2862 | elements are strings naming the components of a SELinux context. |
| 2863 | |||
| 2864 | This function does nothing if SELinux is disabled, or if Emacs was not | ||
| 2865 | compiled with SELinux support. */) | ||
| 2859 | (Lisp_Object filename, Lisp_Object context) | 2866 | (Lisp_Object filename, Lisp_Object context) |
| 2860 | { | 2867 | { |
| 2861 | Lisp_Object absname; | 2868 | Lisp_Object absname; |
diff --git a/src/lisp.h b/src/lisp.h index 8ddc7ef143d..f2177ad789d 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -197,22 +197,8 @@ extern int suppress_checking EXTERNALLY_VISIBLE; | |||
| 197 | # if defined DECL_ALIGN | 197 | # if defined DECL_ALIGN |
| 198 | /* On hosts where VALBITS is greater than the pointer width in bits, | 198 | /* On hosts where VALBITS is greater than the pointer width in bits, |
| 199 | USE_LSB_TAG is: | 199 | USE_LSB_TAG is: |
| 200 | 200 | a. unnecessary, because the top bits of an EMACS_INT are unused, and | |
| 201 | a. unnecessary, because the top bits of an EMACS_INT are unused, | 201 | b. slower, because it typically requires extra masking. |
| 202 | |||
| 203 | b. slower, because it typically requires extra masking, and | ||
| 204 | |||
| 205 | c. harmful, because it can create Lisp_Object values that are so scrambled | ||
| 206 | that mark_maybe_object cannot decipher them. mark_maybe_object assumes | ||
| 207 | that EMACS_INT values are contiguous, but a host where EMACS_INT is | ||
| 208 | wider than a pointer might allocate the top half of an EMACS_INT in | ||
| 209 | (say) a 32-bit word on the stack, putting the bottom half in a 32-bit | ||
| 210 | register that is saved elsewhere in a jmp_buf. When this happens, | ||
| 211 | since USE_LSB_TAG is not defined the bottom half alone is a valid | ||
| 212 | pointer that mark_maybe_pointer can follow; but if USE_LSB_TAG were | ||
| 213 | defined, the bottom half would not be a valid pointer and neither | ||
| 214 | mark_maybe_object nor mark_maybe_pointer would follow it. | ||
| 215 | |||
| 216 | So, define USE_LSB_TAG only on hosts where it might be useful. */ | 202 | So, define USE_LSB_TAG only on hosts where it might be useful. */ |
| 217 | # if UINTPTR_MAX >> VALBITS != 0 | 203 | # if UINTPTR_MAX >> VALBITS != 0 |
| 218 | # define USE_LSB_TAG | 204 | # define USE_LSB_TAG |
diff --git a/src/xdisp.c b/src/xdisp.c index 6e5b1da284d..47eb75221e9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5181,6 +5181,12 @@ next_overlay_string (struct it *it) | |||
| 5181 | it->current.overlay_string_index = -1; | 5181 | it->current.overlay_string_index = -1; |
| 5182 | it->n_overlay_strings = 0; | 5182 | it->n_overlay_strings = 0; |
| 5183 | it->overlay_strings_charpos = -1; | 5183 | it->overlay_strings_charpos = -1; |
| 5184 | /* If there's an empty display string on the stack, pop the | ||
| 5185 | stack, to resync the bidi iterator with IT's position. Such | ||
| 5186 | empty strings are pushed onto the stack in | ||
| 5187 | get_overlay_strings_1. */ | ||
| 5188 | if (it->sp > 0 && STRINGP (it->string) && !SCHARS (it->string)) | ||
| 5189 | pop_it (it); | ||
| 5184 | 5190 | ||
| 5185 | /* If we're at the end of the buffer, record that we have | 5191 | /* If we're at the end of the buffer, record that we have |
| 5186 | processed the overlay strings there already, so that | 5192 | processed the overlay strings there already, so that |
| @@ -5478,8 +5484,15 @@ get_overlay_strings_1 (struct it *it, EMACS_INT charpos, int compute_stop_p) | |||
| 5478 | xassert (!compute_stop_p || it->sp == 0); | 5484 | xassert (!compute_stop_p || it->sp == 0); |
| 5479 | 5485 | ||
| 5480 | /* When called from handle_stop, there might be an empty display | 5486 | /* When called from handle_stop, there might be an empty display |
| 5481 | string loaded. In that case, don't bother saving it. */ | 5487 | string loaded. In that case, don't bother saving it. But |
| 5482 | if (!STRINGP (it->string) || SCHARS (it->string)) | 5488 | don't use this optimization with the bidi iterator, since we |
| 5489 | need the corresponding pop_it call to resync the bidi | ||
| 5490 | iterator's position with IT's position, after we are done | ||
| 5491 | with the overlay strings. (The corresponding call to pop_it | ||
| 5492 | in case of an empty display string is in | ||
| 5493 | next_overlay_string.) */ | ||
| 5494 | if (!(!it->bidi_p | ||
| 5495 | && STRINGP (it->string) && !SCHARS (it->string))) | ||
| 5483 | push_it (it, NULL); | 5496 | push_it (it, NULL); |
| 5484 | 5497 | ||
| 5485 | /* Set up IT to deliver display elements from the first overlay | 5498 | /* Set up IT to deliver display elements from the first overlay |
| @@ -7390,7 +7403,7 @@ next_element_from_string (struct it *it) | |||
| 7390 | if (it->current.overlay_string_index >= 0) | 7403 | if (it->current.overlay_string_index >= 0) |
| 7391 | { | 7404 | { |
| 7392 | /* Get the next character from an overlay string. In overlay | 7405 | /* Get the next character from an overlay string. In overlay |
| 7393 | strings, There is no field width or padding with spaces to | 7406 | strings, there is no field width or padding with spaces to |
| 7394 | do. */ | 7407 | do. */ |
| 7395 | if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string)) | 7408 | if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string)) |
| 7396 | { | 7409 | { |
| @@ -15650,7 +15663,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15650 | accessible region of the buffer. This can happen when we | 15663 | accessible region of the buffer. This can happen when we |
| 15651 | have just switched to a different buffer and/or changed | 15664 | have just switched to a different buffer and/or changed |
| 15652 | its restriction. In that case, startp is initialized to | 15665 | its restriction. In that case, startp is initialized to |
| 15653 | the character position 1 (BEG) because we did not yet | 15666 | the character position 1 (BEGV) because we did not yet |
| 15654 | have chance to display the buffer even once. */ | 15667 | have chance to display the buffer even once. */ |
| 15655 | && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV) | 15668 | && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV) |
| 15656 | { | 15669 | { |
| @@ -15659,7 +15672,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15659 | 15672 | ||
| 15660 | SAVE_IT (it1, it, it1data); | 15673 | SAVE_IT (it1, it, it1data); |
| 15661 | start_display (&it1, w, startp); | 15674 | start_display (&it1, w, startp); |
| 15662 | move_it_vertically (&it1, margin); | 15675 | move_it_vertically (&it1, margin * FRAME_LINE_HEIGHT (f)); |
| 15663 | margin_pos = IT_CHARPOS (it1); | 15676 | margin_pos = IT_CHARPOS (it1); |
| 15664 | RESTORE_IT (&it, &it, it1data); | 15677 | RESTORE_IT (&it, &it, it1data); |
| 15665 | } | 15678 | } |
| @@ -16384,7 +16397,10 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16384 | ++first_row_to_display) | 16397 | ++first_row_to_display) |
| 16385 | { | 16398 | { |
| 16386 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) | 16399 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) |
| 16387 | && PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)) | 16400 | && (PT < MATRIX_ROW_END_CHARPOS (first_row_to_display) |
| 16401 | || (PT == MATRIX_ROW_END_CHARPOS (first_row_to_display) | ||
| 16402 | && first_row_to_display->ends_at_zv_p | ||
| 16403 | && pt_row == NULL))) | ||
| 16388 | pt_row = first_row_to_display; | 16404 | pt_row = first_row_to_display; |
| 16389 | } | 16405 | } |
| 16390 | 16406 | ||
| @@ -16476,7 +16492,9 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16476 | if (pt_row) | 16492 | if (pt_row) |
| 16477 | { | 16493 | { |
| 16478 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); | 16494 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); |
| 16479 | row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row); | 16495 | row < bottom_row |
| 16496 | && PT >= MATRIX_ROW_END_CHARPOS (row) | ||
| 16497 | && !row->ends_at_zv_p; | ||
| 16480 | row++) | 16498 | row++) |
| 16481 | { | 16499 | { |
| 16482 | w->cursor.vpos++; | 16500 | w->cursor.vpos++; |
diff --git a/src/xselect.c b/src/xselect.c index 49955f03fd0..173cf78bdaa 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2142,9 +2142,9 @@ DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, | |||
| 2142 | 0, 2, 0, | 2142 | 0, 2, 0, |
| 2143 | doc: /* Whether there is an owner for the given X selection. | 2143 | doc: /* Whether there is an owner for the given X selection. |
| 2144 | SELECTION should be the name of the selection in question, typically | 2144 | SELECTION should be the name of the selection in question, typically |
| 2145 | one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects | 2145 | one of the symbols `PRIMARY', `SECONDARY', `CLIPBOARD', or |
| 2146 | these literal upper-case names.) The symbol nil is the same as | 2146 | `CLIPBOARD_MANAGER' (X expects these literal upper-case names.) The |
| 2147 | `PRIMARY', and t is the same as `SECONDARY'. | 2147 | symbol nil is the same as `PRIMARY', and t is the same as `SECONDARY'. |
| 2148 | 2148 | ||
| 2149 | TERMINAL should be a terminal object or a frame specifying the X | 2149 | TERMINAL should be a terminal object or a frame specifying the X |
| 2150 | server to query. If omitted or nil, that stands for the selected | 2150 | server to query. If omitted or nil, that stands for the selected |
| @@ -2273,8 +2273,14 @@ x_clipboard_manager_save_all (void) | |||
| 2273 | 2273 | ||
| 2274 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); | 2274 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); |
| 2275 | if (FRAME_LIVE_P (XFRAME (local_frame))) | 2275 | if (FRAME_LIVE_P (XFRAME (local_frame))) |
| 2276 | internal_condition_case_1 (x_clipboard_manager_save, local_frame, | 2276 | { |
| 2277 | Qt, x_clipboard_manager_error_2); | 2277 | Lisp_Object args[1]; |
| 2278 | args[0] = build_string ("Saving clipboard to X clipboard manager..."); | ||
| 2279 | Fmessage (1, args); | ||
| 2280 | |||
| 2281 | internal_condition_case_1 (x_clipboard_manager_save, local_frame, | ||
| 2282 | Qt, x_clipboard_manager_error_2); | ||
| 2283 | } | ||
| 2278 | } | 2284 | } |
| 2279 | } | 2285 | } |
| 2280 | 2286 | ||