]> git.eshelyaron.com Git - emacs.git/commitdiff
(octave-abbrev-start): Use the correct
authorKarl Heuer <kwzh@gnu.org>
Thu, 10 Dec 1998 03:15:25 +0000 (03:15 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 10 Dec 1998 03:15:25 +0000 (03:15 +0000)
name of the abbrev table, and provide support for XEmacs.
(octave-xemacs-p): New variable.

lisp/progmodes/octave-mod.el

index f97b595b62da26d8ce7084cfeded1112a2a65fc6..2b95c85b415d874613a237f476f553fbda57a7c9 100644 (file)
@@ -626,6 +626,9 @@ the end keyword."
     (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 @@ Note that all Octave mode abbrevs start with a grave accent."
       (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))))))