summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in5
-rw-r--r--src/alloc.c13
-rw-r--r--src/buffer.c10
-rw-r--r--src/keyboard.c4
-rw-r--r--src/menu.c3
-rw-r--r--src/xdisp.c13
-rw-r--r--src/xwidget.c2
7 files changed, 37 insertions, 13 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 150575864da..5f72076dc45 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -505,6 +505,11 @@ $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \
$(lispsource)/international/ucs-normalize.elc: | \
$(lispsource)/international/charprop.el
+## ns-win.el loads ucs-normalize, so it also needs the above-mentioned
+## 2 uni-*.el files to exist.
+$(lispsource)/term/ns-win.elc: | \
+ $(lispsource)/international/charprop.el
+
lispintdir = ${lispsource}/international
${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE
${MAKE} -C ../admin/charsets $(notdir $@)
diff --git a/src/alloc.c b/src/alloc.c
index b40c1f387cb..f0e9f208ca3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1122,10 +1122,17 @@ lisp_free (void *block)
/* Use aligned_alloc if it or a simple substitute is available.
Address sanitization breaks aligned allocation, as of gcc 4.8.2 and
- clang 3.3 anyway. */
+ clang 3.3 anyway. Aligned allocation is incompatible with
+ unexmacosx.c, so don't use it on Darwin. */
-#if ! ADDRESS_SANITIZER
-# if defined HYBRID_MALLOC
+#if ! ADDRESS_SANITIZER && !defined DARWIN_OS
+# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC
+# define USE_ALIGNED_ALLOC 1
+# ifndef HAVE_ALIGNED_ALLOC
+/* Defined in gmalloc.c. */
+void *aligned_alloc (size_t, size_t);
+# endif
+# elif defined HYBRID_MALLOC
# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
# define USE_ALIGNED_ALLOC 1
# endif
diff --git a/src/buffer.c b/src/buffer.c
index 3e410670c54..98b61c350e2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2145,16 +2145,16 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
doc: /* Signal a `buffer-read-only' error if the current buffer is read-only.
If the text under POSITION (which defaults to point) has the
`inhibit-read-only' text property set, the error will not be raised. */)
- (Lisp_Object pos)
+ (Lisp_Object position)
{
- if (NILP (pos))
- XSETFASTINT (pos, PT);
+ if (NILP (position))
+ XSETFASTINT (position, PT);
else
- CHECK_NUMBER (pos);
+ CHECK_NUMBER (position);
if (!NILP (BVAR (current_buffer, read_only))
&& NILP (Vinhibit_read_only)
- && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil)))
+ && NILP (Fget_text_property (position, Qinhibit_read_only, Qnil)))
xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
return Qnil;
}
diff --git a/src/keyboard.c b/src/keyboard.c
index 7e95ad7ad16..baca4b56fb5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -10304,7 +10304,7 @@ handle_interrupt (bool in_signal_handler)
{
write_stdout ("Auto-save? (y or n) ");
c = read_stdin ();
- if ((c & 040) == 'Y')
+ if (c == 'y' || c == 'Y')
{
Fdo_auto_save (Qt, Qnil);
#ifdef MSDOS
@@ -10336,7 +10336,7 @@ handle_interrupt (bool in_signal_handler)
write_stdout ("Abort (and dump core)? (y or n) ");
#endif
c = read_stdin ();
- if ((c & ~040) == 'Y')
+ if (c == 'y' || c == 'Y')
emacs_abort ();
while (c != '\n')
c = read_stdin ();
diff --git a/src/menu.c b/src/menu.c
index caae228a259..cbddef35754 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1236,6 +1236,9 @@ no quit occurs and `x-popup-menu' returns nil. */)
{
/* Use the mouse's current position. */
struct frame *new_f = SELECTED_FRAME ();
+
+ XSETFASTINT (x, 0);
+ XSETFASTINT (y, 0);
#ifdef HAVE_X_WINDOWS
if (FRAME_X_P (new_f))
{
diff --git a/src/xdisp.c b/src/xdisp.c
index 78fddd60fc0..8f1e98d99ef 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7234,14 +7234,23 @@ get_next_display_element (struct it *it)
buffer position is stored in the 'position'
member of the iteration stack slot below the
current one, see handle_single_display_spec. By
- contrast, it->current.pos was is not yet updated
+ contrast, it->current.pos was not yet updated
to point to that buffer position; that will
happen in pop_it, after we finish displaying the
current string. Note that we already checked
above that it->sp is positive, so subtracting one
from it is safe. */
if (it->from_disp_prop_p)
- pos = (it->stack + it->sp - 1)->position;
+ {
+ int stackp = it->sp - 1;
+
+ /* Find the stack level with data from buffer. */
+ while (stackp >= 0
+ && STRINGP ((it->stack + stackp)->string))
+ stackp--;
+ eassert (stackp >= 0);
+ pos = (it->stack + stackp)->position;
+ }
else
INC_TEXT_POS (pos, it->multibyte_p);
diff --git a/src/xwidget.c b/src/xwidget.c
index 8745416f3db..f436e95d686 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -320,7 +320,7 @@ xwidget_show_view (struct xwidget_view *xv)
xv->y + xv->clip_top);
}
-/* Hide an xvidget view. */
+/* Hide an xwidget view. */
static void
xwidget_hide_view (struct xwidget_view *xv)
{