emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115393: * progmodes/octave.el (inferior-octave-prom


From: Leo Liu
Subject: [Emacs-diffs] trunk r115393: * progmodes/octave.el (inferior-octave-prompt): Use shy groups.
Date: Fri, 06 Dec 2013 04:27:06 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115393
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Fri 2013-12-06 12:26:17 +0800
message:
  * progmodes/octave.el (inferior-octave-prompt): Use shy groups.
  (inferior-octave-startup): Always use "octave> " for prompt.
  (octave-goto-function-definition)
  (octave-sync-function-file-names)
  (octave-find-definition-default-filename): Remove redundant backquotes.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/octave.el       
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-06 04:22:08 +0000
+++ b/lisp/ChangeLog    2013-12-06 04:26:17 +0000
@@ -1,3 +1,11 @@
+2013-12-06  Leo Liu  <address@hidden>
+
+       * progmodes/octave.el (inferior-octave-prompt): Use shy groups.
+       (inferior-octave-startup): Always use "octave> " for prompt.
+       (octave-goto-function-definition)
+       (octave-sync-function-file-names)
+       (octave-find-definition-default-filename): Remove redundant backquotes.
+
 2013-12-06  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify

=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el  2013-12-06 00:48:52 +0000
+++ b/lisp/progmodes/octave.el  2013-12-06 04:26:17 +0000
@@ -444,7 +444,7 @@
                              "unwind_protect_cleanup")
          (smie-rule-parent octave-block-offset)
        ;; For (invalid) code between switch and case.
-       ;; (if (smie-parent-p "switch") 4)
+       ;; (if (smie-rule-parent-p "switch") 4)
        nil))))
 
 (defun octave-indent-comment ()
@@ -599,7 +599,9 @@
   :group 'octave)
 
 (defcustom inferior-octave-prompt
-  
"\\(^octave\\(\\|.bin\\|.exe\\|-gui\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+
 "
+  ;; For Octave >= 3.8, default is always 'octave', see
+  ;; http://hg.savannah.gnu.org/hgweb/octave/rev/708173343c50
+  
"\\(?:^octave\\(?:.bin\\|.exe\\)?\\(?:-[.0-9]+\\)?\\(?::[0-9]+\\)?\\|^debug\\|^\\)>+
 "
   "Regexp to match prompts for the inferior Octave process."
   :type 'regexp
   :group 'octave)
@@ -821,7 +823,8 @@
     (inferior-octave-send-list-and-digest
      (list "more off;\n"
            (unless (equal inferior-octave-output-string ">> ")
-             "PS1 ('\\s> ');\n")
+             ;; See http://hg.savannah.gnu.org/hgweb/octave/rev/708173343c50
+             "PS1 ('octave> ');\n")
            (when (and inferior-octave-startup-file
                       (file-exists-p inferior-octave-startup-file))
              (format "source ('%s');\n" inferior-octave-startup-file))))
@@ -1030,8 +1033,8 @@
              (unless found (goto-char orig))
              found))))
     (pcase (and buffer-file-name (file-name-extension buffer-file-name))
-      (`"cc" (funcall search
-                      
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
+      ("cc" (funcall search
+                     
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
       (t (funcall search octave-function-header-regexp 3)))))
 
 (defun octave-function-file-p ()
@@ -1100,19 +1103,19 @@
                       (read-char-choice
                        "Which name to use? (a/b/q) " '(?a ?b ?q))))))
           (pcase c
-            (`?a (let ((newname (expand-file-name
-                                 (concat func (file-name-extension
-                                               buffer-file-name t)))))
-                   (when (or (not (file-exists-p newname))
-                             (yes-or-no-p
-                              (format "Target file %s exists; proceed? " 
newname)))
-                     (when (file-exists-p buffer-file-name)
-                       (rename-file buffer-file-name newname t))
-                     (set-visited-file-name newname))))
-            (`?b (save-excursion
-                   (goto-char name-start)
-                   (delete-region name-start name-end)
-                   (insert file)))))))))
+            (?a (let ((newname (expand-file-name
+                                (concat func (file-name-extension
+                                              buffer-file-name t)))))
+                  (when (or (not (file-exists-p newname))
+                            (yes-or-no-p
+                             (format "Target file %s exists; proceed? " 
newname)))
+                    (when (file-exists-p buffer-file-name)
+                      (rename-file buffer-file-name newname t))
+                    (set-visited-file-name newname))))
+            (?b (save-excursion
+                  (goto-char name-start)
+                  (delete-region name-start name-end)
+                  (insert file)))))))))
 
 (defun octave-update-function-file-comment (beg end)
   "Query replace function names in function file comment."
@@ -1771,19 +1774,19 @@
 (defun octave-find-definition-default-filename (name)
   "Default value for `octave-find-definition-filename-function'."
   (pcase (file-name-extension name)
-    (`"oct"
+    ("oct"
      (octave-find-definition-default-filename
       (concat "libinterp/dldfcn/"
               (file-name-sans-extension (file-name-nondirectory name))
               ".cc")))
-    (`"cc"
+    ("cc"
      (let ((file (or (locate-file name (octave-source-directories))
                      (locate-file (file-name-nondirectory name)
                                   (octave-source-directories)))))
        (or (and file (file-exists-p file))
            (error "File `%s' not found" name))
        file))
-    (`"mex"
+    ("mex"
      (if (yes-or-no-p (format "File `%s' may be binary; open? "
                               (file-name-nondirectory name)))
          name


reply via email to

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