Mercurial > emacs
comparison lisp/case-table.el @ 584:4cd7543be581
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 16 Mar 1992 20:39:07 +0000 |
parents | 9697c13298e5 |
children | 8a533acedb77 |
comparison
equal
deleted
inserted
replaced
583:3c0c1cd8428a | 584:4cd7543be581 |
---|---|
44 (with-output-to-temp-buffer "*Help*" | 44 (with-output-to-temp-buffer "*Help*" |
45 (describe-vector vector))) | 45 (describe-vector vector))) |
46 | 46 |
47 (defun invert-case (count) | 47 (defun invert-case (count) |
48 "Change the case of the character just after point and move over it. | 48 "Change the case of the character just after point and move over it. |
49 With arg, applies to that many chars. | 49 With prefix arg, applies to that many chars. |
50 Negative arg inverts characters before point but does not move." | 50 Negative arg inverts characters before point but does not move." |
51 (interactive "p") | 51 (interactive "p") |
52 (if (< count 0) | 52 (if (< count 0) |
53 (progn (setq count (min (1- (point)) (- count))) | 53 (progn (setq count (min (1- (point)) (- count))) |
54 (forward-char (- count)))) | 54 (forward-char (- count)))) |
61 (forward-char 1) | 61 (forward-char 1) |
62 (setq count (1- count)))) | 62 (setq count (1- count)))) |
63 | 63 |
64 (defun set-case-syntax-delims (l r table) | 64 (defun set-case-syntax-delims (l r table) |
65 "Make characters L and R a matching pair of non-case-converting delimiters. | 65 "Make characters L and R a matching pair of non-case-converting delimiters. |
66 Sets the entries for L and R in standard-case-table, | 66 Sets the entries for L and R in `standard-case-table', `standard-syntax-table', |
67 standard-syntax-table, and text-mode-syntax-table to indicate | 67 and `text-mode-syntax-table' to indicate left and right delimiters." |
68 left and right delimiters." | |
69 (aset (car table) l l) | 68 (aset (car table) l l) |
70 (aset (car table) r r) | 69 (aset (car table) r r) |
71 (modify-syntax-entry l (concat "(" (char-to-string r) " ") | 70 (modify-syntax-entry l (concat "(" (char-to-string r) " ") |
72 (standard-syntax-table)) | 71 (standard-syntax-table)) |
73 (modify-syntax-entry l (concat "(" (char-to-string r) " ") | 72 (modify-syntax-entry l (concat "(" (char-to-string r) " ") |
77 (modify-syntax-entry r (concat ")" (char-to-string l) " ") | 76 (modify-syntax-entry r (concat ")" (char-to-string l) " ") |
78 text-mode-syntax-table)) | 77 text-mode-syntax-table)) |
79 | 78 |
80 (defun set-case-syntax-pair (uc lc table) | 79 (defun set-case-syntax-pair (uc lc table) |
81 "Make characters UC and LC a pair of inter-case-converting letters. | 80 "Make characters UC and LC a pair of inter-case-converting letters. |
82 Sets the entries for characters UC and LC in | 81 Sets the entries for characters UC and LC in `standard-case-table', |
83 standard-case-table, standard-syntax-table, and | 82 `standard-syntax-table' and `text-mode-syntax-table' to indicate an |
84 text-mode-syntax-table to indicate an (uppercase, lowercase) | 83 (uppercase, lowercase) pair of letters." |
85 pair of letters." | 84 |
86 (aset (car table) uc lc) | 85 (aset (car table) uc lc) |
87 (modify-syntax-entry lc "w " (standard-syntax-table)) | 86 (modify-syntax-entry lc "w " (standard-syntax-table)) |
88 (modify-syntax-entry lc "w " text-mode-syntax-table) | 87 (modify-syntax-entry lc "w " text-mode-syntax-table) |
89 (modify-syntax-entry uc "w " (standard-syntax-table)) | 88 (modify-syntax-entry uc "w " (standard-syntax-table)) |
90 (modify-syntax-entry uc "w " text-mode-syntax-table)) | 89 (modify-syntax-entry uc "w " text-mode-syntax-table)) |
91 | 90 |
92 (defun set-case-syntax (c syntax table) | 91 (defun set-case-syntax (c syntax table) |
93 "Make characters C case-invariant with syntax SYNTAX. | 92 "Make characters C case-invariant with syntax SYNTAX. |
94 Sets the entries for character C in standard-case-table, | 93 Sets the entries for character C in `standard-case-table', |
95 standard-syntax-table, and text-mode-syntax-table to indicate this. | 94 `standard-syntax-table' and `text-mode-syntax-table' to indicate this. |
96 SYNTAX should be \" \", \"w\", \".\" or \"_\"." | 95 SYNTAX should be \" \", \"w\", \".\" or \"_\"." |
97 (aset (car table) c c) | 96 (aset (car table) c c) |
98 (modify-syntax-entry c syntax (standard-syntax-table)) | 97 (modify-syntax-entry c syntax (standard-syntax-table)) |
99 (modify-syntax-entry c syntax text-mode-syntax-table)) | 98 (modify-syntax-entry c syntax text-mode-syntax-table)) |
100 | 99 |