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
a97569cb
Commit
a97569cb
authored
Oct 05, 2001
by
Gerd Moellmann
Browse files
Use SYMBOL_VALUE/ SET_SYMBOL_VALUE macros instead of accessing
symbols' value directly.
parent
a9dff54b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
src/abbrev.c
src/abbrev.c
+14
-12
src/sunfns.c
src/sunfns.c
+2
-2
src/w16select.c
src/w16select.c
+3
-3
No files found.
src/abbrev.c
View file @
a97569cb
/* Primitives for word-abbrev mode.
Copyright (C) 1985, 1986, 1993, 1996, 1998 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1993, 1996, 1998, 2001
Free Software Foundation, Inc.
This file is part of GNU Emacs.
...
...
@@ -128,7 +129,7 @@ which is incremented each time the abbrev is used.")
sym
=
Fintern
(
name
,
table
);
oexp
=
X
SYMBOL
(
sym
)
->
value
;
oexp
=
SYMBOL
_VALUE
(
sym
);
ohook
=
XSYMBOL
(
sym
)
->
function
;
if
(
!
((
EQ
(
oexp
,
expansion
)
||
(
STRINGP
(
oexp
)
&&
STRINGP
(
expansion
)
...
...
@@ -189,12 +190,13 @@ The default is to try buffer's mode-specific abbrev table, then global table.")
sym
=
Qnil
;
if
(
!
NILP
(
current_buffer
->
abbrev_table
))
sym
=
Fintern_soft
(
abbrev
,
current_buffer
->
abbrev_table
);
if
(
NILP
(
X
SYMBOL
(
sym
)
->
value
))
if
(
NILP
(
SYMBOL
_VALUE
(
sym
)))
sym
=
Qnil
;
if
(
NILP
(
sym
))
sym
=
Fintern_soft
(
abbrev
,
Vglobal_abbrev_table
);
}
if
(
NILP
(
XSYMBOL
(
sym
)
->
value
))
return
Qnil
;
if
(
NILP
(
SYMBOL_VALUE
(
sym
)))
return
Qnil
;
return
sym
;
}
...
...
@@ -290,10 +292,10 @@ Returns the abbrev symbol, if expansion took place.")
wordend
-
wordstart
,
wordend_byte
-
wordstart_byte
);
else
XSETFASTINT
(
sym
,
0
);
if
(
INTEGERP
(
sym
)
||
NILP
(
X
SYMBOL
(
sym
)
->
value
))
if
(
INTEGERP
(
sym
)
||
NILP
(
SYMBOL
_VALUE
(
sym
)))
sym
=
oblookup
(
Vglobal_abbrev_table
,
buffer
,
wordend
-
wordstart
,
wordend_byte
-
wordstart_byte
);
if
(
INTEGERP
(
sym
)
||
NILP
(
X
SYMBOL
(
sym
)
->
value
))
if
(
INTEGERP
(
sym
)
||
NILP
(
SYMBOL
_VALUE
(
sym
)))
return
value
;
if
(
INTERACTIVE
&&
!
EQ
(
minibuf_window
,
selected_window
))
...
...
@@ -318,7 +320,7 @@ Returns the abbrev symbol, if expansion took place.")
/* If this abbrev has an expansion, delete the abbrev
and insert the expansion. */
expansion
=
X
SYMBOL
(
sym
)
->
value
;
expansion
=
SYMBOL
_VALUE
(
sym
);
if
(
STRINGP
(
expansion
))
{
SET_PT
(
wordstart
);
...
...
@@ -404,7 +406,7 @@ is not undone.")
Lisp_Object
val
;
int
zv_before
;
val
=
X
SYMBOL
(
Vlast_abbrev
)
->
value
;
val
=
SYMBOL
_VALUE
(
Vlast_abbrev
);
if
(
!
STRINGP
(
val
))
error
(
"value of abbrev-symbol must be a string"
);
zv_before
=
ZV
;
...
...
@@ -426,13 +428,13 @@ write_abbrev (sym, stream)
Lisp_Object
sym
,
stream
;
{
Lisp_Object
name
;
if
(
NILP
(
X
SYMBOL
(
sym
)
->
value
))
if
(
NILP
(
SYMBOL
_VALUE
(
sym
)))
return
;
insert
(
" ("
,
5
);
XSETSTRING
(
name
,
XSYMBOL
(
sym
)
->
name
);
Fprin1
(
name
,
stream
);
insert
(
" "
,
1
);
Fprin1
(
X
SYMBOL
(
sym
)
->
value
,
stream
);
Fprin1
(
SYMBOL
_VALUE
(
sym
),
stream
);
insert
(
" "
,
1
);
Fprin1
(
XSYMBOL
(
sym
)
->
function
,
stream
);
insert
(
" "
,
1
);
...
...
@@ -446,14 +448,14 @@ describe_abbrev (sym, stream)
{
Lisp_Object
one
;
if
(
NILP
(
X
SYMBOL
(
sym
)
->
value
))
if
(
NILP
(
SYMBOL
_VALUE
(
sym
)))
return
;
one
=
make_number
(
1
);
Fprin1
(
Fsymbol_name
(
sym
),
stream
);
Findent_to
(
make_number
(
15
),
one
);
Fprin1
(
XSYMBOL
(
sym
)
->
plist
,
stream
);
Findent_to
(
make_number
(
20
),
one
);
Fprin1
(
X
SYMBOL
(
sym
)
->
value
,
stream
);
Fprin1
(
SYMBOL
_VALUE
(
sym
),
stream
);
if
(
!
NILP
(
XSYMBOL
(
sym
)
->
function
))
{
Findent_to
(
make_number
(
45
),
one
);
...
...
src/sunfns.c
View file @
a97569cb
/* Functions for Sun Windows menus and selection buffer.
Copyright (C) 1987, 1999 Free Software Foundation, Inc.
Copyright (C) 1987, 1999
, 2001
Free Software Foundation, Inc.
This file is probably totally obsolete. In any case, the FSF is
unwilling to support it. We agreed to include it in our distribution
...
...
@@ -366,7 +366,7 @@ sun_item_create (Pair)
CHECK_STRING
(
String
,
0
);
Value
=
Fcdr
(
Pair
);
if
(
SYMBOLP
(
Value
))
Value
=
X
SYMBOL
(
Value
)
->
value
;
Value
=
SYMBOL
_VALUE
(
Value
);
if
(
VECTORP
(
Value
))
{
submenu
=
sun_menu_create
(
Value
);
menu_item
=
menu_create_item
...
...
src/w16select.c
View file @
a97569cb
/* 16-bit Windows Selection processing for emacs on MS-Windows
Copyright (C) 1996, 1997 Free Software Foundation.
Copyright (C) 1996, 1997
, 2001
Free Software Foundation.
This file is part of GNU Emacs.
...
...
@@ -714,8 +714,8 @@ and t is the same as `SECONDARY'.")
into the clipboard if we run under Windows, so we cannot check
the clipboard alone.) */
if
((
EQ
(
selection
,
Qnil
)
||
EQ
(
selection
,
QPRIMARY
))
&&
!
NILP
(
X
SYMBOL
(
Fintern_soft
(
build_string
(
"kill-ring"
),
Qnil
))
->
value
))
&&
!
NILP
(
SYMBOL
_VALUE
(
Fintern_soft
(
build_string
(
"kill-ring"
),
Qnil
))))
return
Qt
;
if
(
EQ
(
selection
,
QCLIPBOARD
))
...
...
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