diff options
| author | Paul Eggert | 2017-11-13 10:54:20 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-11-13 10:54:20 -0800 |
| commit | 99ceefa8ec4f9993663492cfcce6bb82a94569c1 (patch) | |
| tree | 507f76715b3086f34672b7c984dc09befaa57fc6 /src/buffer.c | |
| parent | a7b7b85567f766ff510a5eaaaf32dbbbec15efd0 (diff) | |
| parent | 79108894dbcd642121466bb6af6c98c6a56e9233 (diff) | |
| download | emacs-99ceefa8ec4f9993663492cfcce6bb82a94569c1.tar.gz emacs-99ceefa8ec4f9993663492cfcce6bb82a94569c1.zip | |
Merge from origin/emacs-26
79108894db Port to IBM xlc 12.01
d14956099d Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
b1573a97e1 Use alignas to fix GCALIGN-related bugs
5d68dc9a2f Change vectorlike from struct to union
6aa0a26b46 Don't enable cursor-sensor-mode in mhtml-mode
2b8ef8dddf * lisp/files.el (abbreviate-file-name): Doc fix. (Bug#29267)
fe85ce1e16 Unbreak interactive run of a flymake test (bug#29267)
48ad00390d Fix Bug#29225
42daf83f08 CC Mode: Fix defun-open being recognized as brace-list-ope...
7775c47298 Merge from Gnulib
e470d16448 Pacify GCC when configured --with-x-toolkit=no
49450d0951 * lisp/find-dired.el (find-grep-dired): Doc fix. (Bug#29262)
e286b3381f Fix more flymake-diag-region eob corner cases and add test...
# Conflicts:
# src/lisp.h
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c index edeed55e8be..4ae5e811b07 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -61,7 +61,7 @@ struct buffer *all_buffers; | |||
| 61 | Setting the default value also goes through the alist of buffers | 61 | Setting the default value also goes through the alist of buffers |
| 62 | and stores into each buffer that does not say it has a local value. */ | 62 | and stores into each buffer that does not say it has a local value. */ |
| 63 | 63 | ||
| 64 | struct GCALIGNED buffer buffer_defaults; | 64 | struct buffer buffer_defaults; |
| 65 | 65 | ||
| 66 | /* This structure marks which slots in a buffer have corresponding | 66 | /* This structure marks which slots in a buffer have corresponding |
| 67 | default values in buffer_defaults. | 67 | default values in buffer_defaults. |
| @@ -84,7 +84,7 @@ struct buffer buffer_local_flags; | |||
| 84 | /* This structure holds the names of symbols whose values may be | 84 | /* This structure holds the names of symbols whose values may be |
| 85 | buffer-local. It is indexed and accessed in the same way as the above. */ | 85 | buffer-local. It is indexed and accessed in the same way as the above. */ |
| 86 | 86 | ||
| 87 | struct GCALIGNED buffer buffer_local_symbols; | 87 | struct buffer buffer_local_symbols; |
| 88 | 88 | ||
| 89 | /* Return the symbol of the per-buffer variable at offset OFFSET in | 89 | /* Return the symbol of the per-buffer variable at offset OFFSET in |
| 90 | the buffer structure. */ | 90 | the buffer structure. */ |
| @@ -1021,7 +1021,8 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too) | |||
| 1021 | newlist = Fcons (elt, newlist); | 1021 | newlist = Fcons (elt, newlist); |
| 1022 | } | 1022 | } |
| 1023 | newlist = Fnreverse (newlist); | 1023 | newlist = Fnreverse (newlist); |
| 1024 | if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE) | 1024 | if (XSYMBOL (local_var)->u.s.trapped_write |
| 1025 | == SYMBOL_TRAPPED_WRITE) | ||
| 1025 | notify_variable_watchers (local_var, newlist, | 1026 | notify_variable_watchers (local_var, newlist, |
| 1026 | Qmakunbound, Fcurrent_buffer ()); | 1027 | Qmakunbound, Fcurrent_buffer ()); |
| 1027 | XSETCDR (XCAR (tmp), newlist); | 1028 | XSETCDR (XCAR (tmp), newlist); |
| @@ -1034,7 +1035,7 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too) | |||
| 1034 | else | 1035 | else |
| 1035 | XSETCDR (last, XCDR (tmp)); | 1036 | XSETCDR (last, XCDR (tmp)); |
| 1036 | 1037 | ||
| 1037 | if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE) | 1038 | if (XSYMBOL (local_var)->u.s.trapped_write == SYMBOL_TRAPPED_WRITE) |
| 1038 | notify_variable_watchers (local_var, Qnil, | 1039 | notify_variable_watchers (local_var, Qnil, |
| 1039 | Qmakunbound, Fcurrent_buffer ()); | 1040 | Qmakunbound, Fcurrent_buffer ()); |
| 1040 | } | 1041 | } |
| @@ -1166,7 +1167,7 @@ buffer_local_value (Lisp_Object variable, Lisp_Object buffer) | |||
| 1166 | sym = XSYMBOL (variable); | 1167 | sym = XSYMBOL (variable); |
| 1167 | 1168 | ||
| 1168 | start: | 1169 | start: |
| 1169 | switch (sym->redirect) | 1170 | switch (sym->u.s.redirect) |
| 1170 | { | 1171 | { |
| 1171 | case SYMBOL_VARALIAS: sym = indirect_variable (sym); goto start; | 1172 | case SYMBOL_VARALIAS: sym = indirect_variable (sym); goto start; |
| 1172 | case SYMBOL_PLAINVAL: result = SYMBOL_VAL (sym); break; | 1173 | case SYMBOL_PLAINVAL: result = SYMBOL_VAL (sym); break; |
| @@ -2096,7 +2097,7 @@ void set_buffer_internal_2 (register struct buffer *b) | |||
| 2096 | { | 2097 | { |
| 2097 | Lisp_Object var = XCAR (XCAR (tail)); | 2098 | Lisp_Object var = XCAR (XCAR (tail)); |
| 2098 | struct Lisp_Symbol *sym = XSYMBOL (var); | 2099 | struct Lisp_Symbol *sym = XSYMBOL (var); |
| 2099 | if (sym->redirect == SYMBOL_LOCALIZED /* Just to be sure. */ | 2100 | if (sym->u.s.redirect == SYMBOL_LOCALIZED /* Just to be sure. */ |
| 2100 | && SYMBOL_BLV (sym)->fwd) | 2101 | && SYMBOL_BLV (sym)->fwd) |
| 2101 | /* Just reference the variable | 2102 | /* Just reference the variable |
| 2102 | to cause it to become set for this buffer. */ | 2103 | to cause it to become set for this buffer. */ |
| @@ -2752,7 +2753,7 @@ swap_out_buffer_local_variables (struct buffer *b) | |||
| 2752 | for (alist = oalist; CONSP (alist); alist = XCDR (alist)) | 2753 | for (alist = oalist; CONSP (alist); alist = XCDR (alist)) |
| 2753 | { | 2754 | { |
| 2754 | Lisp_Object sym = XCAR (XCAR (alist)); | 2755 | Lisp_Object sym = XCAR (XCAR (alist)); |
| 2755 | eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); | 2756 | eassert (XSYMBOL (sym)->u.s.redirect == SYMBOL_LOCALIZED); |
| 2756 | /* Need not do anything if some other buffer's binding is | 2757 | /* Need not do anything if some other buffer's binding is |
| 2757 | now cached. */ | 2758 | now cached. */ |
| 2758 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) | 2759 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) |
| @@ -5423,8 +5424,8 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, | |||
| 5423 | bo_fwd->type = Lisp_Fwd_Buffer_Obj; | 5424 | bo_fwd->type = Lisp_Fwd_Buffer_Obj; |
| 5424 | bo_fwd->offset = offset; | 5425 | bo_fwd->offset = offset; |
| 5425 | bo_fwd->predicate = predicate; | 5426 | bo_fwd->predicate = predicate; |
| 5426 | sym->declared_special = 1; | 5427 | sym->u.s.declared_special = true; |
| 5427 | sym->redirect = SYMBOL_FORWARDED; | 5428 | sym->u.s.redirect = SYMBOL_FORWARDED; |
| 5428 | SET_SYMBOL_FWD (sym, (union Lisp_Fwd *) bo_fwd); | 5429 | SET_SYMBOL_FWD (sym, (union Lisp_Fwd *) bo_fwd); |
| 5429 | XSETSYMBOL (PER_BUFFER_SYMBOL (offset), sym); | 5430 | XSETSYMBOL (PER_BUFFER_SYMBOL (offset), sym); |
| 5430 | 5431 | ||