help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs C source code


From: Teemu Likonen
Subject: Re: Emacs C source code
Date: Tue, 31 Jul 2012 19:27:54 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

drain [2012-07-31 03:12:07 -0700] wrote:

> I click on 'syntax.c' and Emacs tells me: "the C source file syntax.c
> is not available".
>
> Where can I find this file? Where is it most likely to be in GNU /
> Linux? (my distro is Ubuntu 11.10)

If you compile Emacs from its source code and leave the source code
directory intact then the Emacs runtime will find function and variable
definitions from the C source too.

The relevant function looks like this:


DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p",
       doc: /* Move point forward ARG words (backward if ARG is negative).
Normally returns t.
If an edge of the buffer or a field boundary is reached, point is left there
and the function returns nil.  Field boundaries are not noticed if
`inhibit-field-text-motion' is non-nil.  */)
  (Lisp_Object arg)
{
  Lisp_Object tmp;
  int orig_val, val;

  if (NILP (arg))
    XSETFASTINT (arg, 1);
  else
    CHECK_NUMBER (arg);

  val = orig_val = scan_words (PT, XINT (arg));
  if (! orig_val)
    val = XINT (arg) > 0 ? ZV : BEGV;

  /* Avoid jumping out of an input field.  */
  tmp = Fconstrain_to_field (make_number (val), make_number (PT),
                             Qt, Qnil, Qnil);
  val = XFASTINT (tmp);

  SET_PT (val);
  return val == orig_val ? Qt : Qnil;
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]