Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 74523:d3e5cb1aa5b6
(register-input-method): Doc fix.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 09 Dec 2006 15:20:25 +0000 |
parents | 5b1056dbe2ba |
children | 43cc94d955c2 |
comparison
equal
deleted
inserted
replaced
74522:b97c3d287849 | 74523:d3e5cb1aa5b6 |
---|---|
857 (not (listp default-coding-system))) | 857 (not (listp default-coding-system))) |
858 (setq default-coding-system (list default-coding-system))) | 858 (setq default-coding-system (list default-coding-system))) |
859 | 859 |
860 (let ((no-other-defaults nil) | 860 (let ((no-other-defaults nil) |
861 auto-cs) | 861 auto-cs) |
862 (unless (or (stringp from) find-file-literally) | 862 (unless (or (stringp from) find-file-literally) |
863 ;; Find an auto-coding that is specified for the the current | 863 ;; Find an auto-coding that is specified for the the current |
864 ;; buffer and file from the region FROM and TO. | 864 ;; buffer and file from the region FROM and TO. |
865 (save-excursion | 865 (save-excursion |
866 (save-restriction | 866 (save-restriction |
867 (widen) | 867 (widen) |
919 (let ((base (coding-system-base default-buffer-file-coding-system))) | 919 (let ((base (coding-system-base default-buffer-file-coding-system))) |
920 (or (eq base 'undecided) | 920 (or (eq base 'undecided) |
921 (rassq base default-coding-system) | 921 (rassq base default-coding-system) |
922 (setq default-coding-system | 922 (setq default-coding-system |
923 (append default-coding-system | 923 (append default-coding-system |
924 (list (cons default-buffer-file-coding-system | 924 (list (cons default-buffer-file-coding-system |
925 base))))))) | 925 base))))))) |
926 | 926 |
927 ;; If the most preferred coding system has the property mime-charset, | 927 ;; If the most preferred coding system has the property mime-charset, |
928 ;; append it to the defaults. | 928 ;; append it to the defaults. |
929 (let ((tail coding-category-list) | 929 (let ((tail coding-category-list) |
946 ;; default-buffer-file-coding-system. | 946 ;; default-buffer-file-coding-system. |
947 (if default-coding-system | 947 (if default-coding-system |
948 (let ((default-eol-type (coding-system-eol-type | 948 (let ((default-eol-type (coding-system-eol-type |
949 (caar default-coding-system)))) | 949 (caar default-coding-system)))) |
950 (if (and (vectorp default-eol-type) buffer-file-coding-system) | 950 (if (and (vectorp default-eol-type) buffer-file-coding-system) |
951 (setq default-eol-type (coding-system-eol-type | 951 (setq default-eol-type (coding-system-eol-type |
952 buffer-file-coding-system))) | 952 buffer-file-coding-system))) |
953 (if (and (vectorp default-eol-type) default-buffer-file-coding-system) | 953 (if (and (vectorp default-eol-type) default-buffer-file-coding-system) |
954 (setq default-eol-type (coding-system-eol-type | 954 (setq default-eol-type (coding-system-eol-type |
955 default-buffer-file-coding-system))) | 955 default-buffer-file-coding-system))) |
956 (if (and default-eol-type (not (vectorp default-eol-type))) | 956 (if (and default-eol-type (not (vectorp default-eol-type))) |
957 (dolist (elt default-coding-system) | 957 (dolist (elt default-coding-system) |
958 (setcar elt (coding-system-change-eol-conversion | 958 (setcar elt (coding-system-change-eol-conversion |
959 (car elt) default-eol-type)))))) | 959 (car elt) default-eol-type)))))) |
1233 (define-key-after setup-map (vector (intern lang-env)) | 1233 (define-key-after setup-map (vector (intern lang-env)) |
1234 (cons lang-env 'setup-specified-language-environment) t) | 1234 (cons lang-env 'setup-specified-language-environment) t) |
1235 | 1235 |
1236 (dolist (elt alist) | 1236 (dolist (elt alist) |
1237 (set-language-info-internal lang-env (car elt) (cdr elt))) | 1237 (set-language-info-internal lang-env (car elt) (cdr elt))) |
1238 | 1238 |
1239 (if (equal lang-env current-language-environment) | 1239 (if (equal lang-env current-language-environment) |
1240 (set-language-environment lang-env)))) | 1240 (set-language-environment lang-env)))) |
1241 | 1241 |
1242 (defun read-language-name (key prompt &optional default) | 1242 (defun read-language-name (key prompt &optional default) |
1243 "Read a language environment name which has information for KEY. | 1243 "Read a language environment name which has information for KEY. |
1356 (INPUT-METHOD LANGUAGE-ENV ACTIVATE-FUNC TITLE DESCRIPTION ARGS...) | 1356 (INPUT-METHOD LANGUAGE-ENV ACTIVATE-FUNC TITLE DESCRIPTION ARGS...) |
1357 See the function `register-input-method' for the meanings of the elements.") | 1357 See the function `register-input-method' for the meanings of the elements.") |
1358 | 1358 |
1359 (defun register-input-method (input-method lang-env &rest args) | 1359 (defun register-input-method (input-method lang-env &rest args) |
1360 "Register INPUT-METHOD as an input method for language environment LANG-ENV. | 1360 "Register INPUT-METHOD as an input method for language environment LANG-ENV. |
1361 | |
1361 INPUT-METHOD and LANG-ENV are symbols or strings. | 1362 INPUT-METHOD and LANG-ENV are symbols or strings. |
1362 | |
1363 The remaining arguments are: | |
1364 ACTIVATE-FUNC, TITLE, DESCRIPTION, and ARGS... | |
1365 ACTIVATE-FUNC is a function to call to activate this method. | 1363 ACTIVATE-FUNC is a function to call to activate this method. |
1366 TITLE is a string to show in the mode line when this method is active. | 1364 TITLE is a string to show in the mode line when this method is active. |
1367 DESCRIPTION is a string describing this method and what it is good for. | 1365 DESCRIPTION is a string describing this method and what it is good for. |
1368 The ARGS, if any, are passed as arguments to ACTIVATE-FUNC. | 1366 The ARGS, if any, are passed as arguments to ACTIVATE-FUNC. |
1369 All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS. | 1367 All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS. |
1377 parameter of `quail-define-package'. (If the values are different, the | 1375 parameter of `quail-define-package'. (If the values are different, the |
1378 string specified in this function takes precedence.) | 1376 string specified in this function takes precedence.) |
1379 | 1377 |
1380 The commands `describe-input-method' and `list-input-methods' need | 1378 The commands `describe-input-method' and `list-input-methods' need |
1381 these duplicated values to show some information about input methods | 1379 these duplicated values to show some information about input methods |
1382 without loading the relevant Quail packages." | 1380 without loading the relevant Quail packages. |
1381 \n(fn INPUT-METHOD LANG-ENV ACTIVATE-FUNC TITLE DESCRIPTION &rest ARGS)" | |
1383 (if (symbolp lang-env) | 1382 (if (symbolp lang-env) |
1384 (setq lang-env (symbol-name lang-env))) | 1383 (setq lang-env (symbol-name lang-env))) |
1385 (if (symbolp input-method) | 1384 (if (symbolp input-method) |
1386 (setq input-method (symbol-name input-method))) | 1385 (setq input-method (symbol-name input-method))) |
1387 (let ((info (cons lang-env args)) | 1386 (let ((info (cons lang-env args)) |