diff options
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/ccl.el | 22 | ||||
-rw-r--r-- | lisp/international/fontset.el | 11 | ||||
-rw-r--r-- | lisp/international/iso-ascii.el | 5 | ||||
-rw-r--r-- | lisp/international/latin1-disp.el | 4 | ||||
-rw-r--r-- | lisp/international/mule-cmds.el | 108 | ||||
-rw-r--r-- | lisp/international/mule-conf.el | 71 | ||||
-rw-r--r-- | lisp/international/mule-diag.el | 2 | ||||
-rw-r--r-- | lisp/international/mule-util.el | 26 | ||||
-rw-r--r-- | lisp/international/mule.el | 3 | ||||
-rw-r--r-- | lisp/international/quail.el | 20 |
10 files changed, 166 insertions, 106 deletions
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 7f8aa7dda37..51626f51618 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -184,11 +184,19 @@ (defvar ccl-current-ic 0 "The current index for `ccl-program-vector'.") +;; The CCL compiled codewords are 28bits, but the CCL implementation +;; assumes that the codewords are sign-extended, so that data constants in +;; the upper part of the codeword are signed. This function truncates a +;; codeword to 28bits, and then sign extends the result to a fixnum. +(defun ccl-fixnum (code) + "Convert a CCL code word to a fixnum value." + (- (logxor (logand code #x0fffffff) #x08000000) #x08000000)) + (defun ccl-embed-data (data &optional ic) "Embed integer DATA in `ccl-program-vector' at `ccl-current-ic' and increment it. If IC is specified, embed DATA at IC." (if ic - (aset ccl-program-vector ic data) + (aset ccl-program-vector ic (ccl-fixnum data)) (let ((len (length ccl-program-vector))) (if (>= ccl-current-ic len) (let ((new (make-vector (* len 2) nil))) @@ -196,7 +204,7 @@ increment it. If IC is specified, embed DATA at IC." (setq len (1- len)) (aset new len (aref ccl-program-vector len))) (setq ccl-program-vector new)))) - (aset ccl-program-vector ccl-current-ic data) + (aset ccl-program-vector ccl-current-ic (ccl-fixnum data)) (setq ccl-current-ic (1+ ccl-current-ic)))) (defun ccl-embed-symbol (symbol prop) @@ -230,7 +238,8 @@ proper index number for SYMBOL. PROP should be `ccl-program-vector' at IC without altering the other bit field." (let ((relative (- ccl-current-ic (1+ ic)))) (aset ccl-program-vector ic - (logior (aref ccl-program-vector ic) (ash relative 8))))) + (logior (aref ccl-program-vector ic) + (ccl-fixnum (ash relative 8)))))) (defun ccl-embed-code (op reg data &optional reg2) "Embed CCL code for the operation OP and arguments REG and DATA in @@ -986,7 +995,8 @@ is a list of CCL-BLOCKs." (defun ccl-get-next-code () "Return a CCL code in `ccl-code' at `ccl-current-ic'." (prog1 - (aref ccl-code ccl-current-ic) + (let ((code (aref ccl-code ccl-current-ic))) + (if (numberp code) (ccl-fixnum code) code)) (setq ccl-current-ic (1+ ccl-current-ic)))) (defun ccl-dump-1 () @@ -1142,9 +1152,9 @@ is a list of CCL-BLOCKs." (progn (insert (logand code #xFFFFFF)) (setq i (1+ i))) - (insert (format "%c" (lsh code -16))) + (insert (format "%c" (ash code -16))) (if (< (1+ i) len) - (insert (format "%c" (logand (lsh code -8) 255)))) + (insert (format "%c" (logand (ash code -8) 255)))) (if (< (+ i 2) len) (insert (format "%c" (logand code 255)))) (setq i (+ i 3))))) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index c90d4f53bd9..e2e91ff850e 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -487,7 +487,7 @@ (data (list (vconcat (mapcar 'car cjk)))) (i 0)) (dolist (elt cjk) - (let ((mask (lsh 1 i))) + (let ((mask (ash 1 i))) (map-charset-chars #'(lambda (range _arg) (let ((from (car range)) (to (cdr range))) @@ -876,7 +876,7 @@ (spec (cdr target-spec))) (if (integerp spec) (dotimes (i (length registries)) - (if (> (logand spec (lsh 1 i)) 0) + (if (> (logand spec (ash 1 i)) 0) (set-fontset-font "fontset-default" target (cons nil (aref registries i)) nil 'append))) @@ -1164,6 +1164,8 @@ given from DEFAULT-SPEC." (setcar (cdr elt) spec))) fontlist)) +(defvar fontset-alias-alist) + (defun fontset-name-p (fontset) "Return non-nil if FONTSET is valid as fontset name. A valid fontset name should conform to XLFD (X Logical Font Description) @@ -1240,11 +1242,12 @@ Done when `mouse-set-font' is called." (latin-iso8859-15 . latin) (latin-iso8859-16 . latin) (latin-jisx0201 . latin) + (thai-iso8859-11 . thai) (thai-tis620 . thai) (cyrillic-iso8859-5 . cyrillic) (arabic-iso8859-6 . arabic) - (greek-iso8859-7 . latin) - (hebrew-iso8859-8 . latin) + (greek-iso8859-7 . greek) + (hebrew-iso8859-8 . hebrew) (katakana-jisx0201 . kana) (chinese-gb2312 . han) (chinese-gbk . han) diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el index 4441241a658..395e6c4dcd0 100644 --- a/lisp/international/iso-ascii.el +++ b/lisp/international/iso-ascii.el @@ -163,10 +163,7 @@ (iso-ascii-display 255 "\"y") ; small y with diaeresis or umlaut mark (define-minor-mode iso-ascii-mode - "Toggle ISO-ASCII mode. -With a prefix argument ARG, enable the mode if ARG is positive, -and disable it otherwise. If called from Lisp, enable the mode -if ARG is omitted or nil." + "Toggle ISO-ASCII mode." :variable ((eq standard-display-table iso-ascii-display-table) . (lambda (v) (setq standard-display-table diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 6aa633fb42a..1b7bc49a6be 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -201,10 +201,6 @@ character set: `latin-2', `hebrew' etc." (char (and info (decode-char (car (remq 'ascii info)) ?\ )))) (and char (char-displayable-p char)))) -;; Backwards compatibility. -(define-obsolete-function-alias 'latin1-char-displayable-p - 'char-displayable-p "22.1") - (defun latin1-display-setup (set &optional force) "Set up Latin-1 display for characters in the given SET. SET must be a member of `latin1-display-sets'. Normally, check diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 0be0f0fee2d..f91b3ea6ce6 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -136,8 +136,7 @@ (expand-file-name "HELLO" data-directory)) :help "Demonstrate various character sets")) (bindings--define-key map [set-various-coding-system] - `(menu-item "Set Coding Systems" ,set-coding-system-map - :enable (default-value 'enable-multibyte-characters))) + `(menu-item "Set Coding Systems" ,set-coding-system-map)) (bindings--define-key map [separator-input-method] menu-bar-separator) (bindings--define-key map [describe-input-method] @@ -282,9 +281,7 @@ wrong, use this command again to toggle back to the right mode." (defun view-hello-file () "Display the HELLO file, which lists many languages and characters." (interactive) - ;; We have to decode the file in any environment. - (let ((coding-system-for-read 'iso-2022-7bit)) - (view-file (expand-file-name "HELLO" data-directory)))) + (view-file (expand-file-name "HELLO" data-directory))) (defun universal-coding-system-argument (coding-system) "Execute an I/O command using the specified coding system." @@ -303,8 +300,7 @@ wrong, use this command again to toggle back to the right mode." (cmd (key-binding keyseq)) prefix) ;; read-key-sequence ignores quit, so make an explicit check. - ;; Like many places, this assumes quit == C-g, but it need not be. - (if (equal last-input-event ?\C-g) + (if (equal last-input-event (nth 3 (current-input-mode))) (keyboard-quit)) (when (memq cmd '(universal-argument digit-argument)) (call-interactively cmd) @@ -317,16 +313,16 @@ wrong, use this command again to toggle back to the right mode." (let ((current-prefix-arg prefix-arg) ;; Have to bind `last-command-event' here so that ;; `digit-argument', for instance, can compute the - ;; prefix arg. + ;; `prefix-arg'. (last-command-event (aref keyseq 0))) (call-interactively cmd))) ;; This is the final call to `universal-argument-other-key', which - ;; set's the final `prefix-arg. + ;; sets the final `prefix-arg'. (let ((current-prefix-arg prefix-arg)) (call-interactively cmd)) - ;; Read the command to execute with the given prefix arg. + ;; Read the command to execute with the given `prefix-arg'. (setq prefix prefix-arg keyseq (read-key-sequence nil t) cmd (key-binding keyseq))) @@ -355,8 +351,7 @@ This also sets the following values: (if (eq system-type 'darwin) ;; The file-name coding system on Darwin systems is always utf-8. (setq default-file-name-coding-system 'utf-8-unix) - (if (and (default-value 'enable-multibyte-characters) - (or (not coding-system) + (if (and (or (not coding-system) (coding-system-get coding-system 'ascii-compatible-p))) (setq default-file-name-coding-system (coding-system-change-eol-conversion coding-system 'unix)))) @@ -456,8 +451,8 @@ non-nil, it is used to sort CODINGS instead." ;; E: 1 if not XXX-with-esc ;; II: if iso-2022 based, 0..3, else 1. (logior - (lsh (if (eq base most-preferred) 1 0) 7) - (lsh + (ash (if (eq base most-preferred) 1 0) 7) + (ash (let ((mime (coding-system-get base :mime-charset))) ;; Prefer coding systems corresponding to a ;; MIME charset. @@ -473,9 +468,9 @@ non-nil, it is used to sort CODINGS instead." (t 3)) 0)) 5) - (lsh (if (memq base lang-preferred) 1 0) 4) - (lsh (if (memq base from-priority) 1 0) 3) - (lsh (if (string-match-p "-with-esc\\'" + (ash (if (memq base lang-preferred) 1 0) 4) + (ash (if (memq base from-priority) 1 0) 3) + (ash (if (string-match-p "-with-esc\\'" (symbol-name base)) 0 1) 2) (if (eq (coding-system-type base) 'iso-2022) @@ -992,6 +987,11 @@ It is highly recommended to fix it before writing to a file." ;; If all the defaults failed, ask a user. (when (not coding-system) + ;; If UTF-8 is in CODINGS, but is not its first member, make + ;; it the first one, so it is offered as the default. + (and (memq 'utf-8 codings) (not (eq 'utf-8 (car codings))) + (setq codings (append '(utf-8) (delq 'utf-8 codings)))) + (setq coding-system (select-safe-coding-system-interactively from to codings unsafe rejected (car codings)))) @@ -1158,10 +1158,7 @@ see `language-info-alist'." ((eq key 'nonascii-translation) (set-language-environment-nonascii-translation lang-env)) ((eq key 'charset) - (set-language-environment-charset lang-env)) - ((and (not (default-value 'enable-multibyte-characters)) - (or (eq key 'unibyte-syntax) (eq key 'unibyte-display))) - (set-language-environment-unibyte lang-env))))) + (set-language-environment-charset lang-env))))) (defun set-language-info-internal (lang-env key info) "Internal use only. @@ -1333,7 +1330,7 @@ This is the input method activated automatically by the command `toggle-input-method' (\\[toggle-input-method])." :link '(custom-manual "(emacs)Input Methods") :group 'mule - :type `(choice (const nil) + :type '(choice (const nil) mule-input-method-string) :set-after '(current-language-environment)) @@ -1471,12 +1468,7 @@ If INPUT-METHOD is nil, deactivate any current input method." (defun deactivate-input-method () "Turn off the current input method." (when current-input-method - (if input-method-history - (unless (string= current-input-method (car input-method-history)) - (setq input-method-history - (cons current-input-method - (delete current-input-method input-method-history)))) - (setq input-method-history (list current-input-method))) + (add-to-history 'input-method-history current-input-method) (unwind-protect (progn (setq input-method-function nil @@ -1800,6 +1792,9 @@ The default status is as follows: (setq default-sendmail-coding-system 'iso-latin-1) ;; On Darwin systems, this should be utf-8-unix, but when this file is loaded ;; that is not yet defined, so we set it in set-locale-environment instead. + ;; [Actually, it seems to work fine to use utf-8-unix here, and not just + ;; on Darwin. The previous comment seems to be outdated? + ;; See patch at https://debbugs.gnu.org/15803 ] (setq default-file-name-coding-system 'iso-latin-1-unix) ;; Preserve eol-type from existing default-process-coding-systems. ;; On non-unix-like systems in particular, these may have been set @@ -1897,9 +1892,6 @@ the new language environment, it runs `set-language-environment-hook'." (set-language-environment-input-method language-name) (set-language-environment-nonascii-translation language-name) (set-language-environment-charset language-name) - ;; Unibyte setups if necessary. - (unless (default-value 'enable-multibyte-characters) - (set-language-environment-unibyte language-name)) (let ((func (get-language-info language-name 'setup-function))) (if (functionp func) @@ -1951,7 +1943,7 @@ See `set-language-info-alist' for use in programs." (set-language-info-alist (car elt) (cdr elt))) ;; re-set the environment in case its parameters changed (set-language-environment current-language-environment))) - :type `(alist + :type '(alist :key-type (string :tag "Language environment" :completions (lambda (string pred action) @@ -1978,28 +1970,22 @@ See `set-language-info-alist' for use in programs." (defun standard-display-european-internal () ;; Actually set up direct output of non-ASCII characters. (standard-display-8bit (if (eq window-system 'pc) 128 160) 255) - ;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with - ;; the native font, and codes 160 and 146 stand for something very - ;; different there. - (or (and (eq window-system 'pc) (not (default-value - 'enable-multibyte-characters))) - (progn - ;; Most X fonts used to do the wrong thing for latin-1 code 160. - (unless (and (eq window-system 'x) - ;; XFree86 4 has fixed the fonts. - (string= "The XFree86 Project, Inc" (x-server-vendor)) - (> (aref (number-to-string (nth 2 (x-server-version))) 0) - ?3)) - ;; Make non-line-break space display as a plain space. - (aset standard-display-table (unibyte-char-to-multibyte 160) [32])) - ;; Most Windows programs send out apostrophes as \222. Most X fonts - ;; don't contain a character at that position. Map it to the ASCII - ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, - ;; U+2019, normally from the windows-1252 character set. XFree 4 - ;; fonts probably have the appropriate glyph at this position, - ;; so they could use standard-display-8bit. It's better to use a - ;; proper windows-1252 coding system. --fx] - (aset standard-display-table (unibyte-char-to-multibyte 146) [39])))) + ;; Most X fonts used to do the wrong thing for latin-1 code 160. + (unless (and (eq window-system 'x) + ;; XFree86 4 has fixed the fonts. + (string= "The XFree86 Project, Inc" (x-server-vendor)) + (> (aref (number-to-string (nth 2 (x-server-version))) 0) + ?3)) + ;; Make non-line-break space display as a plain space. + (aset standard-display-table (unibyte-char-to-multibyte 160) [32])) + ;; Most Windows programs send out apostrophes as \222. Most X fonts + ;; don't contain a character at that position. Map it to the ASCII + ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, + ;; U+2019, normally from the windows-1252 character set. XFree 4 + ;; fonts probably have the appropriate glyph at this position, + ;; so they could use standard-display-8bit. It's better to use a + ;; proper windows-1252 coding system. --fx] + (aset standard-display-table (unibyte-char-to-multibyte 146) [39])) (defun set-language-environment-coding-systems (language-name) "Do various coding system setups for language environment LANGUAGE-NAME." @@ -2035,10 +2021,8 @@ See `set-language-info-alist' for use in programs." (let ((input-method (get-language-info language-name 'input-method))) (when input-method (setq default-input-method input-method) - (if input-method-history - (setq input-method-history - (cons input-method - (delete input-method input-method-history))))))) + (when input-method-history + (add-to-history 'input-method-history input-method))))) (defun set-language-environment-nonascii-translation (language-name) "Do unibyte/multibyte translation setup for language environment LANGUAGE-NAME." @@ -2675,12 +2659,8 @@ See also `locale-charset-language-names', `locale-language-names', (unless frame (set-language-environment language-name)) - ;; If the default enable-multibyte-characters is nil, - ;; we are using single-byte characters, - ;; so the display table and terminal coding system are irrelevant. - (when (default-value 'enable-multibyte-characters) - (set-display-table-and-terminal-coding-system - language-name coding-system frame)) + (set-display-table-and-terminal-coding-system + language-name coding-system frame) ;; Set the `keyboard-coding-system' if appropriate (tty ;; only). At least X and MS Windows can generate diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 6db795739de..c84dc819d1c 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -222,20 +222,19 @@ ;; Can this be shared with 8859-11? ;; N.b. not all of these are defined in Unicode. (define-charset 'thai-tis620 - "TIS620.2533" + "MULE charset for TIS620.2533" :short-name "TIS620.2533" :iso-final-char ?T :emacs-mule-id 133 :code-space [32 127] :code-offset #x0E00) -;; Fixme: doc for this, c.f. above (define-charset 'tis620-2533 - "TIS620.2533" + "TIS620.2533, a.k.a. TIS-620. Like `thai-iso8859-11', but without NBSP." :short-name "TIS620.2533" :ascii-compatible-p t :code-space [0 255] - :superset '(ascii eight-bit-control (thai-tis620 . 128))) + :superset '(ascii (thai-tis620 . 128))) (define-charset 'jisx0201 "JISX0201" @@ -1067,6 +1066,15 @@ :mime-charset 'ebcdic-uk :map "EBCDICUK") +(define-charset 'ibm038 + "International version of EBCDIC" + :short-name "IBM038" + :code-space [0 255] + :mime-charset 'ibm038 + :map "IBM038") +(define-charset-alias 'ebcdic-int 'ibm038) +(define-charset-alias 'cp038 'ibm038) + (define-charset 'ibm1047 ;; Says groff: "IBM1047, `EBCDIC Latin 1/Open Systems' used by OS/390 Unix." @@ -1576,6 +1584,61 @@ for decoding and encoding files, process I/O, etc." (aset latin-extra-code-table ?\225 t) (aset latin-extra-code-table ?\226 t) +(defcustom password-word-equivalents + '("password" "passcode" "passphrase" "pass phrase" + ; These are sorted according to the GNU en_US locale. + "암호" ; ko + "パスワード" ; ja + "ପ୍ରବେଶ ସଙ୍କେତ" ; or + "ពាក្យសម្ងាត់" ; km + "adgangskode" ; da + "contraseña" ; es + "contrasenya" ; ca + "geslo" ; sl + "hasło" ; pl + "heslo" ; cs, sk + "iphasiwedi" ; zu + "jelszó" ; hu + "lösenord" ; sv + "lozinka" ; hr, sr + "mật khẩu" ; vi + "mot de passe" ; fr + "parola" ; tr + "pasahitza" ; eu + "passord" ; nb + "passwort" ; de + "pasvorto" ; eo + "salasana" ; fi + "senha" ; pt + "slaptažodis" ; lt + "wachtwoord" ; nl + "كلمة السر" ; ar + "ססמה" ; he + "лозинка" ; sr + "пароль" ; kk, ru, uk + "गुप्तशब्द" ; mr + "शब्दकूट" ; hi + "પાસવર્ડ" ; gu + "సంకేతపదము" ; te + "ਪਾਸਵਰਡ" ; pa + "ಗುಪ್ತಪದ" ; kn + "கடவுச்சொல்" ; ta + "അടയാളവാക്ക്" ; ml + "গুপ্তশব্দ" ; as + "পাসওয়ার্ড" ; bn_IN + "රහස්පදය" ; si + "密码" ; zh_CN + "密碼" ; zh_TW + ) + "List of words equivalent to \"password\". +This is used by Shell mode and other parts of Emacs to recognize +password prompts, including prompts in languages other than +English. Different case choices should not be assumed to be +included; callers should bind `case-fold-search' to t." + :type '(repeat string) + :version "24.4" + :group 'processes) + ;; The old code-pages library is obsoleted by coding systems based on ;; the charsets defined in this file but might be required by user ;; code. diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index d6ac8944d78..472529ffc05 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -1104,8 +1104,6 @@ system which uses fontsets)." (insert "Version of this emacs:\n " (emacs-version) "\n\n") (insert "Configuration options:\n " system-configuration-options "\n\n") (insert "Multibyte characters awareness:\n" - (format " default: %S\n" (default-value - 'enable-multibyte-characters)) (format " current-buffer: %S\n\n" enable-multibyte-characters)) (insert "Current language environment: " current-language-environment "\n\n") diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 2526f1ee324..8ad212796a5 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -342,7 +342,7 @@ per-character basis, this may not be accurate." (let ((eol-offset 0) ;; Make sure we terminate, even if BYTE falls right in the middle ;; of a CRLF or some other weird corner case. - (omin 0) (omax most-positive-fixnum) + (omin 0) omax pos lines) (while (progn @@ -355,9 +355,9 @@ per-character basis, this may not be accurate." (setq pos (point-max)))) ;; Adjust POS for DOS EOL format. (setq lines (1- (line-number-at-pos pos))) - (and (not (= lines eol-offset)) (> omax omin))) + (and (not (= lines eol-offset)) (or (not omax) (> omax omin)))) (if (> lines eol-offset) - (setq omax (min (1- omax) lines) + (setq omax (if omax (min (1- omax) lines) lines) eol-offset omax) (setq omin (max (1+ omin) lines) eol-offset omin))) @@ -393,17 +393,17 @@ QUALITY can be: japanese-cp932 korean-cp949))) (setq type 'single-byte)) (pcase type - (`utf-8 + ('utf-8 (when (coding-system-get coding-system :bom) (setq byte (max 0 (- byte 3)))) (if (= eol 1) (filepos-to-bufferpos--dos (+ pm byte) #'byte-to-position) (byte-to-position (+ pm byte)))) - (`single-byte + ('single-byte (if (= eol 1) (filepos-to-bufferpos--dos (+ pm byte) #'identity) (+ pm byte))) - ((and `utf-16 + ((and 'utf-16 ;; FIXME: For utf-16, we could use the same approach as used for ;; dos EOLs (counting the number of non-BMP chars instead of the ;; number of lines). @@ -419,8 +419,8 @@ QUALITY can be: (+ pm byte))) (_ (pcase quality - (`approximate (byte-to-position (+ pm byte))) - (`exact + ('approximate (byte-to-position (+ pm byte))) + ('exact ;; Rather than assume that the file exists and still holds the right ;; data, we reconstruct it based on the buffer's content. (let ((buf (current-buffer))) @@ -470,7 +470,7 @@ QUALITY can be: japanese-cp932 korean-cp949))) (setq type 'single-byte)) (pcase type - (`utf-8 + ('utf-8 (setq byte (position-bytes position)) (when (null byte) (if (<= position 0) @@ -482,9 +482,9 @@ QUALITY can be: (if (coding-system-get coding-system :bom) 3 0) ;; Account for CR in CRLF pairs. lineno)) - (`single-byte + ('single-byte (+ position -1 lineno)) - ((and `utf-16 + ((and 'utf-16 ;; FIXME: For utf-16, we could use the same approach as used for ;; dos EOLs (counting the number of non-BMP chars instead of the ;; number of lines). @@ -498,8 +498,8 @@ QUALITY can be: lineno)) (_ (pcase quality - (`approximate (+ (position-bytes position) -1 lineno)) - (`exact + ('approximate (+ (position-bytes position) -1 lineno)) + ('exact ;; Rather than assume that the file exists and still holds the right ;; data, we reconstruct its relevant portion. (let ((buf (current-buffer))) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index b47fd4ca69c..1c7f6fa83a9 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -911,7 +911,7 @@ non-ASCII files. This attribute is meaningful only when (i 0)) (dolist (elt coding-system-iso-2022-flags) (if (memq elt flags) - (setq bits (logior bits (lsh 1 i)))) + (setq bits (logior bits (ash 1 i)))) (setq i (1+ i))) (setcdr (assq :flags spec-attrs) bits)))) @@ -1514,6 +1514,7 @@ DECODING is the coding system to be used to decode input from the process, ENCODING is the coding system to be used to encode output to the process. For a list of possible coding systems, use \\[list-coding-systems]." + (declare (interactive-only set-process-coding-system)) (interactive "zCoding-system for output from the process: \nzCoding-system for input to the process: ") (let ((proc (get-buffer-process (current-buffer)))) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f1fb5f7c605..bd05fcec698 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1394,12 +1394,13 @@ Return the input string." (generated-events nil) ;FIXME: What is this? (input-method-function nil) (modified-p (buffer-modified-p)) - last-command-event last-command this-command) + last-command-event last-command this-command inhibit-record) (setq quail-current-key "" quail-current-str "" quail-translating t) (if key - (setq unread-command-events (cons key unread-command-events))) + (setq unread-command-events (cons key unread-command-events) + inhibit-record t)) (while quail-translating (set-buffer-modified-p modified-p) (quail-show-guidance) @@ -1408,8 +1409,13 @@ Return the input string." (or input-method-previous-message "") quail-current-str quail-guidance-str))) + ;; We inhibit record_char only for the first key, + ;; because it was already recorded before read_char + ;; called quail-input-method. + (inhibit--record-char inhibit-record) (keyseq (read-key-sequence prompt nil nil t)) (cmd (lookup-key (quail-translation-keymap) keyseq))) + (setq inhibit-record nil) (if (if key (and (commandp cmd) (not (eq cmd 'quail-other-command))) (eq cmd 'quail-self-insert-command)) @@ -1453,14 +1459,15 @@ Return the input string." (generated-events nil) ;FIXME: What is this? (input-method-function nil) (modified-p (buffer-modified-p)) - last-command-event last-command this-command) + last-command-event last-command this-command inhibit-record) (setq quail-current-key "" quail-current-str "" quail-translating t quail-converting t quail-conversion-str "") (if key - (setq unread-command-events (cons key unread-command-events))) + (setq unread-command-events (cons key unread-command-events) + inhibit-record t)) (while quail-converting (set-buffer-modified-p modified-p) (or quail-translating @@ -1476,8 +1483,13 @@ Return the input string." quail-conversion-str quail-current-str quail-guidance-str))) + ;; We inhibit record_char only for the first key, + ;; because it was already recorded before read_char + ;; called quail-input-method. + (inhibit--record-char inhibit-record) (keyseq (read-key-sequence prompt nil nil t)) (cmd (lookup-key (quail-conversion-keymap) keyseq))) + (setq inhibit-record nil) (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) (progn (setq last-command-event (aref keyseq (1- (length keyseq))) |