diff options
| author | Stefan Monnier | 2006-01-18 15:56:30 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-01-18 15:56:30 +0000 |
| commit | 5d724235437912e7c5cd1214fd09f91e7daa774b (patch) | |
| tree | 7b12be96b4fa7db37cb84f05dbc98bdbca7d636e | |
| parent | edd1c6857ecfb345734ef01b0dbcd7208e207fc7 (diff) | |
| download | emacs-5d724235437912e7c5cd1214fd09f91e7daa774b.tar.gz emacs-5d724235437912e7c5cd1214fd09f91e7daa774b.zip | |
Move defvars out of eval-when-compile.
(fortran-break-line): Remove unused var `opoint'.
(fortran-abbrev-start): Obey help-event-list.
| -rw-r--r-- | lisp/progmodes/fortran.el | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 65e7b8914ae..c7a175241d5 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; fortran.el --- Fortran mode for GNU Emacs | 1 | ;;; fortran.el --- Fortran mode for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, | 3 | ;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, |
| 4 | ;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 4 | ;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> | 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> |
| 7 | ;; Maintainer: Glenn Morris <rgm@gnu.org> | 7 | ;; Maintainer: Glenn Morris <rgm@gnu.org> |
| @@ -53,12 +53,12 @@ | |||
| 53 | ;; second in column 6. | 53 | ;; second in column 6. |
| 54 | ;; * Support any other extensions to f77 grokked by GNU Fortran I've missed. | 54 | ;; * Support any other extensions to f77 grokked by GNU Fortran I've missed. |
| 55 | 55 | ||
| 56 | (eval-when-compile ; silence compiler | 56 | ;; silence compiler |
| 57 | (defvar dabbrev-case-fold-search) | 57 | (defvar dabbrev-case-fold-search) |
| 58 | (defvar font-lock-syntactic-keywords) | 58 | (defvar font-lock-syntactic-keywords) |
| 59 | (defvar gud-find-expr-function) | 59 | (defvar gud-find-expr-function) |
| 60 | (defvar imenu-case-fold-search) | 60 | (defvar imenu-case-fold-search) |
| 61 | (defvar imenu-syntax-alist)) | 61 | (defvar imenu-syntax-alist) |
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | (defgroup fortran nil | 64 | (defgroup fortran nil |
| @@ -891,16 +891,16 @@ With non-nil ARG, uncomments the region." | |||
| 891 | Any other key combination is executed normally." | 891 | Any other key combination is executed normally." |
| 892 | (interactive "*") | 892 | (interactive "*") |
| 893 | (insert last-command-char) | 893 | (insert last-command-char) |
| 894 | (let (char event) | 894 | (let* ((event (if (fboundp 'next-command-event) ; XEmacs |
| 895 | (if (fboundp 'next-command-event) ; XEmacs | 895 | (next-command-event) |
| 896 | (setq event (next-command-event) | 896 | (read-event))) |
| 897 | char (event-to-character event)) | 897 | (char (if (fboundp 'event-to-character) |
| 898 | (setq event (read-event) | 898 | (event-to-character event) event))) |
| 899 | char event)) | ||
| 900 | ;; Insert char if not equal to `?', or if abbrev-mode is off. | 899 | ;; Insert char if not equal to `?', or if abbrev-mode is off. |
| 901 | (if (and abbrev-mode (or (eq char ??) (eq char help-char))) | 900 | (if (and abbrev-mode (or (eq char ??) (eq char help-char) |
| 901 | (memq event help-event-list))) | ||
| 902 | (fortran-abbrev-help) | 902 | (fortran-abbrev-help) |
| 903 | (setq unread-command-events (list event))))) | 903 | (push event unread-command-events)))) |
| 904 | 904 | ||
| 905 | (defun fortran-abbrev-help () | 905 | (defun fortran-abbrev-help () |
| 906 | "List the currently defined abbrevs in Fortran mode." | 906 | "List the currently defined abbrevs in Fortran mode." |
| @@ -911,8 +911,7 @@ Any other key combination is executed normally." | |||
| 911 | 911 | ||
| 912 | (defun fortran-prepare-abbrev-list-buffer () | 912 | (defun fortran-prepare-abbrev-list-buffer () |
| 913 | "Create a buffer listing the Fortran mode abbreviations." | 913 | "Create a buffer listing the Fortran mode abbreviations." |
| 914 | (save-excursion | 914 | (with-current-buffer (get-buffer-create "*Abbrevs*") |
| 915 | (set-buffer (get-buffer-create "*Abbrevs*")) | ||
| 916 | (erase-buffer) | 915 | (erase-buffer) |
| 917 | (insert-abbrev-table-description 'fortran-mode-abbrev-table t) | 916 | (insert-abbrev-table-description 'fortran-mode-abbrev-table t) |
| 918 | (goto-char (point-min)) | 917 | (goto-char (point-min)) |
| @@ -1917,8 +1916,7 @@ If ALL is nil, only match comments that start in column > 0." | |||
| 1917 | 1916 | ||
| 1918 | (defun fortran-break-line () | 1917 | (defun fortran-break-line () |
| 1919 | "Call `fortran-split-line'. Joins continuation lines first, then refills." | 1918 | "Call `fortran-split-line'. Joins continuation lines first, then refills." |
| 1920 | (let ((opoint (point)) | 1919 | (let ((bol (line-beginning-position)) |
| 1921 | (bol (line-beginning-position)) | ||
| 1922 | (comment-string | 1920 | (comment-string |
| 1923 | (save-excursion | 1921 | (save-excursion |
| 1924 | (if (fortran-find-comment-start-skip) | 1922 | (if (fortran-find-comment-start-skip) |
| @@ -2036,5 +2034,5 @@ Supplying prefix arg DO-SPACE prevents stripping the whitespace." | |||
| 2036 | 2034 | ||
| 2037 | (provide 'fortran) | 2035 | (provide 'fortran) |
| 2038 | 2036 | ||
| 2039 | ;;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04 | 2037 | ;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04 |
| 2040 | ;;; fortran.el ends here | 2038 | ;;; fortran.el ends here |