1. 09 Dec, 2018 1 commit
  2. 08 Dec, 2018 12 commits
  3. 07 Dec, 2018 3 commits
    • Alan Mackenzie's avatar
      CC Mode: Compensate for backward-sexp ignoring trailing commas after {...} · f6a69957
      Alan Mackenzie authored
      This fixes bug #32808.
      
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): New variable
      comma-delimited, set when we're about to scan backward over a comma.  Do not
      reckon a brace block as bounding a statement when it is followed or preceded
      by a comma (except when argument comma-delim is non-nil).
      (c-guess-basic-syntax, CASE 9C): Call c-beginning-of-statement-1 with argument
      comma-delim changed to non-nil.
      f6a69957
    • Michael Albinus's avatar
      Refactor some Tramp functions · 294b2c2b
      Michael Albinus authored
      * lisp/net/tramp-compat.el (tramp-compat-file-local-name): New defsubst.
      (tramp-compat-file-name-quoted-p, tramp-compat-file-name-quote)
      (tramp-compat-file-name-unquote):
      * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p)
      (tramp-handle-file-truename, tramp-get-remote-tmpdir):
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
      (tramp-adb-handle-rename-file, tramp-adb-handle-exec-path):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
      (tramp-sh-handle-exec-path, tramp-find-inline-encoding)
      (tramp-get-remote-touch): Use it.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Use `tramp-handle-expand-file-name'.
      (tramp-adb-handle-expand-file-name): Move to tramp.el.
      (tramp-adb-handle-file-writable-p): Adapt docstring.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      Use `tramp-handle-file-local-copy', `tramp-handle-file-writable-p'
      and `tramp-handle-write-region'.
      (tramp-gvfs-handle-file-local-copy)
      (tramp-gvfs-handle-file-writable-p)
      (tramp-gvfs-handle-write-region): Move to tramp.el.
      
      * lisp/net/tramp-rclone.el: Dont't require `tramp-adb' and
      `tramp-gvfs' anymore.
      (tramp-rclone-file-name-handler-alist):
      Use `tramp-handle-expand-file-name', `tramp-handle-file-local-copy',
      `tramp-handle-file-writable-p' and `tramp-handle-write-region'.
      (tramp-rclone-handle-directory-files): Simplify.
      
      * lisp/net/tramp.el (tramp-methods): Extend docstring.
      (tramp-parse-netrc): Require `netrc'.
      (tramp-handle-expand-file-name, tramp-handle-file-local-copy)
      (tramp-handle-file-writable-p, tramp-handle-write-region): New defuns.
      294b2c2b
    • Eli Zaretskii's avatar
      Fix the value of default-directory upon startup on MS-Windows · e4a8f6eb
      Eli Zaretskii authored
      * src/w32.c (w32_get_current_directory): New function.
      (GetCachedVolumeInformation, init_environment): Use it.
      (w32_init_current_directory): New function.
      * src/w32.h (w32_init_current_directory): Add prototype.
      * src/emacs.c (main) [WINDOWSNT]: Use w32_init_current_directory
      to get the accurate value of cwd.  This is needed to record
      the correct directory in emacs_wd, which is now initialized
      way earlier in the startup process, when init_environment was
      not yet called.  For details, see the problems reported in
      http://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00068.html.
      Reported by Angelo Graziosi <angelo.g0@libero.it>.
      e4a8f6eb
  4. 06 Dec, 2018 11 commits
    • Juri Linkov's avatar
      bcd74314
    • Paul Eggert's avatar
      0e8e5da1
    • Paul Eggert's avatar
      Mention unsetting XDG_RUNTIME_DIR in doc. · b1d7f19a
      Paul Eggert authored
      b1d7f19a
    • Paul Eggert's avatar
      emacsclient: avoid background chatter · 46b81008
      Paul Eggert authored
      * lib-src/emacsclient.c (process_grouping): New function.
      (act_on_signals, main): Use it.
      (main): Omit "Waiting for Emacs..." and later "\n" messages
      if in background, since that messes up the screen.
      46b81008
    • Paul Eggert's avatar
      Fix emacsclient hang when backgrounded · 2f985977
      Paul Eggert authored
      Problem reported by Kaushal Modi in:
      https://lists.gnu.org/r/emacs-devel/2018-12/msg00083.html
      The tcdrain call replaced an fdatasync call which had no
      effect on the tty, so removing it entirely shouldn’t cause
      problems.  The fdatasync call replaced an fsync call which
      also had no effect on the tty, and the fsync call seems to be
      badly-merged revenant of emacsclient’s old (circa 2004) way of
      communicating to and from Emacs via FILE * streams, where
      fsync was apparently needed when talking to sockets.
      * lib-src/emacsclient.c [!DOS_NT]: Don’t include termios.h.
      (flush_stdout): Remove.  All callers removed.
      (main): Do not drain the tty after "Waiting for Emacs..."
      message.  There should be no need to drain, and draining it
      might send us a SIGTTOU.  Do not fflush stdout just before
      exiting, as exiting does that for us.
      2f985977
    • Paul Eggert's avatar
      struct image_type layout is private to image.c · c5b6f167
      Paul Eggert authored
      * src/dispextern.h (struct image_type): Move from here ...
      * src/image.c (struct image_type): ... to here.
      c5b6f167
    • Eli Zaretskii's avatar
      Avoid an error on exit in a build without threads · 6fa44f96
      Eli Zaretskii authored
      * lisp/simple.el (list-processes--refresh): Avoid signaling an
      error in a build --without-threads.  (Bug#33629)
      6fa44f96
    • Michael Albinus's avatar
      Add missing handler to tramp-rclone.el, improve robustness · 7d33c775
      Michael Albinus authored
      * lisp/net/tramp-rclone.el (tramp-adb): Require.
      (tramp-rclone-file-name-handler-alist):
      Use `tramp-adb-handle-expand-file-name'.
      (tramp-rclone-flush-directory-cache): New defun, derived from
      `tramp-rclone-flush-mount'.
      (tramp-rclone-do-copy-or-rename-file)
      (tramp-rclone-handle-delete-directory)
      (tramp-rclone-handle-delete-file)
      (tramp-rclone-handle-make-directory): Use it.
      (tramp-rclone-handle-directory-files)
      (tramp-rclone-local-file-name):
      Use `tramp-compat-file-name-quoted-p', 	`tramp-compat-file-name-quote'
      and ´tramp-compat-file-name-unquote'.
      (tramp-rclone-handle-file-executable-p)
      (tramp-rclone-handle-file-readable-p): Cache result.
      (tramp-rclone-handle-file-name-all-completions)
      (tramp-rclone-mounted-p, tramp-rclone-remote-file-name)
      (tramp-rclone-maybe-open-connection): Rewrite.
      
      * test/lisp/net/tramp-tests.el (tramp--test-rclone-p): New defun.
      (tramp-test05-expand-file-name-relative)
      (tramp--test-special-characters): Use it.
      7d33c775
    • Michael Albinus's avatar
      Rework Tramp wrt string-match-p, looking-at-p, save-match-data · 66b49fc1
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-find-method, tramp-find-user)
      (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name)
      (tramp-completion-make-tramp-file-name, tramp-debug-message)
      (tramp-message, tramp-progress-reporter-update)
      (tramp-set-completion-function)
      (tramp-rfn-eshadow-update-overlay)
      (tramp-find-file-name-coding-system-alist)
      (tramp-file-name-for-operation)
      (tramp-use-absolute-autoload-file-names)
      (tramp-get-completion-methods, tramp-get-completion-user-host)
      (tramp-handle-directory-files)
      (tramp-handle-file-name-case-insensitive-p)
      (tramp-handle-file-name-completion, tramp-handle-file-truename)
      (tramp-handle-insert-directory, tramp-handle-load)
      (tramp-handle-shell-command, tramp-action-yesno)
      (tramp-action-yn, tramp-process-actions)
      (tramp-mode-string-to-int, tramp-get-local-locale)
      (tramp-local-host-p):
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info)
      (tramp-adb-handle-directory-files-and-attributes)
      (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output)
      (tramp-adb-handle-file-name-all-completions)
      (tramp-adb-handle-shell-command)
      (tramp-adb-handle-start-file-process):
      * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name):
      * lisp/net/tramp-cache.el (tramp-get-hash-table)
      (tramp-flush-directory-properties, tramp-flush-file-function):
      * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
      (tramp-append-tramp-buffers):
      * lisp/net/tramp-compat.el (tramp-compat-process-running-p):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
      (tramp-gvfs-get-file-attributes)
      (tramp-gvfs-handle-file-attributes)
      (tramp-gvfs-monitor-process-filter)
      (tramp-gvfs-handler-mounted-unmounted)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
      (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection):
      * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
      (tramp-do-file-attributes-with-stat)
      (tramp-sh-handle-file-selinux-context)
      (tramp-sh-handle-directory-files-and-attributes)
      (tramp-do-directory-files-and-attributes-with-stat)
      (tramp-sh-handle-file-name-all-completions)
      (tramp-sh-handle-dired-compress-file)
      (tramp-sh-handle-insert-directory)
      (tramp-sh-handle-expand-file-name)
      (tramp-sh-handle-start-file-process)
      (tramp-sh-handle-process-file, tramp-sh-handle-write-region)
      (tramp-sh-handle-file-notify-add-watch)
      (tramp-sh-gio-monitor-process-filter)
      (tramp-sh-gvfs-monitor-dir-process-filter)
      (tramp-sh-inotifywait-process-filter)
      (tramp-sh-handle-file-system-info, tramp-maybe-send-script)
      (tramp-find-executable, tramp-open-shell, tramp-find-shell)
      (tramp-open-connection-setup-interactive-shell)
      (tramp-find-inline-encoding, tramp-call-local-coding-command)
      (tramp-compute-multi-hops, tramp-maybe-open-connection)
      (tramp-convert-file-attributes)
      (tramp-make-copy-program-file-name, tramp-get-remote-locale)
      (tramp-get-test-nt-command, tramp-get-remote-stat)
      (tramp-get-inline-coding):
      * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files)
      (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes)
      (tramp-smb-handle-file-name-all-completions)
      (tramp-smb-handle-file-system-info)
      (tramp-smb-handle-file-writable-p)
      (tramp-smb-handle-insert-directory)
      (tramp-smb-handle-make-directory)
      (tramp-smb-handle-make-directory-internal)
      (tramp-smb-handle-start-file-process, tramp-smb-get-localname)
      (tramp-smb-read-file-entry): Use `string-match-p' and
      `looking-at-p'.  Remove superfluous `save-match-data'.  Apply
      `eval-when-compile' on constant concat data.
      
      * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p):
      Use `string-prefix-p'.
      (tramp-compat-file-name-unquote): Do not use match data.
      66b49fc1
    • Michael Albinus's avatar
      Make stronger tests for Tramp multi hops · 8f3fde38
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-dissect-file-name, tramp-dissect-hop-name):
      Check, that method is capable of multi hops.
      
      * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
      (tramp-test02-file-name-dissect-simplified)
      (tramp-test02-file-name-dissect-separate): Suppress check for multihops.
      (tramp-test03-file-name-method-rules): Check for error if multi
      hops cannot be applied.
      8f3fde38
    • João Távora's avatar
      Keep Flymake compatible with Emacs 26.1 builds --without-x · 8e8b8115
      João Távora authored
      * lisp/progmodes/flymake.el (flymake-double-exclamation-mark):
      Don't define if 'define-fringe-bitmap isn't fbound.
      (Version): Bump to 1.0.2
      8e8b8115
  5. 05 Dec, 2018 1 commit
  6. 04 Dec, 2018 9 commits
  7. 03 Dec, 2018 3 commits
    • Paul Eggert's avatar
      emacsclient: fix typo on recent socket-leak change · bc6ffabe
      Paul Eggert authored
      This ports to POSIXish platforms like macOS that lack SOCK_CLOEXEC.
      Fix suggested by Eli Zaretskii in:
      https://lists.gnu.org/r/emacs-devel/2018-12/msg00055.html
      * lib-src/emacsclient.c (set_local_socket):
      Don’t use SOCK_CLOEXEC; that’s cloexec_socket’s job.
      bc6ffabe
    • Eli Zaretskii's avatar
      Fix WINDOWSNT/DOS_NT build · 2ff9dca1
      Eli Zaretskii authored
      Recent changes in sysdep.c and emacsclient unnecessarily
      removed useful code from DOS_NT builds.  This changeset
      reinstates that code.
      * nt/inc/ms-w32.h (tcdrain): Redirect to _commit.
      (fdatasync): No need to redirect anymore.
      
      * lib-src/emacsclient.c (flush_stdout): Don't avoid calling
      tcdrain on DOS_NT platforms.
      
      * src/sysdep.c (reset_sys_modes): Don't ifdef away the call to
      tcdrain on DOS_NT platforms.
      2ff9dca1
    • Paul Eggert's avatar
      emacsclient: don’t leak socket to child processes · 5c412405
      Paul Eggert authored
      * lib-src/emacsclient.c [!WINDOWSNT]: Include fcntl.h.
      (cloexec_socket): New function.
      (set_tcp_socket, set_local_socket): Use it.
      5c412405