comparison lisp/progmodes/idlwave.el @ 77493:dd5c0a36a2d6

(idlwave-beginning-of-subprogram, idlwave-end-of-subprogram): Take optional NOMARK arg to prevent pushing mark. (idlwave-current-routine): Don't push mark.
author J.D. Smith <jdsmith@as.arizona.edu>
date Wed, 25 Apr 2007 20:44:25 +0000
parents b71ececfef19
children 189495e510b9 41aaac7180d5 92c344270c8a
comparison
equal deleted inserted replaced
77492:bcf5ca699533 77493:dd5c0a36a2d6
2409 (idlwave-indent-line) 2409 (idlwave-indent-line)
2410 (goto-char (- (point-max) beg)) 2410 (goto-char (- (point-max) beg))
2411 ;; Reindent new line 2411 ;; Reindent new line
2412 (idlwave-indent-line))) 2412 (idlwave-indent-line)))
2413 2413
2414 (defun idlwave-beginning-of-subprogram () 2414 (defun idlwave-beginning-of-subprogram (&optional nomark)
2415 "Moves point to the beginning of the current program unit." 2415 "Moves point to the beginning of the current program unit.
2416 If NOMARK is non-nil, do not push mark."
2416 (interactive) 2417 (interactive)
2417 (idlwave-find-key idlwave-begin-unit-reg -1)) 2418 (idlwave-find-key idlwave-begin-unit-reg -1 nomark))
2418 2419
2419 (defun idlwave-end-of-subprogram () 2420 (defun idlwave-end-of-subprogram (&optional nomark)
2420 "Moves point to the start of the next program unit." 2421 "Moves point to the start of the next program unit.
2422 If NOMARK is non-nil, do not push mark."
2421 (interactive) 2423 (interactive)
2422 (idlwave-end-of-statement) 2424 (idlwave-end-of-statement)
2423 (idlwave-find-key idlwave-end-unit-reg 1)) 2425 (idlwave-find-key idlwave-end-unit-reg 1 nomark))
2424 2426
2425 (defun idlwave-mark-statement () 2427 (defun idlwave-mark-statement ()
2426 "Mark current IDL statement." 2428 "Mark current IDL statement."
2427 (interactive) 2429 (interactive)
2428 (idlwave-end-of-statement) 2430 (idlwave-end-of-statement)
2533 2535
2534 (defun idlwave-current-routine () 2536 (defun idlwave-current-routine ()
2535 "Return (NAME TYPE CLASS) of current routine." 2537 "Return (NAME TYPE CLASS) of current routine."
2536 (idlwave-routines) 2538 (idlwave-routines)
2537 (save-excursion 2539 (save-excursion
2538 (idlwave-beginning-of-subprogram) 2540 (idlwave-beginning-of-subprogram 'nomark)
2539 (if (looking-at "[ \t]*\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)") 2541 (if (looking-at "[ \t]*\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)")
2540 (let* ((type (if (string= (downcase (match-string 1)) "pro") 2542 (let* ((type (if (string= (downcase (match-string 1)) "pro")
2541 'pro 'function)) 2543 'pro 'function))
2542 (class (idlwave-sintern-class (match-string 3))) 2544 (class (idlwave-sintern-class (match-string 3)))
2543 (name (idlwave-sintern-routine-or-method (match-string 4) class))) 2545 (name (idlwave-sintern-routine-or-method (match-string 4) class)))