1. 13 Nov, 2017 2 commits
    • Paul Eggert's avatar
      Use alignas to fix GCALIGN-related bugs · b1573a97
      Paul Eggert authored
      Use alignas and unions to specify alignments of objects needing
      addresses that are at least a multiple of GCALIGNMENT.  Using
      these standard C facilities should be safer than relying on ad hoc
      and poorly-understood features like GCC’s __attribute__
      ((aligned (N))), the root cause for recent porting bugs like
      Bug#29040.  The alignas macro was standardized by C11 and Gnulib
      supports alignas for pre-C11 platforms.  I have tested this on Sun
      Studio 12 sparc (2007) and GCC 4.4.7 x86-64 (2012) as well as on
      more recent platforms like GCC 7.2.1 (2017) on Fedora 26 (both
      x86-64 and x86).
      * lib-src/make-docfile.c (close_emacs_globals): lispsym is now
      just an array of struct Lisp_Symbol, since struct Lisp_Symbol is
      now properly aligned.  All uses changed.
      * src/alloc.c (NEXT_FREE_LISP_STRING): Just use the new u.next
      member; this is simpler and safer than casting a pointer that
      might not be aligned properly.
      (aligned_Lisp_Symbol): Remove.  No longer needed, now that struct
      Lisp_Symbol is aligned properly.  All uses replaced with struct
      Lisp_Symbol.
      * src/lisp.h (GCALIGNED): Remove, as it does not work as expected:
      it can cause the natural alignment to be ignored.  All uses
      replaced by unions with a ‘char alignas (GCALIGNMENT)’ member as
      described below.
      (struct Lisp_Symbol, struct Lisp_Cons, struct Lisp_String):
      Change definition from ‘struct TAG { MEMBERS };’ to
      ‘struct TAG { union { struct { MEMBERS } s; char alignas
      (GCALIGNMENT) gcaligned; } u; };’.  This guarantees ‘struct TAG’
      to have an alignment that at least max (GCALIGNMENT, N) where N is
      its old alignment.  All uses like ‘PTR->MEMBER’ changed to
      ‘PTR->u.s.MEMBER’; these uses were supposed to be mostly private
      anyway.  Verify that the resulting ‘struct TAG’ is properly
      aligned for Emacs.
      (union vectorlike_header): New member ‘gcaligned’ to guarantee
      that this type, and its containing types like ‘struct Lisp_Subr’,
      ‘struct buffer’ and ‘struct thread_state’, are all properly
      aligned for Emacs.
      (struct Lisp_String): New union member ‘next’, for the benefit
      of NEXT_FREE_LISP_STRING.
      (union Aligned_Cons, union Aligned_String): Remove.  All uses
      replaced by struct Lisp_Cons and struct Lisp_String, since they
      are now properly aligned.
      (USE_STACK_CONS, USE_STACK_STRING): Simplify now that we can
      assume struct Lisp_Cons and struct Lisp_String are properly
      aligned.
      b1573a97
    • Paul Eggert's avatar
      Change vectorlike from struct to union · 5d68dc9a
      Paul Eggert authored
      * src/lisp.h (vectorlike_headed): Change from struct to union.
      All uses changed.  Since it has only one member, this does not
      change semantics.  This is designed to simplify future changes
      needed to fix bugs like Bug#29040.  All uses changed.
      5d68dc9a
  2. 12 Nov, 2017 8 commits
    • Tom Tromey's avatar
      Don't enable cursor-sensor-mode in mhtml-mode · 6aa0a26b
      Tom Tromey authored
      * lisp/textmodes/mhtml-mode.el (mhtml--last-submode): Update doc
      string.
      (mhtml-mode): Don't call cursor-sensor-mode.
      6aa0a26b
    • Eli Zaretskii's avatar
    • João Távora's avatar
      Unbreak interactive run of a flymake test (bug#29267) · fe85ce1e
      João Távora authored
      See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19657#20 for the
      technique used here.
      
      * test/lisp/progmodes/flymake-tests.el (ruby-backend):
      Let-bind abbreviated-home-dir.
      fe85ce1e
    • Michael Albinus's avatar
      Fix Bug#29225 · 48ad0039
      Michael Albinus authored
      * src/fileio.c (Fset_file_acl): Report error only when
      acl_errno_valid returns true.  (Bug#29225)
      
      * test/lisp/net/tramp-tests.el (tramp-test24-file-acl)
      (tramp-test25-file-selinux): New tests.
      (tramp-test26-file-name-completion, tramp-test27-load)
      (tramp-test28-process-file, tramp-test29-start-file-process)
      (tramp-test30-interrupt-process, tramp-test31-shell-command)
      (tramp-test32-environment-variables)
      (tramp-test32-environment-variables-and-port-numbers)
      (tramp-test33-explicit-shell-file-name)
      (tramp-test34-vc-registered)
      (tramp-test35-make-auto-save-file-name)
      (tramp-test36-find-backup-file-name)
      (tramp-test37-make-nearby-temp-file)
      (tramp-test38-special-characters)
      (tramp-test38-special-characters-with-stat)
      (tramp-test38-special-characters-with-perl)
      (tramp-test38-special-characters-with-ls, tramp-test39-utf8)
      (tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
      (tramp-test39-utf8-with-ls, tramp-test40-file-system-info)
      (tramp-test41-asynchronous-requests)
      (tramp-test42-recursive-load, tramp-test43-remote-load-path)
      (tramp-test44-delay-load, tramp-test45-unload): Rename.
      48ad0039
    • Alan Mackenzie's avatar
      CC Mode: Fix defun-open being recognized as brace-list-open at EOB. · 42daf83f
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-looking-at-statement-block): Add handling
      for an open brace at EOB and nested braces inside an unclosed brace block.
      42daf83f
    • Paul Eggert's avatar
      Merge from Gnulib · 7775c472
      Paul Eggert authored
      This incorporates:
      2017-11-11 faccessat: port to macOS (Bug#29231)
      2017-11-05 fstatat: pacify GCC on unusual platform
      * build-aux/config.guess, build-aux/config.sub:
      * doc/misc/texinfo.tex, lib/faccessat.c, lib/fstatat.c:
      * lib/unistd.in.h, m4/faccessat.m4, m4/unistd_h.m4:
      Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      7775c472
    • Paul Eggert's avatar
      Pacify GCC when configured --with-x-toolkit=no · e470d164
      Paul Eggert authored
      Without these changes, Emacs does not build on Fedora 26 x86-64
      when configured --with-x-toolkit=no --enable-gcc-warnings.
      * oldXMenu/Activate.c (XMenuActivate): Add FALLTHROUGH.
      * src/xterm.c (x_dispatch_event): Define only if
      USE_X_TOOLKIT || USE_MOTIF || USE_GTK.
      e470d164
    • Eli Zaretskii's avatar
  3. 11 Nov, 2017 7 commits
  4. 10 Nov, 2017 6 commits
    • Paul Eggert's avatar
      Fix off-by-1 bug in --enable-checking=stringbytes · 05aa6d4a
      Paul Eggert authored
      Evidently nobody builds Emacs with --enable-checking=all,
      which is no surprise as it is so slow as to be unusable nowadays.
      Perhaps we should remove the slowest checks, or move them into
      another category, or speed them up, or something.
      * src/alloc.c (SDATA_SIZE) [GC_CHECK_STRING_BYTES]: Fix off-by-one
      error in size calculation, which caused a failure when
      --enable-checking=stringbytes was used.  I introduced this bug in
      2016-09-08T01:08:45!eggert@cs.ucla.edu "Port flexible array
      members to GCC + valgrind".
      05aa6d4a
    • Alan Mackenzie's avatar
      Correct the indentation of C99's compound literals. · 096f638d
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-looking-at-statement-block): Amend so that
      if there is only syntactic whitespace in a brace block, it is regarded as a
      statement block.  Also, if there is no semicolon or comma delimiter, treat as
      a statement block when there is a keyword.
      (c-guess-basic-syntax): CASE 9 test: Regard a brace as starting a brace block
      when its contents indicate a brace block.
      096f638d
    • Eli Zaretskii's avatar
      Improve the doc string of 'dired-isearch-filter-filenames' · c52a2aa8
      Eli Zaretskii authored
      * lisp/dired-aux.el (dired-isearch-filter-filenames): Doc fix.
      (Bug#29215)
      c52a2aa8
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Fix display of line numbers in GTK builds · f3e69a80
      Eli Zaretskii authored
      * src/xdisp.c (should_produce_line_number) [USE_GTK]: Make sure
      tip_frame is indeed a tooltip frame, before disabling line numbers
      on it.  (Bug#27647)
      
      * src/dispextern.h (tip_frame): Add commentary describing the
      kludgey usage of this variable in GTK builds.
      f3e69a80
    • João Távora's avatar
      Fix previous change to flymake-diag-region (bug#29174) · e6f1fd40
      João Távora authored
      * lisp/progmodes/flymake.el (flymake-diag-region):
      Pass line and col to commit.
      e6f1fd40
  5. 09 Nov, 2017 10 commits
    • João Távora's avatar
      flymake-diag-region really returns nil if region is invalid (bug#29174) · 89382780
      João Távora authored
      Reported by Lele Gaifax <lele@metapensiero.it>.
      
      * lisp/progmodes/flymake.el (flymake-diag-region): Really
      return nil if the region is invalid.
      89382780
    • João Távora's avatar
      Flymake correctly highlights whole last line if eob (bug#29201) · 535688a4
      João Távora authored
      If a line/column pair indicates an end-of-buffer position, flymake
      should behave like the case where the last line of the buffer is
      referenced without a column indication.  This behavior is currently
      to highlight the whole last line.
      
      * lisp/progmodes/flymake.el (flymake-diag-region): Correct
      conditions of fallback to the fallback-eol local function.
      535688a4
    • João Távora's avatar
      Protect Flymake checkdoc backend against checkdoc errors (bug#29176) · 72e62d3f
      João Távora authored
      The function checkdoc-current-buffer may error if there are unbalanced
      parens, for example, but this shouldn't disable the
      elisp-flymake-checkdoc backend.
      
      * lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc): Use
      ignore-errors.
      72e62d3f
    • João Távora's avatar
      Sort entries of the Flymake diagnostics buffer (bug#29175) · b28de574
      João Távora authored
      Reported by Lele Gaifax <lele@metapensiero.it>.
      
      * lisp/progmodes/flymake.el
      (flymake--diagnostics-buffer-entries): Sort results of flymake-diagnostics.
      b28de574
    • Alan Mackenzie's avatar
      Correctly indent C++14 brace lists which are a second argument to a function. · fc56bea1
      Alan Mackenzie authored
      In particular, don't indent contained brace lists in "staircase" fashion.
      This fixes bug #28623.
      
      * lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): When
      testing for being enclosed in parens, recognise also a brace directly
      following a comma, as well as a brace being the first thing inside the paren.
      Enhance the return value, by indicating when we're directly inside an open
      paren.
      (c-inside-bracelist-p): Add an extra argument ACCEPT-IN-PARAM which indicates
      whether we will accept a bracelist directly inside an open parenthesis.
      Simplify the manipulation of PAREN-STATE by dispensing with variable LIM and
      using c-pull-open-brace.  Enhance the return value, respecting the new argument.
      (c-guess-basic-syntax): Save a copy of the initial parse-state in the new
      variable STATE-CACHE.  Use this variable in place of C-STATE-CACHE throughout
      the function.  At CASE 7B, call c-inside-bracelist-p with extra argument nil.
      At CASE 9, call that function with extra argument t.
      fc56bea1
    • Eli Zaretskii's avatar
      Fix redisplay of overlay-arrows on GUI frames · 9dde8be9
      Eli Zaretskii authored
      * src/xdisp.c (try_window_reusing_current_matrix)
      (try_cursor_movement): Disallow these optimizations if the buffer
      has overlay arrow(s) shown on the fringe(s).  (Bug#29198)
      9dde8be9
    • João Távora's avatar
      Protect Flymake tests against older Ruby and Perl (bug#29187) · 0da08f2f
      João Távora authored
      * test/lisp/progmodes/flymake-tests.el (perl-backend): Search
      for the error from the bottom.
      (ruby-backend): Protect against situation of bug#29187
      0da08f2f
    • Paul Eggert's avatar
      Fix URL cookie expiration bug · 781f276c
      Paul Eggert authored
      Problem reported by Damien Cassou (Bug#29223).
      * lisp/url/url-cookie.el (url-cookie-expired-p):
      Fix typo in previous change, which caused unexpired cookies
      to be treated as expired and vice versa.
      781f276c
    • Paul Eggert's avatar
      Use GCALIGNED properly for GCC · 9e59de94
      Paul Eggert authored
      Apparently GCC requires that ‘__attribute__ ((aligned (8)))’ must
      immediately follow the ‘struct’ keyword when aligning a structure.
      The attribute silently does not work if it follows a tag after the
      ‘struct’ keyword.  Who knew?  Anyway, this patch is designed to
      fix a SIGSEGV problem reported by John Mastro (Bug#29183).
      * lib-src/make-docfile.c (close_emacs_globals):
      * src/buffer.c (buffer_defaults, buffer_local_symbols):
      * src/lisp.h (DEFUN):
      * src/thread.c (main_thread):
      Put 'GCALIGNED' immediately after 'struct'.
      9e59de94
    • Glenn Morris's avatar
      In f90.el, set fill-paragraph-function to a useful value · b9d7c902
      Glenn Morris authored
      * lisp/progmodes/f90.el (f90-mode-map) <menu>: Add fill-paragraph.
      (f90-mode): Set fill-paragraph-function.
      (f90-fill-paragraph): New command.
      b9d7c902
  6. 08 Nov, 2017 5 commits
  7. 07 Nov, 2017 2 commits