home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / language / elisp.zoo / lisp / text-mod.elc < prev    next >
Text File  |  1989-07-06  |  3KB  |  47 lines

  1.  
  2. (provide (quote text-mode))
  3.  
  4. (defvar text-mode-syntax-table nil "\
  5. Syntax table used while in text mode.")
  6.  
  7. (defvar text-mode-abbrev-table nil "\
  8. Abbrev table used while in text mode.")
  9.  
  10. (define-abbrev-table (quote text-mode-abbrev-table) nil)
  11.  
  12. (if text-mode-syntax-table nil (setq text-mode-syntax-table (make-syntax-table)) (set-syntax-table text-mode-syntax-table) (modify-syntax-entry 34 ".   " text-mode-syntax-table) (modify-syntax-entry 92 ".   " text-mode-syntax-table) (modify-syntax-entry 39 "w   " text-mode-syntax-table))
  13.  
  14. (defvar text-mode-map nil "\
  15. ")
  16.  
  17. (if text-mode-map nil (setq text-mode-map (make-sparse-keymap)) (define-key text-mode-map "    " (quote tab-to-tab-stop)) (define-key text-mode-map "s" (quote center-line)) (define-key text-mode-map "S" (quote center-paragraph)))
  18.  
  19. (defun text-mode nil "\
  20. Major mode for editing text intended for humans to read.  Special commands:\\{text-mode-map}
  21. Turning on text-mode calls the value of the variable text-mode-hook,
  22. if that value is non-nil." (interactive) (byte-code "הêו êז✓!êחë①êטë②ê ë③êי!êכל!ç" [text-mode-map mode-name major-mode local-abbrev-table text-mode-abbrev-table text-mode-syntax-table nil kill-all-local-variables use-local-map "Text" text-mode set-syntax-table run-hooks text-mode-hook] 5))
  23.  
  24. (defvar indented-text-mode-map nil)
  25.  
  26. (if indented-text-mode-map nil (setq indented-text-mode-map (make-sparse-keymap)) (define-key indented-text-mode-map "    " (quote indent-relative)) (define-key indented-text-mode-map "s" (quote center-line)) (define-key indented-text-mode-map "S" (quote center-paragraph)))
  27.  
  28. (defun indented-text-mode nil "\
  29. Major mode for editing indented text intended for humans to read.\\{indented-text-mode-map}
  30. Turning on indented-text-mode calls the value of the variable text-mode-hook,
  31. if that value is non-nil." (interactive) (byte-code "IJêח êט✓!êיבIJ\"ê♪ë②êכ !êלד!êמë⑤êט╱!êנë⑥◆êסë⑥✓êעפ!ç" [text-mode-map nil local-abbrev-table text-mode-abbrev-table text-mode-syntax-table indent-line-function indented-text-mode-map mode-name major-mode kill-all-local-variables use-local-map define-abbrev-table set-syntax-table make-local-variable indent-relative-maybe "Indented Text" indented-text-mode run-hooks text-mode-hook] 8))
  32.  
  33. (defun center-paragraph nil "\
  34. Center each line in the paragraph at or after point.
  35. See center-line for more info." (interactive) (byte-code "IJêèא ênåבג!ê`⑧ד êה`✓\"))ç" [end nil forward-paragraph newline 1 backward-paragraph center-region] 6))
  36.  
  37. (defun center-region (from to) "\
  38. Center each line starting in the region.
  39. See center-line for more info." (interactive "r") (byte-code "בê✓    Và⓪    ə✓①
  40. ë⓪)êè✓bê`    Wà%ג êדה!êé⑤)ç" [from to tem nil center-line forward-line 1] 4))
  41.  
  42. (defun center-line nil "\
  43. Center the line point is on, within the width specified by `fill-column'.
  44. This means adjusting the indentation to match
  45. the distance between the end of the text and `fill-column'." (interactive) (byte-code "בêèב⑧ג êד êה êד êië⓪êג ê    וז
  46.     ✓#ח\"\\j))ç" [line-length left-margin fill-column nil beginning-of-line delete-horizontal-space end-of-line / - 2] 11))
  47.