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
f6cd0527
Commit
f6cd0527
authored
Mar 27, 2000
by
Gerd Moellmann
Browse files
Use new macro names
for handling per-buffer variables.
parent
ddebaaa9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
src/category.c
src/category.c
+2
-2
src/data.c
src/data.c
+18
-18
src/print.c
src/print.c
+2
-2
src/syntax.c
src/syntax.c
+2
-2
No files found.
src/category.c
View file @
f6cd0527
...
...
@@ -276,8 +276,8 @@ DEFUN ("set-category-table", Fset_category_table, Sset_category_table, 1, 1, 0,
table
=
check_category_table
(
table
);
current_buffer
->
category_table
=
table
;
/* Indicate that this buffer now has a specified category table. */
idx
=
BUFFER_
LOCAL_
VAR_IDX
(
category_table
);
SET_BUFFER_
HAS_LOCAL_
VALUE_P
(
current_buffer
,
idx
,
1
);
idx
=
PER_
BUFFER_VAR_IDX
(
category_table
);
SET_
PER_
BUFFER_VALUE_P
(
current_buffer
,
idx
,
1
);
return
table
;
}
...
...
src/data.c
View file @
f6cd0527
...
...
@@ -738,7 +738,7 @@ do_symval_forwarding (valcontents)
case
Lisp_Misc_Buffer_Objfwd
:
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
return
BUFFER_
LOCAL_
VALUE
(
current_buffer
,
offset
);
return
PER_
BUFFER_VALUE
(
current_buffer
,
offset
);
case
Lisp_Misc_Kboard_Objfwd
:
offset
=
XKBOARD_OBJFWD
(
valcontents
)
->
offset
;
...
...
@@ -783,7 +783,7 @@ store_symval_forwarding (symbol, valcontents, newval)
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
Lisp_Object
type
;
type
=
BUFFER_
LOCAL_
TYPE
(
offset
);
type
=
PER_
BUFFER_TYPE
(
offset
);
if
(
XINT
(
type
)
==
-
1
)
error
(
"Variable %s is read-only"
,
XSYMBOL
(
symbol
)
->
name
->
data
);
...
...
@@ -791,7 +791,7 @@ store_symval_forwarding (symbol, valcontents, newval)
&&
XTYPE
(
newval
)
!=
XINT
(
type
))
buffer_slot_type_mismatch
(
offset
);
BUFFER_
LOCAL_
VALUE
(
current_buffer
,
offset
)
=
newval
;
PER_
BUFFER_VALUE
(
current_buffer
,
offset
)
=
newval
;
}
break
;
...
...
@@ -902,7 +902,7 @@ find_symbol_value (symbol)
return
*
XOBJFWD
(
valcontents
)
->
objvar
;
case
Lisp_Misc_Buffer_Objfwd
:
return
BUFFER_
LOCAL_
VALUE
(
current_buffer
,
return
PER_
BUFFER_VALUE
(
current_buffer
,
XBUFFER_OBJFWD
(
valcontents
)
->
offset
);
case
Lisp_Misc_Kboard_Objfwd
:
...
...
@@ -991,11 +991,11 @@ set_internal (symbol, newval, buf, bindflag)
if
(
BUFFER_OBJFWDP
(
valcontents
))
{
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
int
idx
=
BUFFER_
LOCAL_
IDX
(
offset
);
int
idx
=
PER_
BUFFER_IDX
(
offset
);
if
(
idx
>
0
&&
!
bindflag
&&
!
let_shadows_buffer_binding_p
(
symbol
))
SET_BUFFER_
HAS_LOCAL_
VALUE_P
(
buf
,
idx
,
1
);
SET_
PER_
BUFFER_VALUE_P
(
buf
,
idx
,
1
);
}
else
if
(
BUFFER_LOCAL_VALUEP
(
valcontents
)
...
...
@@ -1108,8 +1108,8 @@ default_value (symbol)
if
(
BUFFER_OBJFWDP
(
valcontents
))
{
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
if
(
BUFFER_
LOCAL_
IDX
(
offset
)
!=
0
)
return
BUFFER_
LOCAL_
DEFAULT
_VALUE
(
offset
);
if
(
PER_
BUFFER_IDX
(
offset
)
!=
0
)
return
PER_
BUFFER_DEFAULT
(
offset
);
}
/* Handle user-created local variables. */
...
...
@@ -1180,9 +1180,9 @@ for this variable.")
if
(
BUFFER_OBJFWDP
(
valcontents
))
{
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
int
idx
=
BUFFER_
LOCAL_
IDX
(
offset
);
int
idx
=
PER_
BUFFER_IDX
(
offset
);
BUFFER_
LOCAL_
DEFAULT
_VALUE
(
offset
)
=
value
;
PER_
BUFFER_DEFAULT
(
offset
)
=
value
;
/* If this variable is not always local in all buffers,
set it in the buffers that don't nominally have a local value. */
...
...
@@ -1191,8 +1191,8 @@ for this variable.")
struct
buffer
*
b
;
for
(
b
=
all_buffers
;
b
;
b
=
b
->
next
)
if
(
!
BUFFER_
HAS_LOCAL_
VALUE_P
(
b
,
idx
))
BUFFER_
LOCAL_
VALUE
(
b
,
offset
)
=
value
;
if
(
!
PER_
BUFFER_VALUE_P
(
b
,
idx
))
PER_
BUFFER_VALUE
(
b
,
offset
)
=
value
;
}
return
value
;
}
...
...
@@ -1410,13 +1410,13 @@ From now on the default value will apply in this buffer.")
if
(
BUFFER_OBJFWDP
(
valcontents
))
{
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
int
idx
=
BUFFER_
LOCAL_
IDX
(
offset
);
int
idx
=
PER_
BUFFER_IDX
(
offset
);
if
(
idx
>
0
)
{
SET_BUFFER_
HAS_LOCAL_
VALUE_P
(
current_buffer
,
idx
,
0
);
BUFFER_
LOCAL_
VALUE
(
current_buffer
,
offset
)
=
BUFFER_
LOCAL_
DEFAULT
_VALUE
(
offset
);
SET_
PER_
BUFFER_VALUE_P
(
current_buffer
,
idx
,
0
);
PER_
BUFFER_VALUE
(
current_buffer
,
offset
)
=
PER_
BUFFER_DEFAULT
(
offset
);
}
return
variable
;
}
...
...
@@ -1532,8 +1532,8 @@ BUFFER defaults to the current buffer.")
if
(
BUFFER_OBJFWDP
(
valcontents
))
{
int
offset
=
XBUFFER_OBJFWD
(
valcontents
)
->
offset
;
int
idx
=
BUFFER_
LOCAL_
IDX
(
offset
);
if
(
idx
==
-
1
||
BUFFER_
HAS_LOCAL_
VALUE_P
(
buf
,
idx
))
int
idx
=
PER_
BUFFER_IDX
(
offset
);
if
(
idx
==
-
1
||
PER_
BUFFER_VALUE_P
(
buf
,
idx
))
return
Qt
;
}
return
Qnil
;
...
...
src/print.c
View file @
f6cd0527
...
...
@@ -1772,8 +1772,8 @@ print_object (obj, printcharfun, escapeflag)
case
Lisp_Misc_Buffer_Objfwd
:
strout
(
"#<buffer_objfwd to "
,
-
1
,
-
1
,
printcharfun
,
0
);
print_object
(
BUFFER_
LOCAL_
VALUE
(
current_buffer
,
XBUFFER_OBJFWD
(
obj
)
->
offset
),
print_object
(
PER_
BUFFER_VALUE
(
current_buffer
,
XBUFFER_OBJFWD
(
obj
)
->
offset
),
printcharfun
,
escapeflag
);
PRINTCHAR
(
'>'
);
break
;
...
...
src/syntax.c
View file @
f6cd0527
...
...
@@ -725,8 +725,8 @@ One argument, a syntax table.")
check_syntax_table
(
table
);
current_buffer
->
syntax_table
=
table
;
/* Indicate that this buffer now has a specified syntax table. */
idx
=
BUFFER_
LOCAL_
VAR_IDX
(
syntax_table
);
SET_BUFFER_
HAS_LOCAL_
VALUE_P
(
current_buffer
,
idx
,
1
);
idx
=
PER_
BUFFER_VAR_IDX
(
syntax_table
);
SET_
PER_
BUFFER_VALUE_P
(
current_buffer
,
idx
,
1
);
return
table
;
}
...
...
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