259 |
If this command is repeated, marks more defuns after the ones |
If this command is repeated, marks more defuns after the ones |
260 |
already marked." |
already marked." |
261 |
(interactive) |
(interactive) |
262 |
(let (here) |
(cond ((and (eq last-command this-command) (mark t)) |
263 |
(when (and (eq last-command this-command) (mark t)) |
(set-mark |
264 |
(setq here (point)) |
(save-excursion |
265 |
(goto-char (mark))) |
(goto-char (mark)) |
266 |
(push-mark (point)) |
(end-of-defun) |
267 |
(end-of-defun) |
(point)))) |
268 |
(push-mark (point) nil t) |
(t |
269 |
(if here |
(push-mark (point)) |
270 |
(goto-char here) |
(end-of-defun) |
271 |
(beginning-of-defun) |
(push-mark (point) nil t) |
272 |
(re-search-backward "^\n" (- (point) 1) t)))) |
(beginning-of-defun) |
273 |
|
(re-search-backward "^\n" (- (point) 1) t)))) |
274 |
|
|
275 |
(defun narrow-to-defun (&optional arg) |
(defun narrow-to-defun (&optional arg) |
276 |
"Make text outside current defun invisible. |
"Make text outside current defun invisible. |