適当な上にある括弧に移動する

 letに限らずにこういう感じに一般化したほうが何かと便利そう。こんなん誰かが既にもっと上手いこと作っていそうな気もしてきたけど。
■具体的に何をするか。
nameの括弧内側にあるときに使うとname括弧の所に移動する。ex: name=letなら。(letの所に移動する

;commentとか正規表現に(が出てくると上手くいかないので避ける方法が要るかも。
(defun goto-foo(name)
  "キャレットがnameの括弧内ならばnameのある所に移動"
  (let ((cp (point)))
	(while (not (looking-for name))
	  (dotimes (i 2 t)
		(while (looking-at "[^)]")
		  (if (looking-at "(")	; if (looking-at "\"")で"を避けた方が良いかも。
			  (goto-matched-parenthesis))
		  (forward-char))
		(goto-matched-parenthesis))
	  (forward-char)
	  (when (eobp)
		(goto-char cp)
		(message "探した括弧がないかも")
		(return-from goto-foo nil)))
	t))