[comp.emacs] How to find answers yourself; 18.33 bug fix

rms@PREP.AI.MIT.EDU (Richard M. Stallman) (12/13/86)

Before asking this list a question on how to do something with Emacs,
make sure you have checked diligently the information provided in
the distribution.  It doesn't take very long and it can save other people
a lot of time as well as getting you an answer much faster.

Make sure you check all the sections in the manual whose topics are
clearly pertinent.  (This is a lot less than the whole manual.)  If
you don't have a printed copy, look at it with Info.  In this case,
the answer to the question appears in the section "The Init File",
which just from its title you can tell is worth reading for this
question.  And the first place you might have looked--the section on
key bindings--has a cross reference pointing there.

I see now that the manual could be improved on this subject by putting
this information in all the places that a person might look first.
The answer to this question could jump out at the reader.  As it is
you have to read and pay attention.  But that's what you should always
do before you give up.

Another way to find an answer is to look at Lisp code which does the
kind of job you are interested in.  In this case, the job is to define
keypad keys.  Therefore, look at Lisp code in lisp/term, picking a
terminal that you know has a keypad (the vt100?).  You can read all
that code in a few minutes, and in this case it would give you the
answer.  This technique isn't always applicable, but since it
sometimes is, you should not fail to consider it.

Trying these methods thoroughly never takes much time, and often
they will work and save you a delay and the other people on this
list a distraction.  So don't omit them!


On another subject: 18.33 needs the following patch in scr/editfns.c
to work correctly on some machines.

*** editfns.c.BAK	Fri Dec 12 23:10:36 1986
--- editfns.c	Fri Dec 12 23:30:43 1986
***************
*** 876,883
  	}
      }
  
!   ++n;				/* The format string itself is an arg.  */
!   strings = (unsigned char **) alloca (n * sizeof (unsigned char *));
    for (; n >= 0; n--)
      {
        if (n >= nargs)

--- 876,882 -----
  	}
      }
  
!   strings = (unsigned char **) alloca ((n + 1) * sizeof (unsigned char *));
    for (; n >= 0; n--)
      {
        if (n >= nargs)
------------------------------------------------------------------------------