Skip to content

Instantly share code, notes, and snippets.

@amalloy amalloy/.emacs
Created Sep 27, 2010

Embed
What would you like to do?
(defun smart-line-beginning ()
"Move point to the beginning of text on the current line; if that is already the current position of point, then move it to the beginning of the line."
(interactive)
(let ((pt (point)))
(beginning-of-line-text)
(when (eq pt (point))
(beginning-of-line))))
(global-set-key "\C-a" 'smart-beginning-of-line)
@klang

This comment has been minimized.

Copy link

commented Sep 27, 2010

(global-set-key "\C-a" 'smart-line-beginning)

;; of course ..

@amalloy

This comment has been minimized.

Copy link
Owner Author

commented Sep 27, 2010

Bah. Emacs can't just read my mind, or use genius-like fuzzy correction?

@klang

This comment has been minimized.

Copy link

commented Sep 27, 2010

tab completion .. you must have it!

@amalloy

This comment has been minimized.

Copy link
Owner Author

commented Sep 27, 2010

Well yes. That's the only reason M-x was working for me. But I haven't figured out how to get tab completion in my .emacs file to recognize new symbols I've defined. Is this easy?

@klang

This comment has been minimized.

Copy link

commented Sep 27, 2010

I am unsure which of these make it work in my setup ..

http://github.com/klang/elisp/blob/master/50-hippie-expand.el

or

http://github.com/klang/elisp/blob/master/52-clojure-extras.el

.. but I think it's the last one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.