diff options
| author | Paul Eggert | 2017-11-08 19:24:06 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-11-08 19:24:06 -0800 |
| commit | 00995c88dde4f8078a843b48faef16668a126d9c (patch) | |
| tree | eff0ed91f09522946ac7aaeae5ad1d2cfc93e7f7 | |
| parent | fae6cdc8ab0c9becd37afd9c31da56fecfad947b (diff) | |
| parent | 9e59de9449b53c3ecd85b624c11360ba9cafee75 (diff) | |
| download | emacs-00995c88dde4f8078a843b48faef16668a126d9c.tar.gz emacs-00995c88dde4f8078a843b48faef16668a126d9c.zip | |
Merge from origin/emacs-26
9e59de9449 Use GCALIGNED properly for GCC
b9d7c90260 In f90.el, set fill-paragraph-function to a useful value
# Conflicts:
# src/lisp.h
| -rw-r--r-- | lib-src/make-docfile.c | 2 | ||||
| -rw-r--r-- | lisp/progmodes/f90.el | 18 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/lisp.h | 14 | ||||
| -rw-r--r-- | src/thread.c | 2 |
5 files changed, 30 insertions, 10 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 0ea3f7b6b6a..ff84df94a69 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -668,7 +668,7 @@ close_emacs_globals (ptrdiff_t num_symbols) | |||
| 668 | "extern\n" | 668 | "extern\n" |
| 669 | "#endif\n" | 669 | "#endif\n" |
| 670 | "struct {\n" | 670 | "struct {\n" |
| 671 | " struct Lisp_Symbol GCALIGNED s;\n" | 671 | " struct GCALIGNED Lisp_Symbol s;\n" |
| 672 | "} lispsym[%td];\n"), | 672 | "} lispsym[%td];\n"), |
| 673 | num_symbols); | 673 | num_symbols); |
| 674 | } | 674 | } |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 72156288eba..0cd665ca24b 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -133,7 +133,7 @@ | |||
| 133 | ;; f90-indent-region (can be called by calling indent-region) | 133 | ;; f90-indent-region (can be called by calling indent-region) |
| 134 | ;; f90-indent-subprogram | 134 | ;; f90-indent-subprogram |
| 135 | ;; f90-break-line f90-join-lines | 135 | ;; f90-break-line f90-join-lines |
| 136 | ;; f90-fill-region | 136 | ;; f90-fill-region f90-fill-paragraph |
| 137 | ;; f90-insert-end | 137 | ;; f90-insert-end |
| 138 | ;; f90-upcase-keywords f90-upcase-region-keywords | 138 | ;; f90-upcase-keywords f90-upcase-region-keywords |
| 139 | ;; f90-downcase-keywords f90-downcase-region-keywords | 139 | ;; f90-downcase-keywords f90-downcase-region-keywords |
| @@ -784,6 +784,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") | |||
| 784 | ["Indent Region" f90-indent-region :active mark-active] | 784 | ["Indent Region" f90-indent-region :active mark-active] |
| 785 | ["Fill Region" f90-fill-region :active mark-active | 785 | ["Fill Region" f90-fill-region :active mark-active |
| 786 | :help "Fill long lines in the region"] | 786 | :help "Fill long lines in the region"] |
| 787 | ["Fill Statement/Comment" fill-paragraph :active t] | ||
| 787 | "--" | 788 | "--" |
| 788 | ["Break Line at Point" f90-break-line :active t | 789 | ["Break Line at Point" f90-break-line :active t |
| 789 | :help "Break the current line at point"] | 790 | :help "Break the current line at point"] |
| @@ -1185,6 +1186,7 @@ with no args, if that value is non-nil." | |||
| 1185 | (set (make-local-variable 'abbrev-all-caps) t) | 1186 | (set (make-local-variable 'abbrev-all-caps) t) |
| 1186 | (set (make-local-variable 'normal-auto-fill-function) 'f90-do-auto-fill) | 1187 | (set (make-local-variable 'normal-auto-fill-function) 'f90-do-auto-fill) |
| 1187 | (setq indent-tabs-mode nil) ; auto buffer local | 1188 | (setq indent-tabs-mode nil) ; auto buffer local |
| 1189 | (set (make-local-variable 'fill-paragraph-function) 'f90-fill-paragraph) | ||
| 1188 | (set (make-local-variable 'font-lock-defaults) | 1190 | (set (make-local-variable 'font-lock-defaults) |
| 1189 | '((f90-font-lock-keywords f90-font-lock-keywords-1 | 1191 | '((f90-font-lock-keywords f90-font-lock-keywords-1 |
| 1190 | f90-font-lock-keywords-2 | 1192 | f90-font-lock-keywords-2 |
| @@ -2158,6 +2160,20 @@ Like `join-line', but handles F90 syntax." | |||
| 2158 | (if (featurep 'xemacs) | 2160 | (if (featurep 'xemacs) |
| 2159 | (zmacs-deactivate-region) | 2161 | (zmacs-deactivate-region) |
| 2160 | (deactivate-mark)))) | 2162 | (deactivate-mark)))) |
| 2163 | |||
| 2164 | (defun f90-fill-paragraph (&optional justify) | ||
| 2165 | "In a comment, fill it as a paragraph, else fill the current statement. | ||
| 2166 | For use as the value of `fill-paragraph-function'. | ||
| 2167 | Passes optional argument JUSTIFY to `fill-comment-paragraph'. | ||
| 2168 | Always returns non-nil (to prevent `fill-paragraph' being called)." | ||
| 2169 | (interactive "*P") | ||
| 2170 | (or (fill-comment-paragraph justify) | ||
| 2171 | (save-excursion | ||
| 2172 | (f90-next-statement) | ||
| 2173 | (let ((end (if (bobp) (point) (1- (point))))) | ||
| 2174 | (f90-previous-statement) | ||
| 2175 | (f90-fill-region (point) end))) | ||
| 2176 | t)) | ||
| 2161 | 2177 | ||
| 2162 | (defconst f90-end-block-optional-name | 2178 | (defconst f90-end-block-optional-name |
| 2163 | '("program" "module" "subroutine" "function" "type") | 2179 | '("program" "module" "subroutine" "function" "type") |
diff --git a/src/buffer.c b/src/buffer.c index 15735a298ad..edeed55e8be 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 buffer GCALIGNED buffer_defaults; | 64 | struct GCALIGNED 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 buffer GCALIGNED buffer_local_symbols; | 87 | struct GCALIGNED 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. */ |
diff --git a/src/lisp.h b/src/lisp.h index 1ce32f33420..e3262ad40f3 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -277,10 +277,14 @@ DEFINE_GDB_SYMBOL_END (VALMASK) | |||
| 277 | error !; | 277 | error !; |
| 278 | #endif | 278 | #endif |
| 279 | 279 | ||
| 280 | /* Declare an object to have an address that is a multiple of | 280 | /* Use GCALIGNED immediately after the 'struct' keyword to require the |
| 281 | GCALIGNMENT. This is a no-op if the object's natural alignment is | 281 | struct to have an address that is a multiple of GCALIGNMENT. This |
| 282 | already a multiple of GCALIGNMENT. alignas is not suitable here, | 282 | is a no-op if the struct's natural alignment is already a multiple |
| 283 | as it fails if the object's natural alignment exceeds GCALIGNMENT. */ | 283 | of GCALIGNMENT. GCALIGNED's implementation uses the 'aligned' |
| 284 | attribute instead of 'alignas (GCALIGNMENT)', as the latter would | ||
| 285 | fail if an object's natural alignment exceeds GCALIGNMENT. The | ||
| 286 | implementation hopes that natural alignment suffices on platforms | ||
| 287 | lacking 'aligned'. */ | ||
| 284 | #ifdef HAVE_STRUCT_ATTRIBUTE_ALIGNED | 288 | #ifdef HAVE_STRUCT_ATTRIBUTE_ALIGNED |
| 285 | # define GCALIGNED __attribute__ ((aligned (GCALIGNMENT))) | 289 | # define GCALIGNED __attribute__ ((aligned (GCALIGNMENT))) |
| 286 | #else | 290 | #else |
| @@ -2941,7 +2945,7 @@ CHECK_NUMBER_CDR (Lisp_Object x) | |||
| 2941 | /* This version of DEFUN declares a function prototype with the right | 2945 | /* This version of DEFUN declares a function prototype with the right |
| 2942 | arguments, so we can catch errors with maxargs at compile-time. */ | 2946 | arguments, so we can catch errors with maxargs at compile-time. */ |
| 2943 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ | 2947 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ |
| 2944 | static struct Lisp_Subr GCALIGNED sname = \ | 2948 | static struct GCALIGNED Lisp_Subr sname = \ |
| 2945 | { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ | 2949 | { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ |
| 2946 | { .a ## maxargs = fnname }, \ | 2950 | { .a ## maxargs = fnname }, \ |
| 2947 | minargs, maxargs, lname, intspec, 0}; \ | 2951 | minargs, maxargs, lname, intspec, 0}; \ |
diff --git a/src/thread.c b/src/thread.c index 03f5b31855e..7335833cf94 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -26,7 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include "coding.h" | 26 | #include "coding.h" |
| 27 | #include "syssignal.h" | 27 | #include "syssignal.h" |
| 28 | 28 | ||
| 29 | static struct thread_state GCALIGNED main_thread; | 29 | static struct GCALIGNED thread_state main_thread; |
| 30 | 30 | ||
| 31 | struct thread_state *current_thread = &main_thread; | 31 | struct thread_state *current_thread = &main_thread; |
| 32 | 32 | ||