emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el
Date: Sun, 28 Apr 2002 18:09:55 -0400

Index: emacs/lisp/progmodes/f90.el
diff -c emacs/lisp/progmodes/f90.el:1.38 emacs/lisp/progmodes/f90.el:1.39
*** emacs/lisp/progmodes/f90.el:1.38    Thu Apr 25 17:55:39 2002
--- emacs/lisp/progmodes/f90.el Sun Apr 28 18:09:55 2002
***************
*** 242,247 ****
--- 242,250 ----
    :type 'boolean
    :group 'f90)
  
+ (defconst f90-xemacs-flag (string-match "XEmacs\\|Lucid" emacs-version)
+   "Non-nil means f90-mode thinks it is running under XEmacs.")
+ 
  (defconst f90-keywords-re
    (regexp-opt '("allocatable" "allocate" "assign" "assignment" "backspace"
                "block" "call" "case" "character" "close" "common" "complex"
***************
*** 441,447 ****
  
   
  ;; menus
! (if (string-match "XEmacs" emacs-version)
      (defvar f90-xemacs-menu
        '("F90"
        ["Indent Subprogram"       f90-indent-subprogram t]
--- 444,450 ----
  
   
  ;; menus
! (if f90-xemacs-flag
      (defvar f90-xemacs-menu
        '("F90"
        ["Indent Subprogram"       f90-indent-subprogram t]
***************
*** 672,682 ****
  
  ;; When compiling under GNU Emacs, load imenu during compilation.  If
  ;; you have 19.22 or earlier, comment this out, or get imenu.
! (and (fboundp 'eval-when-compile)
!      (eval-when-compile
!        (if (not (string-match "XEmacs" emacs-version))
!          (require 'imenu))
!        ()))
  
  ;; abbrevs have generally two letters, except standard types `c, `i, `r, `t
  (defvar f90-mode-abbrev-table nil)
--- 675,682 ----
  
  ;; When compiling under GNU Emacs, load imenu during compilation.  If
  ;; you have 19.22 or earlier, comment this out, or get imenu.
! (or f90-xemacs-flag (eval-when-compile (require 'imenu)))
! 
  
  ;; abbrevs have generally two letters, except standard types `c, `i, `r, `t
  (defvar f90-mode-abbrev-table nil)
***************
*** 829,843 ****
    (setq normal-auto-fill-function 'f90-do-auto-fill)
    (setq indent-tabs-mode nil)
    ;; Setting up things for font-lock
!   (if (string-match "XEmacs" emacs-version)
!       (progn
!       (put 'f90-mode 'font-lock-keywords-case-fold-search t)
!       (if (and (featurep 'menubar)
!                current-menubar
!                (not (assoc "F90" current-menubar)))
!           (progn
!             (set-buffer-menubar (copy-sequence current-menubar))
!             (add-submenu nil f90-xemacs-menu)))))
    ;; XEmacs: (Don't need a special case, since both emacsen work alike -sb)
    (make-local-variable 'font-lock-defaults)
    (setq font-lock-defaults 
--- 829,841 ----
    (setq normal-auto-fill-function 'f90-do-auto-fill)
    (setq indent-tabs-mode nil)
    ;; Setting up things for font-lock
!   (when f90-xemacs-flag
!     (put 'f90-mode 'font-lock-keywords-case-fold-search t)
!     (when (and (featurep 'menubar)
!              current-menubar
!              (not (assoc "F90" current-menubar)))
!           (set-buffer-menubar (copy-sequence current-menubar))
!           (add-submenu nil f90-xemacs-menu)))
    ;; XEmacs: (Don't need a special case, since both emacsen work alike -sb)
    (make-local-variable 'font-lock-defaults)
    (setq font-lock-defaults 
***************
*** 1227,1236 ****
      (goto-char pos)
      (setq program (f90-beginning-of-subprogram))
      ;; The keywords in the preceding lists assume case-insensitivity.
!     (if (string-match "XEmacs" emacs-version)
        (zmacs-activate-region)
!       (setq mark-active t)
!       (setq deactivate-mark nil))
      program))
  
  (defun f90-comment-region (beg-region end-region)
--- 1225,1234 ----
      (goto-char pos)
      (setq program (f90-beginning-of-subprogram))
      ;; The keywords in the preceding lists assume case-insensitivity.
!     (if f90-xemacs-flag
        (zmacs-activate-region)
!       (setq mark-active t
!             deactivate-mark nil))
      program))
  
  (defun f90-comment-region (beg-region end-region)
***************
*** 1399,1405 ****
      (goto-char save-point)
      (set-marker end-region-mark nil)
      (set-marker save-point nil)
!     (if (string-match "XEmacs" emacs-version)
        (zmacs-deactivate-region)
        (deactivate-mark))))
  
--- 1397,1403 ----
      (goto-char save-point)
      (set-marker end-region-mark nil)
      (set-marker save-point nil)
!     (if f90-xemacs-flag
        (zmacs-deactivate-region)
        (deactivate-mark))))
  
***************
*** 1512,1518 ****
                        (zerop (forward-line 1))))
        (setq f90-cache-position (point)))
      (setq f90-cache-position nil)
!     (if (string-match "XEmacs" emacs-version)
        (zmacs-deactivate-region)
        (deactivate-mark))))
  
--- 1510,1516 ----
                        (zerop (forward-line 1))))
        (setq f90-cache-position (point)))
      (setq f90-cache-position nil)
!     (if f90-xemacs-flag
        (zmacs-deactivate-region)
        (deactivate-mark))))
  
***************
*** 1615,1629 ****
    (interactive)
    (let (e c)
      (insert last-command-char)
!     (if (string-match "XEmacs" emacs-version)
!       (progn
!         (setq e (next-command-event))
!         (setq c (event-to-character e)))
!       (setq c (read-event)))
      ;; insert char if not equal to `?'
      (if (or (eq c ??) (eq c help-char))
        (f90-abbrev-help)
!       (if (string-match "XEmacs" emacs-version)
          (setq unread-command-event e)
        (setq unread-command-events (list c))))))
  
--- 1613,1626 ----
    (interactive)
    (let (e c)
      (insert last-command-char)
!     (if (not f90-xemacs-flag)
!         (setq c (read-event))
!       (setq e (next-command-event)
!             c (event-to-character e)))
      ;; insert char if not equal to `?'
      (if (or (eq c ??) (eq c help-char))
        (f90-abbrev-help)
!       (if f90-xemacs-flag
          (setq unread-command-event e)
        (setq unread-command-events (list c))))))
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]