[Top][All Lists]

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

Moving to beginning and end of a list

From: Nordlöw
Subject: Moving to beginning and end of a list
Date: Thu, 22 Oct 2009 07:51:13 -0700 (PDT)
User-agent: G2/1.0

I have found these two functions very useful especially when do lisp
hacking and designing clever macros:

(defun move-beginning-of-list ()
  "Move to beginning of list, before first element."
  (while (ignore-errors (backward-sexp) t)))
(global-set-key [(meta shift ?a)] 'move-beginning-of-list)

(defun move-end-of-list ()
  "Move to end of list, after first element."
  (while (ignore-errors (forward-sexp) t)))
(global-set-key [(meta shift ?e)] 'move-end-of-list)

Does Emacs contain something similar by default.


reply via email to

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