comparison lisp/progmodes/sql.el @ 25183:16937a774275

(sql-accumulate-and-indent): Instead of testing whether this is Emacs 20 before calling comint-accumulate, test whether comint-accumulate is defined.
author Richard M. Stallman <rms@gnu.org>
date Fri, 06 Aug 1999 00:51:50 +0000
parents 0d593aa15c0f
children 970b18c6803f
comparison
equal deleted inserted replaced
25182:ef79ee0ceedd 25183:16937a774275
2 2
3 ;; Copyright (C) 1998, 1999 Free Software Foundation, Inc. 3 ;; Copyright (C) 1998, 1999 Free Software Foundation, Inc.
4 4
5 ;; Author: Alex Schroeder <a.schroeder@bsiag.ch> 5 ;; Author: Alex Schroeder <a.schroeder@bsiag.ch>
6 ;; Maintainer: Alex Schroeder <a.schroeder@bsiag.ch> 6 ;; Maintainer: Alex Schroeder <a.schroeder@bsiag.ch>
7 ;; Version: 1.4.5 7 ;; Version: 1.4.6
8 ;; Keywords: comm languages processes 8 ;; Keywords: comm languages processes
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
25 ;; Boston, MA 02111-1307, USA. 25 ;; Boston, MA 02111-1307, USA.
26 26
27 ;;; Commentary: 27 ;;; Commentary:
28 28
29 ;; Please send bug reports and bug fixes to the mailing list at 29 ;; Please send bug reports and bug fixes to the mailing list at
30 ;; sql.el@gnu.org so that I can merge them into the master source. If 30 ;; sql.el@gnu.org (or sql.el@bsiag.com). If you want to subscribe to
31 ;; you want to subscribe to the mailing list, send mail to 31 ;; the mailing list, send mail to sql.el-request@gnu.org with
32 ;; sql.el-request@gnu.org with 'subscribe' in the subject line. 32 ;; `subscribe sql.el FIRSTNAME LASTNAME' in the subject line.
33 33
34 ;; You can get the latest version of this file from my homepage 34 ;; You can get the latest version of this file from my homepage
35 ;; <URL:http://www.geocities.com/TimesSquare/6120/emacs.html>. 35 ;; <URL:http://www.geocities.com/TimesSquare/6120/emacs.html>.
36 36
37 ;; This file provides a sql-mode and a sql-interactive-mode. My goals 37 ;; This file provides a sql-mode and a sql-interactive-mode. My goals
158 :type 'boolean 158 :type 'boolean
159 :group 'SQL) 159 :group 'SQL)
160 160
161 (defcustom sql-input-ring-file-name nil 161 (defcustom sql-input-ring-file-name nil
162 "*If non-nil, name of the file to read/write input history. 162 "*If non-nil, name of the file to read/write input history.
163
164 You have to set this variable if you want the history of your commands
165 saved from one Emacs session to the next. If this variable is set,
166 exiting the SQL interpreter in an SQLi buffer will write the input
167 history to the specified file. Starting a new process in a SQLi buffer
168 will read the input history from the specified file.
163 169
164 You have to set this variable if you want the history of your commands 170 You have to set this variable if you want the history of your commands
165 saved from one Emacs session to the next. If this variable is set, 171 saved from one Emacs session to the next. If this variable is set,
166 exiting the SQL interpreter in an SQLi buffer will write the input 172 exiting the SQL interpreter in an SQLi buffer will write the input
167 history to the specified file. Starting a new process in a SQLi buffer 173 history to the specified file. Starting a new process in a SQLi buffer
611 ;;; Small functions 617 ;;; Small functions
612 618
613 (defun sql-accumulate-and-indent () 619 (defun sql-accumulate-and-indent ()
614 "Continue SQL statement on the next line." 620 "Continue SQL statement on the next line."
615 (interactive) 621 (interactive)
616 ;; comint-accumulate is a Emacs 20.X thingie 622 (if (fboundp 'comint-accumulate) (comint-accumulate))
617 (if (not (string-match "XEmacs\\|Lucid\\|GNU Emacs 19" emacs-version))
618 (comint-accumulate))
619 (indent-according-to-mode)) 623 (indent-according-to-mode))
620 624
621 ;;;###autoload 625 ;;;###autoload
622 (defun sql-help () 626 (defun sql-help ()
623 "Shows short help for the SQL modes. 627 "Shows short help for the SQL modes.