Show
Ignore:
Timestamp:
05/13/06 11:31:18 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/progmodes/idlwave.el

    r4058 r4079  
    12091209       ;; fontification.  Slow, use it only in fancy fontification. 
    12101210       (keyword-parameters 
    1211         '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\\(\n[ \t]*;.*\\)*\n[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" 
    1212           (5 font-lock-reference-face))) 
     1211        '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" 
     1212          (6 font-lock-reference-face))) 
    12131213 
    12141214       ;; System variables start with a bang. 
     
    19161916  (set (make-local-variable 'comment-start-skip) ";+[ \t]*") 
    19171917  (set (make-local-variable 'comment-start) ";") 
     1918  (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions 
    19181919  (set (make-local-variable 'require-final-newline) t) 
    19191920  (set (make-local-variable 'abbrev-all-caps) t) 
     
    19481949  ;; on the `idlwave-mode' symbol. 
    19491950  (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) 
     1951  (set (make-local-variable 'font-lock-mark-block-function) 
     1952       'idlwave-mark-subprogram) 
     1953  (set (make-local-variable 'font-lock-fontify-region-function) 
     1954       'idlwave-font-lock-fontify-region) 
    19501955 
    19511956  ;; Imenu setup 
     
    19561961  (set (make-local-variable 'imenu-prev-index-position-function) 
    19571962       'idlwave-prev-index-position) 
     1963 
     1964  ;; HideShow setup 
     1965  (add-to-list 'hs-special-modes-alist 
     1966               (list 'idlwave-mode 
     1967                     idlwave-begin-block-reg 
     1968                     idlwave-end-block-reg 
     1969                     ";" 
     1970                     'idlwave-forward-block nil)) 
     1971   
    19581972 
    19591973  ;; Make a local post-command-hook and add our hook to it 
     
    20012015    (setq idlwave-setup-done t))) 
    20022016 
     2017(defun idlwave-font-lock-fontify-region (beg end &optional verbose) 
     2018  "Fontify continuation lines correctly." 
     2019  (let (pos) 
     2020    (save-excursion 
     2021      (goto-char beg) 
     2022      (forward-line -1) 
     2023      (when (setq pos (idlwave-is-continuation-line)) 
     2024        (goto-char pos) 
     2025        (idlwave-beginning-of-statement) 
     2026        (setq beg (point))))) 
     2027  (font-lock-default-fontify-region beg end verbose)) 
     2028 
    20032029;; 
    20042030;; Code Formatting ---------------------------------------------------- 
    20052031;;  
    2006  
    2007 (defun idlwave-push-mark (&rest rest) 
    2008   "Push mark for compatibility with Emacs 18/19." 
    2009   (if (fboundp 'iconify-frame) 
    2010       (apply 'push-mark rest) 
    2011     (push-mark))) 
    20122032 
    20132033(defun idlwave-hard-tab () 
     
    24042424  (let ((end (point))) 
    24052425    (idlwave-beginning-of-statement) 
    2406     (idlwave-push-mark end nil t))) 
     2426    (push-mark end nil t))) 
    24072427 
    24082428(defun idlwave-mark-block () 
     
    24152435    (idlwave-backward-block) 
    24162436    (idlwave-beginning-of-statement) 
    2417     (idlwave-push-mark end nil t))) 
     2437    (push-mark end nil t))) 
    24182438 
    24192439 
     
    24262446  (let ((beg (point))) 
    24272447    (idlwave-forward-block) 
    2428     (idlwave-push-mark beg nil t)) 
     2448    (push-mark beg nil t)) 
    24292449  (exchange-point-and-mark)) 
    24302450 
     
    24472467  (backward-word 1)) 
    24482468 
    2449 (defun idlwave-forward-block (
     2469(defun idlwave-forward-block (&optional arg
    24502470  "Move across next nested block." 
    24512471  (interactive) 
    2452   (if (idlwave-down-block 1) 
    2453       (idlwave-block-jump-out 1 'nomark))) 
     2472  (let ((arg (or arg 1))) 
     2473    (if (idlwave-down-block arg) 
     2474        (idlwave-block-jump-out arg 'nomark)))) 
    24542475 
    24552476(defun idlwave-backward-block () 
     
    24972518              (progn 
    24982519                (forward-line 1) 
    2499                 (idlwave-push-mark beg nil t) 
     2520                (push-mark beg nil t) 
    25002521                (message "Could not find end of doc library header."))) 
    25012522          (message "Could not find doc library header start.") 
    25022523          (goto-char here))))) 
    2503  
    25042524 
    25052525(defun idlwave-current-routine () 
     
    31953215Blank or comment-only lines following regular continuation lines (with 
    31963216`$') count as continuations too." 
    3197   (save-excursion 
    3198     (or  
    3199      (idlwave-look-at "\\<\\$") 
    3200      (catch 'loop 
    3201        (while (and (looking-at "^[ \t]*\\(;.*\\)?$")  
    3202                    (eq (forward-line -1) 0)) 
    3203          (if (idlwave-look-at "\\<\\$") (throw 'loop t))))))) 
     3217  (let (p) 
     3218    (save-excursion 
     3219      (or  
     3220       (idlwave-look-at "\\<\\$") 
     3221       (catch 'loop 
     3222         (while (and (looking-at "^[ \t]*\\(;.*\\)?$")  
     3223                     (eq (forward-line -1) 0)) 
     3224           (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) 
    32043225 
    32053226(defun idlwave-is-comment-line ()