Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
d9a7c140
Commit
d9a7c140
authored
Jan 14, 2010
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make auto-composition work on all buffers even if they are fundamental mode.
parent
d1bf28dc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
25 deletions
+61
-25
etc/ChangeLog
etc/ChangeLog
+4
-0
etc/NEWS
etc/NEWS
+5
-0
lisp/ChangeLog
lisp/ChangeLog
+11
-0
lisp/composite.el
lisp/composite.el
+20
-22
src/ChangeLog
src/ChangeLog
+12
-0
src/composite.c
src/composite.c
+9
-3
No files found.
etc/ChangeLog
View file @
d9a7c140
2010-01-14 Kenichi Handa <handa@m17n.org>
* NEWS: Describe the change of auto-composition-mode.
2010-01-12 Glenn Morris <rgm@gnu.org>
* CONTRIBUTE, NEWS: Use bug-gnu-emacs rather than emacs-pretest-bug
...
...
etc/NEWS
View file @
d9a7c140
...
...
@@ -122,6 +122,11 @@ international/ucs-normalize.el.
** Function arguments in *Help* buffers are now shown in upper-case.
Customize `help-downcase-arguments' to t to show them in lower-case.
** Delete Auto Composition Mode. Now the variable
`auto-composition-mode' is simply a buffer local variable. The
commands `auto-composition-mode' and `global-auto-composition-mode'
still works as before.
* Editing Changes in Emacs 23.2
...
...
lisp/ChangeLog
View file @
d9a7c140
2010-01-14 Kenichi Handa <handa@m17n.org>
* composite.el (auto-composition-mode): Make it a buffer local
variable (permanent-local).
(auto-composition-function): Set the default value to
auto-compose-chars.
(auto-composition-mode): Make it a simple function, not a minor
mode.
(global-auto-composition-mode): Likewise.
(turn-on-auto-composition-if-enabled): Delete it.
2010-01-12 Michael Albinus <michael.albinus@gmx.de>
* files.el (copy-directory): Compute target for recursive
...
...
lisp/composite.el
View file @
d9a7c140
...
...
@@ -744,10 +744,14 @@ This function is the default value of `auto-composition-function' (which see)."
(
setq
func
'compose-gstring-for-terminal
))
(
funcall
func
gstring
))))
(
make-variable-buffer-local
'auto-composition-mode
)
(
put
'auto-composition-mode
'permanent-local
t
)
(
make-variable-buffer-local
'auto-composition-function
)
(
setq-default
auto-composition-function
'auto-compose-chars
)
;;;###autoload
(
def
ine-minor-mode
auto-composition-mode
(
def
un
auto-composition-mode
(
&optional
arg
)
"Toggle Auto Composition mode.
With ARG, turn Auto Composition mode off if and only if ARG is a non-positive
number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto
...
...
@@ -758,29 +762,23 @@ by functions registered in `composition-function-table' (which see).
You can use `global-auto-composition-mode' to turn on
Auto Composition mode in all buffers (this is the default)."
nil
nil
nil
(
if
noninteractive
(
setq
auto-composition-mode
nil
))
(
cond
(
auto-composition-mode
(
setq
auto-composition-function
'auto-compose-chars
))
(
t
(
setq
auto-composition-function
nil
))))
(
defun
turn-on-auto-composition-if-enabled
()
(
if
enable-multibyte-characters
(
auto-composition-mode
1
)))
(
interactive
"P"
)
(
setq
auto-composition-mode
(
if
arg
(
or
(
not
(
integerp
arg
))
(
>
arg
0
))
(
not
auto-composition-mode
))))
;;;###autoload
(
def
ine-global-minor-mode
global-auto-composition-mode
auto-composition-mode
turn-on-auto-composition-if-enabled
;; This :extra-args' appears to be the result of a naive copy&paste
;; from global-font-lock-mod
e.
;; :extra-args (dummy)
:initialize
'custom-initialize-delay
:init-value
(
not
noninteractive
)
:group
'auto-composition
:version
"23.1"
)
(
def
un
global-auto-composition-mode
(
&optional
arg
)
"Toggle Auto-Composition mode in every possible buffer.
With prefix arg, turn Global-Auto-Composition mode on if and only if arg
is positiv
e.
See `auto-composition-mode' for more information on Auto-Composition mode."
(
interactive
"P"
)
(
setq-default
auto-composition-mode
(
if
arg
(
or
(
not
(
integerp
arg
))
(
>
arg
0
)
)
(
not
(
default-value
'auto-composition-mode
)))))
(
defalias
'toggle-auto-composition
'auto-composition-mode
)
...
...
src/ChangeLog
View file @
d9a7c140
2010-01-14 Kenichi Handa <handa@m17n.org>
Make auto-composition work on all buffers even if they are
fundamental mode.
* composite.c (Vauto_composition_mode): New variable.
(composition_compute_stop_pos): Check Vauto_composition_mode
instead of Vauto_composition_function.
(composition_adjust_point, Ffind_composition_internal): Likewise.
(syms_of_composite): Declare Lisp variable
"auto-composition-mode" here.
2010-01-13 Kenichi Handa <handa@m17n.org>
Display buffer name, etc. in mode line by composing correctly.
...
...
src/composite.c
View file @
d9a7c140
...
...
@@ -157,6 +157,7 @@ Lisp_Object composition_hash_table;
Lisp_Object
Vcompose_chars_after_function
;
Lisp_Object
Qauto_composed
;
Lisp_Object
Vauto_composition_mode
;
Lisp_Object
Vauto_composition_function
;
Lisp_Object
Qauto_composition_function
;
Lisp_Object
Vcomposition_function_table
;
...
...
@@ -1039,7 +1040,7 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string)
if
(
NILP
(
string
)
&&
PT
>
charpos
&&
PT
<
endpos
)
cmp_it
->
stop_pos
=
PT
;
if
(
NILP
(
current_buffer
->
enable_multibyte_characters
)
||
!
FUNCTIONP
(
Vauto_composition_function
))
||
NILP
(
Vauto_composition_mode
))
return
;
if
(
bytepos
<
0
)
{
...
...
@@ -1478,7 +1479,7 @@ composition_adjust_point (last_pt, new_pt)
}
if
(
NILP
(
current_buffer
->
enable_multibyte_characters
)
||
!
FUNCTIONP
(
Vauto_composition_function
))
||
NILP
(
Vauto_composition_mode
))
return
new_pt
;
/* Next check the automatic composition. */
...
...
@@ -1661,7 +1662,7 @@ See `find-composition' for more details. */)
if
(
!
find_composition
(
from
,
to
,
&
start
,
&
end
,
&
prop
,
string
))
{
if
(
!
NILP
(
current_buffer
->
enable_multibyte_characters
)
&&
FUNCTIONP
(
Vauto_composition_function
)
&&
!
NILP
(
Vauto_composition_mode
)
&&
find_automatic_composition
(
from
,
to
,
&
start
,
&
end
,
&
gstring
,
string
))
return
list3
(
make_number
(
start
),
make_number
(
end
),
gstring
);
...
...
@@ -1788,6 +1789,11 @@ The default value is the function `compose-chars-after'. */);
Qauto_composition_function
=
intern_c_string
(
"auto-composition-function"
);
staticpro
(
&
Qauto_composition_function
);
DEFVAR_LISP
(
"auto-composition-mode"
,
&
Vauto_composition_mode
,
doc:
/* Non-nil if Auto-Composition mode is enabled.
Use the command `auto-composition-mode' to change this variable. */
);
Vauto_composition_mode
=
Qt
;
DEFVAR_LISP
(
"auto-composition-function"
,
&
Vauto_composition_function
,
doc:
/* Function to call to compose characters automatically.
This function is called from the display routine with four arguments:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment