156 |
|
|
157 |
;;; Code: |
;;; Code: |
158 |
|
|
159 |
(eval-when-compile |
(defvar comment-auto-fill-only-comments) |
160 |
(defvar comment-auto-fill-only-comments) |
(defvar font-lock-keywords) |
|
(defvar font-lock-keywords) |
|
|
(defvar imenu--index-alist)) |
|
161 |
|
|
162 |
;; User options |
;; User options |
163 |
|
|
475 |
["Insert Block End" f90-insert-end t] |
["Insert Block End" f90-insert-end t] |
476 |
"--" |
"--" |
477 |
("Highlighting" |
("Highlighting" |
478 |
["Toggle font-lock-mode" font-lock-mode :active t |
["Toggle font-lock-mode" font-lock-mode :selected font-lock-mode |
479 |
:selected font-lock-mode :style toggle] |
:style toggle] |
480 |
"--" |
"--" |
481 |
["Light highlighting (level 1)" f90-font-lock-1 t] |
["Light highlighting (level 1)" f90-font-lock-1 t] |
482 |
["Moderate highlighting (level 2)" f90-font-lock-2 t] |
["Moderate highlighting (level 2)" f90-font-lock-2 t] |
494 |
["Downcase Keywords (region)" f90-downcase-region-keywords mark-active] |
["Downcase Keywords (region)" f90-downcase-region-keywords mark-active] |
495 |
) |
) |
496 |
"--" |
"--" |
497 |
["Toggle auto-fill" auto-fill-mode :active t :selected auto-fill-function |
["Toggle auto-fill" auto-fill-mode :selected auto-fill-function |
|
:style toggle] |
|
|
["Toggle abbrev-mode" abbrev-mode :active t :selected abbrev-mode |
|
498 |
:style toggle] |
:style toggle] |
499 |
|
["Toggle abbrev-mode" abbrev-mode :selected abbrev-mode :style toggle] |
500 |
["Add imenu Menu" f90-add-imenu-menu |
["Add imenu Menu" f90-add-imenu-menu |
501 |
:active (or (not (boundp 'imenu--index-alist)) (not imenu--index-alist)) |
:active (not (lookup-key (current-local-map) [menu-bar index])) |
502 |
:visible (fboundp 'imenu-add-to-menubar)] |
:included (fboundp 'imenu-add-to-menubar)] |
503 |
)) |
)) |
504 |
|
|
505 |
(defun f90-font-lock-1 () |
(defun f90-font-lock-1 () |
600 |
(defun f90-add-imenu-menu () |
(defun f90-add-imenu-menu () |
601 |
"Add an imenu menu to the menubar." |
"Add an imenu menu to the menubar." |
602 |
(interactive) |
(interactive) |
603 |
(if (and (boundp 'imenu--index-alist) imenu--index-alist) |
(if (lookup-key (current-local-map) [menu-bar index]) |
604 |
(message "%s" "F90-imenu already exists.") |
(message "%s" "F90-imenu already exists.") |
605 |
(imenu-add-to-menubar "F90-imenu") |
(imenu-add-to-menubar "F90-imenu") |
606 |
(redraw-frame (selected-frame)))) |
(redraw-frame (selected-frame)))) |
1321 |
(interactive) |
(interactive) |
1322 |
(let (indent no-line-number (pos (make-marker)) (case-fold-search t)) |
(let (indent no-line-number (pos (make-marker)) (case-fold-search t)) |
1323 |
(set-marker pos (point)) |
(set-marker pos (point)) |
1324 |
(beginning-of-line) ; digits after & \n are not line-nos |
(beginning-of-line) ; digits after & \n are not line-nos |
1325 |
(if (save-excursion (and (f90-previous-statement) (f90-line-continued))) |
(if (save-excursion (and (f90-previous-statement) (f90-line-continued))) |
1326 |
(progn (setq no-line-number t) (skip-chars-forward " \t")) |
(progn (setq no-line-number t) (skip-chars-forward " \t")) |
1327 |
(f90-indent-line-no)) |
(f90-indent-line-no)) |
1348 |
(interactive) |
(interactive) |
1349 |
(let (string cont (case-fold-search t)) |
(let (string cont (case-fold-search t)) |
1350 |
(if abbrev-mode (expand-abbrev)) |
(if abbrev-mode (expand-abbrev)) |
1351 |
(beginning-of-line) ; reindent where likely to be needed |
(beginning-of-line) ; reindent where likely to be needed |
1352 |
(f90-indent-line-no) |
(f90-indent-line-no) |
1353 |
(f90-indent-line 'no-update) |
(f90-indent-line 'no-update) |
1354 |
(end-of-line) |
(end-of-line) |
1397 |
f90-if-indent) |
f90-if-indent) |
1398 |
((setq struct (f90-looking-at-type-like)) |
((setq struct (f90-looking-at-type-like)) |
1399 |
f90-type-indent) |
f90-type-indent) |
1400 |
((or(setq struct (f90-looking-at-program-block-start)) |
((or (setq struct (f90-looking-at-program-block-start)) |
1401 |
(looking-at "contains[ \t]*\\($\\|!\\)")) |
(looking-at "contains[ \t]*\\($\\|!\\)")) |
1402 |
f90-program-indent))) |
f90-program-indent))) |
1403 |
(if ind-b (setq ind-lev (+ ind-lev ind-b))) |
(if ind-b (setq ind-lev (+ ind-lev ind-b))) |
1404 |
(if struct (setq block-list (cons struct block-list))) |
(if struct (setq block-list (cons struct block-list))) |