# than to expect to find it in ncurses.
# Also we need tputs and friends to be able to build at all.
have_tputs_et_al=true
+# Maybe curses should be tried earlier?
+# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
$as_echo_n "checking for library containing tputs... " >&6; }
if test "${ac_cv_search_tputs+set}" = set; then :
return 0;
}
_ACEOF
-for ac_lib in '' ncurses terminfo termcap; do
+for ac_lib in '' ncurses terminfo termcap curses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
fi
if test "$have_tputs_et_al" != true; then
- as_fn_error "I couldn't find termcap functions (tputs and friends).
-Maybe some development libraries/packages are missing? Try installing
-libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
+ as_fn_error "The required function \`tputs' was not found in any library.
+These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
+Please try installing whichever of these libraries is most appropriate
+for your system, together with its header files.
+For example, a libncurses-dev(el) or similar package." "$LINENO" 5
fi
# Must define this when any termcap library is found.
as Arabic, Farsi, or Hebrew, is displayed in the correct visual order
as expected by users of those scripts. This display reordering is a
"Full bidirectionality" class implementation of the Unicode
-Bidirectional Algorithm. Buffers RTL text should look exactly the
-same as before.
+Bidirectional Algorithm. Buffers with no RTL text should look exactly
+the same as before.
For more information, see the node "Bidirectional Editing" in the
Emacs Manual.
+2011-10-13 Eli Zaretskii <eliz@gnu.org>
+
+ * simple.el (what-cursor-position): Fix the display of the
+ character info for LRE, LRO, RLE, and RLO characters by appending
+ an invisible PDF.
+
+2011-10-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/timer.el (with-timeout): Make sure we cancel the timer
+ even in case of error; add debug spec; simplify data flow.
+ (with-timeout-handler): Remove.
+
2011-10-12 Michael Albinus <michael.albinus@gmx.de>
Fix Bug#6019, Bug#9315.
(timer-activate-when-idle timer t)
timer))
\f
-(defun with-timeout-handler (tag)
- "This is the timer function used for the timer made by `with-timeout'."
- (throw tag 'timeout))
-
(defvar with-timeout-timers nil
"List of all timers used by currently pending `with-timeout' calls.")
if the program loops without waiting in any way, the timeout will not
be detected.
\n(fn (SECONDS TIMEOUT-FORMS...) BODY)"
- (declare (indent 1))
+ (declare (indent 1) (debug ((form body) body)))
(let ((seconds (car list))
- (timeout-forms (cdr list)))
- `(let ((with-timeout-tag (cons nil nil))
- with-timeout-value with-timeout-timer
- (with-timeout-timers with-timeout-timers))
- (if (catch with-timeout-tag
- (progn
- (setq with-timeout-timer
- (run-with-timer ,seconds nil
- 'with-timeout-handler
- with-timeout-tag))
- (push with-timeout-timer with-timeout-timers)
- (setq with-timeout-value (progn . ,body))
- nil))
- (progn . ,timeout-forms)
- (cancel-timer with-timeout-timer)
- with-timeout-value))))
+ (timeout-forms (cdr list))
+ (timeout (make-symbol "timeout")))
+ `(let ((-with-timeout-value-
+ (catch ',timeout
+ (let* ((-with-timeout-timer-
+ (run-with-timer ,seconds nil
+ (lambda () (throw ',timeout ',timeout))))
+ (with-timeout-timers
+ (cons -with-timeout-timer- with-timeout-timers)))
+ (unwind-protect
+ ,@body
+ (cancel-timer -with-timeout-timer-))))))
+ ;; It is tempting to avoid the `if' altogether and instead run
+ ;; timeout-forms in the timer, just before throwing `timeout'.
+ ;; But that would mean that timeout-forms are run in the deeper
+ ;; dynamic context of the timer, with inhibit-quit set etc...
+ (if (eq -with-timeout-value- ',timeout)
+ (progn ,@timeout-forms)
+ -with-timeout-value-))))
(defun with-timeout-suspend ()
"Stop the clock for `with-timeout'. Used by debuggers.
in *Help* buffer. See also the command `describe-char'."
(interactive "P")
(let* ((char (following-char))
+ ;; If the character is one of LRE, LRO, RLE, RLO, it will
+ ;; start a directional embedding, which could completely
+ ;; disrupt the rest of the line (e.g., RLO will display the
+ ;; rest of the line right-to-left). So we put an invisible
+ ;; PDF character after these characters, to end the
+ ;; embedding, which eliminates any effects on the rest of the
+ ;; line.
+ (pdf (if (memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
+ (propertize (string ?\x202c) 'invisible t)
+ ""))
(beg (point-min))
(end (point-max))
(pos (point))
;; We show the detailed information about CHAR.
(describe-char (point)))
(if (or (/= beg 1) (/= end (1+ total)))
- (message "Char: %s %s point=%d of %d (%d%%) <%d-%d> column=%d%s"
+ (message "Char: %s%s %s point=%d of %d (%d%%) <%d-%d> column=%d%s"
(if (< char 256)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
- encoding-msg pos total percent beg end col hscroll)
- (message "Char: %s %s point=%d of %d (%d%%) column=%d%s"
+ pdf encoding-msg pos total percent beg end col hscroll)
+ (message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s"
(if enable-multibyte-characters
(if (< char 128)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
(single-key-description char))
- encoding-msg pos total percent col hscroll))))))
+ pdf encoding-msg pos total percent col hscroll))))))
\f
;; Initialize read-expression-map. It is defined at C level.
(let ((m (make-sparse-keymap)))
+2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with
+ xfree to avoid crash when xmalloc overrun checking is enabled.
+ * lwlib-Xm.c (free_destroyed_instance, xm_update_one_value): Ditto.
+ * lwlib-utils.c (XtApplyToWidgets): Ditto.
+ * lwlib.c (safe_free_str, free_widget_value, free_widget_value_tree)
+ (free_widget_info, free_widget_instance, name_to_widget): Ditto.
+ * xlwmenu.c (openXftFont): Ditto.
+
2011-06-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* Makefile.in (ALL_CFLAGS): Add -I../lib for generated header files
}
fn = XftFontOpenName (XtDisplay (widget), screen, fname);
- if (fname != name) free (fname);
+ if (fname != name) xfree (fname);
return fn;
}
if (instance->xft_data[0].xft_font)
XftFontClose (XtDisplay (instance->widget),
instance->xft_data[0].xft_font);
- free (instance->xft_data);
+ xfree (instance->xft_data);
}
#endif
if (XtIsSubclass (instance->widget, dialogWidgetClass))
static void
free_destroyed_instance (destroyed_instance* instance)
{
- free (instance->name);
- free (instance->type);
- free (instance);
+ xfree (instance->name);
+ xfree (instance->type);
+ xfree (instance);
}
\f/* motif utility functions */
}
else if (class == xmTextWidgetClass)
{
- free (val->value);
+ xfree (val->value);
val->value = XmTextGetString (widget);
val->edited = True;
}
else if (class == xmTextFieldWidgetClass)
{
- free (val->value);
+ xfree (val->value);
val->value = XmTextFieldGetString (widget);
val->edited = True;
}
XtVaGetValues (toggle, XmNset, &set, NULL);
if (set)
{
- free (val->value);
+ xfree (val->value);
val->value = safe_strdup (XtName (toggle));
}
}
XtApplyToWidgets (kids [i], proc, arg);
proc (kids [i], arg);
}
- free (kids);
+ xfree (kids);
}
}
static void
safe_free_str (char *s)
{
- free (s);
+ xfree (s);
}
static widget_value *widget_value_free_list = 0;
{
/* When the number of already allocated cells is too big,
We free it. */
- free (wv);
+ xfree (wv);
malloc_cpt--;
}
else
if (!wv)
return;
- free (wv->name);
- free (wv->value);
- free (wv->key);
+ xfree (wv->name);
+ xfree (wv->value);
+ xfree (wv->key);
wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
safe_free_str (info->name);
free_widget_value_tree (info->val);
memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
- free (info);
+ xfree (info);
}
static void
free_widget_instance (widget_instance *instance)
{
memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
- free (instance);
+ xfree (instance);
}
static widget_info *
widget = XtNameToWidget (instance->widget, real_name);
- free (real_name);
+ xfree (real_name);
}
return widget;
}
}
}
- if (fname != mw->menu.fontName) free (fname);
+ if (fname != mw->menu.fontName) xfree (fname);
return mw->menu.xft_font != 0;
}
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * editfns.c (Fset_time_zone_rule): Replace free with xfree to
+ avoid crash when xmalloc overrun checking is enabled.
+
+2011-10-13 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
+ itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
+ cursor motion with <left> and <right> arrow keys.
+
+ * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
+ some callers set that themselves.
+
2011-10-12 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (find_row_edges): Handle the case where ROW comes from a
bidi_it->nchars = -1; /* to be computed in bidi_resolve_explicit_1 */
bidi_it->first_elt = 1;
bidi_set_paragraph_end (bidi_it);
- bidi_it->paragraph_dir = NEUTRAL_DIR;
bidi_it->new_paragraph = 1;
bidi_it->separator_limit = -1;
bidi_it->type = NEUTRAL_B;
}
set_time_zone_rule (tzstring);
- free (environbuf);
+ xfree (environbuf);
environbuf = environ;
return Qnil;
bytepos--;
}
bidi_init_it (pos, bytepos, FRAME_WINDOW_P (SELECTED_FRAME ()), &itb);
+ itb.paragraph_dir = NEUTRAL_DIR;
itb.string.s = NULL;
itb.string.lstring = Qnil;
itb.string.bufpos = 0;