changeset 50648:5b37299dac0a

(dabbrev-case-fold-search): Add defvar for compiler. (fortran-abbrev-start): Make XEmacs compatible.
author Glenn Morris <rgm@gnu.org>
date Sun, 20 Apr 2003 13:03:04 +0000
parents 5773e914b2ed
children c2fa5aacd170
files lisp/progmodes/fortran.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el	Sun Apr 20 13:01:32 2003 +0000
+++ b/lisp/progmodes/fortran.el	Sun Apr 20 13:03:04 2003 +0000
@@ -54,6 +54,7 @@
 ;; * Support any other extensions to f77 grokked by GNU Fortran I've missed.
 
 (eval-when-compile			; silence compiler
+  (defvar dabbrev-case-fold-search)
   (defvar imenu-case-fold-search)
   (defvar imenu-syntax-alist))
 
@@ -773,13 +774,17 @@
   "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs.
 Any other key combination is executed normally."
   (interactive "*")
-  (let (c)
-    (insert last-command-char)
-    (if (and abbrev-mode
-             (or (eq (setq c (read-event)) ??) ; insert char if not `?'
-                 (eq c help-char)))
+  (insert last-command-char)
+  (let (char event)
+    (if (fboundp 'next-command-event) ; XEmacs
+        (setq event (next-command-event)
+              char (event-to-character event))
+      (setq event (read-event)
+            char event))
+    ;; Insert char if not equal to `?', or if abbrev-mode is off.
+    (if (and abbrev-mode (or (eq char ??) (eq char help-char)))
 	(fortran-abbrev-help)
-      (setq unread-command-events (list c)))))
+      (setq unread-command-events (list event)))))
 
 (defun fortran-abbrev-help ()
   "List the currently defined abbrevs in Fortran mode."