Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100868. ------------------------------------------------------------ revno: 100868 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-07-23 03:39:20 +0200 message: * lisp/ChangeLog: Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-23 01:29:46 +0000 +++ lisp/ChangeLog 2010-07-23 01:39:20 +0000 @@ -182,7 +182,7 @@ 2010-07-14 Jan Djärv * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127 - now that unicode is used (Bug#6594). + now that Unicode is used (Bug#6594). 2010-07-14 Chong Yidong @@ -259,15 +259,15 @@ 2010-07-12 Andreas Schwab - * language/tai-viet.el ("TaiViet"): Try to fix re-encoding - bugs. (Bug#5806) + * language/tai-viet.el ("TaiViet"): Try to fix re-encoding bugs. + (Bug#5806) * language/tv-util.el (tai-viet-re): Remove format. 2010-07-12 Kenichi Handa - * language/hebrew.el: Remove no-byte-compile declaration. Change - coding: tag to utf-8. Register hebrew-shape-gstring in + * language/hebrew.el: Remove no-byte-compile declaration. + Change coding: tag to utf-8. Register hebrew-shape-gstring in composition-function-table for 3-character looking back. (hebrew-font-get-precomposed): New function. (hebrew-shape-gstring): Utilize precomposed glyphs if available. @@ -484,7 +484,7 @@ Make sure `flyspell-word' re-checks word after function run (Bug#6504). * textmodes/ispell.el (ispell-init-process): Make sure ispell and - default directories are expanded. (Bug#6143). + default directories are expanded (Bug#6143). 2010-06-24 Juri Linkov @@ -767,7 +767,7 @@ 2010-06-16 Jay Belanger - * calc/calc-poly.el: (math-accum-factors): Make sure that + * calc/calc-poly.el (math-accum-factors): Make sure that constants aren't distributed after they are factored out. 2010-06-16 Juri Linkov @@ -4604,7 +4604,7 @@ 2010-02-03 Michael Albinus * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory - also in case of (and (not full) (not wildcard)). This is needed, + also in case of (and (not full) (not wildcard)). This is needed when dired is called with a list of files, which are not in `default-directory'. (Bug#5478) @@ -11093,7 +11093,7 @@ * textmodes/fill.el: Convert to utf-8 encoding. (fill-french-nobreak-p): Remove redundant » and « inherited from our - pre-unicode days. + pre-Unicode days. * add-log.el (change-log-fill-forward-paragraph): New function. (change-log-mode): Use it so fill-region DTRT. ------------------------------------------------------------ revno: 100867 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2010-07-23 03:29:46 +0200 message: * custom.el (custom-declare-variable): Give clearer error message (bug#6476). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-23 00:59:43 +0000 +++ lisp/ChangeLog 2010-07-23 01:29:46 +0000 @@ -1,3 +1,8 @@ +2010-07-23 Juanma Barranquero + + * custom.el (custom-declare-variable): Give a clearer error message + when the docstring is missing (bug#6476). + 2010-07-22 Michael R. Mauger * progmodes/sql.el: Version 2.4. Improved Login prompting. === modified file 'lisp/custom.el' --- lisp/custom.el 2010-04-19 02:32:47 +0000 +++ lisp/custom.el 2010-07-23 01:29:46 +0000 @@ -143,7 +143,9 @@ (when (get symbol 'force-value) (put symbol 'force-value nil)) (when doc - (put symbol 'variable-documentation doc)) + (if (keywordp doc) + (error "Doc string is missing") + (put symbol 'variable-documentation doc))) (let ((initialize 'custom-initialize-reset) (requests nil)) (unless (memq :group args) ------------------------------------------------------------ revno: 100866 committer: Michael Mauger branch nick: trunk timestamp: Thu 2010-07-22 20:59:43 -0400 message: SQL Mode Version2.4 - Improved login prompting * progmodes/sql.el: Version 2.4. Improved Login prompting. (sql-login-params): New widget definition. (sql-oracle-login-params, sql-mysql-login-params) (sql-solid-login-params, sql-sybase-login-params) (sql-informix-login-params, sql-ingres-login-params) (sql-ms-login-params, sql-postgres-login-params) (sql-interbase-login-params, sql-db2-login-params) (sql-linter-login-params): Use it. (sql-sqlite-login-params): Use it; Define "database" parameter as a file name. (sql-sqlite-program): Change to "sqlite3" (sql-comint-sqlite): Make sure database name is complete. (sql-for-each-login): New function. (sql-connect, sql-save-connection): Use it. (sql-get-login-ext): New function. (sql-get-login): Use it. (sql-make-alternate-buffer-name): Handle :file parameters. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-07-21 01:56:55 +0000 +++ etc/NEWS 2010-07-23 00:59:43 +0000 @@ -269,6 +269,22 @@ which is a list of the parameters to be prompted for before a connection is established. +By default, the value of the parameter is simply prompted for. For +`server' and `database', they can be specified in a list as shown +below: + + (server :file ARG) + (database :file ARG) + (server :completion ARG) + (database :completion ARG) + +The ARG when :file is specified is a regexp that will match valid file +names (without the directory portion). Generally these strings will +be of the form ".+\.SUF" where SUF is the desired file suffix. + +When :completion is specified, the ARG corresponds to the PREDICATE +argument to the `completing-read' function. + *** Added `sql-connection-alist' to record login parameter values. An alist for recording different username, database and server values. If there are multiple databases that you connect to the === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-22 12:15:31 +0000 +++ lisp/ChangeLog 2010-07-23 00:59:43 +0000 @@ -1,3 +1,23 @@ +2010-07-22 Michael R. Mauger + + * progmodes/sql.el: Version 2.4. Improved Login prompting. + (sql-login-params): New widget definition. + (sql-oracle-login-params, sql-mysql-login-params) + (sql-solid-login-params, sql-sybase-login-params) + (sql-informix-login-params, sql-ingres-login-params) + (sql-ms-login-params, sql-postgres-login-params) + (sql-interbase-login-params, sql-db2-login-params) + (sql-linter-login-params): Use it. + (sql-sqlite-login-params): Use it; Define "database" parameter as + a file name. + (sql-sqlite-program): Change to "sqlite3" + (sql-comint-sqlite): Make sure database name is complete. + (sql-for-each-login): New function. + (sql-connect, sql-save-connection): Use it. + (sql-get-login-ext): New function. + (sql-get-login): Use it. + (sql-make-alternate-buffer-name): Handle :file parameters. + 2010-07-22 Juanma Barranquero * dired.el (dired-no-confirm): Document value t and fix defcustom to === modified file 'lisp/progmodes/sql.el' --- lisp/progmodes/sql.el 2010-07-21 01:56:55 +0000 +++ lisp/progmodes/sql.el 2010-07-23 00:59:43 +0000 @@ -5,7 +5,7 @@ ;; Author: Alex Schroeder ;; Maintainer: Michael Mauger -;; Version: 2.3 +;; Version: 2.4 ;; Keywords: comm languages processes ;; URL: http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/sql.el ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode @@ -152,12 +152,7 @@ ;; (defcustom my-sql-xyz-login-params '(user password server database) ;; "Login parameters to needed to connect to XyzDB." -;; :type '(repeat (choice -;; (const user) -;; (const password) -;; (const server) -;; (const database) -;; (const port))) +;; :type 'sql-login-params ;; :group 'SQL) ;; ;; (sql-set-product-feature 'xyz @@ -287,6 +282,38 @@ :group 'SQL :safe 'numberp) +;; Login parameter type + +(define-widget 'sql-login-params 'lazy + "Widget definition of the login parameters list" + :tag "Login Parameters" + :type '(repeat (choice + (const user) + (const password) + (choice :tag "server" + (const server) + (list :tag "file" + (const :format "" server) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" server) + (const :format "" :completion) + (restricted-sexp + :match-alternatives (listp symbolp)))) + (choice :tag "database" + (const database) + (list :tag "file" + (const :format "" database) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" database) + (const :format "" :completion) + (restricted-sexp + :match-alternatives (listp symbolp)))) + (const port)))) + ;; SQL Product support (defvar sql-interactive-product nil @@ -728,12 +755,7 @@ (defcustom sql-oracle-login-params '(user password database) "List of login parameters needed to connect to Oracle." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -754,7 +776,7 @@ ;; Customization for SQLite -(defcustom sql-sqlite-program "sqlite" +(defcustom sql-sqlite-program "sqlite3" "Command to start SQLite. Starts `sql-interactive-mode' after doing some setup." @@ -767,14 +789,9 @@ :version "20.8" :group 'SQL) -(defcustom sql-sqlite-login-params '(database) +(defcustom sql-sqlite-login-params '((database :file ".*\\.db")) "List of login parameters needed to connect to SQLite." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -797,12 +814,7 @@ (defcustom sql-mysql-login-params '(user password database server) "List of login parameters needed to connect to MySql." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -817,12 +829,7 @@ (defcustom sql-solid-login-params '(user password server) "List of login parameters needed to connect to Solid." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -844,12 +851,7 @@ (defcustom sql-sybase-login-params '(server user password database) "List of login parameters needed to connect to Sybase." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -864,12 +866,7 @@ (defcustom sql-informix-login-params '(database) "List of login parameters needed to connect to Informix." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -884,12 +881,7 @@ (defcustom sql-ingres-login-params '(database) "List of login parameters needed to connect to Ingres." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -911,12 +903,7 @@ (defcustom sql-ms-login-params '(user password server database) "List of login parameters needed to connect to Microsoft." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -943,12 +930,7 @@ (defcustom sql-postgres-login-params '(user database server) "List of login parameters needed to connect to Postgres." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -969,12 +951,7 @@ (defcustom sql-interbase-login-params '(user password database) "List of login parameters needed to connect to Interbase." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -995,12 +972,7 @@ (defcustom sql-db2-login-params nil "List of login parameters needed to connect to DB2." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -1021,12 +993,7 @@ (defcustom sql-linter-login-params '(user password database server) "Login parameters to needed to connect to Linter." - :type '(repeat (choice - (const user) - (const password) - (const server) - (const database) - (const port))) + :type 'sql-login-params :version "24.1" :group 'SQL) @@ -2204,6 +2171,19 @@ (append old-val keywords) (append keywords old-val)))))) +(defun sql-for-each-login (login-params body) + "Iterates through login parameters and returns a list of results." + + (delq nil + (mapcar + (lambda (param) + (let ((token (or (and (listp param) (car param)) param)) + (type (or (and (listp param) (nth 1 param)) nil)) + (arg (or (and (listp param) (nth 2 param)) nil))) + + (funcall body token type arg))) + login-params))) + ;;; Functions to switch highlighting @@ -2365,6 +2345,38 @@ "Read a password using PROMPT. Optional DEFAULT is password to start with." (read-passwd prompt nil default)) +(defun sql-get-login-ext (prompt last-value history-var type arg) + "Prompt user with extended login parameters. + +If TYPE is nil, then the user is simply prompted for a string +value. + +If TYPE is `:file', then the user is prompted for a file +name that must match the regexp pattern specified in the ARG +argument. + +If TYPE is `:completion', then the user is prompted for a string +specified by ARG. (ARG is used as the PREDICATE argument to +`completing-read'.)" + (cond + ((eq type nil) + (read-from-minibuffer prompt last-value nil nil history-var)) + + ((eq type :file) + (let ((use-dialog-box nil)) + (expand-file-name + (read-file-name prompt + (file-name-directory last-value) nil t + (file-name-nondirectory last-value) + (if arg + `(lambda (f) + (string-match (concat "\\<" ,arg "\\>") + (file-name-nondirectory f))) + nil))))) + + ((eq type :completion) + (completing-read prompt arg nil t last-value history-var)))) + (defun sql-get-login (&rest what) "Get username, password and database from the user. @@ -2382,33 +2394,48 @@ `database'. The members of WHAT are processed in the order in which they are provided. +The tokens for `database' and `server' may also be lists to +control or limit the values that can be supplied. These can be +of the form: + + \(database :file \".+\\\\.EXT\") + \(database :completion FUNCTION) + +The `server' token supports the same forms. + In order to ask the user for username, password and database, call the function like this: (sql-get-login 'user 'password 'database)." (interactive) - (while what - (cond - ((eq (car what) 'user) ; user - (setq sql-user - (read-from-minibuffer "User: " sql-user nil nil - 'sql-user-history))) - ((eq (car what) 'password) ; password - (setq sql-password - (sql-read-passwd "Password: " sql-password))) - - ((eq (car what) 'server) ; server - (setq sql-server - (read-from-minibuffer "Server: " sql-server nil nil - 'sql-server-history))) - ((eq (car what) 'port) ; port - (setq sql-port - (read-from-minibuffer "Port: " sql-port nil nil - 'sql-port-history))) - ((eq (car what) 'database) ; database - (setq sql-database - (read-from-minibuffer "Database: " sql-database nil nil - 'sql-database-history)))) - - (setq what (cdr what)))) + (mapcar + (lambda (w) + (let ((token (or (and (listp w) (car w)) w)) + (type (or (and (listp w) (nth 1 w)) nil)) + (arg (or (and (listp w) (nth 2 w)) nil))) + + (cond + ((eq token 'user) ; user + (setq sql-user + (read-from-minibuffer "User: " sql-user nil nil + 'sql-user-history))) + + ((eq token 'password) ; password + (setq sql-password + (sql-read-passwd "Password: " sql-password))) + + ((eq token 'server) ; server + (setq sql-server + (sql-get-login-ext "Server: " sql-server + 'sql-server-history type arg))) + + ((eq token 'database) ; database + (setq sql-database + (sql-get-login-ext "Database: " sql-database + 'sql-database-history type arg))) + + ((eq token 'port) ; port + (setq sql-port + (read-number "Port: " sql-port)))))) + what)) (defun sql-find-sqli-buffer () "Returns the current default SQLi buffer or nil. @@ -2511,42 +2538,49 @@ (let ((name "")) - ;; Try using the :sqli-login setting - (when (string= "" (or name "")) - (setq name - (apply 'concat - (apply 'append nil - (mapcar - (lambda (v) - (cond - ((eq v 'user) (list "/" sql-user)) - ((eq v 'server) (list "." sql-server)) - ((eq v 'database) (list "@" sql-database)) - ((eq v 'port) (list ":" sql-port)) - - ((eq v 'password) nil) - (t nil))) - (sql-get-product-feature sql-product :sqli-login)))))) - - ;; Default: username/server format - (when (string= "" (or name "")) - (setq name - (concat " " - (if (string= "" sql-user) - (if (string= "" (user-login-name)) - () - (concat (user-login-name) "/")) - (concat sql-user "/")) - (if (string= "" sql-database) - (if (string= "" sql-server) - (system-name) - sql-server) - sql-database)))) - - ;; Return the final string; prefixed by the connection name + ;; Build a name using the :sqli-login setting + (setq name + (apply 'concat + (apply 'append nil + (sql-for-each-login + (sql-get-product-feature sql-product :sqli-login) + (lambda (token type arg) + (cond + ((eq token 'user) (list "/" sql-user)) + ((eq token 'port) (list ":" sql-port)) + ((eq token 'server) + (list "." (if (eq type :file) + (file-name-nondirectory sql-server) + sql-server))) + ((eq token 'database) + (list "@" (if (eq type :file) + (file-name-nondirectory sql-database) + sql-database))) + + ((eq token 'password) nil) + (t nil))))))) + + + ;; If there's a connection, use it and the name thus far (if sql-connection (format "<%s>%s" sql-connection (or name "")) - (substring (or name " ") 1)))) + + ;; If there is no name, try to create something meaningful + (if (string= "" (or name "")) + (concat + (if (string= "" sql-user) + (if (string= "" (user-login-name)) + () + (concat (user-login-name) "/")) + (concat sql-user "/")) + (if (string= "" sql-database) + (if (string= "" sql-server) + (system-name) + sql-server) + sql-database)) + + ;; We've got a name, go with it (without the first punctuation char) + (substring name 1))))) (defun sql-rename-buffer () "Rename a SQLi buffer." @@ -2950,87 +2984,7 @@ -;;; Entry functions for different SQL interpreters. - -;;;###autoload -(defun sql-product-interactive (&optional product) - "Run PRODUCT interpreter as an inferior process. - -If buffer `*SQL*' exists but no process is running, make a new process. -If buffer exists and a process is running, just switch to buffer `*SQL*'. - -\(Type \\[describe-mode] in the SQL buffer for a list of commands.)" - (interactive "P") - - (setq product - (cond - ((equal product '(4)) ; Universal arg, prompt for product - (intern (completing-read "SQL product: " - (mapcar (lambda (info) (symbol-name (car info))) - sql-product-alist) - nil 'require-match - (or (and sql-product (symbol-name sql-product)) "ansi")))) - ((and product ; Product specified - (symbolp product)) product) - (t sql-product))) ; Default to sql-product - - (if product - (when (sql-get-product-feature product :sqli-comint-func) - (if (and sql-buffer - (buffer-live-p sql-buffer) - (comint-check-proc sql-buffer)) - (pop-to-buffer sql-buffer) - - ;; Is the current buffer in sql-mode and - ;; there is a buffer local setting of sql-buffer - (let* ((start-buffer - (and (derived-mode-p 'sql-mode) - (current-buffer))) - (start-sql-buffer - (and start-buffer - (let (found) - (dolist (var (buffer-local-variables)) - (and (consp var) - (eq (car var) 'sql-buffer) - (buffer-live-p (cdr var)) - (get-buffer-process (cdr var)) - (setq found (cdr var)))) - found))) - new-sqli-buffer) - - ;; Get credentials. - (apply 'sql-get-login (sql-get-product-feature product :sqli-login)) - - ;; Connect to database. - (message "Login...") - (funcall (sql-get-product-feature product :sqli-comint-func) - product - (sql-get-product-feature product :sqli-options)) - - ;; Set SQLi mode. - (setq sql-interactive-product product - new-sqli-buffer (current-buffer) - sql-buffer new-sqli-buffer) - (sql-interactive-mode) - - ;; Set `sql-buffer' in the start buffer - (when (and start-buffer (not start-sql-buffer)) - (with-current-buffer start-buffer - (setq sql-buffer new-sqli-buffer))) - - ;; All done. - (message "Login...done") - (pop-to-buffer sql-buffer)))) - (message "No default SQL product defined. Set `sql-product'."))) - -(defun sql-comint (product params) - "Set up a comint buffer to run the SQL processor. - -PRODUCT is the SQL product. PARAMS is a list of strings which are -passed as command line arguments." - (let ((program (sql-get-product-feature product :sqli-program))) - (set-buffer - (apply 'make-comint "SQL" program nil params)))) +;;; Connection handling ;;;###autoload (defun sql-connect (connection) @@ -3082,12 +3036,13 @@ (t (car v)))) (cdr connect-set))) ;; the remaining params (w/o the connection params) - (rem-params (delq nil - (mapcar - (lambda (l) - (unless (member l set-params) - l)) - login-params))) + (rem-params (sql-for-each-login + login-params + (lambda (token type arg) + (unless (member token set-params) + (if (or type arg) + (list token type arg) + token))))) ;; Remember the connection (sql-connection connection)) @@ -3125,16 +3080,15 @@ (message "Connection <%s> already exists" name) (setq connect (append (list name) - (delq nil - (mapcar - (lambda (param) - (cond - ((eq param 'product) `(sql-product (quote ,sql-product))) - ((eq param 'user) `(sql-user ,sql-user)) - ((eq param 'database) `(sql-database ,sql-database)) - ((eq param 'server) `(sql-server ,sql-server)) - ((eq param 'port) `(sql-port ,sql-port)))) - (append (list 'product) login))))) + (sql-for-each-login + `(product ,@login) + (lambda (token type arg) + (cond + ((eq token 'product) `(sql-product ',sql-product)) + ((eq token 'user) `(sql-user ,sql-user)) + ((eq token 'database) `(sql-database ,sql-database)) + ((eq token 'server) `(sql-server ,sql-server)) + ((eq token 'port) `(sql-port ,sql-port))))))) (setq alist (append alist (list connect))) @@ -3155,6 +3109,90 @@ sql-connection-alist) tail)) + + +;;; Entry functions for different SQL interpreters. + +;;;###autoload +(defun sql-product-interactive (&optional product) + "Run PRODUCT interpreter as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer `*SQL*'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.)" + (interactive "P") + + (setq product + (cond + ((equal product '(4)) ; Universal arg, prompt for product + (intern (completing-read "SQL product: " + (mapcar (lambda (info) (symbol-name (car info))) + sql-product-alist) + nil 'require-match + (or (and sql-product (symbol-name sql-product)) "ansi")))) + ((and product ; Product specified + (symbolp product)) product) + (t sql-product))) ; Default to sql-product + + (if product + (when (sql-get-product-feature product :sqli-comint-func) + (if (and sql-buffer + (buffer-live-p sql-buffer) + (comint-check-proc sql-buffer)) + (pop-to-buffer sql-buffer) + + ;; Is the current buffer in sql-mode and + ;; there is a buffer local setting of sql-buffer + (let* ((start-buffer + (and (derived-mode-p 'sql-mode) + (current-buffer))) + (start-sql-buffer + (and start-buffer + (let (found) + (dolist (var (buffer-local-variables)) + (and (consp var) + (eq (car var) 'sql-buffer) + (buffer-live-p (cdr var)) + (get-buffer-process (cdr var)) + (setq found (cdr var)))) + found))) + new-sqli-buffer) + + ;; Get credentials. + (apply 'sql-get-login (sql-get-product-feature product :sqli-login)) + + ;; Connect to database. + (message "Login...") + (funcall (sql-get-product-feature product :sqli-comint-func) + product + (sql-get-product-feature product :sqli-options)) + + ;; Set SQLi mode. + (setq sql-interactive-product product + new-sqli-buffer (current-buffer) + sql-buffer new-sqli-buffer) + (sql-interactive-mode) + + ;; Set `sql-buffer' in the start buffer + (when (and start-buffer (not start-sql-buffer)) + (with-current-buffer start-buffer + (setq sql-buffer new-sqli-buffer))) + + ;; All done. + (message "Login...done") + (pop-to-buffer sql-buffer)))) + (message "No default SQL product defined. Set `sql-product'."))) + +(defun sql-comint (product params) + "Set up a comint buffer to run the SQL processor. + +PRODUCT is the SQL product. PARAMS is a list of strings which are +passed as command line arguments." + (let ((program (sql-get-product-feature product :sqli-program))) + (set-buffer + (apply 'make-comint "SQL" program nil params)))) + ;;;###autoload (defun sql-oracle () "Run sqlplus by Oracle as an inferior process. @@ -3318,7 +3356,8 @@ ;; make-comint. (let ((params)) (if (not (string= "" sql-database)) - (setq params (append (list sql-database) params))) + (setq params (append (list (expand-file-name sql-database)) + params))) (setq params (append options params)) (sql-comint product params))) ------------------------------------------------------------ revno: 100865 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2010-07-22 14:15:31 +0200 message: * dired.el (dired-no-confirm): Document value t and fix defcustom (bug#6597). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-22 11:54:27 +0000 +++ lisp/ChangeLog 2010-07-22 12:15:31 +0000 @@ -1,3 +1,8 @@ +2010-07-22 Juanma Barranquero + + * dired.el (dired-no-confirm): Document value t and fix defcustom to + accept it (bug#6597). Suggested by Drew Adams . + 2010-07-22 Teemu Likonen (tiny change) * dired.el (dired-mode-map): Use command remapping (bug#6632). === modified file 'lisp/dired.el' --- lisp/dired.el 2010-07-22 11:54:27 +0000 +++ lisp/dired.el 2010-07-22 12:15:31 +0000 @@ -2763,17 +2763,19 @@ (fit-window-to-buffer (get-buffer-window buf) nil 1))) (defcustom dired-no-confirm nil - "A list of symbols for commands Dired should not confirm. + "A list of symbols for commands Dired should not confirm, or t. Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', `copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink', -`touch' and `uncompress'." +`touch' and `uncompress'. +If t, confirmation is never needed." :group 'dired - :type '(set (const byte-compile) (const chgrp) - (const chmod) (const chown) (const compress) - (const copy) (const delete) (const hardlink) - (const load) (const move) (const print) - (const shell) (const symlink) (const touch) - (const uncompress))) + :type '(choice (const :tag "Confirmation never needed" t) + (set (const byte-compile) (const chgrp) + (const chmod) (const chown) (const compress) + (const copy) (const delete) (const hardlink) + (const load) (const move) (const print) + (const shell) (const symlink) (const touch) + (const uncompress)))) (defun dired-mark-pop-up (bufname op-symbol files function &rest args) "Return FUNCTION's result on ARGS after showing which files are marked. ------------------------------------------------------------ revno: 100864 author: Teemu Likonen committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2010-07-22 13:54:27 +0200 message: * dired.el (dired-mode-map): Use command remapping (bug#6632). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-22 11:09:52 +0000 +++ lisp/ChangeLog 2010-07-22 11:54:27 +0000 @@ -1,3 +1,7 @@ +2010-07-22 Teemu Likonen (tiny change) + + * dired.el (dired-mode-map): Use command remapping (bug#6632). + 2010-07-22 Lawrence Mitchell * term/vt100.el (vt100-wide-mode): Fix :init-value keyword (bug#6620). === modified file 'lisp/dired.el' --- lisp/dired.el 2010-05-27 23:30:11 +0000 +++ lisp/dired.el 2010-07-22 11:54:27 +0000 @@ -1380,10 +1380,8 @@ (define-key map ">" 'dired-next-dirline) (define-key map "^" 'dired-up-directory) (define-key map " " 'dired-next-line) - (define-key map "\C-n" 'dired-next-line) - (define-key map "\C-p" 'dired-previous-line) - (define-key map [down] 'dired-next-line) - (define-key map [up] 'dired-previous-line) + (define-key map [remap next-line] 'dired-next-line) + (define-key map [remap previous-line] 'dired-previous-line) ;; hiding (define-key map "$" 'dired-hide-subdir) (define-key map "\M-$" 'dired-hide-all) @@ -1393,7 +1391,7 @@ (define-key map (kbd "M-s f C-s") 'dired-isearch-filenames) (define-key map (kbd "M-s f M-C-s") 'dired-isearch-filenames-regexp) ;; misc - (define-key map "\C-x\C-q" 'dired-toggle-read-only) + (define-key map [remap toggle-read-only] 'dired-toggle-read-only) (define-key map "?" 'dired-summary) (define-key map "\177" 'dired-unmark-backward) (define-key map [remap undo] 'dired-undo) ------------------------------------------------------------ revno: 100863 author: Lawrence Mitchell committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2010-07-22 13:09:52 +0200 message: * term/vt100.el (vt100-wide-mode): Fix :init-value keyword (bug#6620). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-21 04:40:47 +0000 +++ lisp/ChangeLog 2010-07-22 11:09:52 +0000 @@ -1,3 +1,7 @@ +2010-07-22 Lawrence Mitchell + + * term/vt100.el (vt100-wide-mode): Fix :init-value keyword (bug#6620). + 2010-07-21 Michael Albinus * net/tramp.el (tramp-get-ls-command) === modified file 'lisp/term/vt100.el' --- lisp/term/vt100.el 2010-05-03 02:29:46 +0000 +++ lisp/term/vt100.el 2010-07-22 11:09:52 +0000 @@ -45,7 +45,7 @@ "Toggle 132/80 column mode for vt100s. With positive argument, switch to 132-column mode. With negative argument, switch to 80-column mode." - :global t :initial-value (= (frame-width) 132) + :global t :init-value (= (frame-width) 132) (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) ------------------------------------------------------------ revno: 100862 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2010-07-21 11:37:35 +0200 message: * nt/INSTALL: Add note about backslashes in Windows paths. Fix typos. Simplify references to Windows versions. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2010-07-20 20:21:03 +0000 +++ nt/ChangeLog 2010-07-21 09:37:35 +0000 @@ -1,3 +1,8 @@ +2010-07-21 Juanma Barranquero + + * INSTALL: Add note about backslashes in Windows paths. + Fix typos. Simplify references to Windows versions. + 2010-07-20 Juanma Barranquero * addpm.c (add_registry, main): === modified file 'nt/INSTALL' --- nt/INSTALL 2010-01-13 08:35:10 +0000 +++ nt/INSTALL 2010-07-21 09:37:35 +0000 @@ -1,5 +1,5 @@ - Building and Installing Emacs - on Windows NT/2K/XP and Windows 95/98/ME + Building and Installing Emacs on Windows + (from 95 to 7 and beyond) Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. @@ -158,7 +158,7 @@ emacs source with text!=binary. [2] fails when needs to invoke shell commands; okay invoking gcc etc. [3] requires LC_MESSAGES support to build; cannot build with early - versions of cygwin. + versions of Cygwin. [4] may fail on Windows 9X and Windows ME; if so, install Bash. [5] fails when building leim due to the use of cygwin style paths. May work if building emacs without leim. @@ -174,8 +174,8 @@ like this, we recommend the use of the supported compilers mentioned in the previous paragraph. - You will also need a copy of the Posix cp, rm and mv programs. These - and other useful Posix utilities can be obtained from one of several + You will also need a copy of the POSIX cp, rm and mv programs. These + and other useful POSIX utilities can be obtained from one of several projects: * http://gnuwin32.sourceforge.net/ ( GnuWin32 ) @@ -183,13 +183,12 @@ * http://www.cygwin.com/ ( Cygwin ) * http://unxutils.sourceforge.net/ ( UnxUtils ) - If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or - Windows NT, we suggest to install the Cygwin port of Bash. That is - because the native Windows shell COMMAND.COM is too limited; the - Emacs build procedure tries very hard to support even such limited - shells, but as none of the Windows developers of Emacs work on - Windows 9x, we cannot guarantee that it works without a more - powerful shell. + If you build Emacs on 16-bit versions of Windows (9X or ME), we + suggest to install the Cygwin port of Bash. That is because the + native Windows shell COMMAND.COM is too limited; the Emacs build + procedure tries very hard to support even such limited shells, but + as none of the Windows developers of Emacs work on Windows 9X, we + cannot guarantee that it works without a more powerful shell. Additional instructions and help for building Emacs on Windows can be found at the Emacs Wiki: @@ -224,7 +223,7 @@ N.B. It is normal to see a few error messages output while configure is running, when gcc support is being tested. These cannot be - suppressed because of limitations in the Windows 9x command.com shell. + suppressed because of limitations in the Windows 9X command.com shell. You are encouraged to look at the file config.log which shows details for failed tests, after configure.bat finishes. Any unexplained failure @@ -249,6 +248,10 @@ wrong. (Usually, any such failures happen because some headers are missing due to bad packaging of the image support libraries.) + Note that any file path passed to the compiler or linker must use + forward slashes; using backslashes will cause compiler warnings or + errors about unrecognized escape sequences. + To use the external image support, the DLLs implementing the functionality must be found when Emacs first needs them, either on the PATH, or in the same directory as emacs.exe. Failure to find a @@ -430,10 +433,10 @@ The main problems that are likely to be encountered when building Emacs stem from using an old version of GCC, or old MinGW or W32 API - headers. Additionally, cygwin ports of GNU make may require the Emacs + headers. Additionally, Cygwin ports of GNU make may require the Emacs source tree to be mounted with text!=binary, because the makefiles generated by configure.bat necessarily use DOS line endings. Also, - cygwin ports of make must run in UNIX mode, either by specifying + Cygwin ports of make must run in UNIX mode, either by specifying --unix on the command line, or MAKE_MODE=UNIX in the environment. When configure runs, it attempts to detect when GCC itself, or the