diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/buffer.c b/src/buffer.c index 02ca23eb2dd..b177c5eaa7f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -781,15 +781,22 @@ fetch_buffer_markers (struct buffer *b) | |||
| 781 | 781 | ||
| 782 | 782 | ||
| 783 | DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, | 783 | DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, |
| 784 | 2, 3, | 784 | 2, 4, |
| 785 | "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", | 785 | "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", |
| 786 | doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. | 786 | doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. |
| 787 | BASE-BUFFER should be a live buffer, or the name of an existing buffer. | 787 | BASE-BUFFER should be a live buffer, or the name of an existing buffer. |
| 788 | |||
| 788 | NAME should be a string which is not the name of an existing buffer. | 789 | NAME should be a string which is not the name of an existing buffer. |
| 789 | Optional argument CLONE non-nil means preserve BASE-BUFFER's state, | 790 | Optional argument CLONE non-nil means preserve BASE-BUFFER's state, |
| 790 | such as major and minor modes, in the indirect buffer. | 791 | such as major and minor modes, in the indirect buffer. |
| 791 | CLONE nil means the indirect buffer's state is reset to default values. */) | 792 | |
| 792 | (Lisp_Object base_buffer, Lisp_Object name, Lisp_Object clone) | 793 | CLONE nil means the indirect buffer's state is reset to default values. |
| 794 | |||
| 795 | If optional argument INHIBIT-BUFFER-HOOKS is non-nil, the new buffer | ||
| 796 | does not run the hooks `kill-buffer-hook', | ||
| 797 | `kill-buffer-query-functions', and `buffer-list-update-hook'. */) | ||
| 798 | (Lisp_Object base_buffer, Lisp_Object name, Lisp_Object clone, | ||
| 799 | Lisp_Object inhibit_buffer_hooks) | ||
| 793 | { | 800 | { |
| 794 | Lisp_Object buf, tem; | 801 | Lisp_Object buf, tem; |
| 795 | struct buffer *b; | 802 | struct buffer *b; |
| @@ -834,6 +841,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 834 | b->pt_byte = b->base_buffer->pt_byte; | 841 | b->pt_byte = b->base_buffer->pt_byte; |
| 835 | b->begv_byte = b->base_buffer->begv_byte; | 842 | b->begv_byte = b->base_buffer->begv_byte; |
| 836 | b->zv_byte = b->base_buffer->zv_byte; | 843 | b->zv_byte = b->base_buffer->zv_byte; |
| 844 | b->inhibit_buffer_hooks = !NILP (inhibit_buffer_hooks); | ||
| 837 | 845 | ||
| 838 | b->newline_cache = 0; | 846 | b->newline_cache = 0; |
| 839 | b->width_run_cache = 0; | 847 | b->width_run_cache = 0; |
| @@ -1076,12 +1084,12 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too) | |||
| 1076 | for (newlist = Qnil; CONSP (list); list = XCDR (list)) | 1084 | for (newlist = Qnil; CONSP (list); list = XCDR (list)) |
| 1077 | { | 1085 | { |
| 1078 | Lisp_Object elt = XCAR (list); | 1086 | Lisp_Object elt = XCAR (list); |
| 1079 | /* Preserve element ELT if it's t, | 1087 | /* Preserve element ELT if it's t, or if it is a |
| 1080 | if it is a function with a `permanent-local-hook' property, | 1088 | function with a `permanent-local-hook' |
| 1081 | or if it's not a symbol. */ | 1089 | property. */ |
| 1082 | if (! SYMBOLP (elt) | 1090 | if (EQ (elt, Qt) |
| 1083 | || EQ (elt, Qt) | 1091 | || (SYMBOLP (elt) |
| 1084 | || !NILP (Fget (elt, Qpermanent_local_hook))) | 1092 | && !NILP (Fget (elt, Qpermanent_local_hook)))) |
| 1085 | newlist = Fcons (elt, newlist); | 1093 | newlist = Fcons (elt, newlist); |
| 1086 | } | 1094 | } |
| 1087 | newlist = Fnreverse (newlist); | 1095 | newlist = Fnreverse (newlist); |
| @@ -4214,7 +4222,11 @@ OVERLAY. */) | |||
| 4214 | 4222 | ||
| 4215 | DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0, | 4223 | DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0, |
| 4216 | doc: /* Return a list of the overlays that contain the character at POS. | 4224 | doc: /* Return a list of the overlays that contain the character at POS. |
| 4217 | If SORTED is non-nil, then sort them by decreasing priority. */) | 4225 | If SORTED is non-nil, then sort them by decreasing priority. |
| 4226 | |||
| 4227 | Zero-length overlays that start and stop at POS are not included in | ||
| 4228 | the return value. Instead use `overlays-in' if those overlays are of | ||
| 4229 | interest. */) | ||
| 4218 | (Lisp_Object pos, Lisp_Object sorted) | 4230 | (Lisp_Object pos, Lisp_Object sorted) |
| 4219 | { | 4231 | { |
| 4220 | ptrdiff_t len, noverlays; | 4232 | ptrdiff_t len, noverlays; |