diff options
| author | Dave Love | 2003-09-11 09:24:56 +0000 |
|---|---|---|
| committer | Dave Love | 2003-09-11 09:24:56 +0000 |
| commit | 1d1af02ddd35cfb8fb794debf77fb2ec873ddb6d (patch) | |
| tree | 730ba77f9bd45f822c062438ec30dc37995840a1 | |
| parent | 54ce67a02e95247d6a40cb15c9649533ef339c9e (diff) | |
| download | emacs-1d1af02ddd35cfb8fb794debf77fb2ec873ddb6d.tar.gz emacs-1d1af02ddd35cfb8fb794debf77fb2ec873ddb6d.zip | |
Doc fixes.
(auto-compose-chars): Use functionp, not fboundp.
| -rw-r--r-- | lisp/composite.el | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lisp/composite.el b/lisp/composite.el index 6df3b690071..3db2ff09644 100644 --- a/lisp/composite.el +++ b/lisp/composite.el | |||
| @@ -40,8 +40,7 @@ | |||
| 40 | (mid-left . 3) (mid-center . 10) (mid-right . 5)) | 40 | (mid-left . 3) (mid-center . 10) (mid-right . 5)) |
| 41 | "Alist of symbols vs integer codes of glyph reference points. | 41 | "Alist of symbols vs integer codes of glyph reference points. |
| 42 | A glyph reference point symbol is to be used to specify a composition | 42 | A glyph reference point symbol is to be used to specify a composition |
| 43 | rule in COMPONENTS argument to such functions as `compose-region' and | 43 | rule in COMPONENTS argument to such functions as `compose-region'. |
| 44 | `make-composition'. | ||
| 45 | 44 | ||
| 46 | Meanings of glyph reference point codes are as follows: | 45 | Meanings of glyph reference point codes are as follows: |
| 47 | 46 | ||
| @@ -164,9 +163,9 @@ When called from a program, expects these four arguments. | |||
| 164 | First two arguments START and END are positions (integers or markers) | 163 | First two arguments START and END are positions (integers or markers) |
| 165 | specifying the region. | 164 | specifying the region. |
| 166 | 165 | ||
| 167 | Optional 3rd argument COMPONENTS, if non-nil, is a character or a | 166 | Optional 3rd argument COMPONENTS, if non-nil, is a character, a string |
| 168 | sequence (vector, list, or string) of integers. In this case, | 167 | Optional 3rd argument COMPONENTS, if non-nil, is a character, a string |
| 169 | characters are composed not relatively but according to COMPONENTS. | 168 | or a vector or list of integers and rules. |
| 170 | 169 | ||
| 171 | If it is a character, it is an alternate character to display instead | 170 | If it is a character, it is an alternate character to display instead |
| 172 | of the text in the region. | 171 | of the text in the region. |
| @@ -315,7 +314,7 @@ is: | |||
| 315 | Optional 2nd arg LIMIT, if non-nil, limits the matching of text. | 314 | Optional 2nd arg LIMIT, if non-nil, limits the matching of text. |
| 316 | 315 | ||
| 317 | Optional 3rd arg OBJECT, if non-nil, is a string that contains the | 316 | Optional 3rd arg OBJECT, if non-nil, is a string that contains the |
| 318 | text to compose. In that case, POS and LIMIT index to the string. | 317 | text to compose. In that case, POS and LIMIT index into the string. |
| 319 | 318 | ||
| 320 | This function is the default value of `compose-chars-after-function'." | 319 | This function is the default value of `compose-chars-after-function'." |
| 321 | (let ((tail (aref composition-function-table (char-after pos))) | 320 | (let ((tail (aref composition-function-table (char-after pos))) |
| @@ -373,7 +372,7 @@ If STRING is nil, POS is a position in the current buffer, and the | |||
| 373 | function has to compose a character at POS with surrounding characters | 372 | function has to compose a character at POS with surrounding characters |
| 374 | in the current buffer. | 373 | in the current buffer. |
| 375 | 374 | ||
| 376 | Otherwise, STRING is a string, and POS is an index to the string. In | 375 | Otherwise, STRING is a string, and POS is an index into the string. In |
| 377 | this case, the function has to compose a character at POS with | 376 | this case, the function has to compose a character at POS with |
| 378 | surrounding characters in the string. | 377 | surrounding characters in the string. |
| 379 | 378 | ||
| @@ -381,10 +380,6 @@ See also the command `toggle-auto-composition'.") | |||
| 381 | 380 | ||
| 382 | ;; Copied from font-lock.el. | 381 | ;; Copied from font-lock.el. |
| 383 | (eval-when-compile | 382 | (eval-when-compile |
| 384 | ;; | ||
| 385 | ;; We don't do this at the top-level as we only use non-autoloaded macros. | ||
| 386 | (require 'cl) | ||
| 387 | ;; | ||
| 388 | ;; Borrowed from lazy-lock.el. | 383 | ;; Borrowed from lazy-lock.el. |
| 389 | ;; We use this to preserve or protect things when modifying text properties. | 384 | ;; We use this to preserve or protect things when modifying text properties. |
| 390 | (defmacro save-buffer-state (varlist &rest body) | 385 | (defmacro save-buffer-state (varlist &rest body) |
| @@ -398,17 +393,17 @@ See also the command `toggle-auto-composition'.") | |||
| 398 | (unless modified | 393 | (unless modified |
| 399 | (restore-buffer-modified-p nil)))) | 394 | (restore-buffer-modified-p nil)))) |
| 400 | (put 'save-buffer-state 'lisp-indent-function 1) | 395 | (put 'save-buffer-state 'lisp-indent-function 1) |
| 401 | ;; Fixme: This makes bootstrapping fails by this error. | 396 | ;; Fixme: This makes bootstrapping fail with this error. |
| 402 | ;; Symbol's function definition is void: eval-defun | 397 | ;; Symbol's function definition is void: eval-defun |
| 403 | ;;(def-edebug-spec save-buffer-state let) | 398 | ;;(def-edebug-spec save-buffer-state let) |
| 404 | ) | 399 | ) |
| 405 | 400 | ||
| 406 | (defvar auto-composition-chunk-size 500 | 401 | (defvar auto-composition-chunk-size 500 |
| 407 | "*Automatic composition chunks of this many characters, or smaller.") | 402 | "*Automatic composition uses chunks of this many characters, or smaller.") |
| 408 | 403 | ||
| 409 | (defun auto-compose-chars (pos string) | 404 | (defun auto-compose-chars (pos string) |
| 410 | "Compose characters after the buffer position POS. | 405 | "Compose characters after the buffer position POS. |
| 411 | If STRING is non-nil, it is a string, and POS is an index to the string. | 406 | If STRING is non-nil, it is a string, and POS is an index into the string. |
| 412 | In that case, compose characters in the string. | 407 | In that case, compose characters in the string. |
| 413 | 408 | ||
| 414 | This function is the default value of `auto-composition-function' (which see)." | 409 | This function is the default value of `auto-composition-function' (which see)." |
| @@ -430,7 +425,7 @@ This function is the default value of `auto-composition-function' (which see)." | |||
| 430 | (or (< pos limit) | 425 | (or (< pos limit) |
| 431 | (/= ch ?\n))) | 426 | (/= ch ?\n))) |
| 432 | (setq func (aref composition-function-table ch)) | 427 | (setq func (aref composition-function-table ch)) |
| 433 | (if (fboundp func) | 428 | (if (functionp func) |
| 434 | (setq newpos (funcall func pos string) | 429 | (setq newpos (funcall func pos string) |
| 435 | pos (if (and (integerp newpos) (> newpos pos)) | 430 | pos (if (and (integerp newpos) (> newpos pos)) |
| 436 | newpos | 431 | newpos |