[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.8 and 1.16

version 1.8, 2013/11/16 06:54:12 version 1.16, 2021/03/14 23:21:21
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.7 2013/09/21 10:51:45 ohara Exp $  ;; $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asir-mode.el,v 1.15 2021/02/24 23:10:32 takayama 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 31 
Line 31 
 ;; The following key binding can be used:  ;; The following key binding can be used:
 ;; C-c s     Asir starts up in another window.  ;; C-c s     Asir starts up in another window.
 ;; C-c t     Asir terminates.  ;; C-c t     Asir terminates.
   ;; C-c a     Abort current calculation.
 ;; C-c l     The current buffer is loaded to Asir as a file.  ;; C-c l     The current buffer is loaded to Asir as a file.
 ;; C-c r     Selected region is loaded to Asir as a file.  ;; C-c r     Selected region is loaded to Asir as a file.
 ;; C-c p     Selected region is pasted to Asir.  ;; C-c p     Selected region is pasted to Asir.
   
 (require 'shell)  (require 'shell)
   (require 'cl)
   
 ;;;; AsirGUI for Windows  ;;;; AsirGUI for Windows
 (defvar asir-exec-path '("~/Desktop/asir/bin" "c:/Program Files/asir/bin" "c:/Program Files (x64)/asir/bin" "c:/asir/bin")  (defvar asir-exec-path '("~/Desktop/asir/bin" "c:/Program Files/asir/bin" "c:/Program Files (x64)/asir/bin" "c:/asir/bin")
Line 91 
Line 93 
               (shell (get-buffer-create asir-cmd-buffer-name)))                (shell (get-buffer-create asir-cmd-buffer-name)))
             (sleep-for 1)              (sleep-for 1)
             (goto-char (point-max))              (goto-char (point-max))
             (insert "asir")              (insert "openxm asir")
             (comint-send-input)              (comint-send-input)
             (select-frame current-frame))))))              (select-frame current-frame))))))
   
Line 150 
Line 152 
             (insert-buffer-substring buffer start end)              (insert-buffer-substring buffer start end)
             (comint-send-input))))))              (comint-send-input))))))
   
   (defun asir-abort ()
     "Abort calculation on asir"
     (interactive)
     (if (eq system-type 'windows-nt)
       ;; for Windows
         (let ((exec-path (asir-effective-exec-path)))
           (start-process "asir-proc-cmdasir" nil "cmdasir" "--abort"))
       ;; for UNIX
       (save-excursion
         (if (get-buffer asir-cmd-buffer-name)
             (progn
               (set-buffer asir-cmd-buffer-name)
               (comint-kill-input)
               (comint-interrupt-subjob)
               (goto-char (point-max))
               (insert "t\ny")
               (comint-send-input)
               )))))
   
 ;;;; Extension for CC-mode.  ;;;; Extension for CC-mode.
   
 (require 'cc-mode)  (require 'cc-mode)
Line 188 
Line 209 
                   '("----"                    '("----"
                         ["Start Asir" asir-start t]                          ["Start Asir" asir-start t]
                         ["Terminate Asir" asir-terminate t]                          ["Terminate Asir" asir-terminate t]
                           ["Abort calcuration on Asir" asir-abort 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]                          ["Paste Region to Asir" asir-paste-region mark-active]
Line 226  Each list item should be a regexp matching a single id
Line 248  Each list item should be a regexp matching a single id
 ;; Key binding for asir-mode  ;; Key binding for asir-mode
 (define-key asir-mode-map (kbd "C-c s") 'asir-start)  (define-key asir-mode-map (kbd "C-c s") 'asir-start)
 (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 a") 'asir-abort)
 (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)  (define-key asir-mode-map (kbd "C-c p") 'asir-paste-region)
Line 1230  Key bindings:
Line 1253  Key bindings:
            ((and (eq char-after-ip ?{)             ((and (eq char-after-ip ?{)
                  (progn                   (progn
                    (setq placeholder (c-inside-bracelist-p (point)                     (setq placeholder (c-inside-bracelist-p (point)
                                                            paren-state))                                                             paren-state nil))
                    (if placeholder                     (if placeholder
                        (setq tmpsymbol '(brace-list-open . inexpr-class))                         (setq tmpsymbol '(brace-list-open . inexpr-class))
                      (setq tmpsymbol '(block-open . inexpr-statement)                       (setq tmpsymbol '(block-open . inexpr-statement)
Line 1353  Key bindings:
Line 1376  Key bindings:
                               (save-excursion                                (save-excursion
                                 (goto-char containing-sexp)                                  (goto-char containing-sexp)
                                 (c-looking-at-special-brace-list)))                                  (c-looking-at-special-brace-list)))
                          (c-inside-bracelist-p containing-sexp paren-state))))                           (c-inside-bracelist-p containing-sexp paren-state t))))
           (cond            (cond
   
            ;; CASE 9A: In the middle of a special brace list opener.             ;; CASE 9A: In the middle of a special brace list opener.

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.16

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