Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into master
This commit is contained in:
commit
554495006e
13 changed files with 3058 additions and 49 deletions
|
|
@ -578,6 +578,11 @@ Enable or disable use of the selected input method (@code{toggle-input-method}).
|
|||
@item C-x @key{RET} C-\ @var{method} @key{RET}
|
||||
Select a new input method for the current buffer (@code{set-input-method}).
|
||||
|
||||
@item C-x \ @var{method} @key{RET}
|
||||
Temporarily enable the selected transient input method, and
|
||||
automatically disable it after inserting a single character
|
||||
(@code{transient-input-method}).
|
||||
|
||||
@item C-h I @var{method} @key{RET}
|
||||
@itemx C-h C-\ @var{method} @key{RET}
|
||||
@findex describe-input-method
|
||||
|
|
@ -675,6 +680,16 @@ character.
|
|||
input methods. The list gives information about each input method,
|
||||
including the string that stands for it in the mode line.
|
||||
|
||||
@findex transient-input-method
|
||||
@kindex C-x \
|
||||
To insert only a single character using a transient input method you
|
||||
can first select a transient input method by typing @kbd{C-u C-x \}.
|
||||
Then typing @kbd{C-x \} (@code{transient-input-method}) will
|
||||
temporarily enable the selected transient input method, and disable it
|
||||
automatically after using the activated input method to insert
|
||||
a single character. This is useful to insert a character from input
|
||||
methods with rare Unicode characters.
|
||||
|
||||
@node Coding Systems
|
||||
@section Coding Systems
|
||||
@cindex coding systems
|
||||
|
|
|
|||
22
etc/NEWS
22
etc/NEWS
|
|
@ -132,11 +132,6 @@ Emacs to break lines after more characters than just whitespace
|
|||
characters. In particular, this significantly improves word-wrapping
|
||||
for CJK text mixed with Latin text.
|
||||
|
||||
---
|
||||
** Improved language transliteration in Malayalam input methods.
|
||||
Added a new Mozhi scheme. The inapplicable ITRANS scheme is now
|
||||
deprecated. Errors in the Inscript method were corrected.
|
||||
|
||||
---
|
||||
** Rudimentary support for the 'st' terminal emulator.
|
||||
Emacs now supports 256 color display on the 'st' terminal emulator.
|
||||
|
|
@ -626,6 +621,23 @@ recorded for the purpose of 'view-lossage'.
|
|||
The menu bar "Help" menu now has a "Show Recent Inputs" item under the
|
||||
"Describe" sub-menu.
|
||||
|
||||
** Input methods
|
||||
|
||||
+++
|
||||
*** 'C-x \' temporarily enables a transient input method.
|
||||
'C-u C-x \' can be used to select a transient input method, e.g.
|
||||
'C-u C-x \ compose RET' selects the 'compose' input method. Then typing
|
||||
'C-x \ 1 2' will insert the character '½', and disable the input method
|
||||
afterwards.
|
||||
|
||||
---
|
||||
*** New input method 'compose' based on X Multi_key sequences.
|
||||
|
||||
---
|
||||
*** Improved language transliteration in Malayalam input methods.
|
||||
Added a new Mozhi scheme. The inapplicable ITRANS scheme is now
|
||||
deprecated. Errors in the Inscript method were corrected.
|
||||
|
||||
** Ispell
|
||||
|
||||
+++
|
||||
|
|
|
|||
|
|
@ -315,8 +315,7 @@ The document was typeset with
|
|||
@printindex cp
|
||||
|
||||
@bye
|
||||
|
||||
@c " (file-name-nondirectory (buffer-file-name)) " ends here\n"))
|
||||
"))
|
||||
"A list specifying text to insert by default into a new file.
|
||||
Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION).
|
||||
CONDITION may be a regexp that must match the new file's name, or it may be
|
||||
|
|
|
|||
|
|
@ -54,10 +54,12 @@
|
|||
(<= (length pp) (- (window-width) (current-column))))
|
||||
(insert pp)
|
||||
(insert-text-button
|
||||
"[Show]" 'action (lambda (&rest _ignore)
|
||||
(with-output-to-temp-buffer
|
||||
"*Pp Eval Output*"
|
||||
(princ pp)))
|
||||
"[Show]"
|
||||
'follow-link t
|
||||
'action (lambda (&rest _ignore)
|
||||
(with-output-to-temp-buffer
|
||||
"*Pp Eval Output*"
|
||||
(princ pp)))
|
||||
'help-echo "mouse-2, RET: pretty print value in another buffer"))))
|
||||
|
||||
(defun describe-property-list (properties)
|
||||
|
|
@ -687,7 +689,8 @@ The character information includes:
|
|||
(save-excursion (goto-char pos)
|
||||
(looking-at-p "[ \t]+$")))
|
||||
'trailing-whitespace)
|
||||
((and nobreak-char-display char (eq char '#xa0))
|
||||
((and nobreak-char-display char
|
||||
(eq (get-char-code-property char 'general-category) 'Zs))
|
||||
'nobreak-space)
|
||||
((and nobreak-char-display char
|
||||
(memq char '(#xad #x2010 #x2011)))
|
||||
|
|
|
|||
|
|
@ -1147,12 +1147,14 @@
|
|||
(let ((side-effect-free-fns
|
||||
'(% * + - / /= 1+ 1- < <= = > >= abs acos append aref ash asin atan
|
||||
assq
|
||||
bool-vector-count-consecutive bool-vector-count-population
|
||||
bool-vector-subsetp
|
||||
boundp buffer-file-name buffer-local-variables buffer-modified-p
|
||||
buffer-substring byte-code-function-p
|
||||
capitalize car-less-than-car car cdr ceiling char-after char-before
|
||||
char-equal char-to-string char-width compare-strings
|
||||
compare-window-configurations concat coordinates-in-window-p
|
||||
copy-alist copy-sequence copy-marker cos count-lines
|
||||
copy-alist copy-sequence copy-marker copysign cos count-lines
|
||||
current-time-string current-time-zone
|
||||
decode-char
|
||||
decode-time default-boundp default-value documentation downcase
|
||||
|
|
@ -1165,22 +1167,22 @@
|
|||
frame-visible-p fround ftruncate
|
||||
get gethash get-buffer get-buffer-window getenv get-file-buffer
|
||||
hash-table-count
|
||||
int-to-string intern-soft
|
||||
int-to-string intern-soft isnan
|
||||
keymap-parent
|
||||
length line-beginning-position line-end-position
|
||||
lax-plist-get ldexp length line-beginning-position line-end-position
|
||||
local-variable-if-set-p local-variable-p locale-info
|
||||
log log10 logand logb logcount logior lognot logxor lsh
|
||||
make-byte-code make-list make-string make-symbol marker-buffer max
|
||||
member memq min minibuffer-selected-window minibuffer-window
|
||||
member memq memql min minibuffer-selected-window minibuffer-window
|
||||
mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string
|
||||
parse-colon-path plist-get plist-member
|
||||
prefix-numeric-value previous-window prin1-to-string propertize
|
||||
degrees-to-radians
|
||||
radians-to-degrees rassq rassoc read-from-string regexp-quote
|
||||
region-beginning region-end reverse round
|
||||
radians-to-degrees rassq rassoc read-from-string regexp-opt
|
||||
regexp-quote region-beginning region-end reverse round
|
||||
sin sqrt string string< string= string-equal string-lessp
|
||||
string-search string-to-char
|
||||
string-to-number substring
|
||||
string-to-number string-to-syntax substring
|
||||
sxhash sxhash-equal sxhash-eq sxhash-eql
|
||||
symbol-function symbol-name symbol-plist symbol-value string-make-unibyte
|
||||
string-make-multibyte string-as-multibyte string-as-unibyte
|
||||
|
|
@ -1230,7 +1232,7 @@
|
|||
standard-case-table standard-syntax-table stringp subrp symbolp
|
||||
syntax-table syntax-table-p
|
||||
this-command-keys this-command-keys-vector this-single-command-keys
|
||||
this-single-command-raw-keys
|
||||
this-single-command-raw-keys type-of
|
||||
user-real-login-name user-real-uid user-uid
|
||||
vector vectorp visible-frame-list
|
||||
wholenump window-configuration-p window-live-p
|
||||
|
|
@ -1262,7 +1264,7 @@
|
|||
'(concat regexp-opt regexp-quote
|
||||
string-to-char string-to-syntax symbol-name
|
||||
eq eql
|
||||
= /= < <= => > min max
|
||||
= /= < <= >= > min max
|
||||
+ - * / % mod abs ash 1+ 1- sqrt
|
||||
logand logior lognot logxor logcount
|
||||
copysign isnan ldexp float logb
|
||||
|
|
@ -1270,7 +1272,7 @@
|
|||
ffloor fceiling fround ftruncate
|
||||
string= string-equal string< string-lessp
|
||||
string-search
|
||||
consp atom listp nlistp propert-list-p
|
||||
consp atom listp nlistp proper-list-p
|
||||
sequencep arrayp vectorp stringp bool-vector-p hash-table-p
|
||||
null not
|
||||
numberp integerp floatp natnump characterp
|
||||
|
|
|
|||
|
|
@ -88,9 +88,9 @@ If called interactively, toggle `%s'. If the prefix argument is
|
|||
positive, enable the mode, and if it is zero or negative, disable
|
||||
the mode.
|
||||
|
||||
If called from Lisp, toggle the mode if if ARG is `toggle'.
|
||||
If called from Lisp, toggle the mode if ARG is `toggle'.
|
||||
Enable the mode if ARG is nil, omitted, or is a positive number.
|
||||
All other values will disable the mode.
|
||||
Disable the mode if ARG is a negative number.
|
||||
|
||||
The mode's hook is called both when the mode is enabled and when
|
||||
it is disabled.")
|
||||
|
|
@ -312,12 +312,10 @@ or call the function `%s'."))))
|
|||
(cond ((eq arg 'toggle)
|
||||
(not ,getter))
|
||||
((and (numberp arg)
|
||||
(> arg 0))
|
||||
t)
|
||||
((eq arg nil)
|
||||
t)
|
||||
(< arg 1))
|
||||
nil)
|
||||
(t
|
||||
nil)))
|
||||
t)))
|
||||
,@body
|
||||
;; The on/off hooks are here for backward compatibility only.
|
||||
(run-hooks ',hook (if ,getter ',hook-on ',hook-off))
|
||||
|
|
|
|||
|
|
@ -1013,8 +1013,7 @@ Otherwise, return a new string (without any text properties)."
|
|||
(insert string)
|
||||
(goto-char (point-min))
|
||||
(while (< (point) (point-max))
|
||||
(let ((standard-output (current-buffer))
|
||||
(orig-point (point))
|
||||
(let ((orig-point (point))
|
||||
end-point active-maps
|
||||
close generate-summary)
|
||||
(cond
|
||||
|
|
@ -1190,8 +1189,8 @@ Any inserted text ends in two newlines (used by
|
|||
;; map.
|
||||
(or (keymapp sub-shadows)
|
||||
(null sub-shadows)
|
||||
(consp sub-shadows)
|
||||
(not (keymapp (car sub-shadows)))))
|
||||
(and (consp sub-shadows)
|
||||
(keymapp (car sub-shadows)))))
|
||||
;; Maps we have already listed in this loop shadow this map.
|
||||
(let ((tail orig-maps))
|
||||
(while (not (equal tail maps))
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
|
||||
;; Keep "C-x C-m ..." for mule specific commands.
|
||||
(define-key ctl-x-map "\C-m" mule-keymap)
|
||||
(define-key ctl-x-map "\\" 'transient-input-method)
|
||||
|
||||
(defvar describe-language-environment-map
|
||||
(let ((map (make-sparse-keymap "Describe Language Environment")))
|
||||
|
|
@ -1344,6 +1345,16 @@ This is the input method activated automatically by the command
|
|||
mule-input-method-string)
|
||||
:set-after '(current-language-environment))
|
||||
|
||||
(defcustom transient-input-method nil
|
||||
"Default transient input method.
|
||||
This is the input method activated automatically by the command
|
||||
`transient-input-method' (\\[transient-input-method])."
|
||||
:link '(custom-manual "(emacs)Input Methods")
|
||||
:group 'mule
|
||||
:type '(choice (const nil)
|
||||
mule-input-method-string)
|
||||
:set-after '(current-language-environment))
|
||||
|
||||
(put 'input-method-function 'permanent-local t)
|
||||
|
||||
(defvar input-method-history nil
|
||||
|
|
@ -1519,6 +1530,35 @@ To deactivate it programmatically, use `deactivate-input-method'."
|
|||
(defvar toggle-input-method-active nil
|
||||
"Non-nil inside `toggle-input-method'.")
|
||||
|
||||
(defun transient-input-method (&optional arg interactive)
|
||||
"Enable transient input method for the current buffer."
|
||||
(interactive "P\np")
|
||||
(when (or arg (not transient-input-method))
|
||||
(let* ((default (or (car input-method-history) default-input-method))
|
||||
(input-method
|
||||
(read-input-method-name
|
||||
(if default "Transient input method (default %s): " "Transient input method: ")
|
||||
default t)))
|
||||
(setq transient-input-method input-method)
|
||||
(when interactive
|
||||
(customize-mark-as-set 'transient-input-method))))
|
||||
(let* ((previous-input-method current-input-method)
|
||||
(history input-method-history)
|
||||
(clearfun (make-symbol "clear-transient-input-method"))
|
||||
(exitfun
|
||||
(lambda ()
|
||||
(deactivate-input-method)
|
||||
(when previous-input-method
|
||||
(activate-input-method previous-input-method))
|
||||
(setq input-method-history history)
|
||||
(remove-hook 'input-method-after-insert-chunk-hook clearfun))))
|
||||
(fset clearfun (lambda () (funcall exitfun)))
|
||||
(add-hook 'input-method-after-insert-chunk-hook clearfun)
|
||||
(when previous-input-method
|
||||
(deactivate-input-method))
|
||||
(activate-input-method transient-input-method)
|
||||
exitfun))
|
||||
|
||||
(defun toggle-input-method (&optional arg interactive)
|
||||
"Enable or disable multilingual text input method for the current buffer.
|
||||
Only one input method can be enabled at any time in a given buffer.
|
||||
|
|
|
|||
2926
lisp/leim/quail/compose.el
Normal file
2926
lisp/leim/quail/compose.el
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1416,12 +1416,13 @@ which see."
|
|||
(defun elisp--documentation-one-liner ()
|
||||
(let* (str
|
||||
(callback (lambda (doc &rest plist)
|
||||
(setq str
|
||||
(format "%s: %s"
|
||||
(propertize (prin1-to-string
|
||||
(plist-get plist :thing))
|
||||
'face (plist-get plist :face))
|
||||
doc)))))
|
||||
(when doc
|
||||
(setq str
|
||||
(format "%s: %s"
|
||||
(propertize (prin1-to-string
|
||||
(plist-get plist :thing))
|
||||
'face (plist-get plist :face))
|
||||
doc))))))
|
||||
(or (progn (elisp-eldoc-var-docstring callback) str)
|
||||
(progn (elisp-eldoc-funcall callback) str))))
|
||||
|
||||
|
|
|
|||
|
|
@ -896,7 +896,7 @@ This is the same format used for saving keyboard macros (see
|
|||
For an approximate inverse of this, see `key-description'."
|
||||
;; Don't use a defalias, since the `pure' property is true only for
|
||||
;; the calling convention of `kbd'.
|
||||
(declare (pure t))
|
||||
(declare (pure t) (side-effect-free t))
|
||||
;; A pure function is expected to preserve the match data.
|
||||
(save-match-data (read-kbd-macro keys)))
|
||||
|
||||
|
|
@ -4446,7 +4446,7 @@ Unless optional argument INPLACE is non-nil, return a new string."
|
|||
|
||||
(defun string-replace (fromstring tostring instring)
|
||||
"Replace FROMSTRING with TOSTRING in INSTRING each time it occurs."
|
||||
(declare (pure t))
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(when (equal fromstring "")
|
||||
(signal 'wrong-length-argument fromstring))
|
||||
(let ((start 0)
|
||||
|
|
|
|||
|
|
@ -48,22 +48,16 @@
|
|||
(with-temp-buffer
|
||||
(define-minor-mode test-mode "A test.")
|
||||
(should (eq test-mode nil))
|
||||
(test-mode t)
|
||||
(should (eq test-mode nil))
|
||||
(test-mode nil)
|
||||
(should (eq test-mode t))
|
||||
(test-mode -33)
|
||||
(should (eq test-mode nil))
|
||||
(test-mode 33)
|
||||
(should (eq test-mode t))
|
||||
(test-mode 0)
|
||||
(should (eq test-mode nil))
|
||||
(test-mode 'toggle)
|
||||
(should (eq test-mode t))
|
||||
(test-mode 'toggle)
|
||||
(should (eq test-mode nil))
|
||||
(test-mode "what")
|
||||
(should (eq test-mode nil))))
|
||||
(test-mode 'toggle)
|
||||
(should (eq test-mode t))))
|
||||
|
||||
(provide 'easy-mmode-tests)
|
||||
|
||||
|
|
|
|||
|
|
@ -361,6 +361,26 @@ C-b undefined
|
|||
|
||||
")))))
|
||||
|
||||
(defvar help-tests--was-in-buffer nil)
|
||||
|
||||
(ert-deftest help-substitute-command-keys/menu-filter-in-correct-buffer ()
|
||||
"Evaluate menu-filter in the original buffer. See Bug#39149."
|
||||
(unwind-protect
|
||||
(progn
|
||||
(define-key global-map (kbd "C-c C-l r")
|
||||
`(menu-item "2" identity
|
||||
:filter ,(lambda (cmd)
|
||||
(setq help-tests--was-in-buffer
|
||||
(current-buffer))
|
||||
cmd)))
|
||||
(with-temp-buffer
|
||||
(substitute-command-keys "\\[identity]")
|
||||
(should (eq help-tests--was-in-buffer
|
||||
(current-buffer)))))
|
||||
(setq help-tests--was-in-buffer nil)
|
||||
(define-key global-map (kbd "C-c C-l r") nil)
|
||||
(define-key global-map (kbd "C-c C-l") nil)))
|
||||
|
||||
(provide 'help-tests)
|
||||
|
||||
;;; help-tests.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue