home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / lucidem / help / 153 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.7 KB  |  40 lines

  1. Newsgroups: alt.lucid-emacs.help
  2. Sender: help-lucid-emacs-request@lucid.com
  3. Date: Mon, 27 Jul 92 18:29:46 PDT
  4. From: eb%watergate@lucid.com (Eric Benson)
  5. Message-ID: <9207280129.AA23761@watergate.lucid>
  6. Subject: Re: Change in point movement behavior
  7. References: <MCGRANT.92Jul27153440@isl.stanford.edu>
  8.     <MCGRANT.92Jul27162250@isl.stanford.edu>
  9. Reply-To: eb@lucid.com
  10. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  11. Lines: 27
  12.  
  13. In Emacs 18 the cursor keys actually send the characters C-n and C-p
  14. to Emacs.  In lemacs they are the X keysyms 'up and 'down.  We had
  15. originally bound these keys to the commands previous-line and
  16. next-line, but that doesn't work well for modes with local bindings
  17. for C-n and C-p, since people usually expect the cursor keys to do
  18. exactly the same thing as C-b, C-f, C-p and C-n, regardless of what
  19. those keys are bound to.  So, we changed the cursor key bindings to be
  20. keyboard macros containing exactly those characters instead.  This
  21. works fine, except that next-line and previous-line check the variable
  22. last-command to decide if it should keep the goal column at the same
  23. place, and apparently the keyboard macro was causing this to fail.
  24. However, it turns out that Emacs 18 has this extra special hack to
  25. make keyboard macros containing exactly one character set last-command
  26. to the command to which the character is bound.  Lemacs didn't have
  27. this hack, so I added it.  It will appear in 19.3, but if you want it
  28. now, in command_loop_1 in keyboard.c, change the line
  29.  
  30.   Vlast_command = Qt;
  31.  
  32. to
  33.  
  34.   if (!(!NILP(Vexecuting_macro) &&
  35.     ((XTYPE (Vexecuting_macro) == Lisp_String &&
  36.       XSTRING (Vexecuting_macro)->size == 1) ||
  37.      (XTYPE (Vexecuting_macro) == Lisp_Vector &&
  38.       XVECTOR (Vexecuting_macro)->size == 1))))
  39.     Vlast_command = Qt;
  40.