[BACK]Return to asir-mode.el CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / post-msg-asirgui

Diff for /OpenXM_contrib2/windows/post-msg-asirgui/asir-mode.el between version 1.3 and 1.4

version 1.3, 2013/09/19 19:57:32 version 1.4, 2013/09/21 03:52:05
Line 2 
Line 2 
 ;;  ;;
 ;; asir-mode.el -- asir mode  ;; asir-mode.el -- asir mode
 ;;  ;;
 ;; $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asir-mode.el,v 1.2 2013/08/29 17:39:29 ohara Exp $  ;; $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asir-mode.el,v 1.3 2013/09/19 19:57:32 ohara Exp $
   
 ;; This program is free software: you can redistribute it and/or modify  ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published by
Line 78 
Line 78 
                                  (delete-frame asir-cmd-frame)))))))                                   (delete-frame asir-cmd-frame)))))))
   
 (defun asir-execute-current-buffer ()  (defun asir-execute-current-buffer ()
   "Execute the current buffer on asir"    "Execute current buffer on asir"
   (interactive)    (interactive)
   (let ((exec-path (asir-effective-exec-path)))    (let ((exec-path (asir-effective-exec-path)))
         (asir-cmd-load (buffer-file-name))))          (asir-cmd-load (buffer-file-name))))
   
 (defun asir-execute-region ()  (defun asir-execute-region ()
   "Execute the region on asir"    "Execute region on asir"
   (interactive)    (interactive)
   (save-excursion    (save-excursion
         (if mark-active          (if mark-active
Line 97 
Line 97 
                   (kill-buffer temp-buffer)                    (kill-buffer temp-buffer)
                   (asir-cmd-load temp-file)))))                    (asir-cmd-load temp-file)))))
   
   (defun asir-paste-region ()
     "Paste region to asir"
     (interactive)
     (if mark-active
         (save-excursion
           (let ((buffer (current-buffer))
                 (start (region-beginning))
                 (end (region-end)))
             (set-buffer asir-cmd-buffer-name)
             (goto-char (point-max))
             (insert-buffer-substring buffer start end)
             (comint-send-input)))))
   
 ;;;; Extension for CC-mode.  ;;;; Extension for CC-mode.
   
 (require 'cc-mode)  (require 'cc-mode)
Line 137 
Line 150 
                         ["Terminate Asir" asir-terminate t]                          ["Terminate Asir" asir-terminate t]
                         ["Execute Current Buffer on Asir" asir-execute-current-buffer (buffer-file-name)]                          ["Execute Current Buffer on Asir" asir-execute-current-buffer (buffer-file-name)]
                         ["Execute Region on Asir" asir-execute-region mark-active]                          ["Execute Region on Asir" asir-execute-region mark-active]
                           ["Paste Region to Asir" asir-paste-region mark-active]
                         )))                          )))
   
 (defvar asir-font-lock-extra-types nil  (defvar asir-font-lock-extra-types nil
Line 174  Each list item should be a regexp matching a single id
Line 188  Each list item should be a regexp matching a single id
 (define-key asir-mode-map (kbd "C-c t") 'asir-terminate)  (define-key asir-mode-map (kbd "C-c t") 'asir-terminate)
 (define-key asir-mode-map (kbd "C-c l") 'asir-execute-current-buffer)  (define-key asir-mode-map (kbd "C-c l") 'asir-execute-current-buffer)
 (define-key asir-mode-map (kbd "C-c r") 'asir-execute-region)  (define-key asir-mode-map (kbd "C-c r") 'asir-execute-region)
   (define-key asir-mode-map (kbd "C-c p") 'asir-paste-region)
   
 (easy-menu-define asir-menu asir-mode-map "asir Mode Commands"  (easy-menu-define asir-menu asir-mode-map "asir Mode Commands"
                   ;; Can use `asir' as the language for `c-mode-menu'                    ;; Can use `asir' as the language for `c-mode-menu'

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>