changeset 23848:7896e341d77f

(octave-abbrev-start): Use the correct name of the abbrev table, and provide support for XEmacs. (octave-xemacs-p): New variable.
author Karl Heuer <kwzh@gnu.org>
date Thu, 10 Dec 1998 03:15:25 +0000
parents 8d6ae4ca21a7
children 1f014e9d0768
files lisp/progmodes/octave-mod.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/octave-mod.el	Thu Dec 10 03:11:59 1998 +0000
+++ b/lisp/progmodes/octave-mod.el	Thu Dec 10 03:15:25 1998 +0000
@@ -626,6 +626,9 @@
     (delete-horizontal-space)
     (insert (concat " " octave-continuation-string))))
 
+(defvar octave-xemacs-p
+  (string-match "XEmacs\\|Lucid" emacs-version))
+
 ;;; Comments
 (defun octave-comment-region (beg end &optional arg)
   "Comment or uncomment each line in the region as Octave code.
@@ -1337,9 +1340,12 @@
       (self-insert-command 1)
     (let (c)
       (insert last-command-char)
-      (if (or (eq (setq c (read-event)) ??)
-	      (eq c help-char))
-	  (let ((abbrev-table-name-list '(octave-mode-abbrev-table)))
+      (if (if octave-xemacs-p
+	      (or (eq (event-to-character (setq c (next-event))) ??)
+		  (eq (event-to-character c) help-char))
+	    (or (eq (setq c (read-event)) ??)
+		(eq c help-char)))
+	  (let ((abbrev-table-name-list '(octave-abbrev-table)))
 	    (list-abbrevs))
 	(setq unread-command-events (list c))))))