Commit 14beddf4 authored by Chong Yidong's avatar Chong Yidong

Merge changes from emacs-23 branch

parents 2a4466ca 113ef437
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* configure.in: Test existence of xaw3d library, not just the
header (Bug#7642).
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and
$(BLD)/time_r.$(O).
($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and
$(EMACS_ROOT)/src/m/intel386.h.
($(BLD)/strftime.$(O)):
($(BLD)/strftime.$(O)):
($(BLD)/time_r.$(O)): Define prerequisites.
2011-01-31 Paul Eggert <eggert@cs.ucla.edu>
......
......@@ -10595,10 +10595,51 @@ main ()
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXaw3d $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char XawScrollbarSetThumb ();
int
main ()
{
return XawScrollbarSetThumb ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
else
ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
emacs_cv_xaw3d=yes
else
emacs_cv_xaw3d=no
fi
else
emacs_cv_xaw3d=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
......
......@@ -2006,7 +2006,8 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
#include <X11/Intrinsic.h>
#include <X11/Xaw3d/Simple.h>],
[],
emacs_cv_xaw3d=yes,
[AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb,
emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)],
emacs_cv_xaw3d=no)])
else
emacs_cv_xaw3d=no
......
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* search.texi (Regexps): Copyedits. Mention character classes
(Bug#7809).
* files.texi (File Aliases): Restore explanatory text from Eli
Zaretskii, accidentally removed in 2011-01-08 commit.
2011-01-29 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (MAKEINFO): Remove options, leave only program name.
......
......@@ -1183,26 +1183,23 @@ implies the effect of @code{find-file-existing-other-name}.
@cindex directory name abbreviation
@vindex directory-abbrev-alist
Sometimes, a directory is ordinarily accessed through a symbolic
link, and you may want Emacs to preferentially display its ``linked''
name instead of its truename. To do this, customize the variable
@code{directory-abbrev-alist}. Each element in this list should have
the form @code{(@var{from} . @var{to})}, which says to replace
@var{from} with @var{to} when it appears in a directory name. For
this feature to work properly, @var{from} and @var{to} should point to
the same file. The @var{from} string is actually a regular expression
(@pxref{Regexps}); it should always start with @samp{\`}, to avoid
matching to an incorrect part of the original directory name. The
@var{to} string should be an ordinary absolute directory name. Do not
use @samp{~} to stand for a home directory in the @var{to} string;
Emacs performs these substitutions separately.
Here's an example, from a system on which file system
@file{/home/fsf} and so on are normally accessed through symbolic
links named @file{/fsf} and so on.
link, and you may want Emacs to preferentially show its ``linked''
name. To do this, customize @code{directory-abbrev-alist}. Each
element in this list should have the form @code{(@var{from}
. @var{to})}, which means to replace @var{from} with @var{to} whenever
@var{from} appears in a directory name. The @var{from} string is a
regular expression (@pxref{Regexps}). It is matched against directory
names anchored at the first character, and should start with @samp{\`}
(to support directory names with embedded newlines, which would defeat
@samp{^}). The @var{to} string should be an ordinary absolute
directory name pointing to the same directory. Do not use @samp{~} to
stand for a home directory in the @var{to} string; Emacs performs
these substitutions separately. Here's an example, from a system on
which @file{/home/fsf} is normally accessed through a symbolic link
named @file{/fsf}:
@example
(("\\`/home/fsf" . "/fsf")
("\\`/home/gd" . "/gd"))
(("\\`/home/fsf" . "/fsf"))
@end example
@node Directories
......
......@@ -545,21 +545,20 @@ Search}.
@cindex syntax of regexps
This manual describes regular expression features that users
typically want to use. There are additional features that are
mainly used in Lisp programs; see @ref{Regular Expressions,,,
elisp, The Emacs Lisp Reference Manual}.
typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp
Reference Manual}, for additional features used mainly in Lisp
programs.
Regular expressions have a syntax in which a few characters are
special constructs and the rest are @dfn{ordinary}. An ordinary
character is a simple regular expression which matches that same
character and nothing else. The special characters are @samp{$},
@samp{^}, @samp{.}, @samp{*}, @samp{+}, @samp{?}, @samp{[}, and
@samp{\}. The character @samp{]} is special if it ends a character
alternative (see later). The character @samp{-} is special inside a
character alternative. Any other character appearing in a regular
expression is ordinary, unless a @samp{\} precedes it. (When you use
regular expressions in a Lisp program, each @samp{\} must be doubled,
see the example near the end of this section.)
character matches that same character and nothing else. The special
characters are @samp{$^.*+?[\}. The character @samp{]} is special if
it ends a character alternative (see later). The character @samp{-}
is special inside a character alternative. Any other character
appearing in a regular expression is ordinary, unless a @samp{\}
precedes it. (When you use regular expressions in a Lisp program,
each @samp{\} must be doubled, see the example near the end of this
section.)
For example, @samp{f} is not a special character, so it is ordinary, and
therefore @samp{f} is a regular expression that matches the string
......@@ -569,28 +568,27 @@ only @samp{o}. (When case distinctions are being ignored, these regexps
also match @samp{F} and @samp{O}, but we consider this a generalization
of ``the same string,'' rather than an exception.)
Any two regular expressions @var{a} and @var{b} can be concatenated. The
result is a regular expression which matches a string if @var{a} matches
some amount of the beginning of that string and @var{b} matches the rest of
the string.@refill
As a simple example, we can concatenate the regular expressions @samp{f}
and @samp{o} to get the regular expression @samp{fo}, which matches only
the string @samp{fo}. Still trivial. To do something nontrivial, you
need to use one of the special characters. Here is a list of them.
Any two regular expressions @var{a} and @var{b} can be concatenated.
The result is a regular expression which matches a string if @var{a}
matches some amount of the beginning of that string and @var{b}
matches the rest of the string. For example, concatenating the
regular expressions @samp{f} and @samp{o} gives the regular expression
@samp{fo}, which matches only the string @samp{fo}. Still trivial.
To do something nontrivial, you need to use one of the special
characters. Here is a list of them.
@table @asis
@item @kbd{.}@: @r{(Period)}
is a special character that matches any single character except a newline.
Using concatenation, we can make regular expressions like @samp{a.b}, which
matches any three-character string that begins with @samp{a} and ends with
@samp{b}.@refill
is a special character that matches any single character except a
newline. For example, the regular expressions @samp{a.b} matches any
three-character string that begins with @samp{a} and ends with
@samp{b}.
@item @kbd{*}
is not a construct by itself; it is a postfix operator that means to
match the preceding regular expression repetitively as many times as
possible. Thus, @samp{o*} matches any number of @samp{o}s (including no
@samp{o}s).
match the preceding regular expression repetitively any number of
times, as many times as possible. Thus, @samp{o*} matches any number
of @samp{o}s, including no @samp{o}s.
@samp{*} always applies to the @emph{smallest} possible preceding
expression. Thus, @samp{fo*} has a repeating @samp{o}, not a repeating
......@@ -609,22 +607,21 @@ With this choice, the rest of the regexp matches successfully.@refill
@item @kbd{+}
is a postfix operator, similar to @samp{*} except that it must match
the preceding expression at least once. So, for example, @samp{ca+r}
matches the strings @samp{car} and @samp{caaaar} but not the string
@samp{cr}, whereas @samp{ca*r} matches all three strings.
the preceding expression at least once. Thus, @samp{ca+r} matches the
strings @samp{car} and @samp{caaaar} but not the string @samp{cr},
whereas @samp{ca*r} matches all three strings.
@item @kbd{?}
is a postfix operator, similar to @samp{*} except that it can match the
preceding expression either once or not at all. For example,
@samp{ca?r} matches @samp{car} or @samp{cr}; nothing else.
is a postfix operator, similar to @samp{*} except that it can match
the preceding expression either once or not at all. Thus, @samp{ca?r}
matches @samp{car} or @samp{cr}, and nothing else.
@item @kbd{*?}, @kbd{+?}, @kbd{??}
@cindex non-greedy regexp matching
are non-greedy variants of the operators above. The normal operators
@samp{*}, @samp{+}, @samp{?} are @dfn{greedy} in that they match as
much as they can, as long as the overall regexp can still match. With
a following @samp{?}, they are non-greedy: they will match as little
as possible.
are non-@dfn{greedy} variants of the operators above. The normal
operators @samp{*}, @samp{+}, @samp{?} match as much as they can, as
long as the overall regexp can still match. With a following
@samp{?}, they will match as little as possible.
Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a}
and the string @samp{abbbb}; but if you try to match them both against
......@@ -640,29 +637,30 @@ a newline, it matches the whole string. Since it @emph{can} match
starting at the first @samp{a}, it does.
@item @kbd{\@{@var{n}\@}}
is a postfix operator that specifies repetition @var{n} times---that
is, the preceding regular expression must match exactly @var{n} times
in a row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx}
and nothing else.
is a postfix operator specifying @var{n} repetitions---that is, the
preceding regular expression must match exactly @var{n} times in a
row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} and
nothing else.
@item @kbd{\@{@var{n},@var{m}\@}}
is a postfix operator that specifies repetition between @var{n} and
@var{m} times---that is, the preceding regular expression must match
at least @var{n} times, but no more than @var{m} times. If @var{m} is
is a postfix operator specifying between @var{n} and @var{m}
repetitions---that is, the preceding regular expression must match at
least @var{n} times, but no more than @var{m} times. If @var{m} is
omitted, then there is no upper limit, but the preceding regular
expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is
equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to
@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}.
@item @kbd{[ @dots{} ]}
is a @dfn{character set}, which begins with @samp{[} and is terminated
by @samp{]}. In the simplest case, the characters between the two
brackets are what this set can match.
is a @dfn{character set}, beginning with @samp{[} and terminated by
@samp{]}.
Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and
@samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s
(including the empty string), from which it follows that @samp{c[ad]*r}
matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc.
In the simplest case, the characters between the two brackets are what
this set can match. Thus, @samp{[ad]} matches either one @samp{a} or
one @samp{d}, and @samp{[ad]*} matches any string composed of just
@samp{a}s and @samp{d}s (including the empty string). It follows that
@samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr},
@samp{caddaar}, etc.
You can also include character ranges in a character set, by writing the
starting and ending characters with a @samp{-} between them. Thus,
......@@ -671,9 +669,12 @@ intermixed freely with individual characters, as in @samp{[a-z$%.]},
which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or
period.
Note that the usual regexp special characters are not special inside a
character set. A completely different set of special characters exists
inside character sets: @samp{]}, @samp{-} and @samp{^}.
You can also include certain special @dfn{character classes} in a
character set. A @samp{[:} and balancing @samp{:]} enclose a
character class inside a character alternative. For instance,
@samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,,
elisp, The Emacs Lisp Reference Manual}, for a list of character
classes.
To include a @samp{]} in a character set, you must make it the first
character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To
......
2011-01-28 Chong Yidong <cyd@stupidchicken.com>
* vol1.texi (Top):
* vol2.texi (Top):
* elisp.texi (Top):
* display.texi (Display Property): Shorten the menu description of
the "Other Display Specs" node (Bug#7816).
* keymaps.texi (Defining Menus): Add "menu item" and "extended
menu item" concept index entries (Bug#7805).
2011-01-29 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (texinfodir): New variable.
......
......@@ -3657,9 +3657,8 @@ display specifications and what they mean.
* Replacing Specs:: Display specs that replace the text.
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Other Display Specs:: Displaying an image; adjusting the height,
spacing, and other properties of text.
* Display Margins:: Displaying text or images to the side of the main text.
@end menu
......
......@@ -1330,9 +1330,8 @@ The @code{display} Property
* Replacing Specs:: Display specs that replace the text.
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Other Display Specs:: Displaying an image; adjusting the height,
spacing, and other properties of text.
* Display Margins:: Displaying text or images to the side of
the main text.
......
......@@ -1972,6 +1972,7 @@ feature.
@cindex defining menus
@cindex menu prompt string
@cindex prompt string (of menu)
@cindex menu item
A keymap acts as a menu if it has an @dfn{overall prompt string},
which is a string that appears as an element of the keymap.
......@@ -2073,6 +2074,7 @@ of menus in advance. To force recalculation of the menu bar, call
@node Extended Menu Items
@subsubsection Extended Menu Items
@kindex menu-item
@cindex extended menu item
An extended-format menu item is a more flexible and also cleaner
alternative to the simple format. You define an event type with a
......
......@@ -1351,9 +1351,8 @@ The @code{display} Property
* Replacing Specs:: Display specs that replace the text.
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Other Display Specs:: Displaying an image; adjusting the height,
spacing, and other properties of text.
* Display Margins:: Displaying text or images to the side of
the main text.
......
......@@ -1350,9 +1350,8 @@ The @code{display} Property
* Replacing Specs:: Display specs that replace the text.
* Specified Space:: Displaying one space with a specified width.
* Pixel Specification:: Specifying space width or height in pixels.
* Other Display Specs:: Displaying an image; magnifying text; moving it
up or down on the page; adjusting the width
of spaces within text.
* Other Display Specs:: Displaying an image; adjusting the height,
spacing, and other properties of text.
* Display Margins:: Displaying text or images to the side of
the main text.
......
2011-01-31 Alan Mackenzie <acm@muc.de>
* progmodes/cc-cmds.el (c-forward-over-illiterals): Continue
parsing if we encounter a naked # (Bug#7595).
(c-beginning-of-statement): Avoid loop in locating the beginning
of a macro.
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* files.el (copy-directory): Fix arguments to recursive call.
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* files.el (copy-directory): If destination is an existing
directory, copy into a subdirectory there.
2011-01-31 Andreas Schwab <schwab@linux-m68k.org>
* emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list
files.
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* image-dired.el (image-dired-mouse-display-image): No-op if no
file is found (Bug#7817).
* mouse.el (mouse-menu-non-singleton): Doc fix (Bug#7801).
2011-01-31 Kenichi Handa <handa@m17n.org>
* international/quail.el (quail-keyboard-layout-alist): Remove
superfluous SPC for "pc105-uk" (bug#7927).
2011-01-31 Glenn Morris <rgm@gnu.org>
* msb.el (msb-menu-bar-update-buffers): Update for changed
argument handling of menu-bar-select-frame. (Bug#7902)
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* progmodes/cc-engine.el (c-forward-<>-arglist-recur): Set a limit
to the recursion depth (Bug#7722).
2011-01-31 Roy Liu <carsomyr@gmail.com> (tiny change)
* term/ns-win.el (ns-find-file): Expand ns-input-file with
command-line-default-directory (Bug#7872).
2011-01-31 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el (compilation--flush-directory-cache):
......
......@@ -115,7 +115,7 @@ See the documentation for `list-load-path-shadows' for further information."
;; FILE now contains the current file name, with no suffix.
(unless (or (member file files-seen-this-dir)
;; Ignore these files.
(member file '("subdirs")))
(member file '("subdirs" "leim-list")))
;; File has not been seen yet in this directory.
;; This test prevents us declaring that XXX.el shadows
;; XXX.elc (or vice-versa) when they are in the same directory.
......
2011-01-31 Antoine Levitt <antoine.levitt@gmail.com> (tiny change)
* erc-track.el (track): Don't reset erc-modified-channels-object
each time erc-track-mode is activated.
2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca>
* erc.el (erc-mode):
......
......@@ -648,7 +648,6 @@ module, otherwise the keybindings will not do anything useful."
(add-hook 'erc-send-completed-hook 'erc-user-is-active)
(add-hook 'erc-server-001-functions 'erc-user-is-active))
(erc-track-add-to-mode-line erc-track-position-in-mode-line)
(setq erc-modified-channels-object (erc-modified-channels-object nil))
(erc-update-mode-line)
(if (featurep 'xemacs)
(defadvice switch-to-buffer (after erc-update (&rest args) activate)
......
......@@ -4855,22 +4855,35 @@ this happens by default."
;; Compute target name.
(setq directory (directory-file-name (expand-file-name directory))
newname (directory-file-name (expand-file-name newname)))
(if (not (file-directory-p newname)) (make-directory newname parents))
(if (not (file-directory-p newname))
;; If NEWNAME is not an existing directory, create it; that
;; is where we will copy the files of DIRECTORY.
(make-directory newname parents)
;; If NEWNAME is an existing directory, we will copy into
;; NEWNAME/[DIRECTORY-BASENAME].
(setq newname (expand-file-name
(file-name-nondirectory
(directory-file-name directory))
newname))
(and (file-exists-p newname)
(not (file-directory-p newname))
(error "Cannot overwrite non-directory %s with a directory"
newname))
(make-directory newname t))
;; Copy recursively.
(mapc
(lambda (file)
(let ((target (expand-file-name
(file-name-nondirectory file) newname))
(attrs (file-attributes file)))
(cond ((file-directory-p file)
(copy-directory file target keep-time parents))
((stringp (car attrs)) ; Symbolic link
(make-symbolic-link (car attrs) target t))
(t
(copy-file file target t keep-time)))))
;; We do not want to copy "." and "..".
(directory-files directory 'full directory-files-no-dot-files-regexp))
(dolist (file
;; We do not want to copy "." and "..".
(directory-files directory 'full
directory-files-no-dot-files-regexp))
(if (file-directory-p file)
(copy-directory file newname keep-time parents)
(let ((target (expand-file-name (file-name-nondirectory file) newname))
(attrs (file-attributes file)))
(if (stringp (car attrs)) ; Symbolic link
(make-symbolic-link (car attrs) target t)
(copy-file file target t keep-time)))))
;; Set directory attributes.
(set-file-modes newname (file-modes directory))
......
......@@ -2194,15 +2194,15 @@ matching tag will be marked in the dired buffer."
Track this in associated dired buffer if `image-dired-track-movement' is
non-nil."
(interactive "e")
(let (file)
(mouse-set-point event)
(goto-char (posn-point (event-end event)))
(setq file (image-dired-original-file-name))
(if image-dired-track-movement
(image-dired-track-original-file))
(image-dired-create-display-image-buffer)
(display-buffer image-dired-display-image-buffer)
(image-dired-display-image file)))
(mouse-set-point event)
(goto-char (posn-point (event-end event)))
(let ((file (image-dired-original-file-name)))
(when file
(if image-dired-track-movement
(image-dired-track-original-file))
(image-dired-create-display-image-buffer)
(display-buffer image-dired-display-image-buffer)
(image-dired-display-image file))))
(defun image-dired-mouse-select-thumbnail (event)
"Use mouse EVENT to select thumbnail image.
......
......@@ -662,7 +662,7 @@ This layout is almost the same as that of VT100,
")
'("pc105-uk" . "\
\
`\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \
`\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \
qQwWeErRtTyYuUiIoOpP[{]} \
aAsSdDfFgGhHjJkKlL;:'@#~ \
\\|zZxXcCvVbBnNmM,<.>/? \
......
......@@ -201,9 +201,9 @@ items `Turn Off' and `Help'."
newmap))
(defun mouse-menu-non-singleton (menubar)
"Given menu keymap,
if it defines exactly one submenu, return just that submenu.
Otherwise return the whole menu."
"Return menu keybar MENUBAR, or a lone submenu inside it.
If MENUBAR defines exactly one submenu, return just that submenu.
Otherwise, return MENUBAR."
(if menubar
(let (submap)
(map-keymap
......
......@@ -1114,7 +1114,8 @@ variable `msb-menu-cond'."
(list (frame-parameter frame 'name)
(frame-parameter frame 'name)
(cons nil nil))
'menu-bar-select-frame))
`(lambda ()
(interactive) (menu-bar-select-frame ,frame))))
frames)))))
(setcdr global-buffers-menu-map
(if (and buffers-menu frames-menu)
......
......@@ -2440,13 +2440,15 @@ function does not require the declaration to contain a brace block."
(goto-char last)
(throw 'done '(nil . nil)))
;; Stop if we encounter a preprocessor line.
((and (not macro-end)
;; Stop if we encounter a preprocessor line. Continue if we
;; hit a naked #
((and c-opt-cpp-prefix
(not macro-end)
(eq (char-after) ?#)
(= (point) (c-point 'boi)))
(goto-char last)
;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 2003/3/26
(throw 'done '(t . macro-boundary)))
(if (= (point) here) ; Not a macro, therefore naked #.
(forward-char)
(throw 'done '(t . macro-boundary))))
;; Stop after a ';', '}', or "};"
((looking-at ";\\|};?")
......@@ -2560,14 +2562,21 @@ be more \"DWIM:ey\"."
(c-backward-syntactic-ws))
(or (bobp) (c-after-statement-terminator-p)))))))
;; Are we about to move backwards into or out of a
;; preprocessor command? If so, locate it's beginning.
;; preprocessor command? If so, locate its beginning.
(when (eq (cdr res) 'macro-boundary)
(save-excursion
(beginning-of-line)
(setq macro-fence
(and (not (bobp))
(progn (c-skip-ws-backward) (c-beginning-of-macro))
(point)))))
(setq macro-fence
(save-excursion
(if macro-fence
(progn
(end-of-line)
(and (not (eobp))
(progn (c-skip-ws-forward)
(c-beginning-of-macro))
(progn (c-end-of-macro)
(point))))
(and (not (eobp))
(c-beginning-of-macro)
(progn (c-end-of-macro) (point)))))))
;; Are we about to move backwards into a literal?
(when (memq (cdr res) '(macro-boundary literal))
(setq range (c-ascertain-preceding-literal)))
......
......@@ -5371,6 +5371,8 @@ comment at the start of cc-engine.el for more info."
;; cc-mode requires cc-fonts.
(declare-function c-fo