The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers

tpot (at) frungy . org

rss

2004
Months
Aug

Mon, 09 Aug 2004

Cool emacs Hack

(defun indent-or-complete ()
  "Complete if point is at end of a word, otherwise indent line."
  (interactive)
  (if (looking-at "\\>")
      (dabbrev-expand nil)
    (indent-for-tab-command)
    ))
 
(add-hook 'c-mode-common-hook
          (function (lambda ()
                      (local-set-key (kbd "") 'indent-or-complete)
                      )))
I think I'll try it out for a week or so and see how funky it is. posted at: 12:33 | path: /software/emacs | permanent link to this entry