emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106775: 2012-01-05 Michael R. Mauger


From: Michael Mauger
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106775: 2012-01-05 Michael R. Mauger <address@hidden>
Date: Wed, 04 Jan 2012 22:45:30 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106775
committer: Michael Mauger <address@hidden>
branch nick: trunk
timestamp: Wed 2012-01-04 22:45:30 -0500
message:
  2012-01-05  Michael R. Mauger  <address@hidden>
  
          * progmodes/sql.el (sql-login-hook): Add hook to respond to the
          first prompt in `sql-interacive-mode'.
          (sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin
          keywords. 
          (sql-mode-mysql-font-lock-keywords):  Add ELSEIF keyword.
          (sql-product-interactive): Bug fix: Set `sql-buffer' in
          context of original buffer.  Invoke `sql-login-hook'.
modified:
  lisp/ChangeLog
  lisp/progmodes/sql.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-01-04 18:51:47 +0000
+++ b/lisp/ChangeLog    2012-01-05 03:45:30 +0000
@@ -1,3 +1,13 @@
+2012-01-05  Michael R. Mauger  <address@hidden>
+
+       * progmodes/sql.el (sql-login-hook): Add hook to respond to the
+       first prompt in `sql-interacive-mode'.
+       (sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin
+       keywords. 
+       (sql-mode-mysql-font-lock-keywords):  Add ELSEIF keyword.
+       (sql-product-interactive): Bug fix: Set `sql-buffer' in
+       context of original buffer.  Invoke `sql-login-hook'.
+
 2012-01-04  Eli Zaretskii  <address@hidden>
 
        * mail/rmail.el (rmail-font-lock-keywords): Accept non-ASCII

=== modified file 'lisp/progmodes/sql.el'
--- a/lisp/progmodes/sql.el     2011-12-19 06:21:24 +0000
+++ b/lisp/progmodes/sql.el     2012-01-05 03:45:30 +0000
@@ -1,6 +1,6 @@
 ;;; sql.el --- specialized comint.el for SQL interpreters
 
-;; Copyright (C) 1998-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1998-2012  Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <address@hidden>
 ;; Maintainer: Michael Mauger <address@hidden>
@@ -219,6 +219,8 @@
 ;; Drew Adams <address@hidden> -- Emacs 20 support
 ;; Harald Maier <address@hidden> -- sql-send-string
 ;; Stefan Monnier <address@hidden> -- font-lock corrections; code polish
+;; Paul Sleigh <address@hidden> -- MySQL keyword enhancement
+;; Andrew Schein <address@hidden> -- sql-port bug
 
 
 
@@ -811,6 +813,14 @@
   :type 'hook
   :group 'SQL)
 
+(defcustom sql-login-hook '()
+  "Hook for interacting with a buffer in `sql-interactive-mode'.
+
+This hook is invoked in a buffer once it is ready to accept input
+for the first time."
+  :type 'hook
+  :group 'SQL)
+
 ;; Customization for ANSI
 
 (defcustom sql-ansi-statement-starters (regexp-opt '(
@@ -1594,6 +1604,7 @@
 "atan" "atan2" "avg" "bfilename" "bin_to_num" "bitand" "cardinality"
 "cast" "ceil" "chartorowid" "chr" "cluster_id" "cluster_probability"
 "cluster_set" "coalesce" "collect" "compose" "concat" "convert" "corr"
+"connect_by_root" "connect_by_iscycle" "connect_by_isleaf"
 "corr_k" "corr_s" "cos" "cosh" "count" "covar_pop" "covar_samp"
 "cube_table" "cume_dist" "current_date" "current_timestamp" "cv"
 "dataobj_to_partition" "dbtimezone" "decode" "decompose" "deletexml"
@@ -2279,7 +2290,7 @@
 "collation" "column" "columns" "comment" "committed" "concurrent"
 "constraint" "create" "cross" "data" "database" "default"
 "delay_key_write" "delayed" "delete" "desc" "directory" "disable"
-"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else"
+"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else" "elseif"
 "enable" "enclosed" "end" "escaped" "exists" "fields" "first" "for"
 "force" "foreign" "from" "full" "fulltext" "global" "group" "handler"
 "having" "heap" "high_priority" "if" "ignore" "in" "index" "infile"
@@ -3423,7 +3434,7 @@
                                                          :prompt-regexp))
           (start nil))
       (with-current-buffer buf
-        (toggle-read-only -1)
+        (setq view-read-only nil)
         (unless save-prior
           (erase-buffer))
         (goto-char (point-max))
@@ -3532,7 +3543,7 @@
                        (get-lru-window))))
       (with-current-buffer outbuf
         (set-buffer-modified-p nil)
-        (toggle-read-only 1))
+        (setq view-read-only t))
       (view-buffer-other-window outbuf)
       (when one-win
         (shrink-window-if-larger-than-buffer)))))
@@ -4097,7 +4108,8 @@
               (setq new-sqli-buffer (current-buffer))
               (when new-name
                 (sql-rename-buffer new-name))
-              (setq sql-buffer (buffer-name new-sqli-buffer))
+              (set (make-local-variable 'sql-buffer) 
+                   (buffer-name new-sqli-buffer))
 
               ;; Set `sql-buffer' in the start buffer
               (with-current-buffer start-buffer
@@ -4107,6 +4119,7 @@
 
               ;; All done.
               (message "Login...done")
+              (run-hooks 'sql-login-hook)
               (pop-to-buffer new-sqli-buffer)))))
     (message "No default SQL product defined.  Set `sql-product'.")))
 


reply via email to

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