source: tags/pre-darwinppc-purge/source/cocoa-ide/hemlock/doc/user/special-modes.mss

Last change on this file was 6, checked in by Gary Byers, 21 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 29.8 KB
Line 
1@comment{-*- Dictionary: bld:scribe/hem/hem; Mode: spell; Package: Hemlock -*-}
2@chap[Special Modes]
3
4@section[Dired Mode]
5@label[dired]
6@index[directory editing]
7
8@hemlock provides a directory editing mechanism. The user can flag files and
9directories for deletion, undelete flagged files, and with a keystroke read in
10files and descend into directories. In some implementations, it also supports
11copying, renaming, and a simple wildcard feature.
12
13
14@subsection[Inspecting Directories]
15@defcom[com "Dired", bind (C-x C-M-d)]
16This command prompts for a directory and fills a buffer with a verbose listing
17of that directory. When the prefix argument is supplied, this includes Unix
18dot files. If a dired buffer already exists for the directory, this switches
19to the buffer and makes sure it displays dot files if appropriate.
20@enddefcom
21
22@defcom[com "Dired with Pattern", bind (C-x C-M-d)]
23This command prompts for a directory and a pattern that may contain at most one
24wildcard, an asterisk, and it fills a buffer with a verbose listing of the
25files in the directory matching the pattern. When the prefix argument is
26supplied, this includes Unix dot files. If a dired buffer already exists for
27this directory, this switches to the buffer and makes sure it displays dot
28files if appropriate.
29@enddefcom
30
31@defcom[com "Dired from Buffer Pathname"]
32This command invokes @hid[Dired] on the directory name of the current buffer's
33pathname.
34@enddefcom
35
36@defcom[com "Dired Help", bind (Dired: ?)]
37This command pops up a help window listing the various @hid[Dired] commands.
38@enddefcom
39
40@defcom[com "Dired View File", bind (Dired: Space)]
41@defcom1[com "Dired Edit File", bind (Dired: e)]
42These command read in the file on the current line with the point. If the line
43describes a directory instead of a file, then this command effectively invokes
44@hid[Dired] on the specification. This associates the file's buffer with the
45@hid[Dired] buffer.
46
47@hid[Dired View File] reads in the file as if by @hid[View File], and
48@hid[Dired Edit File] as if by @hid[Find File].
49
50@hid[Dired View File] always reads into a newly created buffer, warning if the
51file already exists in some buffer.
52@enddefcom
53
54@defcom[com "Dired Up Directory", bind (Dired: ^)]
55This command invokes @hid[Dired] on the directory up one level from the current
56@hid[Dired] buffer. This is useful for going backwards after repeatedly
57invoking @hid[Dired View File] and descending into a series of subdirectories.
58Remember, @hid[Dired] only generates directory listings when no buffer contains
59a dired for the specified directory.
60@enddefcom
61
62@defcom[com "Dired Update Buffer", bind (Dired: H-u)]
63This command is useful when the user knows the directory in the current
64@hid[Dired] buffer has changed. @hemlock cannot know the directory structure
65has changed, but the user can explicitly update the buffer with this command
66instead of having to delete it and invoke @hid[Dired] again.
67@enddefcom
68
69@defcom[com "Dired Next File"]
70@defcom1[com "Dired Previous File"]
71These commands move to next or previous undeleted file.
72@enddefcom
73
74
75@subsection[Deleting Files]
76@defcom[com "Dired Delete File and Down Line", bind (Dired: d)]
77This command marks for deletion the file on the current line with the point and
78moves point down a line.
79@enddefcom
80
81@defcom[com "Dired Delete File with Pattern", bind (Dired: D)]
82This command prompts for a name pattern that may contain at most one wildcard,
83an asterisk, and marks for deletion all the names matching the pattern.
84@enddefcom
85
86@defcom[com "Dired Delete File", bind (Dired: C-d)]
87This command marks for deletion the file on the current line with the point
88without moving the point.
89@enddefcom
90
91
92@subsection[Undeleting Files]
93@defcom[com "Dired Undelete File and Down Line", bind (Dired: u)]
94This command unmarks for deletion the file on the current line with the point
95and moves point down a line.
96@enddefcom
97
98@defcom[com "Dired Undelete File with Pattern", bind (Dired: U)]
99This command prompts for a name pattern that may contain at most one wildcard,
100an asterisk, and unmarks for deletion all the names matching the pattern.
101@enddefcom
102
103@defcom[com "Dired Undelete File", bind (Dired: C-u)]
104This command unmarks for deletion the file on the current line with the point
105without moving the point.
106@enddefcom
107
108
109@subsection[Expunging and Quitting]
110@defcom[com "Dired Expunge Files", bind (Dired: !)]
111@defhvar1[var "Dired File Expunge Confirm", val {t}]
112@defhvar1[var "Dired Directory Expunge Confirm", val {t}]
113This command deletes files marked for deletion, asking the user for
114confirmation once for all the files flagged. It recursively deletes any marked
115directories, asking the user for confirmation once for all those marked.
116@hid[Dired File Expunge Confirm] and @hid[Dired Directory Expunge Confirm] when
117set to @nil individually inhibit the confirmation prompting for the appropriate
118deleting.
119@enddefcom
120
121@defcom[com "Dired Quit", bind (Dired: q)]
122This command expunges any marked files or directories as if by @hid[Expunge
123Dired Files] before deleting the @hid[Dired] buffer.
124@enddefcom
125
126
127@subsection[Copying Files]
128@defcom[com "Dired Copy File", bind (Dired: c)]
129This command prompts for a destination specification and copies the file on the
130line with the point. When prompting, the current line's specification is the
131default, which provides some convenience in supplying the destination. The
132destination is either a directory specification or a file name, and when it is
133the former, the source is copied into the directory under its current file name
134and extension.
135@enddefcom
136
137@defcom[com "Dired Copy with Wildcard", bind (Dired: C)]
138This command prompts for a name pattern that may contain at most one wildcard,
139an asterisk, and copies all the names matching the pattern. When prompting for
140a destination, this provides the @hid[Dired] buffer's directory as a default.
141The destination is either a directory specification or a file name with a
142wildcard. When it is the former, all the source files are copied into the
143directory under their current file names and extensions. When it is the later,
144each sources file's substitution for the wildcard causing it to match the first
145pattern replaces the wildcard in the destination pattern; for example, you
146might want to copy @f["*.txt"] to @f["*.text"].
147@enddefcom
148
149@defhvar[var "Dired Copy File Confirm", val {t}]
150@label[copy-confirm]
151This variable controls interaction with the user when it is not obvious what
152the copying process should do. This takes one of the following values:
153@Begin[Description]
154@true@\
155When the destination specification exists, the copying process stops and asks
156the user if it should overwrite the destination.
157
158@nil@\
159The copying process always copies the source file to the destination
160specification without interacting with the user.
161
162@kwd[update]@\
163When the destination specification exists, and its write date is newer than
164the source's write date, then the copying process stops and asks the user if it
165should overwrite the destination.
166@End[Description]
167@enddefhvar
168
169
170@subsection[Renaming Files]
171@defcom[com "Dired Rename File", bind (Dired: r)]
172Rename the file or directory under the point
173@enddefcom
174
175@defcom[com "Dired Rename with Wildcard", bind (Dired: R)]
176Rename files that match a pattern containing ONE wildcard.
177@enddefcom
178
179@defhvar[var "Dired Rename File Confirm", val {t}]
180When non-nil, @hid[Dired] will query before clobbering an existing file.
181@enddefhvar
182
183
184@section[View Mode]
185@hid[View] mode provides for scrolling through a file read-only, terminating
186the buffer upon reaching the end.
187
188@defcom[com "View File"]
189This command reads a file into a new buffer as if by "Visit File", but
190read-only. Bindings exist for scrolling and backing up in a single key stroke.
191@enddefcom
192
193@defcom[com "View Help", bind (View: ?)]
194This command shows a help message for @hid[View] mode.
195@enddefcom
196
197@defcom[com "View Edit File", bind (View: e)]
198This commands makes a buffer in @hid[View] mode a normal editing buffer,
199warning if the file exists in another buffer simultaneously.
200@enddefcom
201
202@defcom[com "View Scroll Down", bind (View: Space)]
203@defhvar1[var "View Scroll Deleting Buffer", val {t}]
204This command scrolls the current window down through its buffer. If the end of
205the file is visible, then this deletes the buffer if @hid[View Scroll Deleting
206Buffer] is set. If the buffer is associated with a @hid[Dired] buffer, this
207returns there instead of to the previous buffer.
208@enddefcom
209
210@defcom[com "View Return", bind (View: ^)]
211@defcom1[com "View Quit", bind (View: q)]
212These commands invoke a function that returns to the buffer that created the
213current buffer in @hid[View] mode. Sometimes this function does nothing, but
214it is useful for returning to @hid[Dired] buffers and similar @hemlock
215features.
216
217After invoking the viewing return function if there is one, @hid[View Quit]
218deletes the buffer that is current when the user invokes it.
219@enddefcom
220
221Also, bound in @hid[View] mode are the following commands:
222@Begin[Description]
223@binding[backspace], @binding[delete]@\Scrolls the window up.
224
225@binding[<]@\Goes to the beginning of the buffer.
226
227@binding[>]@\Goes to the end of the buffer.
228@End[Description]
229
230
231@section[Process Mode]
232@Label[process]
233@Index[shells]
234@Index[processes]
235
236@hid[Process] mode allows the user to execute a Unix process within a @hemlock
237buffer. These commands and default bindings cater to running Unix shells in
238buffers. For example, @hid[Stop Buffer Subprocess] is bound to @binding[H-z]
239to stop the process you are running in the shell instead of binding @hid[Stop
240Main Process] to this key which would stop the shell itself.
241
242@defcom[com "Shell", bind (C-M-s)]
243@defhvar1[var "Shell Utility", val {"/bin/csh"}]
244@defhvar1[var "Shell Utility Switches", val {@nil}]
245@defhvar1[var "Current Shell"]
246@defhvar1[var "Ask about Old Shells"]
247This command executes the process determined by the values of @hid(Shell
248Utility) and @hid(Shell Utility Switches) in a new buffer named @f["Shell n"]
249where @f["n"] is some distinguishing integer.
250
251@hid[Current Shell] is a @hemlock variable that holds to the current shell
252buffer. When @hid[Shell] is invoked, if there is a @hid[Current Shell], the
253command goes to that buffer.
254
255When there is no @hid[Current Shell], but shell buffers do exist, if @hid[Ask
256about Old Shells] is set, the @hid[Shell] command prompts for one of them,
257setting @hid[Current Shell] to the indicated shell, and goes to the buffer.
258
259Invoking @hid[Shell] with an argument forces the creation of a new shell
260buffer.
261
262@hid[Shell Utility] is the string name of the process to execute.
263
264@hid[Shell Utility Switches] is a string containing the default command line
265arguments to @hid[Shell Utility]. This is a string since the utility is
266typically @f["/bin/csh"], and this string can contain I/O redirection and other
267shell directives.
268@enddefcom
269
270@defcom[com "Shell Command Line in Buffer"]
271This command prompts for a buffer and a shell command line. It then runs a
272shell, giving it the command line, in the buffer.
273@enddefcom
274
275@defcom[com "Set Current Shell"]
276This command sets the value of @hid[Current Shell].
277@enddefcom
278
279@defcom[com "Stop Main Process"]
280This command stops the process running in the current buffer by sending a
281@f[:SIGTSTP] to that process. With an argument, stops the process using
282@f[:SIGSTOP].
283@enddefcom
284
285@defcom[com "Continue Main Process"]
286If the process in the current buffer is stopped, this command continues it.
287@enddefcom
288
289@defcom[com "Kill Main Process"]
290@defhvar1[var "Kill Process Confirm", val {t}]
291This command prompts for confirmation and kills the process running in the
292current buffer.
293
294Setting this variable to @nil inhibits @hemlock@comment{}'s prompting for confirmation.
295@enddefcom
296
297@defcom[com "Stop Buffer Subprocess", stuff (bound to @bf[H-z] in @hid[Process] mode)]
298This command stops the foreground subprocess of the process in the current
299buffer, similar to the effect of @binding[C-Z] in a shell.
300@enddefcom
301
302@defcom[com "Kill Buffer Subprocess"]
303This command kills the foreground subprocess of the process in the current
304buffer.
305@enddefcom
306
307@defcom[com "Interrupt Buffer Subprocess", stuff (bound to @bf[H-c] in @hid[Process] mode)]
308This command interrupts the foreground subprocess of the process in the
309current buffer, similar to the effect of @binding[C-C] in a shell.
310@enddefcom
311
312@defcom[com "Quit Buffer Subprocess", stuff (bound to @bf[H-\] in @hid[Process] mode)]
313This command dumps the core of the foreground subprocess of the processs in
314the current buffer, similar to the effect of @binding[C-\] in a shell.
315@enddefcom
316
317@defcom[com "Send EOF to Process", stuff (bound to @bf[H-d] in @hid[Process] mode)]
318This command sends the end of file character to the process in the current
319buffer, similar to the effect of @binding[C-D] in a shell.
320@enddefcom
321
322@defcom[com "Confirm Process Input", stuff (bound to @bf[Return] in @hid[Process] mode)]
323This command sends the text the user has inserted at the end of a process
324buffer to the process in that buffer. Resulting output is inserted at the end
325of the process buffer.
326@enddefcom
327
328The user may edit process input using commands that are shared with
329@hid[Typescript] mode, see section @ref[typescripts].
330
331
332@section[Bufed Mode]
333@hemlock provides a mechanism for managing buffers as an itemized list.
334@hid[Bufed] supports conveniently deleting several buffers at once, saving
335them, going to one, etc., all in a key stroke.
336
337@defcom[com "Bufed", bind (C-x C-M-b)]
338This command creates a list of buffers in a buffer supporting operations such
339as deletion, saving, and selection. If there already is a @hid[Bufed] buffer,
340this just goes to it.
341@enddefcom
342
343@defcom[com "Bufed Help"]
344This command pops up a display of @hid[Bufed] help.
345@enddefcom
346
347@defcom[com "Bufed Delete", bind (Bufed: C-d, C-D, D, d)]
348@defhvar1[var "Virtual Buffer Deletion", val {t}]
349@defhvar1[var "Bufed Delete Confirm", val {t}]
350@hid[Bufed Delete] deletes the buffer on the current line.
351
352When @hid[Virtual Buffer Deletion] is set, this merely flags the buffer for
353deletion until @hid[Bufed Expunge] or @hid[Bufed Quit] executes.
354
355Whenever these commands actually delete a buffer, if @hid[Bufed Delete Confirm]
356is set, then @hemlock prompts the user for permission; if more than one buffer
357is flagged for deletion, this only prompts once. For each modified buffer,
358@hemlock asks to save the buffer before deleting it.
359@enddefcom
360
361@defcom[com "Bufed Undelete", bind (Bufed: U, u)]
362This command undeletes the buffer on the current line.
363@enddefcom
364
365@defcom[com "Bufed Expunge", bind (Bufed: !)]
366This command expunges any buffers marked for deletion regarding @hid[Bufed
367Delete Confirm].
368@enddefcom
369
370@defcom[com "Bufed Quit", bind (Bufed: q)]
371This command kills the @hid[Bufed] buffer, expunging any buffers marked for
372deletion.
373@enddefcom
374
375@defcom[com "Bufed Goto", bind (Bufed: Space)]
376This command selects the buffer on the current line, switching to it.
377@enddefcom
378
379@defcom[com "Bufed Goto and Quit", bind (Bufed: S-leftdown)]
380This command goes to the buffer under the pointer, quitting @hid[Bufed]. It
381supplies a function for @hid[Generic Pointer Up] which is a no-op.
382@enddefcom
383
384@defcom[com "Bufed Save File", bind (Bufed: s)]
385This command saves the buffer on the current line.
386@enddefcom
387
388
389@section[Completion]
390This is a minor mode that saves words greater than three characters in length,
391allowing later completion of those words. This is very useful for the often
392long identifiers used in Lisp programs. As you type a word, such as a Lisp
393symbol when in @hid[Lisp] mode, and you progress to typing the third letter,
394@hemlock displays a possible completion in the status line. You can then
395rotate through the possible completions or type some more letters to narrow
396down the possibilities. If you choose a completion, you can also rotate
397through the possibilities in the buffer instead of in the status line.
398Choosing a completion or inserting a character that delimits words moves the
399word forward in the ring of possible completions, so the next time you enter
400its initial characters, @hemlock will prefer it over less recently used
401completions.
402
403@defcom[com "Completion Mode"]
404This command toggles @hid[Completion] mode in the current buffer.
405@enddefcom
406
407@defcom[com "Completion Self Insert"]
408This command is like @hid[Self Insert], but it also checks for possible
409completions displaying any result in the status line. This is bound to most of
410the key-events with corresponding graphic characters.
411@enddefcom
412
413@defcom[com "Completion Complete Word", bind (Completion: End)]
414This command selects the currently displayed completion if there is one,
415guessing the case of the inserted text as with @hid[Query Replace]. Invoking
416this immediately in succession rotates through possible completions in the
417buffer. If there is no currently displayed completion on a first invocation,
418this tries to find a completion from text immediately before the point and
419displays the completion if found.
420@enddefcom
421
422@defcom[com "Completion Rotate Completions", bind (Completion: M-End)]
423This command displays the next possible completion in the status line. If
424there is no currently displayed completion, this tries to find a completion
425from text immediately before the point and displays the completion if found.
426@enddefcom
427
428@defcom[com "List Possible Completions"]
429This command lists all the possible completions for the text immediately before
430the point in a pop-up display. Sometimes this is more useful than rotating
431through several completions to see if what you want is available.
432@enddefcom
433
434@defhvar[var "Completion Bucket Size", val {20}]
435Completions are stored in buckets determined by the first three letters of a
436word. This variable limits the number of completions saved for each combination
437of the first three letters of a word. If you have many identifier in some
438module beginning with the same first three letters, you'll need increase this
439variable to accommodate all the names.
440@enddefhvar
441
442
443@defcom[com "Save Completions"]
444@defcom1[com "Read Completions"]
445@defhvar1[var "Completion Database Filename", val {nil}]
446@hid[Save Completions] writes the current completions to the file
447@hid[Completion Database Filename]. It writes them, so @hid[Read Completions]
448can read them back in preserving the most-recently-used order. If the user
449supplies an argument, then this prompts for a pathname.
450
451@hid[Read Completions] reads completions saved in @hid[Completion Database
452Filename]. It moves any current completions to a less-recently-used status,
453and it removes any in a given bucket that exceed the limit @hid[Completion
454Bucket Size].
455@enddefcom
456
457@defcom[com "Parse Buffer for Completions"]
458This command passes over the current buffer putting each valid completion word
459into the database. This is a good way of picking up many useful completions
460upon visiting a new file for which there are no saved completions.
461@enddefcom
462
463
464@section[CAPS-LOCK Mode]
465
466@hid[CAPS-LOCK] is a minor mode in which @hemlock that inserts all alphabetic
467characters as uppercase letters.
468
469@defcom[com "Caps Lock Mode"]
470This command toggles @hid[CAPS-LOCK] mode for the current buffer; it is most
471useful when bound to a key, so you can enter and leave @hid[CAPS-LOCK] mode
472casually.
473@enddefcom
474
475@defcom[com "Self Insert Caps Lock"]
476This command inserts the uppercase version of the character corresponding to
477the last key-event typed.
478@enddefcom
479
480
481
482@section[Overwrite Mode]
483
484@hid[Overwrite] mode is a minor mode which is useful for creating figures and
485tables out of text. In this mode, typing a key-event with a corresponding
486graphic character replaces the character at the point instead of inserting the
487character. @hid[Quoted Insert] can be used to insert characters normally.
488
489@defcom[com "Overwrite Mode"]
490This command turns on @hid[Overwrite] mode in the current buffer. If it is
491already on, then it is turned off. A positive argument turns @hid[Overwrite]
492mode on, while zero or a negative argument turns it off.
493@enddefcom
494
495@defcom[com "Self Overwrite"]
496This command replaces the next character with the character corresponding to
497the key-event used to invoke the command. After replacing the character, this
498moves past it. If the next character is a tab, this first expands the tab into
499the appropriate number of spaces, replacing just the next space character.
500At the end of the line, it inserts the
501character instead of clobbering the newline.
502
503This is bound to key-events with corresponding graphic characters in
504@hid[Overwrite] mode.
505@enddefcom
506
507@defcom[com "Overwrite Delete Previous Character",
508 stuff (bound to @bf[Delete] and @bf[Backspace] in @hid[Overwrite] mode)]
509This command replaces the previous character with a space and moves backwards.
510This deletes tabs and newlines.
511@enddefcom
512
513
514@section[Word Abbreviation]
515@index[word abbreviation]
516Word abbreviation provides a way to speed the typing of frequently used words
517and phrases. When in @hid[Abbrev] mode, typing a word delimiter causes the
518previous word to be replaced with its @i[expansion] if there is one currently
519defined. The expansion for an abbrev may be any string, so this mode can be
520used for abbreviating programming language constructs and other more obscure
521uses. For example, @hid[Abbrev] mode can be used to automatically correct
522common spelling mistakes and to enforce consistent capitalization of
523identifiers in programs.
524
525@i[Abbrev] is an abbreviation for @i[abbreviation], which is used for
526historical reasons. Obviously the original writer of @hid[Abbrev] mode hated
527to type long words and could hardly use @hid[Abbrev] mode while writing
528@hid[Abbrev] mode.
529
530A word abbrev can be either global or local to a major mode. A global word
531abbrev is defined no matter what the current major mode is, while a mode word
532abbrev is only defined when its mode is the major mode in the current buffer.
533Mode word abbrevs can be used to prevent abbrev expansion in inappropriate
534contexts.
535
536
537@subsection[Basic Commands]
538
539@defcom[com "Abbrev Mode"]
540This command turns on @hid[Abbrev] mode in the current buffer. If @hid[Abbrev]
541mode is already on, it is turned off. @hid[Abbrev] mode must be on for the
542automatic expansion of word abbrevs to occur, but the abbreviation commands are
543bound globally and may be used at any time.
544@enddefcom
545
546@defcom[com "Abbrev Expand Only",
547 stuff (bound to word-delimiters in @hid[Abbrev] mode)]
548This is the word abbrev expansion command. If the word before the point is a
549defined word abbrev, then it is replaced with its expansion. The replacement
550is done using the same case-preserving heuristic as is used by
551@hid[Query Replace]. This command is globally bound to @binding[M-Space] so
552that abbrevs can be expanded when @hid[Abbrev] mode is off. An undesirable
553expansion may be inhibited by using @binding[C-q] to insert the delimiter.
554@enddefcom
555
556@defcom[com "Inverse Add Global Word Abbrev", bind (C-x -)]
557@defcom1[com "Inverse Add Mode Word Abbrev", bind (C-x C-h, C-x Backspace)]
558@hid[Inverse Add Global Word Abbrev] prompts for a string and makes it the
559global word abbrev expansion for the word before the point.
560
561@hid[Inverse Add Mode Word Abbrev] is identical to
562@hid[Inverse Add Global Word Abbrev] except that it defines an expansion which
563is local to the current major mode.
564@enddefcom
565
566@defcom[com "Make Word Abbrev"]
567This command defines an arbitrary word abbreviation. It prompts for the mode,
568abbreviation and expansion. If the mode @f["Global"] is specified, then it
569makes a global abbrev.
570@enddefcom
571
572@defcom[com "Add Global Word Abbrev", bind (C-x +)]
573@defcom1[com "Add Mode Word Abbrev", bind (C-x C-a)]
574@hid[Add Global Word Abbrev] prompts for a word and defines it to be a global
575word abbreviation. The prefix argument determines which text is used as the
576expansion:
577@begin[description]
578@i[no prefix argument]@\The word before the point is used as the expansion of
579the abbreviation.
580
581@i[zero prefix argument]@\The text in the region is used as the expansion of the
582abbreviation.
583
584@i[positive prefix argument]@\That many words before the point are made the
585expansion of the abbreviation.
586
587@i[negative prefix argument]@\Do the same thing as
588@hid[Delete Global Word Abbrev] instead of defining an abbreviation.
589@end[description]
590
591@hid[Add Mode Word Abbrev] is identical to @hid[Add Global Word Abbrev] except
592that it defines or deletes mode word abbrevs in the current major mode.
593@enddefcom
594
595@defcom[com "Word Abbrev Prefix Mark", bind (M-")]
596This command allows @hid[Abbrev Expand Only] to recognize abbreviations when
597they have prefixes attached. First type the prefix, then use this command. A
598hyphen (@f[-]) will be inserted in the buffer. Now type the abbreviation and
599the word delimiter. @hid[Abbrev Expand Only] will expand the abbreviation and
600remove the hyphen.
601
602Note that there is no need for a suffixing command, since
603@hid[Abbrev Expand Only] may be used explicitly by typing @binding[M-Space].
604@enddefcom
605
606@defcom[com "Unexpand Last Word", bind (C-x u)]
607This command undoes the last word abbrev expansion. If repeated, undoes its
608own effect.
609@enddefcom
610
611
612@subsection[Word Abbrev Files]
613A word abbrev file is a file which holds word abbrev definitions. Word abbrev
614files allow abbrevs to be saved so that they may be used across many editing
615sessions.
616
617@defhvar[var "Abbrev Pathname Defaults", val {(pathname "abbrev.defns")}]
618This is sticky default for the following commands. When they prompt for a file
619to write, they offer this and set it for the next time one of them executes.
620@enddefhvar
621
622@defcom[com "Read Word Abbrev File"]
623This command reads in a word abbrev file, adding all the definitions to those
624currently defined. If a definition in the file is different from the current
625one, the current definition is replaced.
626@enddefcom
627
628@defcom[com "Write Word Abbrev File"]
629This command prompts for a file and writes all currently defined word abbrevs
630out to it.
631@enddefcom
632
633@defcom[com "Append to Word Abbrev File"]
634This command prompts for a word abbrev file and appends any new definitions to
635it. An abbrev is new if it has been defined or redefined since the last use of
636this command. Definitions made by reading word abbrev files are not
637considered.
638@enddefcom
639
640
641@subsection[Listing Word Abbrevs]
642@defcom[com "List Word Abbrevs"]
643@defcom1[com "Word Abbrev Apropos"]
644@hid[List Word Abbrevs] displays a list of each defined word abbrev, with its
645mode and expansion.
646
647@hid[Word Abbrev Apropos] is similar, except that it only displays abbrevs
648which contain a specified string, either in the definition, expansion or mode.
649@enddefcom
650
651@subsection[Editing Word Abbrevs]
652Word abbrev definition lists are edited by editing the text representation
653of the definitions. Word abbrev files may be edited directly, like any other
654text file. The set of abbrevs currently defined in @hemlock may be edited
655using the commands described in this section.
656
657The text representation of a word abbrev is fairly simple. Each definition
658begins at the beginning of a line. Each line has three fields which are
659separated by ASCII tab characters. The fields are the abbreviation, the mode
660of the abbreviation and the expansion. The mode is represented as the mode
661name inside of parentheses. If the abbrev is global, then the mode field is
662empty. The expansion is represented as a quoted string since it may contain
663any character. The string is quoted with double-quotes (@f["]); double-quotes
664in the expansion are represented by doubled double-quotes. The expansion may
665contain newline characters, in which case the definition will take up more than
666one line.
667
668@defcom[com "Edit Word Abbrevs"]
669This command inserts the current word abbrev definitions into the
670@hid[Edit Word Abbrevs] buffer and then enters a recursive edit on the buffer.
671When the recursive edit is exited, the definitions in the buffer become the new
672current abbrev definitions.
673@enddefcom
674
675@defcom[com "Insert Word Abbrevs"]
676This command inserts at the point the text representation of the currently
677defined word abbrevs.
678@enddefcom
679
680@defcom[com "Define Word Abbrevs"]
681This command interprets the text of the current buffer as a word abbrev
682definition list, adding all the definitions to those currently defined.
683@enddefcom
684
685
686@subsection[Deleting Word Abbrevs]
687The user may delete word abbrevs either individually or collectively.
688Individual abbrev deletion neutralizes single abbrevs which have outlived their
689usefulness; collective deletion provides a clean slate from which to initiate
690abbrev definitions.
691
692@defcom[com "Delete All Word Abbrevs"]
693This command deletes all word abbrevs which are currently defined.
694@enddefcom
695
696@defcom[com "Delete Global Word Abbrev"]
697@defcom1[com "Delete Mode Word Abbrev"]
698@hid[Delete Global Word Abbrev] prompts for a word abbreviation and deletes its
699global definition. If given a prefix argument, deletes all global abbrev
700definitions.
701
702@hid[Delete Mode Word Abbrev] is identical to @hid[Delete Global Word Abbrev]
703except that it deletes definitions in the current major mode.
704@enddefcom
705
706
707@section[Lisp Library]
708This is an implementation dependent feature. The Lisp library is a collection
709of local hacks that users can submit and share that is maintained by the Lisp
710group. These commands help peruse the catalog or description files and figure
711out how to load the entries.
712
713@defcom[com "Lisp Library"]
714This command finds all the library entries and lists them in a buffer. The
715following commands describe and load those entries.
716@enddefcom
717
718@defcom[com "Describe Library Entry", bind (Lisp-Lib: space)]
719@defcom1[com "Describe Pointer Library Entry", bind (Lisp-Lib: leftdown)]
720@defcom1[com "Load Library Entry", bind (Lisp-Lib: rightdown)]
721@defcom1[com "Load Pointer Library Entry", bind (Lisp-Lib: l)]
722@defcom1[com "Editor Load Library Entry"]
723@defcom1[com "Editor Load Pointer Library Entry"]
724@hid[Load Library Entry] and @hid[Load Pointer Library Entry] load the library
725entry indicated by the line on which the point lies or where the user clicked
726the pointer, respectively. These load the entry into the current slave Lisp.
727
728@hid[Editor Load Library Entry] and @hid[Editor Load Pointer Library Entry] are
729the same, but they load the entry into the editor Lisp.
730@enddefcom
731
732@defcom[com "Exit Lisp Library", bind (Lisp-Lib: q)]
733This command deletes the @hid[Lisp Library] buffer.
734@enddefcom
735
736@defcom[com "Lisp Library Help", bind (Lisp-Lib: ?)]
737This command pops up a help window listing @hid[Lisp-Lib] commands.
738@enddefcom
Note: See TracBrowser for help on using the repository browser.