diff options
| author | Joakim Verona | 2014-12-23 17:03:28 +0100 |
|---|---|---|
| committer | Joakim Verona | 2014-12-23 17:03:28 +0100 |
| commit | 5f46725992bf26f887483c14c63c03f5b5794f34 (patch) | |
| tree | 2896a2b98a65851eaddba81d0138fe5647005b08 /src/buffer.c | |
| parent | 1d8b8a2d8f75d1e3ec9eb109e98720bd9a197bec (diff) | |
| parent | e3040f2aee768655198dd6f979a1ff3a72d17d16 (diff) | |
| download | emacs-5f46725992bf26f887483c14c63c03f5b5794f34.tar.gz emacs-5f46725992bf26f887483c14c63c03f5b5794f34.zip | |
Merge branch 'master' into xwidget
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 177 |
1 files changed, 64 insertions, 113 deletions
diff --git a/src/buffer.c b/src/buffer.c index 4eddd7029cc..7e424bb3178 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -829,6 +829,9 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 829 | set_string_intervals (name, NULL); | 829 | set_string_intervals (name, NULL); |
| 830 | bset_name (b, name); | 830 | bset_name (b, name); |
| 831 | 831 | ||
| 832 | /* An indirect buffer shares undo list of its base (Bug#18180). */ | ||
| 833 | bset_undo_list (b, BVAR (b->base_buffer, undo_list)); | ||
| 834 | |||
| 832 | reset_buffer (b); | 835 | reset_buffer (b); |
| 833 | reset_buffer_local_variables (b, 1); | 836 | reset_buffer_local_variables (b, 1); |
| 834 | 837 | ||
| @@ -1134,10 +1137,7 @@ BUFFER defaults to the current buffer. | |||
| 1134 | Return nil if BUFFER has been killed. */) | 1137 | Return nil if BUFFER has been killed. */) |
| 1135 | (register Lisp_Object buffer) | 1138 | (register Lisp_Object buffer) |
| 1136 | { | 1139 | { |
| 1137 | if (NILP (buffer)) | 1140 | return BVAR (decode_buffer (buffer), name); |
| 1138 | return BVAR (current_buffer, name); | ||
| 1139 | CHECK_BUFFER (buffer); | ||
| 1140 | return BVAR (XBUFFER (buffer), name); | ||
| 1141 | } | 1141 | } |
| 1142 | 1142 | ||
| 1143 | DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, | 1143 | DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, |
| @@ -1145,10 +1145,7 @@ DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, | |||
| 1145 | No argument or nil as argument means use the current buffer. */) | 1145 | No argument or nil as argument means use the current buffer. */) |
| 1146 | (register Lisp_Object buffer) | 1146 | (register Lisp_Object buffer) |
| 1147 | { | 1147 | { |
| 1148 | if (NILP (buffer)) | 1148 | return BVAR (decode_buffer (buffer), filename); |
| 1149 | return BVAR (current_buffer, filename); | ||
| 1150 | CHECK_BUFFER (buffer); | ||
| 1151 | return BVAR (XBUFFER (buffer), filename); | ||
| 1152 | } | 1149 | } |
| 1153 | 1150 | ||
| 1154 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, | 1151 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, |
| @@ -1158,21 +1155,8 @@ If BUFFER is not indirect, return nil. | |||
| 1158 | BUFFER defaults to the current buffer. */) | 1155 | BUFFER defaults to the current buffer. */) |
| 1159 | (register Lisp_Object buffer) | 1156 | (register Lisp_Object buffer) |
| 1160 | { | 1157 | { |
| 1161 | struct buffer *base; | 1158 | struct buffer *base = decode_buffer (buffer)->base_buffer; |
| 1162 | Lisp_Object base_buffer; | 1159 | return base ? (XSETBUFFER (buffer, base), buffer) : Qnil; |
| 1163 | |||
| 1164 | if (NILP (buffer)) | ||
| 1165 | base = current_buffer->base_buffer; | ||
| 1166 | else | ||
| 1167 | { | ||
| 1168 | CHECK_BUFFER (buffer); | ||
| 1169 | base = XBUFFER (buffer)->base_buffer; | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | if (! base) | ||
| 1173 | return Qnil; | ||
| 1174 | XSETBUFFER (base_buffer, base); | ||
| 1175 | return base_buffer; | ||
| 1176 | } | 1160 | } |
| 1177 | 1161 | ||
| 1178 | DEFUN ("buffer-local-value", Fbuffer_local_value, | 1162 | DEFUN ("buffer-local-value", Fbuffer_local_value, |
| @@ -1295,20 +1279,10 @@ Most elements look like (SYMBOL . VALUE), describing one variable. | |||
| 1295 | For a symbol that is locally unbound, just the symbol appears in the value. | 1279 | For a symbol that is locally unbound, just the symbol appears in the value. |
| 1296 | Note that storing new VALUEs in these elements doesn't change the variables. | 1280 | Note that storing new VALUEs in these elements doesn't change the variables. |
| 1297 | No argument or nil as argument means use current buffer as BUFFER. */) | 1281 | No argument or nil as argument means use current buffer as BUFFER. */) |
| 1298 | (register Lisp_Object buffer) | 1282 | (Lisp_Object buffer) |
| 1299 | { | 1283 | { |
| 1300 | register struct buffer *buf; | 1284 | struct buffer *buf = decode_buffer (buffer); |
| 1301 | register Lisp_Object result; | 1285 | Lisp_Object result = buffer_lisp_local_variables (buf, 0); |
| 1302 | |||
| 1303 | if (NILP (buffer)) | ||
| 1304 | buf = current_buffer; | ||
| 1305 | else | ||
| 1306 | { | ||
| 1307 | CHECK_BUFFER (buffer); | ||
| 1308 | buf = XBUFFER (buffer); | ||
| 1309 | } | ||
| 1310 | |||
| 1311 | result = buffer_lisp_local_variables (buf, 0); | ||
| 1312 | 1286 | ||
| 1313 | /* Add on all the variables stored in special slots. */ | 1287 | /* Add on all the variables stored in special slots. */ |
| 1314 | { | 1288 | { |
| @@ -1335,17 +1309,9 @@ DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, | |||
| 1335 | 0, 1, 0, | 1309 | 0, 1, 0, |
| 1336 | doc: /* Return t if BUFFER was modified since its file was last read or saved. | 1310 | doc: /* Return t if BUFFER was modified since its file was last read or saved. |
| 1337 | No argument or nil as argument means use current buffer as BUFFER. */) | 1311 | No argument or nil as argument means use current buffer as BUFFER. */) |
| 1338 | (register Lisp_Object buffer) | 1312 | (Lisp_Object buffer) |
| 1339 | { | 1313 | { |
| 1340 | register struct buffer *buf; | 1314 | struct buffer *buf = decode_buffer (buffer); |
| 1341 | if (NILP (buffer)) | ||
| 1342 | buf = current_buffer; | ||
| 1343 | else | ||
| 1344 | { | ||
| 1345 | CHECK_BUFFER (buffer); | ||
| 1346 | buf = XBUFFER (buffer); | ||
| 1347 | } | ||
| 1348 | |||
| 1349 | return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil; | 1315 | return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil; |
| 1350 | } | 1316 | } |
| 1351 | 1317 | ||
| @@ -1451,16 +1417,7 @@ text in that buffer is changed. It wraps around occasionally. | |||
| 1451 | No argument or nil as argument means use current buffer as BUFFER. */) | 1417 | No argument or nil as argument means use current buffer as BUFFER. */) |
| 1452 | (register Lisp_Object buffer) | 1418 | (register Lisp_Object buffer) |
| 1453 | { | 1419 | { |
| 1454 | register struct buffer *buf; | 1420 | return make_number (BUF_MODIFF (decode_buffer (buffer))); |
| 1455 | if (NILP (buffer)) | ||
| 1456 | buf = current_buffer; | ||
| 1457 | else | ||
| 1458 | { | ||
| 1459 | CHECK_BUFFER (buffer); | ||
| 1460 | buf = XBUFFER (buffer); | ||
| 1461 | } | ||
| 1462 | |||
| 1463 | return make_number (BUF_MODIFF (buf)); | ||
| 1464 | } | 1421 | } |
| 1465 | 1422 | ||
| 1466 | DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick, | 1423 | DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick, |
| @@ -1475,16 +1432,7 @@ between these calls. No argument or nil as argument means use current | |||
| 1475 | buffer as BUFFER. */) | 1432 | buffer as BUFFER. */) |
| 1476 | (register Lisp_Object buffer) | 1433 | (register Lisp_Object buffer) |
| 1477 | { | 1434 | { |
| 1478 | register struct buffer *buf; | 1435 | return make_number (BUF_CHARS_MODIFF (decode_buffer (buffer))); |
| 1479 | if (NILP (buffer)) | ||
| 1480 | buf = current_buffer; | ||
| 1481 | else | ||
| 1482 | { | ||
| 1483 | CHECK_BUFFER (buffer); | ||
| 1484 | buf = XBUFFER (buffer); | ||
| 1485 | } | ||
| 1486 | |||
| 1487 | return make_number (BUF_CHARS_MODIFF (buf)); | ||
| 1488 | } | 1436 | } |
| 1489 | 1437 | ||
| 1490 | DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, | 1438 | DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, |
| @@ -1564,7 +1512,7 @@ frame's buffer list. | |||
| 1564 | The buffer is found by scanning the selected or specified frame's buffer | 1512 | The buffer is found by scanning the selected or specified frame's buffer |
| 1565 | list first, followed by the list of all buffers. If no other buffer | 1513 | list first, followed by the list of all buffers. If no other buffer |
| 1566 | exists, return the buffer `*scratch*' (creating it if necessary). */) | 1514 | exists, return the buffer `*scratch*' (creating it if necessary). */) |
| 1567 | (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) | 1515 | (Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) |
| 1568 | { | 1516 | { |
| 1569 | struct frame *f = decode_any_frame (frame); | 1517 | struct frame *f = decode_any_frame (frame); |
| 1570 | Lisp_Object tail = f->buffer_list, pred = f->buffer_predicate; | 1518 | Lisp_Object tail = f->buffer_list, pred = f->buffer_predicate; |
| @@ -1607,10 +1555,11 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) | |||
| 1607 | return notsogood; | 1555 | return notsogood; |
| 1608 | else | 1556 | else |
| 1609 | { | 1557 | { |
| 1610 | buf = Fget_buffer (build_string ("*scratch*")); | 1558 | AUTO_STRING (scratch, "*scratch*"); |
| 1559 | buf = Fget_buffer (scratch); | ||
| 1611 | if (NILP (buf)) | 1560 | if (NILP (buf)) |
| 1612 | { | 1561 | { |
| 1613 | buf = Fget_buffer_create (build_string ("*scratch*")); | 1562 | buf = Fget_buffer_create (scratch); |
| 1614 | Fset_buffer_major_mode (buf); | 1563 | Fset_buffer_major_mode (buf); |
| 1615 | } | 1564 | } |
| 1616 | return buf; | 1565 | return buf; |
| @@ -1630,10 +1579,11 @@ other_buffer_safely (Lisp_Object buffer) | |||
| 1630 | if (candidate_buffer (buf, buffer)) | 1579 | if (candidate_buffer (buf, buffer)) |
| 1631 | return buf; | 1580 | return buf; |
| 1632 | 1581 | ||
| 1633 | buf = Fget_buffer (build_string ("*scratch*")); | 1582 | AUTO_STRING (scratch, "*scratch*"); |
| 1583 | buf = Fget_buffer (scratch); | ||
| 1634 | if (NILP (buf)) | 1584 | if (NILP (buf)) |
| 1635 | { | 1585 | { |
| 1636 | buf = Fget_buffer_create (build_string ("*scratch*")); | 1586 | buf = Fget_buffer_create (scratch); |
| 1637 | Fset_buffer_major_mode (buf); | 1587 | Fset_buffer_major_mode (buf); |
| 1638 | } | 1588 | } |
| 1639 | 1589 | ||
| @@ -2242,12 +2192,20 @@ set_buffer_if_live (Lisp_Object buffer) | |||
| 2242 | } | 2192 | } |
| 2243 | 2193 | ||
| 2244 | DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, | 2194 | DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, |
| 2245 | Sbarf_if_buffer_read_only, 0, 0, 0, | 2195 | Sbarf_if_buffer_read_only, 0, 1, 0, |
| 2246 | doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) | 2196 | doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. |
| 2247 | (void) | 2197 | If the text under POSITION (which defaults to point) has the |
| 2198 | `inhibit-read-only' text property set, the error will not be raised. */) | ||
| 2199 | (Lisp_Object pos) | ||
| 2248 | { | 2200 | { |
| 2201 | if (NILP (pos)) | ||
| 2202 | XSETFASTINT (pos, PT); | ||
| 2203 | else | ||
| 2204 | CHECK_NUMBER (pos); | ||
| 2205 | |||
| 2249 | if (!NILP (BVAR (current_buffer, read_only)) | 2206 | if (!NILP (BVAR (current_buffer, read_only)) |
| 2250 | && NILP (Vinhibit_read_only)) | 2207 | && NILP (Vinhibit_read_only) |
| 2208 | && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil))) | ||
| 2251 | xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); | 2209 | xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); |
| 2252 | return Qnil; | 2210 | return Qnil; |
| 2253 | } | 2211 | } |
| @@ -3113,13 +3071,15 @@ mouse_face_overlay_overlaps (Lisp_Object overlay) | |||
| 3113 | ptrdiff_t end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3071 | ptrdiff_t end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 3114 | ptrdiff_t n, i, size; | 3072 | ptrdiff_t n, i, size; |
| 3115 | Lisp_Object *v, tem; | 3073 | Lisp_Object *v, tem; |
| 3074 | Lisp_Object vbuf[10]; | ||
| 3075 | USE_SAFE_ALLOCA; | ||
| 3116 | 3076 | ||
| 3117 | size = 10; | 3077 | size = ARRAYELTS (vbuf); |
| 3118 | v = alloca (size * sizeof *v); | 3078 | v = vbuf; |
| 3119 | n = overlays_in (start, end, 0, &v, &size, NULL, NULL); | 3079 | n = overlays_in (start, end, 0, &v, &size, NULL, NULL); |
| 3120 | if (n > size) | 3080 | if (n > size) |
| 3121 | { | 3081 | { |
| 3122 | v = alloca (n * sizeof *v); | 3082 | SAFE_NALLOCA (v, 1, n); |
| 3123 | overlays_in (start, end, 0, &v, &n, NULL, NULL); | 3083 | overlays_in (start, end, 0, &v, &n, NULL, NULL); |
| 3124 | } | 3084 | } |
| 3125 | 3085 | ||
| @@ -3129,6 +3089,7 @@ mouse_face_overlay_overlaps (Lisp_Object overlay) | |||
| 3129 | !NILP (tem))) | 3089 | !NILP (tem))) |
| 3130 | break; | 3090 | break; |
| 3131 | 3091 | ||
| 3092 | SAFE_FREE (); | ||
| 3132 | return i < n; | 3093 | return i < n; |
| 3133 | } | 3094 | } |
| 3134 | 3095 | ||
| @@ -4142,17 +4103,7 @@ BUFFER omitted or nil means delete all overlays of the current | |||
| 4142 | buffer. */) | 4103 | buffer. */) |
| 4143 | (Lisp_Object buffer) | 4104 | (Lisp_Object buffer) |
| 4144 | { | 4105 | { |
| 4145 | register struct buffer *buf; | 4106 | delete_all_overlays (decode_buffer (buffer)); |
| 4146 | |||
| 4147 | if (NILP (buffer)) | ||
| 4148 | buf = current_buffer; | ||
| 4149 | else | ||
| 4150 | { | ||
| 4151 | CHECK_BUFFER (buffer); | ||
| 4152 | buf = XBUFFER (buffer); | ||
| 4153 | } | ||
| 4154 | |||
| 4155 | delete_all_overlays (buf); | ||
| 4156 | return Qnil; | 4107 | return Qnil; |
| 4157 | } | 4108 | } |
| 4158 | 4109 | ||
| @@ -4587,13 +4538,13 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, | |||
| 4587 | First copy the vector contents, in case some of these hooks | 4538 | First copy the vector contents, in case some of these hooks |
| 4588 | do subsequent modification of the buffer. */ | 4539 | do subsequent modification of the buffer. */ |
| 4589 | ptrdiff_t size = last_overlay_modification_hooks_used; | 4540 | ptrdiff_t size = last_overlay_modification_hooks_used; |
| 4590 | Lisp_Object *copy = alloca (size * sizeof *copy); | 4541 | Lisp_Object *copy; |
| 4591 | ptrdiff_t i; | 4542 | ptrdiff_t i; |
| 4592 | 4543 | ||
| 4544 | USE_SAFE_ALLOCA; | ||
| 4545 | SAFE_ALLOCA_LISP (copy, size); | ||
| 4593 | memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, | 4546 | memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, |
| 4594 | size * word_size); | 4547 | size * word_size); |
| 4595 | gcpro1.var = copy; | ||
| 4596 | gcpro1.nvars = size; | ||
| 4597 | 4548 | ||
| 4598 | for (i = 0; i < size;) | 4549 | for (i = 0; i < size;) |
| 4599 | { | 4550 | { |
| @@ -4602,6 +4553,8 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, | |||
| 4602 | overlay_i = copy[i++]; | 4553 | overlay_i = copy[i++]; |
| 4603 | call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3); | 4554 | call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3); |
| 4604 | } | 4555 | } |
| 4556 | |||
| 4557 | SAFE_FREE (); | ||
| 4605 | } | 4558 | } |
| 4606 | UNGCPRO; | 4559 | UNGCPRO; |
| 4607 | } | 4560 | } |
| @@ -5279,16 +5232,14 @@ init_buffer_once (void) | |||
| 5279 | 5232 | ||
| 5280 | QSFundamental = build_pure_c_string ("Fundamental"); | 5233 | QSFundamental = build_pure_c_string ("Fundamental"); |
| 5281 | 5234 | ||
| 5282 | Qfundamental_mode = intern_c_string ("fundamental-mode"); | 5235 | DEFSYM (Qfundamental_mode, "fundamental-mode"); |
| 5283 | bset_major_mode (&buffer_defaults, Qfundamental_mode); | 5236 | bset_major_mode (&buffer_defaults, Qfundamental_mode); |
| 5284 | 5237 | ||
| 5285 | Qmode_class = intern_c_string ("mode-class"); | 5238 | DEFSYM (Qmode_class, "mode-class"); |
| 5286 | 5239 | DEFSYM (Qprotected_field, "protected-field"); | |
| 5287 | Qprotected_field = intern_c_string ("protected-field"); | ||
| 5288 | 5240 | ||
| 5289 | Qpermanent_local = intern_c_string ("permanent-local"); | 5241 | DEFSYM (Qpermanent_local, "permanent-local"); |
| 5290 | 5242 | DEFSYM (Qkill_buffer_hook, "kill-buffer-hook"); | |
| 5291 | Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); | ||
| 5292 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); | 5243 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); |
| 5293 | 5244 | ||
| 5294 | /* super-magic invisible buffer */ | 5245 | /* super-magic invisible buffer */ |
| @@ -5351,10 +5302,11 @@ init_buffer (int initialized) | |||
| 5351 | } | 5302 | } |
| 5352 | #else /* not USE_MMAP_FOR_BUFFERS */ | 5303 | #else /* not USE_MMAP_FOR_BUFFERS */ |
| 5353 | /* Avoid compiler warnings. */ | 5304 | /* Avoid compiler warnings. */ |
| 5354 | initialized = initialized; | 5305 | (void) initialized; |
| 5355 | #endif /* USE_MMAP_FOR_BUFFERS */ | 5306 | #endif /* USE_MMAP_FOR_BUFFERS */ |
| 5356 | 5307 | ||
| 5357 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); | 5308 | AUTO_STRING (scratch, "*scratch*"); |
| 5309 | Fset_buffer (Fget_buffer_create (scratch)); | ||
| 5358 | if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) | 5310 | if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) |
| 5359 | Fset_buffer_multibyte (Qnil); | 5311 | Fset_buffer_multibyte (Qnil); |
| 5360 | 5312 | ||
| @@ -5391,9 +5343,12 @@ init_buffer (int initialized) | |||
| 5391 | However, it is not necessary to turn / into /:/. | 5343 | However, it is not necessary to turn / into /:/. |
| 5392 | So avoid doing that. */ | 5344 | So avoid doing that. */ |
| 5393 | && strcmp ("/", SSDATA (BVAR (current_buffer, directory)))) | 5345 | && strcmp ("/", SSDATA (BVAR (current_buffer, directory)))) |
| 5394 | bset_directory | 5346 | { |
| 5395 | (current_buffer, | 5347 | AUTO_STRING (slash_colon, "/:"); |
| 5396 | concat2 (build_string ("/:"), BVAR (current_buffer, directory))); | 5348 | bset_directory (current_buffer, |
| 5349 | concat2 (slash_colon, | ||
| 5350 | BVAR (current_buffer, directory))); | ||
| 5351 | } | ||
| 5397 | 5352 | ||
| 5398 | temp = get_minibuffer (0); | 5353 | temp = get_minibuffer (0); |
| 5399 | bset_directory (XBUFFER (temp), BVAR (current_buffer, directory)); | 5354 | bset_directory (XBUFFER (temp), BVAR (current_buffer, directory)); |
| @@ -5448,14 +5403,10 @@ syms_of_buffer (void) | |||
| 5448 | last_overlay_modification_hooks | 5403 | last_overlay_modification_hooks |
| 5449 | = Fmake_vector (make_number (10), Qnil); | 5404 | = Fmake_vector (make_number (10), Qnil); |
| 5450 | 5405 | ||
| 5451 | staticpro (&Qfundamental_mode); | ||
| 5452 | staticpro (&Qmode_class); | ||
| 5453 | staticpro (&QSFundamental); | 5406 | staticpro (&QSFundamental); |
| 5454 | staticpro (&Vbuffer_alist); | 5407 | staticpro (&Vbuffer_alist); |
| 5455 | staticpro (&Qprotected_field); | ||
| 5456 | staticpro (&Qpermanent_local); | ||
| 5457 | staticpro (&Qkill_buffer_hook); | ||
| 5458 | 5408 | ||
| 5409 | DEFSYM (Qchoice, "choice"); | ||
| 5459 | DEFSYM (Qleft, "left"); | 5410 | DEFSYM (Qleft, "left"); |
| 5460 | DEFSYM (Qright, "right"); | 5411 | DEFSYM (Qright, "right"); |
| 5461 | DEFSYM (Qrange, "range"); | 5412 | DEFSYM (Qrange, "range"); |
| @@ -5983,13 +5934,13 @@ in a window. To make the change take effect, call `set-window-buffer'. */); | |||
| 5983 | 5934 | ||
| 5984 | DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), | 5935 | DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), |
| 5985 | Qintegerp, | 5936 | Qintegerp, |
| 5986 | doc: /* Width of this buffer's scroll bars in pixels. | 5937 | doc: /* Width of this buffer's vertical scroll bars in pixels. |
| 5987 | A value of nil means to use the scroll bar width from the window's frame. */); | 5938 | A value of nil means to use the scroll bar width from the window's frame. */); |
| 5988 | 5939 | ||
| 5989 | DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height), | 5940 | DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height), |
| 5990 | Qintegerp, | 5941 | Qintegerp, |
| 5991 | doc: /* Height of this buffer's scroll bars in pixels. | 5942 | doc: /* Height of this buffer's horizontal scroll bars in pixels. |
| 5992 | A value of nil means to use the scroll bar heiht from the window's frame. */); | 5943 | A value of nil means to use the scroll bar height from the window's frame. */); |
| 5993 | 5944 | ||
| 5994 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), | 5945 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), |
| 5995 | Qvertical_scroll_bar, | 5946 | Qvertical_scroll_bar, |
| @@ -6008,7 +5959,7 @@ The value takes effect whenever you tell a window to display this buffer; | |||
| 6008 | for instance, with `set-window-buffer' or when `display-buffer' displays it. | 5959 | for instance, with `set-window-buffer' or when `display-buffer' displays it. |
| 6009 | 5960 | ||
| 6010 | A value of `bottom' means put the horizontal scroll bar at the bottom of | 5961 | A value of `bottom' means put the horizontal scroll bar at the bottom of |
| 6011 | the window; a value of nil means don't show any horizonal scroll bars. | 5962 | the window; a value of nil means don't show any horizontal scroll bars. |
| 6012 | A value of t (the default) means do whatever the window's frame | 5963 | A value of t (the default) means do whatever the window's frame |
| 6013 | specifies. */); | 5964 | specifies. */); |
| 6014 | 5965 | ||