Mercurial > emacs
comparison src/buffer.c @ 71968:b0505e901bff
(Fbuffer_local_value, Fbarf_if_buffer_read_only):
Use xsignal1.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Tue, 18 Jul 2006 13:25:47 +0000 |
| parents | 83b791ca7b11 |
| children | e97bfa736263 02e39decdc84 8a8e69664178 |
comparison
equal
deleted
inserted
replaced
| 71967:3254b987edcb | 71968:b0505e901bff |
|---|---|
| 936 | 936 |
| 937 /* Now get the (perhaps updated) value out of the binding. */ | 937 /* Now get the (perhaps updated) value out of the binding. */ |
| 938 result = XCDR (result); | 938 result = XCDR (result); |
| 939 } | 939 } |
| 940 | 940 |
| 941 if (EQ (result, Qunbound)) | 941 if (!EQ (result, Qunbound)) |
| 942 return Fsignal (Qvoid_variable, Fcons (variable, Qnil)); | 942 return result; |
| 943 | 943 |
| 944 return result; | 944 xsignal1 (Qvoid_variable, variable); |
| 945 } | 945 } |
| 946 | 946 |
| 947 /* Return an alist of the Lisp-level buffer-local bindings of | 947 /* Return an alist of the Lisp-level buffer-local bindings of |
| 948 buffer BUF. That is, don't include the variables maintained | 948 buffer BUF. That is, don't include the variables maintained |
| 949 in special slots in the buffer object. */ | 949 in special slots in the buffer object. */ |
| 1959 doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) | 1959 doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) |
| 1960 () | 1960 () |
| 1961 { | 1961 { |
| 1962 if (!NILP (current_buffer->read_only) | 1962 if (!NILP (current_buffer->read_only) |
| 1963 && NILP (Vinhibit_read_only)) | 1963 && NILP (Vinhibit_read_only)) |
| 1964 Fsignal (Qbuffer_read_only, (Fcons (Fcurrent_buffer (), Qnil))); | 1964 xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); |
| 1965 return Qnil; | 1965 return Qnil; |
| 1966 } | 1966 } |
| 1967 | 1967 |
| 1968 DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 1, "", | 1968 DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 1, "", |
| 1969 doc: /* Put BUFFER at the end of the list of all buffers. | 1969 doc: /* Put BUFFER at the end of the list of all buffers. |
