# Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then
SAVE_CPPFLAGS="$CPPFLAGS"
+ if test -z "$xcsdkdir" -a -n "$XCRUN" -a ! -d /usr/include; then
+ dnl /usr/include is not found. Try Xcode SDK dir if it is sane.
+ xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null`
+ case $xcsdkdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ xcsdkdir="" ;;
+ esac
+ fi
CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
AC_CHECK_HEADER(libxml/HTMLparser.h,
[AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
;;
- dnl FIXME? Maybe use same as freebsd - see bug#12040.
- darwin )
- AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)])
- dnl Not used, because PTY_ITERATION is defined.
- AC_DEFINE(FIRST_PTY_LETTER, ['p'])
- dnl Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8.
- dnl But we don't have to block SIGCHLD because it is blocked in the
- dnl implementation of grantpt.
- AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (false)])
- AC_DEFINE(PTY_NAME_SPRINTF, [])
- AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
- ;;
-
gnu | openbsd )
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
- gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | nacl )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl )
dnl if HAVE_GRANTPT
if test "x$ac_cv_func_grantpt" = xyes; then
AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
Prettify Symbols mode is a buffer-local minor mode that replaces
certain strings with more attractive versions for display purposes.
For example, in Emacs Lisp mode, it replaces the string @samp{lambda}
-with the Greek lambda character @samp{λ}. You may wish to use this in
-non-programming modes as well. You can customize the mode by adding
-more entries to @code{prettify-symbols-alist}. More elaborate
-customization is available via customizing
-@code{prettify-symbols-compose-predicate} if its default value
-@code{prettify-symbols-default-compose-p} is not appropriate. There
-is also a global version, @code{global-prettify-symbols-mode}, which
-enables the mode in all buffers that support it.
+with the Greek lambda character @samp{λ}. In a @TeX{} buffer, it will
+replace @samp{\alpha} @dots{} @samp{\omega} and other math macros with
+their Unicode characters. You may wish to use this in non-programming
+modes as well. You can customize the mode by adding more entries to
+@code{prettify-symbols-alist}. More elaborate customization is
+available via customizing @code{prettify-symbols-compose-predicate} if
+its default value @code{prettify-symbols-default-compose-p} is not
+appropriate. There is also a global version,
+@code{global-prettify-symbols-mode}, which enables the mode in all
+buffers that support it.
The symbol at point can be shown in its original form. This is
controlled by the variable @code{prettify-symbols-unprettify-at-point}:
@vindex latex-run-command
@vindex tex-dvi-view-command
@vindex tex-dvi-print-command
+@vindex tex-print-file-extension
The buffer's @TeX{} variant determines what shell command @kbd{C-c
C-b} actually runs. In Plain @TeX{} mode, it is specified by the
variable @code{tex-run-command}, which defaults to @code{"tex"}. In
to view the @file{.dvi} output is determined by the variable
@code{tex-dvi-view-command}, regardless of the @TeX{} variant. The
shell command that @kbd{C-c C-p} runs to print the output is
-determined by the variable @code{tex-dvi-print-command}.
+determined by the variable @code{tex-dvi-print-command}. The variable
+@code{tex-print-file-extension} can be set to the required file
+extension for viewing and printing @TeX{}-compiled files. For
+example, you can set it to @file{.pdf}, and update
+@code{tex-dvi-view-command} and @code{tex-dvi-print-command}
+accordingly.
Normally, Emacs automatically appends the output file name to the
shell command strings described in the preceding paragraph. For
effect after the change---just like the value returned by
@code{window-hscroll} (below).
+Note that text in paragraphs whose base direction is right-to-left
+(@pxref{Bidirectional Display}) moves in the opposite direction: e.g.,
+it moves to the right when @code{scroll-left} is invoked with a
+positive value of @var{count}.
+
Once you scroll a window as far right as it can go, back to its normal
position where the total leftward scrolling is zero, attempts to scroll
any farther right have no effect.
@defun window-hscroll &optional window
This function returns the total leftward horizontal scrolling of
@var{window}---the number of columns by which the text in @var{window}
-is scrolled left past the left margin. The default for
-@var{window} is the selected window.
+is scrolled left past the left margin. (In right-to-left paragraphs,
+the value is the total amount of the rightward scrolling instead.)
+The default for @var{window} is the selected window.
The return value is never negative. It is zero when no horizontal
scrolling has been done in @var{window} (which is usually the case).
@defun set-window-hscroll window columns
This function sets horizontal scrolling of @var{window}. The value of
@var{columns} specifies the amount of scrolling, in terms of columns
-from the left margin. The argument @var{columns} should be zero or
-positive; if not, it is taken as zero. Fractional values of
-@var{columns} are not supported at present.
+from the left margin (right margin in right-to-left paragraphs). The
+argument @var{columns} should be zero or positive; if not, it is taken
+as zero. Fractional values of @var{columns} are not supported at
+present.
Note that @code{set-window-hscroll} may appear not to work if you test
it by evaluating a call with @kbd{M-:} in a simple way. What happens
`show-paren-when-point-in-periphery'.
** Lisp mode
+
+---
*** Strings after `:documentation' are highlighted as docstrings.
+This enhances Lisp mode fontification to handle documentation of the
+form `(:documentation "the doc string")' used in Common Lisp code for
+CLOS class and slot documentation.
** Rectangle editing
** TeX mode
++++
*** New custom variable `tex-print-file-extension' to help users who
use PDF instead of DVI.
++++
*** TeX mode now supports Prettify Symbols mode. When enabling
`prettify-symbols-mode' in a tex-mode buffer, \alpha ... \omega, and
many other math macros are displayed using unicode characters.
"Default expressions to highlight in Lisp modes.")
(defun lisp-string-in-doc-position-p (listbeg startpos)
+ "Return true if a doc string may occur at STARTPOS inside a list.
+LISTBEG is the position of the start of the innermost list
+containing STARTPOS."
(let* ((firstsym (and listbeg
(save-excursion
(goto-char listbeg)
(= (point) startpos))))))
(defun lisp-string-after-doc-keyword-p (listbeg startpos)
+ "Return true if `:documentation' symbol ends at STARTPOS inside a list.
+LISTBEG is the position of the start of the innermost list
+containing STARTPOS."
(and listbeg ; We are inside a Lisp form.
(save-excursion
(goto-char startpos)
(looking-at ":documentation\\_>"))))))
(defun lisp-font-lock-syntactic-face-function (state)
+ "Return syntactic face function for the position represented by STATE.
+STATE is a `parse-partial-sexp' state, and the returned function is the
+Lisp font lock syntactic face function."
(if (nth 3 state)
;; This might be a (doc)string or a |...| symbol.
(let ((startpos (nth 8 state)))
(defvar dos-codepage)
(autoload 'widget-value "wid-edit")
-(defvar mac-system-coding-system)
-
;;; MULE related key bindings and menus.
(defvar mule-keymap
(forward-char (length (match-string-no-properties 0)))
(point))))
(end (point))
- (prompt-boundaries (python-util-comint-last-prompt))
+ (prompt-boundaries
+ (with-current-buffer (process-buffer process)
+ (python-util-comint-last-prompt)))
(prompt
(with-current-buffer (process-buffer process)
(when prompt-boundaries
hits)))
(unwind-protect
(cl-mapcan (lambda (hit) (xref--collect-matches hit regexp))
- hits)
+ (nreverse hits))
;; TODO: Same as above.
(mapc #'kill-buffer
(cl-set-difference (buffer-list) orig-buffers)))))
{
nbytes = XINT (length);
val = make_uninit_string (nbytes);
- memset (SDATA (val), c, nbytes);
- SDATA (val)[nbytes] = 0;
+ if (nbytes)
+ {
+ memset (SDATA (val), c, nbytes);
+ SDATA (val)[nbytes] = 0;
+ }
}
else
{
memcpy (p, beg, len);
}
}
- *p = 0;
+ if (nbytes)
+ *p = 0;
}
return val;
if (min ((nbytes_max - header_size) / word_size, MOST_POSITIVE_FIXNUM) < len)
memory_full (SIZE_MAX);
v = allocate_vectorlike (len);
- v->header.size = len;
+ if (len)
+ v->header.size = len;
return v;
}
do { \
Lisp_Object tmp = XCAR (x); \
CHECK_CHARACTER (tmp); \
- XSETCAR ((x), tmp); \
} while (false)
#define CHECK_CHARACTER_CDR(x) \
do { \
Lisp_Object tmp = XCDR (x); \
CHECK_CHARACTER (tmp); \
- XSETCDR ((x), tmp); \
} while (false)
/* Nonzero iff C is a character of code less than 0x100. */
&& it.method == GET_FROM_BUFFER
&& it.c == '\n')
it_overshoot_count = 1;
+ else if (it_overshoot_count == 1 && it.vpos == 0
+ && it.current_x < it.last_visible_x)
+ {
+ /* If we came to the same screen line as the one where
+ we started, we didn't overshoot the line, and won't
+ need to backtrack after all. This happens, for
+ example, when PT is in the middle of a composition. */
+ it_overshoot_count = 0;
+ }
else if (disp_string_at_start_p && it.vpos > 0)
{
/* This is the case of a display string that spans
/* List of user signals. */
static struct user_signal_info *user_signals = NULL;
+/* Function called when handling user signals. */
+void (*handle_user_signal_hook) (int);
+
void
add_user_signal (int sig, const char *name)
{
}
p->npending++;
+ if (handle_user_signal_hook)
+ (*handle_user_signal_hook) (sig);
#ifdef USABLE_SIGIO
if (interrupt_input)
handle_input_available_signal (sig);
#define EVENT_HEAD_KIND(event_head) \
(Fget ((event_head), Qevent_kind))
+extern void (*handle_user_signal_hook) (int);
+
/* True while doing kbd input. */
extern bool waiting_for_input;
/* Mark STR as a unibyte string. */
#define STRING_SET_UNIBYTE(STR) \
do { \
- if (EQ (STR, empty_multibyte_string)) \
+ if (XSTRING (STR)->size == 0) \
(STR) = empty_unibyte_string; \
else \
XSTRING (STR)->size_byte = -1; \
ASCII characters in advance. */
#define STRING_SET_MULTIBYTE(STR) \
do { \
- if (EQ (STR, empty_unibyte_string)) \
+ if (XSTRING (STR)->size == 0) \
(STR) = empty_multibyte_string; \
else \
XSTRING (STR)->size_byte = XSTRING (STR)->size; \
if (NILP (current_encoding))
{
- char *cpname = SDATA (SYMBOL_NAME (current_encoding));
+ char *cpname = SSDATA (SYMBOL_NAME (current_encoding));
char *cp = NULL, *end;
int cpnum;
(From msdos.c...probably should figure out a way to share it,
although this code isn't going to ever change.) */
static int
-crlf_to_lf (register int n, register unsigned char *buf)
+crlf_to_lf (register int n, register char *buf)
{
- unsigned char *np = buf;
- unsigned char *startp = buf;
- unsigned char *endp = buf + n;
+ unsigned char *np = (unsigned char *)buf;
+ unsigned char *startp = np;
+ char *endp = buf + n;
if (n == 0)
return n;
{
char shortname[MAX_PATH];
- if (w32_get_short_filename (SDATA (filename), shortname, MAX_PATH))
+ if (w32_get_short_filename (SSDATA (filename), shortname, MAX_PATH))
{
dostounix_filename (shortname);
encoded_filename = build_string (shortname);
though the socket wasn't really a kernel handle,
because a real handle has the same value. So
test whether the new handle really is a socket. */
- long nonblocking = 0;
+ unsigned long nonblocking = 0;
if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0)
{
pfn_closesocket (s);
int nbytes = count;
SAFE_NALLOCA (tmpbuf, 2, count);
- dst = tmpbuf;
+ dst = (unsigned char *)tmpbuf;
while (1)
{
if (fd < 0)
{
Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
- char *init_file_name = SDATA (init_file);
- char *load_path = SDATA (load_path_print);
+ char *init_file_name = SSDATA (init_file);
+ char *load_path = SSDATA (load_path_print);
char *buffer = alloca (1024
+ strlen (init_file_name)
+ strlen (load_path));