⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matlab-eei.el

📁 Servlet,处理客户端输入,调查问卷,发送非HTML文档,获取Servlet配置参数,Cookie会话跟踪
💻 EL
📖 第 1 页 / 共 4 页
字号:
(defun matlab-eei-event-variable-value1 (value)  "Handles response to a get variable valuecommand. This function displays the first lineof the value in the minibuffer. If the valuehas more than one line, it appends ... to theend of the first line to indicate that thedisplay is truncated."  (let ((line1 	 (substring 	  value	  0	  (string-match "\n" value))))        (if (< (length line1) (1- (length value)))	(setq line1 (concat line1 " ...")))    (message line1)));; +-----------------------------------------+;; | Close All M-File Buffers                |;; +-----------------------------------------+(defun matlab-eei-close-all ()  "Close all M-file buffers."  (interactive)  (loop for buf in (buffer-list) do	(save-excursion	  (set-buffer buf)	  (if (eq major-mode 'matlab-mode)	      (kill-buffer buf)))));; +-----------------------------------------+;; | EEI Menu                                |;; +-----------------------------------------+(defun matlab-eei-menu-item (item)  "Build an XEmacs compatible menu item from vector ITEM.That is remove the unsupported :help stuff."  (if (featurep 'xemacs)      (let ((n (length item))            (i 0)            slot l)        (while (< i n)          (setq slot (aref item i))          (if (and (keywordp slot)                   (eq slot :help))              (setq i (1+ i))            (setq l (cons slot l)))          (setq i (1+ i)))        (apply 'vector (nreverse l)))    item))(defvar matlab-eei-menu-spec  (list    "Mdb"   (matlab-eei-menu-item    ["Step"                            matlab-eei-step      :active (and 	      matlab-eei-matlab-in-debug-mode-p	      (not (buffer-modified-p)))     :help "Step over the next line"])     (matlab-eei-menu-item    ["Step In"                         matlab-eei-step-in      :active (and 	      matlab-eei-matlab-in-debug-mode-p	      (not (buffer-modified-p)))     :help "Step into the next line."])   (matlab-eei-menu-item    ["Step Out"                       matlab-eei-step-out      :active (and 	      matlab-eei-matlab-in-debug-mode-p	      (not (buffer-modified-p)))     :help "Step out of the current function."])   "-"   (matlab-eei-menu-item    ["Run"                            matlab-eei-run-continue      :included (not matlab-eei-matlab-in-debug-mode-p)     :active (and (not (buffer-modified-p))		  (buffer-file-name))     :help "Run this M-file."])             (matlab-eei-menu-item    ["Continue"                        matlab-eei-run-continue      :included (and 		matlab-eei-matlab-in-debug-mode-p		(not (buffer-modified-p)))     :help "Continue from the current breakpoint."])	   (matlab-eei-menu-item    ["Go Until Cursor"                matlab-eei-go-until-cursor     :active (and 	      matlab-eei-matlab-in-debug-mode-p	      (not (buffer-modified-p)))     :help "Continue execution to the current line."])   (matlab-eei-menu-item    ["Exit Debug Mode"                 matlab-eei-exit-debug      :active matlab-eei-matlab-in-debug-mode-p     :help "Exit debug mode"])   "-"   (matlab-eei-menu-item    ["Set/Clear Breakpoint"           matlab-eei-breakpoint-set-clear      :active (buffer-file-name)     :help "Set or clear breakpoint at the current line."])   (matlab-eei-menu-item    ["Clear All Breakpoints"           matlab-eei-clear-breakpoints      :active matlab-eei-breakpoints-alist     :help "Clear all breakpoints."])   "-"   (matlab-eei-menu-item    ["Stop If Error"                   matlab-eei-toggle-stop-if-error      :active t      :style radio      :selected (matlab-eei-get-stop-if-state "error")     :help "Stop if an uncaught error occurs."])   (matlab-eei-menu-item    ["Stop If Caught Error"               matlab-eei-toggle-stop-if-caught-error      :active t      :style radio      :selected (matlab-eei-get-stop-if-state "caught_error")     :help "Stop if a caught error occurs."])   (matlab-eei-menu-item    ["Stop If Warning"                 matlab-eei-toggle-stop-if-warning      :active t     :style radio      :selected (matlab-eei-get-stop-if-state "warning")     :help "Stop if a warning occurs."])      (matlab-eei-menu-item    ["Stop If Nan/Inf"                 matlab-eei-toggle-stop-if-nan-inf      :active t     :style radio      :selected (matlab-eei-get-stop-if-state "nan_inf")     :help "Stop if an underflow or overflow occurs."])   "-"   (matlab-eei-menu-item    ["Show Stack Navigator"            matlab-eei-display-stack-navigator      :active (buffer-file-name)     :help "Display the stack navigator."])   (matlab-eei-menu-item    ["Evaluate Region"                 matlab-eei-eval-region      :active (buffer-file-name)     :help "Evaluate the selected lines of code"])					; 	"-"	  ; 	["Display Variable"           matlab-eei-display-variable; 	                              :enable  matlab-eei-matlab-stopped-p]   )  "MATLAB debug menu specification.")(defvar matlab-eei-mode-map  (let ((km (make-sparse-keymap)))    (easy-menu-define matlab-eei-menu km "MATLAB EEI Minor Mode Menu"      matlab-eei-menu-spec)    km)  "MATLAB EEI keymap")(defvar matlab-eei-minor-mode nil  "If non-nil, show MATLAB EEI menu.")(make-variable-buffer-local 'matlab-eei-minor-mode)(defun matlab-eei-minor-mode (&optional arg)  "Toggle MATLAB EEI minor mode.With prefix argument ARG, turn on if positive, otherwise off..\\{matlab-eei-mode-map}"  (interactive   (list (or current-prefix-arg             (if matlab-eei-minor-mode 0 1))))  (setq matlab-eei-minor-mode        (if arg            (>             (prefix-numeric-value arg)             0)          (not matlab-eei-minor-mode)))  (if matlab-eei-minor-mode      (if (featurep 'xemacs)            (easy-menu-add matlab-eei-menu-spec matlab-eei-mode-map))    (if (featurep 'xemacs)      (easy-menu-remove matlab-eei-menu-spec))))(if (fboundp 'add-minor-mode)    ;; Emacs 21 & XEmacs    (defalias 'matlab-eei-add-minor-mode 'add-minor-mode)  ;; Emacs 20  (defun matlab-eei-add-minor-mode (toggle name &optional keymap)    "Register a new Semantic minor mode.TOGGLE is a symbol which is the name of a buffer-local variable thatis toggled on or off to say whether the minor mode is active or not.It is also an interactive function to toggle the mode.NAME specifies what will appear in the mode line when the minor modeis active.  NAME should be either a string starting with a space, or asymbol whose value is such a string.Optional KEYMAP is the keymap for the minor mode that will be addedto `minor-mode-map-alist'."  (or (assq toggle minor-mode-alist)      (setq minor-mode-alist (cons (list toggle name)                                   minor-mode-alist)))      (or (not keymap)      (assq toggle minor-mode-map-alist)      (setq minor-mode-map-alist (cons (cons toggle keymap)                                       minor-mode-map-alist))))      )(matlab-eei-add-minor-mode 'matlab-eei-minor-mode " EEI" matlab-eei-mode-map)(defcustom matlab-eei-key-bindings  (list (cons "[?\C-c ?\C-d ?\C-s]" 'matlab-eei-step)	(cons "[?\C-c ?\C-d ?\C-i]" 'matlab-eei-step-in)	(cons "[?\C-c ?\C-d ?\C-o]" 'matlab-eei-step-out)	(cons "[?\C-c ?\C-d ?\C-r]" 'matlab-eei-run-continue)	(cons "[?\C-c ?\C-d ?\C-b]" 'matlab-eei-breakpoint-set-clear)	(cons "[?\C-c ?\C-d ?\C-e]" 'matlab-eei-eval-region))  "*Specifies key bindings for MATLAB debug key bindings.The value of this variable is an association list. The car ofeach element specifies a key sequence. The cdr specifies an interactive command that the key sequence executes. To entera key with a modifier, type C-q followed by the desired modified	keystroke. For example, to enter C-s (Control s) as the key to bebound, type C-q C-s in the key field in the customization buffer.You can use the notation [f1], [f2], etc., to specify function keys."  :group 'matlab  :type '(repeat	  (cons :tag "Key binding"	   (string :tag "Key")	   (function :tag "Command")))  :set '(lambda (sym val)	  ;; Unmap existing key bindings	  (if (and	       (boundp 'matlab-eei-key-bindings)	       matlab-eei-key-bindings)	      (mapc 	       (lambda (binding)		 (let ((key (car binding))		       (fcn (cdr binding)))		   (if (string-match "\\[.+]"key)		       (setq key (car (read-from-string key))))		   (define-key matlab-eei-mode-map key nil)))	       matlab-eei-key-bindings))	  ;; Map new key bindings.	  (mapc 	   (lambda (binding)	     (let ((key (car binding))		   (fcn (cdr binding)))	       (if (string-match "\\[.+]"key)		   (setq key (car (read-from-string key))))	       (define-key matlab-eei-mode-map key fcn)))	   val)	  (set-default sym val)))(defun matlab-eei-emacs-exit-hook ()  (matlab-eei-mcmd-quit))(add-hook 'kill-emacs-hook 'matlab-eei-emacs-exit-hook)(provide 'matlab-eei);; $Log: matlab-eei.el,v $;; Revision 1.2.4.2  2004/04/25 21:31:13  batserve;; 2004/04/12  1.2.4.1.2.1  gweekly;;   Updated copyright;; Accepted job 19572 in A;;;; Revision 1.2.4.1.2.1  2004/04/12 23:27:51  gweekly;; Updated copyright;;;; Revision 1.2.4.1  2004/02/01 21:21:17  batserve;; 2004/01/20  1.2.8.1  batserve;;   2004/01/19  1.2.12.1  paulk;;     Related Records: 184840;;     Code Reviewer: audreyb;;     Change menu to reflect new stop if conditions;;   Accepted job 7613 in Ami;; Accepted job 13335 in A;;;; Revision 1.2.8.1  2004/01/20 04:43:57  batserve;; 2004/01/19  1.2.12.1  paulk;;   Related Records: 184840;;   Code Reviewer: audreyb;;   Change menu to reflect new stop if conditions;; Accepted job 7613 in Ami;;;; Revision 1.2.12.1  2004/01/19 20:17:57  paulk;; Related Records: 184840;; Code Reviewer: audreyb;; Change menu to reflect new stop if conditions;;;; Revision 1.2  2002/03/30 14:51:01  batserve;; Add a function (matlab-eei-close-all) to close all M-file documents.;; Related Records: 124527;; Code Reviewer: audreyb;;;; Revision 1.2  2002/03/20 18:35:19  paulk;; Add a function (matlab-eei-close-all) to close all M-file documents.;; Related Records: 124527;; Code Reviewer: audreyb;;;; Revision 1.1  2002/02/06 20:43:49  paulk;; Initial revision;;;; Revision 1.6  2001/10/18 17:21:27  paulk;; Fixed a bunch of bugs related to setting and clearing breakpoints.;; Related Records: 108087 110285 110287 110295 110685;; Code Reviewer: audreyb;;;; Revision 1.5  2001/09/07 16:44:38  paulk;; Changed "Mathworks" to "MathWorks" and "Matlab" to "MATLAB"?;; Related Records: 107855;;;; Revision 1.4  2001/09/06 16:41:38  paulk;; Move matlab-run-in-matlab-mode-only macro to matlab.el;; Related Records: 99176;; Code Reviewer: eludlam;;;; Revision 1.3  2001/09/05 16:03:21  paulk;; Added a require statement for wid-edit.;; Related Records: 99242;; Code Reviewer: ktucker;;;; Revision 1.2  2001/08/31 20:45:52  paulk;; Updated to support stack navigation, region evaluation, and running commands;; with parameters;; Related Records: 99242 107308 107338 107395;; Code Reviewer: audreyb;;;; end of matlab-eei

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -