• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:this +defs:line +defs:end

41 ;; continuation line indenting, from wave.el.
56 ;; In short, put this file on your load path and add the following
67 ;; The newest version of this file is available from the maintainer's
124 ;; does not work as I would like it, but this is a problem with
133 ;; comment paragraph. To accomplish this, tabs are permanently
139 ;; Muti-statement lines (using "&") on block begin and end lines can
140 ;; ruin the formatting. For example, multiple end statements on a
141 ;; line: endif & endif. Using "&" outside of block begin/end lines
151 ;; be too difficult to fix this hardly used case.
162 (unless (fboundp 'line-beginning-position)
163 (defalias 'line-beginning-position 'point-at-bol))
164 (unless (fboundp 'line-end-position)
165 (defalias 'line-end-position 'point-at-eol))
214 If you change this, you probably also want to change `idlwave-end-offset'."
218 (defcustom idlwave-end-offset -3
221 line up with the block BEGIN lines."
234 Several special indentations are tried to help line up continuation
237 maximum amount by which this special indentation can exceed the
242 this variable."
258 When this variable is nil, paren alignment may still occur, based on
279 hanging indent given by `idlwave-hang-indent-regexp' match in the first line
286 in the first line of a comment paragraph. The size of the indent
287 extends to the end of the match for the regular expression."
292 "*If non-nil then use last match on line for `idlwave-indent-regexp'."
296 (defcustom idlwave-fill-comment-line-only t
303 When the line end falls within a string, string concatenation with the
307 This variable is ignored when `idlwave-fill-comment-line-only' is
308 non-nil, since in this case code is not auto-filled."
312 (defcustom idlwave-split-line-string t
313 "*If non-nil then `idlwave-split-line' will split strings with `+'.
314 When the splitting point of a line falls inside a string, split the string
321 "*The indentation of a comment that starts with this regular
323 at the beginning of a line is never changed."
327 (defcustom idlwave-begin-line-comment nil
328 "*A comment anchored at the beginning of line.
329 A comment matching this regular expression will not have its
330 indentation changed. If nil the default is \"^;\", i.e., any line
332 the line should begin with \"^\"."
334 :type '(choice (const :tag "Any line beginning with `;'" nil)
338 "*A comment that starts with this regular expression on a line by
358 libraries come with catalog files by default, so leaving this on is a
367 Emacs is idle for more than the number of seconds specified by this
372 good value for this variable is about 1/3 of the time initialization
374 with a slow network connection, don't hesitate to set this to 2
399 scan, this is not necessary."
436 \(pre-OSX), the IDLWAVE shell does not work. In this case, this
438 files. The shell will only be asked for a list of paths when this
440 preceeded by a `+' will be searched recursively. If you set this
448 UNIX. Set this to the value of the `!DIR' system variable in IDL.
449 IDLWAVE uses this to find out which of the library routines belong to
452 in this directory. On UNIX systems, IDLWAVE queries the shell for the
542 After changing this variable, you need to either restart Emacs or press
561 When this variable is non-nil, the empty string is considered to be downcase.
573 To make this possible, we need to re-case everything each time we update
599 certain methods this assumption is almost always true. The methods
600 for which to assume this can be set here."
609 like this:
613 The value of this variable may be nil to inhibit display, or an integer to
618 item is displayed in the echo area. If the value of this variable is a
639 doing this (well, three ways if you count the shell... see
642 1. Combine the items of all available classes which contain this
645 a keyword, all keywords allowed for this method in any class are
653 make this less interruptive, IDLWAVE can store the class as a text
682 (boolean :tag "Determine class for this method")))))
691 When you specify a class, this information can be stored as a text
693 editing session, IDLWAVE will not have to ask again. When this
698 The default of this variable is nil, since the result of commands then
700 be nice to turn this on.
713 with this font in order to remind the user that this arrow is special."
740 This messes up your window configuration. With this variable set, IDLWAVE
749 The variables in this group govern this."
764 Changes to this in `idlwave-mode-hook' will have no effect. Instead a user
787 Whenever `idlwave-surround' is non-nil then this affects how '=' is
802 (defcustom idlwave-expand-generic-end nil
807 (defcustom idlwave-reindent-end t
808 "*Non-nil means re-indent line after END was typed."
829 upper case, regardless of this variable."
842 ;; The average user may have difficulty modifying this directly. It
847 ;; The action table is used by `idlwave-indent-line' whereas both the
849 ;; general, the expand table is only used when a line is explicitly
851 ;; is used, the action table is used when a line is indirectly
852 ;; indented via line splitting, auto-filling or a new line creation.
872 and function as a cdr. This table is used by `idlwave-indent-line'.
961 summarizing a file. If PATHNAME is non-nil then this file will be included.
968 When nil, the header is positioned between the PRO/FUNCTION line of
981 A ':' is added to the keyword end.
992 (defcustom idlwave-doclib-end "^;+-"
993 "*Regexp matching the end of a document library header."
1004 "*If non-nil, this is the command to run IDL.
1006 execution search path. If you want to specify command line switches
1007 for the idl program, use `idlwave-shell-command-line-options'.
1009 I know the name of this variable is badly chosen, but I cannot change
1014 (defcustom idlwave-shell-command-line-options nil
1015 "*A list of command line options for calling the IDL program.
1017 this should be a list of strings like '(\"-rt=file\" \"-nw\") with a separate
1039 If you set this to '(control shift), this means setting a breakpoint will
1075 is everything and level 2 is specified by this list.
1119 As a user, you should not set this to t.")
1135 ;; To update this regexp, update the list of keywords and
1148 ;; "begin" "end"
1173 (goto-char (match-end 0)) ; needed for XEmacs, could be nil
1196 ;; Tags in structure definitions. Note that this definition
1199 ;; e.g. vec{bottom:top]. No good way around this.
1270 beginning-of-line))
1275 (defconst idlwave-comment-line-start-skip "^[ \t]*;"
1276 "Regexp to match the start of a full-line comment.
1277 That is the _beginning_ of a line containing a comment delimiter `;' preceded
1289 (defconst idlwave-end-unit-reg "^\\s-*\\(pro\\|function\\)\\>\\|\\'"
1290 "Regular expression to find the line that indicates the end of unit.
1291 This line is the end of buffer or the start of another unit. The case does
1294 (defconst idlwave-continue-line-reg "\\<\\$"
1295 "Regular expression to match a continued line.")
1297 (defconst idlwave-end-block-reg
1298 "\\<end\\(\\|case\\|switch\\|else\\|for\\|if\\|rep\\|while\\)\\>"
1299 "Regular expression to find the end of a block. The case does
1303 '(("pro" . "end")
1304 ("function" . "end")
1317 to expand generic end statements to their detailed form.")
1343 ;; "endif else" is the only possible "end" that can be
1344 ;; followed by a statement on the same line.
1345 '(endelse . ("end\\(\\|if\\)\\s +else" "end\\(\\|if\\)\\s +else"))
1346 ;; all other "end"s can not be followed by a statement.
1347 (cons 'end (list idlwave-end-block-reg nil))
1371 type. The associated value is a list. The first element of this list
1373 identifying the statement type. The second element of this list is a
1375 substatement starts after the end of the found match modulo
1387 ;; Note that this is documented in the v18 manuals as being a string
1389 ;; The code in this file accepts either format for compatibility.
1395 "Character which is inserted as a last character on previous line by
1396 \\[idlwave-split-line] to begin a continuation line. Normally $.")
1534 (define-key idlwave-mode-map "\C-\M-e" 'idlwave-end-of-subprogram)
1536 (define-key idlwave-mode-map "\C-c}" 'idlwave-end-of-block)
1543 (define-key idlwave-mode-map "\M-\r" 'idlwave-split-line)
1548 ;; (define-key idlwave-mode-map "\t" 'idlwave-indent-line)
1593 "Set breakpoint in current line." t)
1597 (define-key idlwave-mode-map "\C-c\C-t" 'idlwave-find-module-this-file)
1634 ;;; space is inserted (this is the space typed by the user to expanded
1742 (idlwave-define-abbrev "end" "end" 'idlwave-show-begin-check t)
1787 The main features of this mode are
1792 TAB is used for explicit indentation of the current line.
1794 To start a continuation line, use \\[idlwave-split-line]. This
1795 function can also be used in the middle of a line to split the line
1808 comment. The indentation of the second line of the paragraph
1811 comments. When the variable `idlwave-fill-comment-line-only' is
1827 this shell. It also makes use of pre-compiled or custom-scanned
1829 default. Use \\[idlwave-update-routine-info] to update this
1880 If the variable `idlwave-expand-generic-end' is non-nil, each END typed
1890 Info documentation for this package is available. Use
1898 Here is a list of all keybindings of this mode.
1914 (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action)
1938 (setq comment-end "")
1939 (set (make-local-variable 'comment-multi-line) nil)
1955 ;; Following line is for Emacs - XEmacs uses the corresponding property
1975 idlwave-end-block-reg
2023 (defun idlwave-font-lock-fontify-region (beg end &optional verbose)
2028 (forward-line -1)
2029 (when (setq pos (idlwave-is-continuation-line))
2033 (font-lock-default-fontify-region beg end verbose))
2101 "Move to start of comment delimiter on current line.
2102 Moves to end of line if there is no comment delimiter.
2105 (let ((eos (progn (end-of-line) (point)))
2109 (beginning-of-line)
2130 "Insert quote and show matching quote if this is end of a string."
2141 ;; Not the end of a string
2157 Also checks if the correct end statement has been used."
2158 ;; All end statements are reserved words
2159 ;; Re-indent end line
2164 (eol-pos (save-excursion (end-of-line) (point)))
2165 begin-pos end-pos end end1 )
2166 (if idlwave-reindent-end (idlwave-indent-line))
2176 (setq end-pos (point))
2177 (if (> end-pos eol-pos)
2178 (setq end-pos pos))
2179 (goto-char end-pos)
2180 (setq end (buffer-substring
2184 end-pos))
2189 ((string= (downcase end) (downcase end1))
2191 ((string= (downcase end) "end")
2192 ;; A generic end
2193 (if idlwave-expand-generic-end
2197 (insert (if (string= end "END") (upcase end1) end1))
2202 (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?"
2203 end1 end)
2220 '("begin" . "end"))
2226 '("begin" . "end")))))
2232 ;; Start new line if we are not in a new line
2239 (insert "end")
2293 ;; Check to see if the line should auto wrap
2314 (end-col (progn (skip-chars-forward " \t") (current-column))))
2321 (idlwave-indent-to end-col (- n))
2327 "Inserts a newline and indents the current and previous line."
2339 ;; The current line is being split, the cursor should be at the
2340 ;; beginning of the new line skipping the leading indentation.
2342 ;; The reason we insert the new line before indenting is that the
2343 ;; indenting could be confused by keywords (e.g. END) on the line
2347 (beginning-of-line 0)
2348 (idlwave-indent-line)
2349 (forward-line)
2350 (idlwave-indent-line))
2360 (if idlwave-begin-line-comment
2361 (looking-at idlwave-begin-line-comment)
2366 ;; On line by itself, indent as code
2375 (defun idlwave-split-line ()
2376 "Continue line by breaking line at point and indent the lines.
2377 For a code line insert continuation marker. If the line is a line comment
2378 then the new line will contain a comment with the same indentation.
2379 Splits strings with the IDL operator `+' if `idlwave-split-line-string' is
2386 ;; For code line add continuation.
2390 (if idlwave-split-line-string
2406 (indent-new-comment-line))
2407 ;; Indent previous line
2409 (forward-line -1)
2410 (idlwave-indent-line)
2412 ;; Reindent new line
2413 (idlwave-indent-line)))
2421 (defun idlwave-end-of-subprogram (&optional nomark)
2425 (idlwave-end-of-statement)
2426 (idlwave-find-key idlwave-end-unit-reg 1 nomark))
2431 (idlwave-end-of-statement)
2432 (let ((end (point)))
2434 (push-mark end nil t)))
2439 (idlwave-end-of-statement)
2441 (idlwave-end-of-statement)
2442 (let ((end (point)))
2445 (push-mark end nil t)))
2449 "Put mark at beginning of program, point at end.
2452 (idlwave-end-of-statement)
2461 If prefix ARG < 0 then move forward to enclosing block end."
2471 (defun idlwave-end-of-block ()
2502 idlwave-end-block-reg -1 'nomark eos))
2511 (idlwave-end-of-statement)
2512 (message "No nested block before end of containing block."))))
2516 "Put point at beginning of doc library header, mark at end.
2524 (setq beg (progn (beginning-of-line) (point)))
2525 (if (re-search-forward idlwave-doclib-end nil t)
2527 (forward-line 1)
2529 (message "Could not find end of doc library header.")))
2553 Point is placed at the beginning of the line whether or not this is an
2559 (goto-char (match-end 0))))
2561 (if (save-excursion (forward-line -1) (idlwave-is-continuation-line))
2563 (beginning-of-line)))))
2567 Returns t if the current line before moving is the beginning of
2571 (if (not (= (forward-line -1) 0))
2572 ;; first line in file
2574 ;; skip blank lines, label lines, include lines and line comments
2580 (looking-at idlwave-comment-line-start-skip)
2584 (= (forward-line -1) 0)))
2588 (forward-line -1)
2589 (idlwave-is-continuation-line))
2590 (= (forward-line -1) 0)))
2593 (defun idlwave-end-of-statement ()
2594 "Moves point to the end of the current IDL statement.
2595 If not in a statement just moves to end of line. Returns position."
2597 (while (and (idlwave-is-continuation-line)
2598 (= (forward-line 1) 0))
2599 (while (and (idlwave-is-comment-or-empty-line)
2600 (= (forward-line 1) 0))))
2601 (end-of-line)
2604 (defun idlwave-end-of-statement0 ()
2605 "Moves point to the end of the current IDL statement.
2606 If not in a statement just moves to end of line. Returns position."
2608 (while (and (idlwave-is-continuation-line)
2609 (= (forward-line 1) 0)))
2610 (end-of-line)
2619 (idlwave-end-of-statement)
2620 ;; skip blank lines, label lines, include lines and line comments
2621 (while (and (= (forward-line 1) 0)
2626 (looking-at idlwave-comment-line-start-skip)
2633 "Skip past multiple commands on a line (with `&')."
2636 (goto-char (match-end 0))
2647 ;; So we find the first colon in the line and make sure
2653 ;; As many in this mode, this function is heuristic and not an exact
2656 (eos (save-excursion (idlwave-end-of-statement) (point)))
2657 (end (idlwave-find-key ":" 1 'nomark eos)))
2658 (if (and end
2659 (= (nth 0 (parse-partial-sexp start end)) 0)
2660 (not (string-match "\\?" (buffer-substring start end)))
2661 (not (string-match "^::" (buffer-substring end eos))))
2671 statement is on a new line or is a subpart of the current statement.
2676 (eos (idlwave-end-of-statement))
2691 (goto-char (match-end 0)))
2694 (goto-char (match-end 0)))
2698 ;; If a continuation line starts here, move to next line
2700 (beginning-of-line 2))
2714 (forward-line 1))
2721 (append st (match-end 0))))))
2787 "Call `idlwave-indent-line' and do expand actions.
2791 (if (and idlwave-expand-generic-end
2792 (re-search-backward "\\<\\(end\\)\\s-*\\="
2794 (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)"))
2795 (progn (goto-char (match-end 1))
2804 (idlwave-indent-line t)))
2806 (defun idlwave-indent-line (&optional expand)
2807 "Indents current IDL line as code or as a comment.
2819 (beginning-of-line)
2820 (if (looking-at idlwave-comment-line-start-skip)
2821 ;; Indentation for a line comment
2836 ;; No longer expand abbrevs on the line. The user can do this
2839 ;; Indent for code line
2841 (beginning-of-line)
2843 ;; a label line
2849 ;; indent the line
2852 (end-of-line)
2855 (let ((fill-column (if (fboundp 'comment-indent-new-line)
2864 "Perform an action repeatedly on a line. ACTION is a list (REG
2873 (beginning-of-line)
2887 "Indent the current line to column COL.
2891 (beginning-of-line)
2899 (idlwave-end-of-statement)
2913 (idlwave-end-of-statement)
2917 "Return appropriate indentation for current line as IDL code."
2919 (beginning-of-line)
2925 ;; Check for continuation line
2927 (and (= (forward-line -1) 0)
2928 (idlwave-is-continuation-line)))
2950 ((idlwave-look-at idlwave-end-block-reg t)
2956 ;; idlwave-end-offset
2964 ((idlwave-look-at idlwave-end-block-reg)
2965 (+ the-indent idlwave-end-offset))
2972 (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
2976 (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
2980 ;; Line up with next word unless this is a closing paren.
2987 ;; This is a closed paren - line up under open paren.
3006 beginning of the current statement if this statement is a continuation
3007 of the previous line. Various special types of continuations,
3012 (end-reg (progn (beginning-of-line) (point)))
3016 (if (eq (line-beginning-position) end-reg)
3019 (basic-indent (+ (idlwave-min-current-statement-indent end-reg)
3025 ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else")
3027 ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" .
3031 (goto-char end-reg)
3040 (if (looking-at "end") ;; that one's special
3042 (+ idlwave-block-indent idlwave-end-offset))
3045 ;; Indent in from the previous line for continuing statements
3052 (goto-char end-reg)
3053 (if (/= (forward-line -1) 0)
3064 (let* ((end-reg end-reg)
3066 (goto-char end-reg)
3072 beg-reg end-reg close-exp))
3081 (setq end-reg (car indent-cons))))))
3096 (goto-char (match-end 0))
3097 ;; Comment only, or blank line with "$"? Basic indent.
3105 (goto-char (match-end 0))
3156 "When optional argument DIR is non-negative, move forward to end of
3157 current block using the `idlwave-begin-block-reg' and `idlwave-end-block-reg'
3170 idlwave-end-block-reg))
3173 idlwave-end-block-reg))
3178 (end-of-line)
3180 idlwave-end-unit-reg dir t limit)))
3182 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block
3192 (defun idlwave-min-current-statement-indent (&optional end-reg)
3195 (if (not (idlwave-is-continuation-line))
3198 (while (and (= (forward-line 1) 0)
3199 (or (setq comm-or-empty (idlwave-is-comment-or-empty-line))
3200 (idlwave-is-continuation-line))
3201 (or (null end-reg) (< (point) end-reg)))
3203 (if (or comm-or-empty (and end-reg (>= (point) end-reg)))
3207 (defun idlwave-current-statement-indent (&optional last-line)
3210 (if last-line
3211 (idlwave-end-of-statement)
3216 "Return the column of the indentation of the current line.
3217 Skips any whitespace. Returns 0 if the end-of-line follows the whitespace."
3219 (beginning-of-line)
3221 ;; if we are at the end of blank line return 0
3225 (defun idlwave-is-continuation-line ()
3226 "Tests if current line is continuation line.
3235 (eq (forward-line -1) 0))
3238 (defun idlwave-is-comment-line ()
3239 "Tests if the current line is a comment line."
3241 (beginning-of-line 1)
3244 (defun idlwave-is-comment-or-empty-line ()
3245 "Tests if the current line is a comment line."
3247 (beginning-of-line 1)
3251 "Searches current line from current point for REGEXP.
3252 If optional argument CONT is non-nil, searches to the end of
3256 Ignores matches that end in a comment or inside a string expression.
3264 (if cont (idlwave-end-of-statement) (end-of-line))
3279 line comments. The indentation is given by the hanging indent of the
3280 first line, otherwise by the minimum indentation of the lines after
3281 the first line. The indentation of the first line does not change.
3282 Does not effect code lines. Does not fill comments on the same line
3283 with code. The hanging indent is given by the end of the first match
3284 matching `idlwave-hang-indent-regexp' on the paragraph's first line . If the
3288 ;; check if this is a line comment
3290 (beginning-of-line)
3296 hang start end)
3299 ;; contiguous line comments. Thus, we may be changing tabs in
3300 ;; a much larger area than is needed, but this is the easiest
3310 (setq end (point)))
3311 (untabify start end)
3314 (beginning-of-line)
3318 (save-excursion (end-of-line) (point))
3320 ;; Get the comment leader on the line and its length
3329 (beginning-of-line) (point))
3333 ;; Mark the beginning and end of the paragraph
3338 (forward-line -1))
3339 ;; Move to first line of paragraph
3341 (forward-line 1))
3347 (forward-line 1))
3348 (beginning-of-line)
3351 (forward-line -1))
3352 (end-of-line)
3353 ;; if at end of buffer add a newline (need this because
3354 ;; fill-region needs END to be at the beginning of line after
3355 ;; the paragraph or it will add a line).
3358 ;; Set END to the beginning of line after the paragraph
3359 ;; END is calculated as distance from end of buffer
3360 (setq end (- (point-max) (point) 1))
3365 ;; point will be at the beginning of a line in which case
3367 ;; the first paragraph line and thus will not affect the
3377 ;; each line's indent is at least as great as the hanging
3382 (beginning-of-line)
3385 (save-excursion (end-of-line) (point))
3394 (forward-line -1))
3398 ;; after first line.
3400 ;; beginning of line and END is at the end of line
3402 ;; be the case for a single line paragraph).
3404 (beginning-of-line)
3410 (save-excursion (end-of-line) (point))
3413 (forward-line -1))
3418 ;; first-line indent
3424 (save-excursion (end-of-line) (point))
3433 ;; to keep whitespace untouched on the first line within the
3434 ;; indent length and to preserve any indent on the first line
3442 (- (point-max) end)
3449 ;; body fill-region will put it at the beginning of the line.
3458 the line.
3462 (end-of-line)
3465 (save-excursion (beginning-of-line) (point))
3469 (beginning-of-line)
3472 (save-excursion (end-of-line) (point))
3478 Only fills non-comment lines if `idlwave-fill-comment-line-only' is
3479 non-nil. Places a continuation character at the end of the line if
3484 (if (or (not idlwave-fill-comment-line-only)
3486 ;; Check for comment line
3487 (beginning-of-line)
3488 (looking-at idlwave-comment-line-start-skip)))
3490 (idlwave-indent-line)
3491 ;; Prevent actions do-auto-fill which calls indent-line-function.
3502 (end-of-line 0)
3503 ;; Indent the split line
3504 (idlwave-indent-line))
3506 (beginning-of-line)
3507 (looking-at idlwave-comment-line-start-skip))
3508 ;; A continued line comment
3509 ;; We treat continued line comments as part of a comment
3515 (forward-line -1)
3521 (beginning-of-line)
3524 (save-excursion (end-of-line) (point)) t)
3531 (end-of-line 0)
3533 ;; Splitting a non-full-line comment.
3534 ;; Insert the comment delimiter from split line
3537 (beginning-of-line)
3539 ;; Insert blank to keep off beginning of line
3542 (forward-line -1)
3547 (idlwave-indent-line))
3548 ;; Split code line - add continuation character
3550 (end-of-line 0)
3556 ;; the line was split. That space was removed.
3563 (beginning-of-line)
3569 ;; Although do-auto-fill (via indent-new-comment-line) calls
3570 ;; idlwave-indent-line for the new line, re-indent again
3572 (idlwave-indent-line))
3579 automatically breaks the line at a previous space."
3587 ;; update mode-line
3602 ;; make sure we catch the current line if it begins the unit
3605 (end-of-line)
3607 (beginning-of-line)
3608 ;; skip function or procedure line
3611 (idlwave-end-of-statement)
3612 (if (> (forward-line 1) 0) (insert "\n")))))
3628 ;; Remove extra spaces from line
3630 ;; Insert a blank line comment to separate from the date entry -
3631 ;; will keep the entry from flowing onto date line if re-filled.
3642 (let* (beg end)
3648 (re-search-forward idlwave-doclib-end nil t)
3649 (setq end (match-end 0)))
3654 end t)
3655 (end-of-line)
3656 (goto-char end)
3657 (end-of-line -1)
3672 ;;; abbrev instead of to the end of the abbrev). We now keep the
3675 (defun idlwave-expand-region-abbrevs (start end)
3680 (goto-char (min start end))
3683 (expand-region-abbrevs start end 'noquery))))
3693 Ignores comment delimiters on the current line.
3702 ;; search for the string start from the beginning of line.
3704 (eol (progn (end-of-line) (point)))
3705 (bq (progn (beginning-of-line) (point)))
3714 ;; Find the string end.
3764 Opens a line if point is not followed by a newline modulo intervening
3777 (if (and (eq this-command 'self-insert-command)
3785 (let ((beg (save-excursion (beginning-of-line) (point)))
3786 end)
3788 (open-line 1))
3792 (setq end (point)))
3794 (indent-region beg end nil))
3880 start (match-end 0)))
3887 end)
3888 (while (setq end (string-match replace_string string start))
3890 (concat ret_string (substring string start end) replace_with))
3891 (setq start (match-end 0)))
3906 Buffers in this list may be killed by `idlwave-kill-autoloaded-buffers'.")
3977 ;; Remove this function from the hook.
4088 (defun idlwave-toggle-comment-region (beg end &optional n)
4089 "Comment the lines in the region if the first non-blank line is
4097 (comment-region beg end (prefix-numeric-value n))
4100 (beginning-of-line)
4105 (uncomment-region beg end)
4106 (comment-region beg end
4109 (match-end 1))))))
4110 (comment-region beg end)))))
4124 ;; the case of procedure names etc. We do this by "interning" these
4133 ;; need to be "sinterned". We do this as early as possible after
4253 SET: also set new patterns. Probably this will always have to be t.
4472 When an IDL shell is running, this command also queries the IDL program
4511 ;; reset was already done in idle time, so skip this step now once
4546 ;; 2. When this function is called non-interactively, it
4719 (setq name (substring name (match-end 0)))))
4743 kwd (substring kwd (match-end 0)))
4851 (match-end 0))))
5130 ;; Just scan this buffer
5232 ;; yes, this buffer has the right mode.
5253 (idlwave-end-of-statement)
5267 ;; Remove the continuation line stuff
5275 (setq start (match-end 0))
5284 (setq start (match-end 0))
5293 ;; We don't know which argument are optional, so this information
5338 the result as a file `idlwave-user-catalog-file'. When this file
5399 "This is the front-end to the creation of the IDLWAVE user catalog.
5405 If this is not the correct file, first set variable
5406 `idlwave-user-catalog-file', and call this command again.
5410 not be scanned. You can scan your own libraries off-line using the
5504 (this-path-alist path-alist)
5506 (while (setq dir-entry (pop this-path-alist))
5718 end
5760 end
5774 end
5797 end
5806 s = strtrim(strjoin(s,' ',/single),2) ; make one line
5814 end
5819 end
5887 at this point.
5895 *Completions* buffer. If this list is too long to fit into the
5902 \\[universal-argument] prefix argument to this command.
5947 module (substring module (match-end 0))))
5954 (setq this-command last-command)
6382 ;; The second element in this structure is the class. When nil, we
6501 POINT: Where is this
6554 ; ;; FIXME: I am sure there can be more in this list
6555 ; ;; FIXME: Do we want to do this at all?
6563 cw-class (if (match-end 4)
6572 (defun idlwave-this-word (&optional class)
6586 ;; searches to this point.
6628 ;; searches to this point.
6665 (goto-char (match-end 0)))
6675 (goto-char (match-end 0)))
6689 and also not part of the current identifier. Since we do this in
6700 ;; FIXME: does not check if this is a valid identifier
6706 (beginning-of-line 0)
6708 ;; continuation line
6709 (goto-char (match-end 1))
6730 beg (end (point)) slash part spart completion all-completions
6749 (setq part (buffer-substring beg end)
6762 (delete-region beg end)
6770 ;; Now this is a unique match
6796 ;; "complete" means, this is already a valid completion
7021 "Scroll the completion window on this frame."
7050 ;; Store a special value in `this-command'. When `idlwave-complete'
7051 ;; finds this in `last-command', it will scroll the *Completions* buffer.
7052 (setq this-command (list 'idlwave-display-completion-list message complete))
7099 To do this, PROMPT is displayed and and the user must hit a letter key to
7154 (setq start (match-end 0)
7167 (setq start (match-end 0)
7226 (setq this-command last-command)))
7294 (end (cdr borders))
7298 (narrow-to-region beg end)
7299 (while (re-search-forward idlwave-struct-tag-regexp end t)
7304 (goto-char (match-end 0))))
7311 (end (cdr borders))
7314 end t)))
7322 (end (cdr borders))
7327 (narrow-to-region beg end)
7334 end t)
7339 (goto-char (match-end 0))))
7440 (let ((case-fold-search t) end-lim list name)
7446 (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point)))
7448 (idlwave-find-structure-definition nil t end-lim))
7488 (let* ((this-class (idlwave-sintern-class name))
7490 (list this-class
7493 (if (not (eq this-class class))
7688 (<= (match-end 0) pos)))
7737 (string-to-number (substring link (match-end 0))))))
7824 (setq start (match-end 0)
7826 tags (if (match-end 3)
7855 (put-text-property (match-beginning 0) (match-end 0)
7889 ;; Restore the pre-completion window configuration if this is safe.
7928 (setq this-command last-command)
7934 of a function or procedure, this command displays a help buffer with
7938 this arrow, if any (see `idlwave-store-inquired-class'). With a
7954 (remove-text-properties (match-beginning 1) (match-end 1)
7974 Like `idlwave-routine-info', this looks for a routine call at point.
7976 a RESOLVE call for this routine, to attempt to make it defined and its
8014 (defun idlwave-find-module-this-file ()
8022 would use. With ARG limit to this buffer. With two prefix ARG's
8027 (this-buffer (equal arg '(4)))
8045 (if this-buffer
8049 (if (or (not this-buffer)
8052 (format "Module in this file: "))
8069 (idlwave-do-find-module name type class nil this-buffer)))
8072 &optional force-source this-buffer)
8102 (when (not this-buffer)
8143 (this-word (idlwave-this-word "a-zA-Z0-9$_"))
8149 (not (equal this-word "")))
8150 (setq this-word (idlwave-sintern-routine-or-method
8151 this-word (nth 2 (nth 3 where))))
8152 (list this-word 'pro
8154 (cons this-word (cdr (nth 3 where)))
8157 (not (equal this-word ""))
8160 (setq this-word (idlwave-sintern-routine-or-method
8161 this-word (nth 2 (nth 3 where))))
8162 (list this-word 'fun
8164 (cons this-word (cdr (nth 3 where)))
8167 (not (equal this-word ""))
8169 (setq this-word (idlwave-sintern-routine this-word))
8170 (list this-word 'fun nil))
8226 ;; If this is the OBJ_NEW function, try to figure out the class and use
8316 ;; Inheritance may cause this keyword to be correct
8322 ;; We do not know the function, so this just might be a correct
8504 Start line with PREFIX. If a file name is inserted, add FILE-PROPS to
8618 word (idlwave-this-word)
8627 ((eq id 'usage) ; Online help on this routine
8692 with this command."
8716 the load path in order to find a definition. The output of this
8717 command can be used to detect possible name clashes during this process."
8825 ENTRY will also be returned, as the first item of this list."
9114 ;; Here we hack func-menu.el in order to support this new mode.
9115 ;; The latest versions of func-menu.el already have this stuff in, so
9152 ["Subprogram End" idlwave-end-of-subprogram t]
9154 ["Block End" idlwave-end-of-block t]
9168 ["Continue/Split line" idlwave-split-line t]
9372 ;; Make sure each abbreviation uses only one display line
9381 ;; Will only work on systems which support this.