~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/dabbrev.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; dabbrev.el --- dynamic abbreviation package
2
2
 
3
3
;; Copyright (C) 1985, 1986, 1992, 1994, 1996, 1997, 2000, 2001, 2002,
4
 
;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
4
;;   2003, 2004, 2005, 2006, 2007, 2008, 2009
 
5
;;   Free Software Foundation, Inc.
5
6
 
6
7
;; Author: Don Morrison
 
8
;;      Lars Lindberg
 
9
;; (according to ack.texi)
7
10
;; Maintainer: Lars Lindberg <Lars.Lindberg@sypro.cap.se>
8
11
;; Created: 16 Mars 1992
9
12
;; Lindberg's last update version: 5.7
104
107
  :group 'convenience)
105
108
 
106
109
(defcustom dabbrev-backward-only nil
107
 
  "*If non-nil, `dabbrev-expand' only looks backwards."
 
110
  "If non-nil, `dabbrev-expand' only looks backwards."
108
111
  :type 'boolean
109
112
  :group 'dabbrev)
110
113
 
111
114
(defcustom dabbrev-limit nil
112
 
  "*Limits region searched by `dabbrev-expand' to this many chars away."
 
115
  "Limits region searched by `dabbrev-expand' to this many chars away."
113
116
  :type '(choice (const :tag "off" nil)
114
117
                 integer)
115
118
  :group 'dabbrev)
116
119
 
117
120
(defcustom dabbrev-abbrev-skip-leading-regexp nil
118
 
  "*Regexp for skipping leading characters of an abbreviation.
 
121
  "Regexp for skipping leading characters of an abbreviation.
119
122
 
120
123
Example: Set this to \"\\\\$\" for programming languages
121
124
in which variable names may appear with or without a leading `$'.
127
130
  :group 'dabbrev)
128
131
 
129
132
(defcustom dabbrev-eliminate-newlines t
130
 
  "*Non-nil means dabbrev should not insert newlines.
 
133
  "Non-nil means dabbrev should not insert newlines.
131
134
Instead it converts them to spaces."
132
135
  :type 'boolean
133
136
  :group 'dabbrev)
134
137
 
135
138
(defcustom dabbrev-case-fold-search 'case-fold-search
136
 
  "*Control whether dabbrev searches should ignore case.
 
139
  "Control whether dabbrev searches should ignore case.
137
140
A value of nil means case is significant.
138
141
A value of `case-fold-search' means case is significant
139
142
 if `case-fold-search' is nil.
144
147
  :group 'dabbrev)
145
148
 
146
149
(defcustom dabbrev-upcase-means-case-search nil
147
 
  "*The significance of an uppercase character in an abbreviation.
 
150
  "The significance of an uppercase character in an abbreviation.
148
151
A nil value means case fold search when searching for possible expansions;
149
152
non-nil means case sensitive search.
150
153
 
154
157
  :group 'dabbrev)
155
158
 
156
159
(defcustom dabbrev-case-distinction 'case-replace
157
 
  "*Whether dabbrev treats expansions as the same if they differ in case.
 
160
  "Whether dabbrev treats expansions as the same if they differ in case.
158
161
 
159
162
A value of nil means treat them as different.
160
163
A value of `case-replace' means distinguish them if `case-replace' is nil.
169
172
  :version "22.1")
170
173
 
171
174
(defcustom dabbrev-case-replace 'case-replace
172
 
  "*Whether dabbrev applies the abbreviations's case pattern to the expansion.
 
175
  "Whether dabbrev applies the abbreviations's case pattern to the expansion.
173
176
 
174
177
A value of nil means preserve the expansion's case pattern.
175
178
A value of `case-replace' means preserve it if `case-replace' is nil.
184
187
  :group 'dabbrev)
185
188
 
186
189
(defcustom dabbrev-abbrev-char-regexp nil
187
 
  "*Regexp to recognize a character in an abbreviation or expansion.
 
190
  "Regexp to recognize a character in an abbreviation or expansion.
188
191
This regexp will be surrounded with \\\\( ... \\\\) when actually used.
189
192
 
190
193
Set this variable to \"\\\\sw\" if you want ordinary words or
209
212
  :group 'dabbrev)
210
213
 
211
214
(defcustom dabbrev-check-all-buffers t
212
 
  "*Non-nil means dabbrev package should search *all* buffers.
 
215
  "Non-nil means dabbrev package should search *all* buffers.
213
216
 
214
217
Dabbrev always searches the current buffer first.  Then, if
215
218
`dabbrev-check-other-buffers' says so, it searches the buffers
222
225
  :group 'dabbrev)
223
226
 
224
227
(defcustom dabbrev-ignored-buffer-names '("*Messages*" "*Buffer List*")
225
 
  "*List of buffer names that dabbrev should not check.
 
228
  "List of buffer names that dabbrev should not check.
226
229
See also `dabbrev-ignored-buffer-regexps'."
227
230
  :type '(repeat (string :tag "Buffer name"))
228
231
  :group 'dabbrev
229
232
  :version "20.3")
230
233
 
231
234
(defcustom dabbrev-ignored-buffer-regexps nil
232
 
  "*List of regexps matching names of buffers that dabbrev should not check.
 
235
  "List of regexps matching names of buffers that dabbrev should not check.
233
236
See also `dabbrev-ignored-buffer-names'."
234
237
  :type '(repeat regexp)
235
238
  :group 'dabbrev
236
239
  :version "21.1")
237
240
 
238
241
(defcustom dabbrev-check-other-buffers t
239
 
  "*Should \\[dabbrev-expand] look in other buffers?\
 
242
  "Should \\[dabbrev-expand] look in other buffers?\
240
243
 
241
244
nil: Don't look in other buffers.
242
245
t: Also look for expansions in the buffers pointed out by
263
266
A mode setting this variable should make it buffer local.")
264
267
 
265
268
(defcustom dabbrev-friend-buffer-function 'dabbrev--same-major-mode-p
266
 
  "*A function to decide whether dabbrev should search OTHER-BUFFER.
 
269
  "A function to decide whether dabbrev should search OTHER-BUFFER.
267
270
The function should take one argument, OTHER-BUFFER, and return
268
271
non-nil if that buffer should be searched.  Have a look at
269
272
`dabbrev--same-major-mode-p' for an example.