|
|
1.1 root 1: ;; Define standard autoloads and keys of other files, for Emacs.
2: ;; Copyright (C) 1985 Richard M. Stallman.
3:
4: ;; This file is part of GNU Emacs.
5:
6: ;; GNU Emacs is distributed in the hope that it will be useful,
7: ;; but WITHOUT ANY WARRANTY. No author or distributor
8: ;; accepts responsibility to anyone for the consequences of using it
9: ;; or for whether it serves any particular purpose or works at all,
10: ;; unless he says so in writing. Refer to the GNU Emacs General Public
11: ;; License for full details.
12:
13: ;; Everyone is granted permission to copy, modify and redistribute
14: ;; GNU Emacs, but only under the conditions described in the
15: ;; GNU Emacs General Public License. A copy of this license is
16: ;; supposed to have been given to you along with GNU Emacs so you
17: ;; can know your rights and responsibilities. It should be in a
18: ;; file named COPYING. Among other things, the copyright notice
19: ;; and this notice must be preserved on all copies.
20:
21:
22: ;; Know which function the debuger is!
23: (setq debugger 'debug)
24:
25: ;; These variables are used by autoloadable packages.
26: ;; They are defined here so that they do not get overridden
27: ;; by the loading of those packages.
28:
29: (defconst paragraph-start "^[ \t\n\f]"
30: "*Regexp for beginning of a line that starts OR separates paragraphs.")
31: (defconst paragraph-separate "^[ \t\f]*$"
32: "*Regexp for beginning of a line that separates paragraphs.
33: If you change this, you may have to change paragraph-start also.")
34:
35: (defconst sentence-end "[.?!][]\")]*\\($\\|\t\\| \\)[ \t\n]*"
36: "*Regexp describing the end of a sentence.
37: All paragraph boundaries also end sentences, regardless.")
38:
39: (defconst page-delimiter "^\014"
40: "*Regexp describing line-beginnings that separate pages.")
41:
42: (defconst case-replace t
43: "*Non-nil means query-replace should preserve case in replacements.")
44:
45: ;; indent.el may not be autoloading, but it still loses
46: ;; if lisp-mode is ever called before this defvar is done.
47: (defvar indent-line-function
48: 'indent-to-left-margin
49: "Function to indent current line.")
50:
51: (defconst only-global-abbrevs nil
52: "*t means user plans to use global abbrevs only.
53: Makes the commands to define mode-specific abbrevs define global ones instead.")
54:
55: (defconst abbrev-file-name "~/.abbrev_defs"
56: "*Default name of file to read abbrevs from.")
57:
58: ;; Names in directory that end in one of these
59: ;; are ignored in completion,
60: ;; making it more likely you will get a unique match.
61: (setq completion-ignored-extensions
62: '(".o" ".elc" "~" ".dvi" ".toc" ".log" ".aux" ".lof"))
63:
64: (defvar compile-command "make -k"
65: "*Last shell command used to do a compilation; default for next compilation.")
66:
67: (defvar dired-listing-switches "-al"
68: "*Switches passed to ls for Dired. MUST contain the `l' option.
69: CANNOT contain the `F' option.")
70:
71: (defconst lpr-switches nil
72: "*List of strings to pass as extra switch args to lpr when it is invoked.")
73:
74: (defvar tags-file-name nil
75: "*File name of tag table.
76: To switch to a new tag table, setting this variable is sufficient.
77: Use the `etags' program to make a tag table file.")
78:
79: (defconst shell-prompt-pattern
80: "^[^#$%>]*[#$%>] *"
81: "*Regexp used by Newline command in shell mode to match subshell prompts.
82: Anything from beginning of line up to the end of what this pattern matches
83: is deemed to be prompt, and is not reexecuted.")
84:
85: (defconst ledit-save-files t
86: "*Non-nil means Ledit should save files before transferring to Lisp.")
87: (defconst ledit-go-to-lisp-string "%?lisp"
88: "*Shell commands to execute to resume Lisp job.")
89: (defconst ledit-go-to-liszt-string "%?liszt"
90: "*Shell commands to execute to resume Lisp compiler job.")
91:
92: (defconst display-time-day-and-date nil
93: "*Non-nil means M-x display-time should display day and date as well as time.")
94:
95: ;;; Determine mode according to filename
96:
97: (defvar auto-mode-alist
98: '(("\\.text$" . text-mode)
99: ("\\.mss$" . text-mode)
100: ("\\.tex$" . TeX-mode)
101: ("\\.TeX$" . TeX-mode)
102: ("\\.sty$" . TeX-mode)
103: ("\\.texinfo$" . texinfo-mode)
104: ;; Mailer puts message to be edited in /tmp/Re.... or Message
105: ("^/tmp/Re" . non-saved-text-mode)
106: ;; some news reader is reported to use this
107: ("^/tmp/fol/" . non-saved-text-mode)
108: ("/Message[0-9]*$" . text-mode)
109: ("\\.c$" . c-mode)
110: ("\\.h$" . c-mode)
111: ("\\.y$" . c-mode)
112: ("\\.scm$" . scheme-mode)
113: ("\\.scm.[0-9]*$" . scheme-mode)
114: ("/\\..*emacs" . emacs-lisp-mode)
115: ("\\.el$" . emacs-lisp-mode)
116: ("\\.ml$" . lisp-mode)
117: ("\\.l$" . lisp-mode)
118: ("\\.lisp$" . lisp-mode))
119: "Alist of filename patterns vs corresponding major mode functions.
120: Each element looks like (REGEXP . FUNCTION).
121: Visiting a file whose name matches REGEXP causes FUNCTION to be called.")
122:
123: ;; Autoload random libraries.
124: ;; Alphabetical order by library name.
125:
126: (autoload 'add-change-log-entry "add-log"
127: "\
128: Find change log file and add an entry for today.
129: With ARG, prompt for name and site of person."
130: t)
131:
132: (autoload 'occur-menu "aton"
133: "\
134: Show menu of lines containing match for REGEXP.
135: Enters recursive edit on text showing an entry for each matching line.
136: User can move to an entry and then exit with \\[exit-recursive-edit] to
137: move to the line in the original buffer described by the selected entry.
138: Abort with \\[abort-recursive-edit] to avoid moving in the original buffer.
139:
140: If REGEXP is empty then THE EXACT SAME menu is presented again,
141: with cursor initially at the next successive entry.
142: This is useful for stepping through located lines rapidly in order."
143: t)
144:
145: (autoload '\` "backquote"
146: "\
147: (` FORM) Expands to a form that will generate FORM.
148: FORM is `almost quoted' -- see backquote.el for a description."
149: nil t)
150:
151: (autoload 'byte-compile-file "bytecomp"
152: "\
153: Compile a file of Lisp code named FILENAME into a file of byte code.
154: The output file's name is made by appending \"c\" to the end of FILENAME."
155: t)
156:
157: (autoload 'byte-recompile-directory "bytecomp"
158: "\
159: Recompile every .el file in DIRECTORY that needs recompilation.
160: This is if a .elc file exists but is older than the .el file.
161: If the .elc file does not exist, offer to compile the .el file
162: only if a prefix argument has been specified."
163: t)
164:
165: (autoload 'batch-byte-compile "bytecomp"
166: "\
167: Runs byte-compile-file on the files remaining on the command line.
168: Must be used only with -batch, and kills emacs on completion.
169: Each file will be processed even if an error occurred previously.
170: For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\""
171: nil)
172:
173:
174: (autoload 'list-command-history "chistory"
175: "\
176: List history of commands typed to minibuffer.
177: The number of commands listed is controlled by list-command-history-max.
178: Calls value of list-command-history-filter (if non-nil) on each history
179: element to judge if that element should be excluded from the list.
180:
181: The buffer is left in Command History mode."
182: t)
183:
184: (autoload 'command-history-mode "chistory"
185: "\
186: Major mode for examining commands from command-history.
187: The number of commands listed is controlled by list-command-history-max.
188: The command history is filtered by list-command-history-filter if non-nil.
189:
190: Like Emacs-Lisp Mode except that characters do not insert themselves and
191: Digits provide prefix arguments. Tab does not indent. Instead these
192: commands are provided:
193: LF, CR Move to the next line in the history.
194: Delete Move to the previous line in the history.
195:
196: Calls the value of command-history-hook if that is non-nil
197: The Command History listing is recomputed each time this mode is
198: invoked."
199: t)
200:
201: (autoload 'repeat-matching-complex-command "chistory"
202: "\
203: Edit and re-evaluate complex command with name matching PATTERN.
204: Matching occurrences are displayed, most recent first, until you
205: select a form for evaluation. If PATTERN is empty (or nil), every form
206: in the command history is offered. The form is placed in the minibuffer
207: for editing and the result is evaluated. Prefix args don't count."
208: t)
209:
210:
211: (autoload 'compare-windows "compare-w"
212: "\
213: Compare text in current window with text in next window.
214: Compares the text starting at point in each window,
215: moving over text in each one as fas as they match."
216: t)
217:
218: (autoload 'compile "compile"
219: "\
220: Compile the program including the current buffer. Default: run `make'.
221: Runs COMMAND, a shell command, in a separate process asynchronously
222: with output going to the buffer *compilation*.
223: You can then use the command \\[next-error] to find the next error message
224: and move to the source code that caused it."
225: t)
226:
227: (autoload 'grep "compile"
228: "\
229: Run grep, with user-specified args, and collect output in a buffer.
230: While grep runs asynchronously, you can use the \\[next-error] command
231: to find the text that grep hits refer to."
232: t)
233:
234: (define-key ctl-x-map "`" 'next-error)
235:
236: (autoload 'next-error "compile"
237: "\
238: Visit next compilation error message and corresponding source code.
239: This operates on the output from the \\[compile] command.
240: If all preparsed error messages have been processed,
241: the error message buffer is checked for new ones.
242: A non-nil argument (prefix arg, if interactive)
243: means reparse the error message buffer and start at the first error."
244: t)
245:
246: (autoload 'debug "debug"
247: "\
248: Enter debugger. Returns if user says \"continue\".
249: Arguments are mainly for use when this is called
250: from the internals of the evaluator.
251: You may call with no args, or you may
252: pass nil as the first arg and any other args you like.
253: In that case, the list of args after the first will
254: be printed into the backtrace buffer.")
255:
256: (autoload 'cancel-debug-on-entry "debug"
257: "\
258: Undoes effect of debug-on-entry on FUNCTION."
259: t)
260:
261: (autoload 'debug-on-entry "debug"
262: "\
263: Request FUNCTION to invoke debugger each time it is called.
264: If the user continues, FUNCTION's execution proceeds.
265: Works by modifying the definition of FUNCTION,
266: which must be written in Lisp, not predefined."
267: t)
268:
269: (define-key ctl-x-map "d" 'dired)
270:
271: (autoload 'dired "dired"
272: "\
273: \"Edit\" directory DIRNAME. Delete some files in it.
274: Dired displays a list of files in DIRNAME.
275: You can move around in it with the usual commands.
276: You can flag files for deletion with C-d
277: and then delete them by typing `x'.
278: Type `h' after entering dired for more info."
279: t)
280:
281: (define-key ctl-x-4-map "d" 'dired-other-window)
282:
283: (autoload 'dired-other-window "dired"
284: "\
285: \"Edit\" directory DIRNAME. Like \\[dired] but selects in another window."
286: t)
287:
288: (autoload 'dired-noselect "dired"
289: "\
290: Find or create a dired buffer, return it, don't select it.
291: Call like dired.")
292:
293: (autoload 'dissociated-press "dissociate"
294: "\
295: Dissociate the text of the current buffer.
296: Output goes in buffer named *Dissociation*,
297: which is redisplayed each time text is added to it.
298: Every so often the user must say whether to continue.
299: If ARG is positive, require ARG words of continuity.
300: If ARG is negative, require -ARG chars of continuity.
301: Default is 2." t)
302:
303: (autoload 'doctor "doctor"
304: "\
305: Switch to *doctor* buffer and start giving psychotherapy."
306: t)
307:
308: (autoload 'electric-buffer-list "ebuff-menu"
309: "\
310: Vaguely like ITS lunar select buffer;
311: combining typeoutoid buffer listing with menuoid buffer selection.
312: This pops up a buffer describing the set of emacs buffers.
313: If the very next character typed is a space then the buffer list is killed.
314:
315: Otherwise, one may use \\[next-line] and \\[previous-line] to move around in the buffer list window
316: and select a buffer by typing Space when the cursor is on the
317: appropriate line of the buffer-list window.
318: Other commands are much like those of buffer-menu-mode.
319: Type C-h after calling \\[electric-buffer-list] for more information.
320:
321: Calls the value of electric-buffer-menu-mode-hook if that is non-nil."
322: t)
323:
324:
325: (autoload 'electric-command-history "echistory"
326: "\
327: Major mode for examining and redoing commands from command-history.
328: The number of command listed is controlled by list-command-history-max.
329: The command history is filtered by list-command-history-filter if non-nil.
330: Combines typeout Command History list window with menu like selection
331: of an expression from the history for re-evaluation in the *original* buffer.
332:
333: The history displayed is filtered by list-command-history-filter if non-nil.
334:
335: This pops up a window with the Command History listing. If the very
336: next character typed is Space, the listing is killed and the previous
337: window configuration is restored. Otherwise, you can browse in the
338: Command History with Return moving down and Delete moving up, possibly
339: selecting an expression to be redone with Space or quitting with `Q'.
340:
341: Like Emacs-Lisp Mode except that characters do not insert themselves and
342: Tab and linefeed do not indent. Instead these commands are provided:
343: Space or ! edit then evaluate current line in history inside
344: the ORIGINAL buffer which invoked this mode.
345: The previous window configuration is restored
346: unless the invoked command changes it.
347: C-c C-c, C-], Q Quit and restore previous window configuration.
348: LF, CR Move to the next line in the history.
349: Delete Move to the previous line in the history.
350: ? Provides a complete list of commands.
351:
352: Calls the value of electric-command-history-hook if that is non-nil
353: The Command History listing is recomputed each time this mode is invoked."
354: t)
355:
356: (autoload 'hanoi "hanoi"
357: "\
358: Towers of Hanoi diversion. Arg is number of rings."
359: t)
360:
361: (autoload 'Helper-help "helper"
362: "\
363: Provide help for current mode."
364: t)
365:
366: (autoload 'Helper-describe-bindings "helper"
367: "\
368: Describe local key bindings of current mode."
369: t)
370:
371:
372: (autoload 'info "info"
373: "\
374: Enter Info documentation browser."
375: t)
376:
377: (autoload 'ledit-mode "ledit"
378: "\
379: Major mode for editing text and stuffing it to a Lisp job.
380: Like Lisp mode, plus these special commands:
381: M-C-d -- record defun at or after point
382: for later transmission to Lisp job.
383: M-C-r -- record region for later transmission to Lisp job.
384: C-x z -- transfer to Lisp job and transmit saved text.
385: M-C-c -- transfer to Liszt (Lisp compiler) job
386: and transmit saved text.
387: To make Lisp mode automatically change to Ledit mode,
388: do (setq lisp-mode-hook 'ledit-from-lisp-mode)"
389: t)
390:
391: (autoload 'ledit-from-lisp-mode "ledit")
392:
393: (autoload 'run-lisp "shell"
394: "\
395: Run an inferior Lisp process, input and output via buffer *lisp*."
396: t)
397:
398: (autoload 'lpr-buffer "lpr"
399: "\
400: Print contents of buffer as with Unix command `lpr'.
401: `lpr-switches' is a list of extra switches (strings) to pass to lpr."
402: t)
403:
404: (autoload 'print-buffer "lpr"
405: "\
406: Print contents of buffer as with Unix command `lpr -p'.
407: `lpr-switches' is a list of extra switches (strings) to pass to lpr."
408: t)
409:
410: (autoload 'lpr-region "lpr"
411: "\
412: Print contents of region as with Unix command `lpr'.
413: `lpr-switches' is a list of extra switches (strings) to pass to lpr."
414: t)
415:
416: (autoload 'print-region "lpr"
417: "\
418: Print contents of region as with Unix command `lpr -p'.
419: `lpr-switches' is a list of extra switches (strings) to pass to lpr."
420: t)
421:
422: (autoload 'append-kbd-macro "macros"
423: "\
424: Append kbd macro NAME in file FILE, as Lisp code to define the macro.
425: Use load to load the file.
426: Third argument KEYS non-nil means also record the keys it is on.
427: (This is the prefix argument, when calling interactively.)"
428: t)
429:
430: (define-key ctl-x-map "q" 'kbd-macro-query)
431:
432: (autoload 'kbd-macro-query "macros"
433: "\
434: Query user during kbd macro execution.
435: With prefix argument, enters recursive edit,
436: reading keyboard commands even within a kbd macro.
437: You can give different commands each time the macro executes.
438: Without prefix argument, reads a character. Your options are:
439: Space -- execute the rest of the macro.
440: DEL -- skip the rest of the macro; start next repetition.
441: C-d -- skip rest of the macro and don't repeat it any more.
442: C-r -- enter a recursive edit, then on exit ask again for a character
443: C-l -- redisplay screen and ask again."
444: t)
445:
446: (autoload 'write-kbd-macro "macros"
447: "\
448: Save kbd macro NAME in file FILE, as Lisp code to define the macro.
449: Use load to load the file.
450: Third argument KEYS non-nil means also record the keys it is on.
451: (This is the prefix argument, when calling interactively.)
452: Fourth argument APPENDFLAG non-nil meams append to FILE's existing contents."
453: t)
454:
455: (autoload 'make-command-summary "makesum"
456: "\
457: Make a summary of current key bindings in the buffer *Summary*.
458: Previous contents of that buffer are killed first."
459: t)
460:
461: (autoload 'define-mail-alias "mailalias"
462: "Define NAME as a mail-alias that translates to DEFINITION."
463: t)
464:
465: (autoload 'manual-entry "man"
466: "\
467: Display Unix manual entry for TOPIC."
468: t)
469:
470: (autoload 'mh-rmail "mh-e"
471: "\
472: Read your mail with mh." t)
473:
474: (autoload 'mh-smail "mh-e"
475: "\
476: Compose and send mail with mh." t)
477:
478: (autoload 'convert-mocklisp-buffer "mlconvert"
479: "\
480: Convert buffer of Mocklisp code to real Lisp that GNU Emacs can run."
481: t)
482:
483: (setq disabled-command-hook 'disabled-command-hook)
484:
485: (autoload 'disabled-command-hook "novice")
486: (autoload 'enable-command "novice"
487: "\
488: Allow COMMAND to be executed without special confirmation from now on.
489: The user's .emacs file is altered so that this will apply
490: to future sessions." t)
491:
492: (autoload 'disable-command "novice"
493: "\
494: Require special confirmation to execute COMMAND from now on.
495: The user's .emacs file is altered so that this will apply
496: to future sessions." t)
497:
498: (autoload 'nroff-mode "nroff-mode"
499: "\
500: Major mode for editing text intended for nroff to format.
501: \\{nroff-mode-map}
502: Turning on Nroff mode runs text-mode-hook, then nroff-mode-hook.
503: Also, try nroff-electric-mode, for automatically inserting
504: closing requests for requests that are used in matched pairs."
505: t)
506:
507: (autoload 'list-options "options"
508: "\
509: Display a list of Emacs user options, with values and documentation."
510: t)
511:
512: (autoload 'edit-options "options"
513: "\
514: Edit a list of Emacs user option values.
515: Selects a buffer containing such a list,
516: in which there are commands to set the option values.
517: Type \\[describe-mode] in that buffer for a list of commands."
518: t)
519:
520: (autoload 'outline-mode "outline"
521: "\
522: Set up Emacs for editing an outline, doing selective hiding of text."
523: t)
524:
525: (autoload 'edit-picture "picture"
526: "\
527: Switch to Picture mode, in which a quarter-plane screen model is used.
528: Printing characters replace instead of inserting themselves with motion
529: afterwards settable by these commands:
530: M-` Move left after insertion.
531: M-' Move right after insertion.
532: M-- Move up after insertion.
533: M-= Move down after insertion.
534: C-c ` Move northwest (nw) after insertion.
535: C-c ' Move northeast (ne) after insertion.
536: C-c / Move southwest (sw) after insertion.
537: C-c \\ Move southeast (se) after insertion.
538: The current direction is displayed in the mode line. The initial
539: direction is right. Whitespace is inserted and tabs are changed to
540: spaces when required by movement. You can move around in the buffer
541: with these commands:
542: C-p Move vertically to SAME column in previous line.
543: C-n Move vertically to SAME column in next line.
544: C-e Move to column following last non-whitespace character.
545: C-f Move right inserting spaces if required.
546: C-b Move left changing tabs to spaces if required.
547: C-c C-f Move in direction of current picture motion.
548: C-c C-b Move in opposite direction of current picture motion.
549: Return Move to beginning of next line.
550: You can edit tabular text with these commands:
551: M-Tab Move to column beneath (or at) next interesting charecter.
552: `Indents' relative to a previous line.
553: Tab Move to next stop in local tab stop list.
554: C-c Tab Set tab stops according to context of this line.
555: With ARG resets tab stops to default (global) value.
556: See also documentation of variable picture-tab-chars
557: which defines \"interesting character\". You can manually
558: change the tab stop list with command \\[edit-tab-stops].
559: You can manipulate text with these commands:
560: C-d Clear (replace) ARG columns after point without moving.
561: C-c C-d Delete char at point - the command normally assigned to C-d.
562: Delete Clear (replace) ARG columns before point, moving back over them.
563: C-k Clear ARG lines, advancing over them. The cleared
564: text is saved in the kill ring.
565: C-o Open blank line(s) beneath current line.
566: You can manipulate rectangles with these commands:
567: C-c C-k Clear (or kill) a rectangle and save it.
568: C-c k Like C-c C-k except rectangle is saved in named register.
569: C-c C-y Overlay (or insert) currently saved rectangle at point.
570: C-c y Like C-c C-y except rectangle is taken from named register.
571: \\[copy-rectangle-to-register] Copies a rectangle to a register.
572: \\[advertised-undo] Can undo effects of rectangle overlay commands
573: commands if invoked soon enough.
574: You can return to the previous mode with:
575: C-c C-c Which also strips trailing whitespace from every line.
576: Stripping is suppressed by supplying an argument.
577:
578: Entry to this mode calls the value of edit-picture-hook if non-nil.
579:
580: Note that Picture mode commands will work outside of Picture mode, but
581: they are not defaultly assigned to keys."
582: t)
583:
584: (fset 'picture-mode 'edit-picture)
585:
586: (autoload 'clear-rectangle "rect"
587: "\
588: Blank out rectangle with corners at point and mark.
589: The text previously in the region is overwritten by the blanks."
590: t)
591:
592: (autoload 'delete-rectangle "rect"
593: "\
594: Delete (don't save) text in rectangle with point and mark as corners.
595: The same range of columns is deleted in each line
596: starting with the line where the region begins
597: and ending with the line where the region ends."
598: t)
599:
600: (autoload 'delete-extract-rectangle "rect"
601: "\
602: Return and delete contents of rectangle with corners at START and END.
603: Value is list of strings, one for each line of the rectangle.")
604:
605: (autoload 'extract-rectangle "rect"
606: "\
607: Return contents of rectangle with corners at START and END.
608: Value is list of strings, one for each line of the rectangle.")
609:
610: (autoload 'insert-rectangle "rect"
611: "\
612: Insert text of RECTANGLE with upper left corner at point.
613: RECTANGLE's first line is inserted at point,
614: its second line is inserted at a point vertically under point, etc.
615: RECTANGLE should be a list of strings.")
616:
617: (autoload 'kill-rectangle "rect"
618: "\
619: Delete rectangle with corners at point and mark; save as last killed one.
620: Calling from program, supply two args START and END, buffer positions.
621: But in programs you might prefer to use delete-extract-rectangle."
622: t)
623:
624: (autoload 'open-rectangle "rect"
625: "\
626: Blank out rectangle with corners at point and mark, shifting text right.
627: The text previously in the region is not overwritten by the blanks,
628: but insted winds up to the right of the rectangle."
629: t)
630:
631: (autoload 'yank-rectangle "rect"
632: "\
633: Yank the last killed rectangle with upper left corner at point."
634: t)
635:
636: (autoload 'rnews "rnews"
637: "\
638: Read netnews for groups for which you are a member and add or delete groups.
639: You can reply to articles posted and send articles to any group.
640: Type \\[describe-mode] once reading news to get a list of rnews commands."
641: t)
642:
643: (autoload 'rmail "rmail"
644: "\
645: Read and edit incoming mail.
646: Moves messages into file named by rmail-file-name (a babyl format file)
647: and edits that file in Rmail Mode.
648: Type \\[describe-mode] once editing that file, for a list of Rmail commands.
649:
650: May be called with filename as argument;
651: then performs rmail editing on that file,
652: but does not copy any new mail into the file."
653: t)
654:
655: (defconst rmail-dont-reply-to-names
656: nil ;(concat (getenv "USER"))
657: "*A regular expression specifying names to prune in replying to messages.
658: nil means dont reply to yourself.")
659:
660: (defconst rmail-ignored-headers
661: "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^[a-z-]*message-id:\\|^summary-line:"
662: "*Gubbish headers one would rather not see.")
663:
664: (defvar rmail-delete-after-output nil
665: "*Non-nil means automatically delete a message that is copied to a file.")
666:
667: ;;; Others are in paths.el.
668:
669:
670: (autoload 'scheme-mode "scheme"
671: "\
672: Set up things for editing scheme code,
673: or for running emacs as an inferior editor under scheme
674: to edit and zap functions."
675: t)
676:
677:
678: ;; Useful to set in site-init.el
679: (defconst send-mail-function 'sendmail-send-it
680: "Function to call to send the current buffer as mail.
681: The headers are delimited by a string found in mail-header-separator.")
682:
683: (defconst mail-self-blind nil
684: "*Non-nil means insert BCC to self in messages to be sent.
685: This is done when the message is initialized,
686: so you can remove or alter the BCC field to override the default.")
687:
688: (defconst mail-interactive nil
689: "*Non-nil means when sending a message wait for and display errors.
690: nil means let mailer mail back a message to report errors.")
691:
692: (defconst mail-yank-ignored-headers
693: "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^remailed\\|^received:\\|^[a-z-]*message-id:\\|^summary-line:\\|^to:\\|^cc:\\|^subject:\\|^in-reply-to:\\|^return-path:"
694: "Delete these headers from old message when it's inserted in a reply.")
695:
696: (defconst mail-header-separator "--text follows this line--"
697: "*Line used to separate headers from text in messages being composed.")
698:
699: (defconst mail-archive-file-name nil
700: "*Name of file to write all outgoing messages in, or nil for none.")
701:
702: (defvar mail-aliases t
703: "Alias of mail address aliases,
704: or t meaning should be initialized from .mailrc.")
705:
706: (autoload 'mail-other-window "sendmail"
707: "\
708: Like mail command but displays in other window."
709: t)
710:
711: (autoload 'mail "sendmail"
712: "\
713: Edit a message to be sent. Argument means resume editing (don't erase).
714: Returns with message buffer selected; value t if message freshly initialized.
715: While editing message, type C-c C-c to send the message and exit.
716:
717: Various special commands starting with C-c are available in sendmail mode
718: to move to message header fields. Type C-c ? for a list of them.
719:
720: If mail-self-blind is non-nil, a bcc to yourself is inserted
721: when the message is initialized.
722:
723: If mail-setup-hook is bound, its value is called with no arguments
724: after the message is initialized. It can add more default fields.
725:
726: When calling from a program, the second through fifth arguments
727: TO, SUBJECT, CC and IN-REPLY-TO specify if non-nil
728: the initial contents of those header fields.
729: These arguments should not have final newlines.
730: The sixth argument REPLYBUFFER is a buffer whose contents
731: should be yanked if the user types C-c y."
732: t)
733:
734: (define-key ctl-x-4-map "m" 'mail-other-window)
735: (define-key ctl-x-map "m" 'mail)
736:
737:
738: (autoload 'shell "shell"
739: "\
740: Run an inferior shell, with I/O through buffer *shell*.
741: If buffer exists but shell process is not running, make new shell.
742: The buffer is put in shell-mode, giving commands for sending input
743: and controlling the subjobs of the shell. See shell-mode."
744: t)
745:
746: (autoload 'spell-buffer "spell"
747: "\
748: Check spelling of every word in the buffer.
749: For each incorrect word, you are asked for the correct spelling
750: and then put into a query-replace to fix some or all occurrences.
751: If you do not want to change a word, just give the same word
752: as its \"correct\" spelling; then the query replace is skipped."
753: t)
754:
755: (autoload 'spell-region "spell"
756: "\
757: Like spell-buffer but applies only to region.
758: From program, applies from START to END."
759: t)
760:
761: (define-key esc-map "$" 'spell-word)
762: (autoload 'spell-word "spell"
763: "\
764: Check spelling of word at or before point.
765: If it is not correct, ask user for the correct spelling
766: and query-replace the entire buffer to substitute it."
767: t)
768:
769: (autoload 'spell-string "spell"
770: "\
771: Check spelling of string supplied as argument."
772: t)
773:
774: (autoload 'untabify "tabify"
775: "\
776: Convert all tabs in region to multiple spaces, preserving columns.
777: The variable tab-width controls the action."
778: t)
779:
780: (autoload 'tabify "tabify"
781: "\
782: Convert multiple spaces in region to tabs when possible.
783: A group of spaces is partially replaced by tabs
784: when this can be done without changing the column they end at.
785: The variable tab-width controls the action."
786: t)
787:
788: (define-key esc-map "." 'find-tag)
789:
790: (autoload 'find-tag "tags"
791: "\
792: Find next tag (in current tag table) whose name contains TAGNAME.
793: Selects the buffer that the tag is contained in
794: and puts point at its definition.
795: If TAGNAME is a null string, the expression in the buffer
796: around or before point is used as the tag name.
797: If second arg NEXT is non-nil (interactively, with prefix arg),
798: searches for the next tag in the tag table
799: that matches the tagname used in the previous find-tag.
800:
801: See documentation of variable tags-file-name."
802: t)
803:
804: (define-key ctl-x-4-map "." 'find-tag-other-window)
805:
806: (autoload 'find-tag-other-window "tags"
807: "\
808: Find tag (in current tag table) whose name contains TAGNAME.
809: Selects the buffer that the tag is contained in
810: and puts point at its definition.
811: If TAGNAME is a null string, the expression in the buffer
812: around or before point is used as the tag name.
813: If second arg NEXT is non-nil (interactively, with prefix arg),
814: searches for the next tag in the tag table
815: that matches the tagname used in the previous find-tag.
816:
817: See documentation of variable tags-file-name."
818: t)
819:
820: (autoload 'list-tags "tags"
821: "\
822: Display list of tags in file FILE."
823: t)
824:
825: (autoload 'next-file "tags"
826: "\
827: Select next file among files in current tag table.
828: Non-nil argument (prefix arg, if interactive)
829: initializes to the beginning of the list of files in the tag table."
830: t)
831:
832: (autoload 'tags-apropos "tags"
833: "\
834: Display list of all tags in tag table that contain STRING."
835: t)
836:
837: (define-key esc-map "," 'tags-loop-continue)
838: (autoload 'tags-loop-continue "tags"
839: "\
840: Continue last tags-search or tags-query-replace command.
841: Used noninteractively with non-nil argument
842: to begin such a command. See variable tags-loop-form."
843: t)
844:
845: (autoload 'tag-table-files "tags"
846: "\
847: Return a list of files in the current tag table.")
848:
849: (autoload 'tags-query-replace "tags"
850: "\
851: Query-replace FROM with TO through all files listed in tag table.
852: If you exit (C-G or ESC), you can resume the query-replace
853: with the command \\[tags-loop-continue].
854:
855: See documentation of variable tags-file-name."
856: t)
857:
858: (autoload 'tags-search "tags"
859: "\
860: Search through all files listed in tag table for match for REGEXP.
861: Stops when a match is found.
862: To continue searching for next match, use command \\[tags-loop-continue].
863:
864: See documentation of variable tags-file-name."
865: t)
866:
867: (autoload 'visit-tags-table "tags"
868: "\
869: Tell tags commands to use tag table file FILE.
870: FILE should be the name of a file created with the `etags' program.
871: A directory name is ok too; it means file TAGS in that directory."
872: t)
873:
874: (autoload 'telnet "telnet"
875: "\
876: Open a network login connection to host named HOST (a string).
877: Communication with HOST is recorded in a buffer *HOST-telnet*.
878: Normally input is edited in Emacs and sent a line at a time."
879: t)
880:
881: (autoload 'tex-mode "tex-mode"
882: "\
883: Major mode for editing TeX input files.\n\
884: Activates $ and \" with TeX meaning, makes ()[]{} have proper syntax.\n\
885: M-$ erects barrier to speed up matching $ searches.\n\
886: Turning on TeX-mode calls the value of the variable TeX-mode-hook,\n\
887: if that value is non-nil."
888: t)
889: (fset 'TeX-mode 'tex-mode)
890:
891: (autoload 'texinfo-format-buffer "texinfo"
892: "\
893: Process the current buffer as texinfo code, into an Info file.
894: The Info file output is generated in a buffer
895: visiting the Info file name specified in the @setfilename command."
896: t)
897:
898: (autoload 'texinfo-mode "texinfo"
899: "\
900: Major mode for editing texinfo files.
901: These are files that are input for TEX and also to be turned
902: into Info files by M-x texinfo-format-buffer.
903: These files must be written in a very restricted and
904: modified version of TEX input format.
905:
906: As for editing commands, like text-mode except for syntax table,
907: which is set up so expression commands skip texinfo bracket groups."
908: t)
909:
910: (autoload 'display-time "time"
911: "\
912: Display current time and load level in mode line of each buffer.
913: Updates automatically every minute."
914: t)
915:
916: (autoload 'underline-region "underline"
917: "\
918: Underline all nonblank characters in the region.
919: Works by overstriking underscores.
920: Called from program, takes two arguments START and END
921: which specify the range to operate on."
922: t)
923:
924: (autoload 'ununderline-region "underline"
925: "\
926: Remove all underlining (overstruck underscores) in the region.
927: Called from program, takes two arguments START and END
928: which specify the range to operate on."
929: t)
930:
931: (autoload 'ask-user-about-lock "userlock"
932: "\
933: Ask user what to do when he wants to edit FILE but it is locked by USER.
934: This function has a choice of three things to do:
935: do (signal 'buffer-file-locked (list FILE USER))
936: to refrain from editing the file
937: return t (grab the lock on the file)
938: return nil (edit the file even though it is locked).
939: You can rewrite it to use any criterion you like to choose which one to do."
940: nil)
941:
942: (autoload 'view-file "view"
943: "\
944: View FILE in View mode, returning to previous buffer when done.
945: The usual Emacs commands are not available; instead,
946: a special set of commands (mostly letters and punctuation)
947: are defined for moving around in the buffer.
948: Space scrolls forward, Delete scrolls backward.
949: For list of all View commands, type ? or h while viewing.
950:
951: Calls the value of view-hook if that is non-nil."
952: t)
953:
954: (autoload 'view-buffer "view"
955: "\
956: View BUFFER in View mode, returning to previous buffer when done.
957: The usual Emacs commands are not available; instead,
958: a special set of commands (mostly letters and punctuation)
959: are defined for moving around in the buffer.
960: Space scrolls forward, Delete scrolls backward.
961: For list of all View commands, type ? or h while viewing.
962:
963: Calls the value of view-hook if that is non-nil."
964: t)
965:
966: (autoload 'view-mode "view"
967: "\
968: Major mode for viewing text but not editing it."
969: t)
970:
971:
972: (autoload 'yow "yow"
973: "Return or display a Zippy quotation" t)
974: (autoload 'psychoanalyze-pinhead "yow"
975: "Zippy goes to the analyst" t)
976:
977:
978: (define-key esc-map "\C-f" 'forward-sexp)
979: (define-key esc-map "\C-b" 'backward-sexp)
980: (define-key esc-map "\C-u" 'backward-up-list)
981: (define-key esc-map "\C-@" 'mark-sexp)
982: (define-key esc-map "\C-d" 'down-list)
983: (define-key esc-map "\C-k" 'kill-sexp)
984: (define-key esc-map "\C-n" 'forward-list)
985: (define-key esc-map "\C-p" 'backward-list)
986: (define-key esc-map "\C-a" 'beginning-of-defun)
987: (define-key esc-map "\C-e" 'end-of-defun)
988: (define-key esc-map "\C-h" 'mark-defun)
989: (define-key esc-map "(" 'insert-parentheses)
990: (define-key esc-map ")" 'move-past-close-and-reindent)
991:
992: (define-key ctl-x-map "\C-e" 'eval-last-sexp)
993:
994: (define-key ctl-x-map "/" 'point-to-register)
995: (define-key ctl-x-map "j" 'register-to-point)
996: (define-key ctl-x-map "x" 'copy-to-register)
997: (define-key ctl-x-map "g" 'insert-register)
998: (define-key ctl-x-map "r" 'copy-rectangle-to-register)
999:
1000: (define-key esc-map "q" 'fill-paragraph)
1001: (define-key esc-map "g" 'fill-region)
1002: (define-key ctl-x-map "." 'set-fill-prefix)
1003:
1004: (define-key esc-map "[" 'backward-paragraph)
1005: (define-key esc-map "]" 'forward-paragraph)
1006: (define-key esc-map "h" 'mark-paragraph)
1007: (define-key esc-map "a" 'backward-sentence)
1008: (define-key esc-map "e" 'forward-sentence)
1009: (define-key esc-map "k" 'kill-sentence)
1010: (define-key ctl-x-map "\177" 'backward-kill-sentence)
1011:
1012: (define-key ctl-x-map "[" 'backward-page)
1013: (define-key ctl-x-map "]" 'forward-page)
1014: (define-key ctl-x-map "\C-p" 'mark-page)
1015: (put 'narrow-to-region 'disabled t)
1016: (define-key ctl-x-map "p" 'narrow-to-page)
1017: (define-key ctl-x-map "l" 'count-lines-page)
1018:
1019: (defun isearch-forward ()
1020: "\
1021: Do incremental search forward.
1022: As you type characters, they add to the search string and are found.
1023: Type Delete to cancel characters from end of search string.
1024: Type ESC to exit, leaving point at location found.
1025: Type C-S to search again forward, C-R to search again backward.
1026: Type C-W to yank word from buffer onto end of search string and search for it.
1027: Type C-Y to yank rest of line onto end of search string, etc.
1028: Type C-Q to quote control character to search for it.
1029: Other control and meta characters terminate the search
1030: and are then executed normally.
1031: The above special characters are mostly controlled by parameters;
1032: do M-x apropos on search-.*-char to find them.
1033: C-G while searching or when search has failed
1034: cancels input back to what has been found successfully.
1035: C-G when search is successful aborts and moves point to starting point."
1036: (interactive)
1037: (isearch t))
1038:
1039: (defun isearch-forward-regexp ()
1040: "\
1041: Do incremental search forward for regular expression.
1042: Like ordinary incremental search except that your input
1043: is treated as a regexp. See isearch-forward for more info."
1044: (interactive)
1045: (isearch t t))
1046:
1047: (defun isearch-backward ()
1048: "\
1049: Do incremental search backward.
1050: See isearch-forward for more information."
1051: (interactive)
1052: (isearch nil))
1053:
1054: (defun isearch-backward-regexp ()
1055: "\
1056: Do incremental search backward for regular expression.
1057: Like ordinary incremental search except that your input
1058: is treated as a regexp. See isearch-forward for more info."
1059: (interactive)
1060: (isearch nil t))
1061:
1062: (defvar search-last-string ""
1063: "Last string search for by a search command.
1064: This does not include direct calls to the primitive search functions,
1065: and does not include searches that are aborted.")
1066:
1067: (defconst search-repeat-char ?\C-s
1068: "Character to repeat incremental search forwards.")
1069: (defconst search-reverse-char ?\C-r
1070: "Character to repeat incremental search backwards.")
1071: (defconst search-exit-char ?\e
1072: "Character to exit incremental search.")
1073: (defconst search-delete-char ?\177
1074: "Character to delete from incremental search string.")
1075: (defconst search-quote-char ?\C-q
1076: "Character to quote special characters for incremental search.")
1077: (defconst search-yank-word-char ?\C-w
1078: "Character to pull next word from buffer into search string.")
1079: (defconst search-yank-line-char ?\C-y
1080: "Character to pull rest of line from buffer into search string.")
1081: (defconst search-exit-option t
1082: "Non-nil means random control characters terminate incremental search.")
1083:
1084: (defvar isearch-slow-window-lines 1
1085: "*Number of lines in slow search display windows.")
1086: (defvar isearch-slow-speed 1200
1087: "*Highest terminal speed at which to use \"slow\" style incremental search.
1088: This is the style where a one-line window is created to show the line
1089: that the search has reached.")
1090:
1091: (autoload 'isearch "isearch")
1092:
1093: (define-key global-map "\C-s" 'isearch-forward)
1094: (define-key global-map "\C-r" 'isearch-backward)
1095: (define-key esc-map "\C-s" 'isearch-forward-regexp)
1096:
1097: (defun query-replace (from-string to-string &optional arg)
1098: "\
1099: Replace some occurrences of FROM-STRING with TO-STRING.
1100: As each match is found, the user must type a character saying
1101: what to do with it. For directions, type \\[help-command] at that time.
1102:
1103: Preserves case in each replacement if case-replace and case-fold-search
1104: are non-nil and FROM-STRING has no uppercase letters.
1105: Third arg DELIMITED (prefix arg if interactive) non-nil means replace
1106: only matches surrounded by word boundaries."
1107: (interactive "sQuery replace: \nsQuery replace %s with: \nP")
1108: (perform-replace from-string to-string t nil arg))
1109:
1110: (defun query-replace-regexp (regexp to-string &optional arg)
1111: "\
1112: Replace some things after point matching REGEXP with TO-STRING.
1113: As each match is found, the user must type a character saying
1114: what to do with it. For directions, type \\[help-command] at that time.
1115:
1116: Preserves case in each replacement if case-replace and case-fold-search
1117: are non-nil and REGEXP has no uppercase letters.
1118: Third arg DELIMITED (prefix arg if interactive) non-nil means replace
1119: only matches surrounded by word boundaries.
1120: In TO-STRING, \\& means insert what matched REGEXP,
1121: and \\<n> means insert what matched <n>th \\(...\\) in REGEXP."
1122: (interactive "sQuery replace regexp: \nsQuery replace regexp %s with: \nP")
1123: (perform-replace regexp to-string t t arg))
1124:
1125: (defun replace-string (from-string to-string &optional delimited)
1126: "\
1127: Replace occurrences of FROM-STRING with TO-STRING.
1128: Preserve case in each match if case-replace and case-fold-search
1129: are non-nil and FROM-STRING has no uppercase letters.
1130: Third arg DELIMITED (prefix arg if interactive) non-nil means replace
1131: only matches surrounded by word boundaries."
1132: (interactive "sReplace string: \nsReplace string %s with: \nP")
1133: (perform-replace from-string to-string nil nil delimited))
1134:
1135: (defun replace-regexp (regexp to-string &optional delimited)
1136: "\
1137: Replace things after point matching REGEXP with TO-STRING.
1138: Preserve case in each match if case-replace and case-fold-search
1139: are non-nil and REGEXP has no uppercase letters.
1140: Third arg DELIMITED (prefix arg if interactive) non-nil means replace
1141: only matches surrounded by word boundaries.
1142: In TO-STRING, \\& means insert what matched REGEXP,
1143: and \\<n> means insert what matched <n>th \\(...\\) in REGEXP."
1144: (interactive "sReplace regexp: \nsReplace regexp %s with: \nP")
1145: (perform-replace regexp to-string nil t delimited))
1146:
1147: (define-key esc-map "%" 'query-replace)
1148:
1149: (autoload 'perform-replace "replace")
1150:
1151: (define-key ctl-x-map "\C-a" 'add-mode-abbrev)
1152: (define-key ctl-x-map "\+" 'add-global-abbrev)
1153: (define-key ctl-x-map "\C-h" 'inverse-add-mode-abbrev)
1154: (define-key ctl-x-map "\-" 'inverse-add-global-abbrev)
1155: (define-key esc-map "'" 'abbrev-prefix-mark)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.