diff options
| author | K. Handa | 2015-01-07 22:51:41 +0900 |
|---|---|---|
| committer | K. Handa | 2015-01-07 22:51:41 +0900 |
| commit | 88bc8332eb14bcc4780fd3fe3dd4de2205c31dbf (patch) | |
| tree | 18da116400703b67738bdbbd38cc4abf4c1e929f /src/buffer.c | |
| parent | 3f79d3131629f73da16ec121d2a0056f11b70e65 (diff) | |
| parent | 95295df44cc2b6e0e2442aeff96b0fe2ceac405c (diff) | |
| download | emacs-88bc8332eb14bcc4780fd3fe3dd4de2205c31dbf.tar.gz emacs-88bc8332eb14bcc4780fd3fe3dd4de2205c31dbf.zip | |
Merge branch master of git.sv.gnu.org:/srv/git/emacs.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/src/buffer.c b/src/buffer.c index 9a5c4a8824f..e0843723232 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Buffer manipulation primitives for GNU Emacs. | 1 | /* Buffer manipulation primitives for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2014 Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2015 Free Software Foundation, |
| 4 | Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -114,41 +115,8 @@ static void reset_buffer_local_variables (struct buffer *, bool); | |||
| 114 | due to user rplac'ing this alist or its elements. */ | 115 | due to user rplac'ing this alist or its elements. */ |
| 115 | Lisp_Object Vbuffer_alist; | 116 | Lisp_Object Vbuffer_alist; |
| 116 | 117 | ||
| 117 | static Lisp_Object Qkill_buffer_query_functions; | ||
| 118 | |||
| 119 | /* Hook run before changing a major mode. */ | ||
| 120 | static Lisp_Object Qchange_major_mode_hook; | ||
| 121 | |||
| 122 | Lisp_Object Qfirst_change_hook; | ||
| 123 | Lisp_Object Qbefore_change_functions; | ||
| 124 | Lisp_Object Qafter_change_functions; | ||
| 125 | |||
| 126 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | ||
| 127 | static Lisp_Object Qpermanent_local_hook; | ||
| 128 | |||
| 129 | static Lisp_Object Qprotected_field; | ||
| 130 | |||
| 131 | static Lisp_Object QSFundamental; /* A string "Fundamental". */ | 118 | static Lisp_Object QSFundamental; /* A string "Fundamental". */ |
| 132 | 119 | ||
| 133 | static Lisp_Object Qkill_buffer_hook; | ||
| 134 | static Lisp_Object Qbuffer_list_update_hook; | ||
| 135 | |||
| 136 | static Lisp_Object Qget_file_buffer; | ||
| 137 | |||
| 138 | static Lisp_Object Qoverlayp; | ||
| 139 | |||
| 140 | Lisp_Object Qpriority, Qbefore_string, Qafter_string; | ||
| 141 | |||
| 142 | static Lisp_Object Qevaporate; | ||
| 143 | |||
| 144 | Lisp_Object Qmodification_hooks; | ||
| 145 | Lisp_Object Qinsert_in_front_hooks; | ||
| 146 | Lisp_Object Qinsert_behind_hooks; | ||
| 147 | |||
| 148 | Lisp_Object Qchoice, Qrange, Qleft, Qright; | ||
| 149 | Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar; | ||
| 150 | static Lisp_Object Qoverwrite_mode, Qfraction; | ||
| 151 | |||
| 152 | static void alloc_buffer_text (struct buffer *, ptrdiff_t); | 120 | static void alloc_buffer_text (struct buffer *, ptrdiff_t); |
| 153 | static void free_buffer_text (struct buffer *b); | 121 | static void free_buffer_text (struct buffer *b); |
| 154 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); | 122 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); |
| @@ -1715,7 +1683,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1715 | return unbind_to (count, Qt); | 1683 | return unbind_to (count, Qt); |
| 1716 | 1684 | ||
| 1717 | /* Then run the hooks. */ | 1685 | /* Then run the hooks. */ |
| 1718 | Frun_hooks (1, &Qkill_buffer_hook); | 1686 | run_hook (Qkill_buffer_hook); |
| 1719 | unbind_to (count, Qnil); | 1687 | unbind_to (count, Qnil); |
| 1720 | } | 1688 | } |
| 1721 | 1689 | ||
| @@ -2739,7 +2707,7 @@ The first thing this function does is run | |||
| 2739 | the normal hook `change-major-mode-hook'. */) | 2707 | the normal hook `change-major-mode-hook'. */) |
| 2740 | (void) | 2708 | (void) |
| 2741 | { | 2709 | { |
| 2742 | Frun_hooks (1, &Qchange_major_mode_hook); | 2710 | run_hook (Qchange_major_mode_hook); |
| 2743 | 2711 | ||
| 2744 | /* Make sure none of the bindings in local_var_alist | 2712 | /* Make sure none of the bindings in local_var_alist |
| 2745 | remain swapped in, in their symbols. */ | 2713 | remain swapped in, in their symbols. */ |
| @@ -5062,9 +5030,9 @@ init_buffer_once (void) | |||
| 5062 | /* Make sure all markable slots in buffer_defaults | 5030 | /* Make sure all markable slots in buffer_defaults |
| 5063 | are initialized reasonably, so mark_buffer won't choke. */ | 5031 | are initialized reasonably, so mark_buffer won't choke. */ |
| 5064 | reset_buffer (&buffer_defaults); | 5032 | reset_buffer (&buffer_defaults); |
| 5065 | eassert (EQ (BVAR (&buffer_defaults, name), make_number (0))); | 5033 | eassert (NILP (BVAR (&buffer_defaults, name))); |
| 5066 | reset_buffer_local_variables (&buffer_defaults, 1); | 5034 | reset_buffer_local_variables (&buffer_defaults, 1); |
| 5067 | eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0))); | 5035 | eassert (NILP (BVAR (&buffer_local_symbols, name))); |
| 5068 | reset_buffer (&buffer_local_symbols); | 5036 | reset_buffer (&buffer_local_symbols); |
| 5069 | reset_buffer_local_variables (&buffer_local_symbols, 1); | 5037 | reset_buffer_local_variables (&buffer_local_symbols, 1); |
| 5070 | /* Prevent GC from getting confused. */ | 5038 | /* Prevent GC from getting confused. */ |