
Richard Stallman <rms@...> wrote:
> When I put the following code (an Emacs function definition) in a .c
> file, go to the `register Lisp_Object tail, prev' line and type C-M-h,
> it does not mark the whole function definition. It puts point
> on the line that declares the parameter `val'.
>
> Would you please make this work?
Done in the development branch. At the same time I also fixed
c-beginning-of-defun and c-end-of-defun to handle things like this
better. The change is not trivial, so it isn't doable to patch it into
5.28.
> DEFUN ("lax-plist-put", Flax_plist_put, Slax_plist_put, 3, 3, 0,
> doc: /* Change value in PLIST of PROP to VAL, comparing with `equal'.
> PLIST is a property list, which is a list of the form
> \(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object.
> If PROP is already a property on the list, its value is set to VAL,
> otherwise the new PROP VAL pair is added. The new plist is returned;
> use `(setq x (lax-plist-put x prop val))' to be sure to use the new value.
> The PLIST is modified by side effects. */)
> (plist, prop, val)
> Lisp_Object plist;
> register Lisp_Object prop;
> Lisp_Object val;
> {
> register Lisp_Object tail, prev;
/.../
"Dwayne A. Davis" <dwayne@...> wrote:
> public class Foo {
> // Long comments that use the '//' start should wrap as well,
> // which is what this one does.
> /**
> * Javadoc style comments appear to work fine here as well, as we
> * can see in this comment.
> */
> public String getName() {
> return name;
> }
>
> /**
> * However, this comment does not work; nothing has changed
> except we are farther down in the class...
It looks like the last comment isn't closed. Is that the case? Is
there more code in the file below it? If so, how does it look? (I
can't reproduce the problem in a file that only contains the code
you've shown.)
[Mailed to bug-cc-mode@...; Posted to gnu.emacs.bugs.]
GNU Emacs 21.1.
In the following c-mode snippet:
void print_salaries (int alices, int bobs)
{
printf ("%i (Alice's salary)\n", alices) ;
printf ("%i (Bob's salary)\n", bobs) ;
}
the '(' before "Alice's" matches the ')' after "Bob's salary", both in
the highlighting (paren.el ??) and in commands like C-M-p (backward-list)
which cc-mode delegates to ..../emacs-lisp/lisp.el.
The problem is that the apostrophe has string syntax in the cc-mode
syntax table, so that in attempting to match the braces, everything
between the two apostrophes is regarded as an indivisible string.
[I actually found this problem while debugging awk-mode: There it is
more serious, because / has string syntax by defeault, and a line such as
printf ("Use local dict file? (y/n)")
is not at all contrived or unexpected.]
The root cause in the backward-list case (and probably the paren.el one,
too) is that the scan-lists primitive is used without first ensuring that
point is in a "safe" place (i.e. outside of any strings or comments).
--
Alan Mackenzie (Munich, Germany)
acm@...
I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details