aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-notifications.el6
-rw-r--r--lisp/help-fns.el2
-rw-r--r--lisp/minibuffer.el6
-rw-r--r--lisp/progmodes/sql.el42
-rw-r--r--lisp/vc/diff-mode.el2
5 files changed, 39 insertions, 19 deletions
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index f9c2d309a35..5104a56c6e7 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -166,8 +166,10 @@ This is typically a function to add in
166 (or (mail-fetch-field "From") ""))) 166 (or (mail-fetch-field "From") "")))
167 (address (cadr address-components))) 167 (address (cadr address-components)))
168 ;; Ignore mails from ourselves 168 ;; Ignore mails from ourselves
169 (unless (gnus-string-match-p gnus-ignored-from-addresses 169 (unless (and gnus-ignored-from-addresses
170 address) 170 address
171 (gnus-string-match-p gnus-ignored-from-addresses
172 address))
171 (let* ((photo-file (gnus-notifications-get-photo-file address)) 173 (let* ((photo-file (gnus-notifications-get-photo-file address))
172 (notification-id (gnus-notifications-notify 174 (notification-id (gnus-notifications-notify
173 (or (car address-components) address) 175 (or (car address-components) address)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 5791f1225c1..fa0484ff4e5 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -936,7 +936,7 @@ file-local variable.\n")
936 (princ " This variable is safe as a file local variable ") 936 (princ " This variable is safe as a file local variable ")
937 (princ "if its value\n satisfies the predicate ") 937 (princ "if its value\n satisfies the predicate ")
938 (princ (if (byte-code-function-p safe-var) 938 (princ (if (byte-code-function-p safe-var)
939 "which is byte-compiled expression.\n" 939 "which is a byte-compiled expression.\n"
940 (format "`%s'.\n" safe-var)))) 940 (format "`%s'.\n" safe-var))))
941 941
942 (if extra-line (terpri)) 942 (if extra-line (terpri))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index a696fff7dc7..669ea58656d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -211,10 +211,10 @@ case sensitive instead."
211 (complete-with-action action table string pred)))) 211 (complete-with-action action table string pred))))
212 212
213(defun completion-table-subvert (table s1 s2) 213(defun completion-table-subvert (table s1 s2)
214 "Completion table that replaces the prefix S1 with S2 in STRING. 214 "Return a completion table from TABLE with S1 replaced by S2.
215The result is a completion table which completes strings of the 215The result is a completion table which completes strings of the
216form (concat S1 S) in the same way as TABLE completes strings of 216form (concat S2 S) in the same way as TABLE completes strings of
217the form (concat S2 S)." 217the form (concat S1 S)."
218 (lambda (string pred action) 218 (lambda (string pred action)
219 (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil 219 (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
220 completion-ignore-case)) 220 completion-ignore-case))
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 030cc02f3f4..f3ecbe3fc3d 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Alex Schroeder <alex@gnu.org> 5;; Author: Alex Schroeder <alex@gnu.org>
6;; Maintainer: Michael Mauger <mmaug@yahoo.com> 6;; Maintainer: Michael Mauger <mmaug@yahoo.com>
7;; Version: 3.0 7;; Version: 3.1
8;; Keywords: comm languages processes 8;; Keywords: comm languages processes
9;; URL: http://savannah.gnu.org/projects/emacs/ 9;; URL: http://savannah.gnu.org/projects/emacs/
10 10
@@ -218,9 +218,12 @@
218;; Michael Mauger <mmaug@yahoo.com> -- improved product support 218;; Michael Mauger <mmaug@yahoo.com> -- improved product support
219;; Drew Adams <drew.adams@oracle.com> -- Emacs 20 support 219;; Drew Adams <drew.adams@oracle.com> -- Emacs 20 support
220;; Harald Maier <maierh@myself.com> -- sql-send-string 220;; Harald Maier <maierh@myself.com> -- sql-send-string
221;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections; code polish 221;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections;
222;; code polish
222;; Paul Sleigh <bat@flurf.net> -- MySQL keyword enhancement 223;; Paul Sleigh <bat@flurf.net> -- MySQL keyword enhancement
223;; Andrew Schein <andrew@andrewschein.com> -- sql-port bug 224;; Andrew Schein <andrew@andrewschein.com> -- sql-port bug
225;; Ian Bjorhovde <idbjorh@dataproxy.com> -- db2 escape newlines
226;; incorrectly enabled by default
224 227
225 228
226 229
@@ -879,6 +882,16 @@ In older versions of SQL*Plus, this was the SET SCAN OFF command."
879 :type 'boolean 882 :type 'boolean
880 :group 'SQL) 883 :group 'SQL)
881 884
885(defcustom sql-db2-escape-newlines nil
886 "Non-nil if newlines should be escaped by a backslash in DB2 SQLi.
887
888When non-nil, Emacs will automatically insert a space and
889backslash prior to every newline in multi-line SQL statements as
890they are submitted to an interactive DB2 session."
891 :version "24.3"
892 :type 'boolean
893 :group 'SQL)
894
882;; Customization for SQLite 895;; Customization for SQLite
883 896
884(defcustom sql-sqlite-program (or (executable-find "sqlite3") 897(defcustom sql-sqlite-program (or (executable-find "sqlite3")
@@ -3188,20 +3201,23 @@ Placeholders are words starting with an ampersand like &this."
3188 3201
3189;; Using DB2 interactively, newlines must be escaped with " \". 3202;; Using DB2 interactively, newlines must be escaped with " \".
3190;; The space before the backslash is relevant. 3203;; The space before the backslash is relevant.
3204
3191(defun sql-escape-newlines-filter (string) 3205(defun sql-escape-newlines-filter (string)
3192 "Escape newlines in STRING. 3206 "Escape newlines in STRING.
3193Every newline in STRING will be preceded with a space and a backslash." 3207Every newline in STRING will be preceded with a space and a backslash."
3194 (let ((result "") (start 0) mb me) 3208 (if (not sql-db2-escape-newlines)
3195 (while (string-match "\n" string start) 3209 string
3196 (setq mb (match-beginning 0) 3210 (let ((result "") (start 0) mb me)
3197 me (match-end 0) 3211 (while (string-match "\n" string start)
3198 result (concat result 3212 (setq mb (match-beginning 0)
3199 (substring string start mb) 3213 me (match-end 0)
3200 (if (and (> mb 1) 3214 result (concat result
3201 (string-equal " \\" (substring string (- mb 2) mb))) 3215 (substring string start mb)
3202 "" " \\\n")) 3216 (if (and (> mb 1)
3203 start me)) 3217 (string-equal " \\" (substring string (- mb 2) mb)))
3204 (concat result (substring string start)))) 3218 "" " \\\n"))
3219 start me))
3220 (concat result (substring string start)))))
3205 3221
3206 3222
3207 3223
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index c6a9371ea9a..11ec785b647 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -178,6 +178,8 @@ when editing big diffs)."
178 ["Unified -> Context" diff-unified->context 178 ["Unified -> Context" diff-unified->context
179 :help "Convert unified diffs to context diffs"] 179 :help "Convert unified diffs to context diffs"]
180 ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)] 180 ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)]
181 ["Remove trailing whitespace" diff-remove-trailing-whitespace
182 :help "Remove trailing whitespace problems introduced by the diff"]
181 ["Show trailing whitespace" whitespace-mode 183 ["Show trailing whitespace" whitespace-mode
182 :style toggle :selected (bound-and-true-p whitespace-mode) 184 :style toggle :selected (bound-and-true-p whitespace-mode)
183 :help "Show trailing whitespace in modified lines"] 185 :help "Show trailing whitespace in modified lines"]