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
Open sidebar
emacs
emacs
Commits
569c11e3
Commit
569c11e3
authored
Nov 22, 2007
by
Stefan Monnier
Browse files
(set_internal): Set the value in the `cons-cell' (for
Buffer_Local_values) not only for frame-local variables.
parent
693b2fe2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
src/ChangeLog
src/ChangeLog
+6
-1
src/data.c
src/data.c
+5
-19
No files found.
src/ChangeLog
View file @
569c11e3
2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
* data.c (set_internal): Set the value in the `cons-cell' (for
Buffer_Local_values) not only for frame-local variables.
2007-11-22 Andreas Schwab <schwab@suse.de>
* data.c (Fnumber_to_string): Add cast when passing EMACS_INT
...
...
@@ -13,7 +18,7 @@
2007-11-22 Dan Nicolaescu <dann@ics.uci.edu>
* term.c: Include stdarg.h.
(fatal): Implement using varargs.
(fatal): Implement using varargs.
* lisp.h (fatal): Add argument types. (Restore 2005-09-30 change).
2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
...
...
src/data.c
View file @
569c11e3
...
...
@@ -1238,6 +1238,7 @@ set_internal (symbol, newval, buf, bindflag)
||
buf
!=
XBUFFER
(
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
buffer
)
||
(
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
check_frame
&&
!
EQ
(
selected_frame
,
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
frame
))
/* Also unload a global binding (if the var is local_if_set). */
||
(
EQ
(
XCAR
(
current_alist_element
),
current_alist_element
)))
{
...
...
@@ -1257,7 +1258,7 @@ set_internal (symbol, newval, buf, bindflag)
{
/* This buffer still sees the default value. */
/* If the variable is
a Lisp_Some_Buffer_Local_Value
,
/* If the variable is
not local_if_set
,
or if this is `let' rather than `set',
make CURRENT-ALIST-ELEMENT point to itself,
indicating that we're seeing the default value.
...
...
@@ -1298,6 +1299,9 @@ set_internal (symbol, newval, buf, bindflag)
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
frame
=
selected_frame
;
}
innercontents
=
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
realvalue
;
/* Store the new value in the cons-cell. */
XSETCDR
(
XCAR
(
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
cdr
),
newval
);
}
/* If storing void (making the symbol void), forward only through
...
...
@@ -1307,24 +1311,6 @@ set_internal (symbol, newval, buf, bindflag)
else
store_symval_forwarding
(
symbol
,
innercontents
,
newval
,
buf
);
/* If we just set a variable whose current binding is frame-local,
store the new value in the frame parameter too. */
if
(
BUFFER_LOCAL_VALUEP
(
valcontents
))
{
/* What binding is loaded right now? */
current_alist_element
=
XCAR
(
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
cdr
);
/* If the current buffer is not the buffer whose binding is
loaded, or if there may be frame-local bindings and the frame
isn't the right one, or if it's a Lisp_Buffer_Local_Value and
the default binding is loaded, the loaded binding may be the
wrong one. */
if
(
XBUFFER_LOCAL_VALUE
(
valcontents
)
->
found_for_frame
)
XSETCDR
(
current_alist_element
,
newval
);
}
return
newval
;
}
...
...
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