1. 09 Jul, 2021 3 commits
    • Michael Albinus's avatar
      Further cleanup for file locks · 9ce6541a
      Michael Albinus authored
      * doc/misc/tramp.texi (Top, Configuration): Adapt node name for
      file locks.
      (Auto-save File Lock and Backup): Rename node name and section
      title.  Add file-lock to @cindex.  Describe file locks.
      
      * lisp/dired.el (dired-trivial-filenames): Add lock files.
      (dired-font-lock-keywords): Move files suffixed with
      `completion-ignored-extensions' up.  Add lock files to these checks.
      
      * lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
      Use `when-let'
      (tramp-lock-file-info-regexp): Rename from
      `tramp-lock-file-contents-regexp'.
      (tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
      (tramp-handle-lock-file): Set file modes of lockname.
      
      * src/buffer.c (Frestore_buffer_modified_p):
      * src/fileio.c (write_region):
      * src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
      
      * src/filelock.c (Qmake_lock_file_name): Declare symbol.
      (make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
      work for interned symbols.
      (lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
      Remove MSDOS version of the function.
      (Flock_file): Check create_lockfiles.
      (Flock_buffer): Call Flock_file.
      
      * src/lisp.h (lock_file): Remove.
      
      * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
      (shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
      
      * test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
      globally.
      (tramp-test39-lock-file): Check also for `set-visited-file-name'.
      9ce6541a
    • Eli Zaretskii's avatar
      Partially restore the lost C-mouse-2 drop-down menu · 2870a72d
      Eli Zaretskii authored
      This allows to pop up the Text Properties menu once facemenu is
      loaded.  It still doesn't allow C-mouse-2 clicks without manually
      loading facemenu; FIXME.
      * lisp/facemenu.el (global-map) <C-down-mouse-2>: Add back the
      removed binding.  (Bug#49466)
      2870a72d
    • Stefan Monnier's avatar
      * lisp/outline.el (outline-mode-cycle-map): Don't bind `tab`. · c73bc89e
      Stefan Monnier authored
      Since it would take precedence over bindings for TAB in higher
      precedence maps.
      c73bc89e
  2. 08 Jul, 2021 12 commits
    • Michael Albinus's avatar
    • Michael Albinus's avatar
      Code cleanup wrt file locks · a6a92e3a
      Michael Albinus authored
      * lisp/files.el (make-lock-file-name): Fix docstring.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      Add `make-lock-file-name'.
      
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `make-lock-file-name'.
      (tramp-handle-unlock-file): Call `userlock--handle-unlock-error'
      in case of error.
      
      * src/buffer.c (Frestore_buffer_modified_p):
      * src/editfns.c (Freplace_buffer_contents):
      * src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file.
      
      * src/filelock.c (unlock_file): Rename from unlock_file_body.
      Remove the other declarations of unlock_file.  Move file name
      handler check to ...
      (Funlock_file): ... here.  Adapt argument numbers.  Call
      unlock_file wrapped by internal_condition_case.
      (Flock_file): Adapt argument numbers.
      (unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file.
      
      * src/lisp.h (unlock_file): Remove.
      a6a92e3a
    • Juri Linkov's avatar
      Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247) · 274e71f5
      Juri Linkov authored
      * lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map'
      add the property 'follow-link' with the value 'ignore'.
      274e71f5
    • pillule's avatar
      Use display-buffer with re-builder (bug#49069) · 57354bc6
      pillule authored
      * lisp/emacs-lisp/re-builder.el (re-builder): Uses 'display-buffer'
      with 'display-buffer-in-direction' to display the reb-buffer.  This
      allow user-customizations and using it on not splitables windows.
      Add a dedication to its window so killing this buffer quit the window.
      57354bc6
    • Lars Ingebrigtsen's avatar
      Make desktop-kill more robust · 8ab0c04c
      Lars Ingebrigtsen authored
      * lisp/desktop.el (desktop-kill): Allow exiting Emacs even if we
      can't delete the desktop file (bug#20762).
      8ab0c04c
    • Lars Ingebrigtsen's avatar
      Allow inhibiting inserting #! in sh-set-shell · cd1313b7
      Lars Ingebrigtsen authored
      * lisp/progmodes/sh-script.el (sh-set-shell): Allow inhibiting
      inserting the #! line (bug#20959).
      cd1313b7
    • Lars Ingebrigtsen's avatar
      Avoid making backup files in ediff when `make-backup-files' is nil · 57eb0db9
      Lars Ingebrigtsen authored
      * lisp/vc/ediff-util.el (ediff-arrange-autosave-in-merge-jobs):
      Don't make backup files when `make-backup-files' is nil (bug#21599).
      57eb0db9
    • Lars Ingebrigtsen's avatar
      Make ido-mode override ffap-file-finder · de5ae0c9
      Lars Ingebrigtsen authored
      * lisp/ffap.el: Autoload so that we can override in ido (bug#21980).
      
      * lisp/ido.el (ido-everywhere): Override ffap-file-finder.
      de5ae0c9
    • Michael Albinus's avatar
      Some further adaptions wrt Tramp file name locks · 6d580b00
      Michael Albinus authored
      * lisp/files.el (files--transform-file-name): Rename from
      `auto-save--transform-file-name'.  Wrap with `save-match-data'.
      (make-auto-save-file-name): Use it.
      (make-lock-file-name): Use it.  Call file name handler.
      
      * lisp/net/tramp.el (tramp-handle-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      Suppress file lock for temporary file.
      
      * lisp/net/tramp-compat.el (tramp-compat-make-lock-file-name):
      New defalias.
      
      * lisp/net/tramp.el (tramp-get-lock-file)
      (tramp-handle-lock-file, tramp-handle-unlock-file): Use it.
      (tramp-make-lock-name): Remove.
      
      * test/lisp/filenotify-tests.el (file-notify-test03-events-remote):
      Tag it :unstable temporarily.
      6d580b00
    • Lars Ingebrigtsen's avatar
      Exclude term-mode from hi-lock global modes · 7d6d1402
      Lars Ingebrigtsen authored
      * lisp/hi-lock.el (hi-lock-exclude-modes): Exclude term-mode so
      that `C-x' works in terminal buffers (bug#22620).
      7d6d1402
    • Lars Ingebrigtsen's avatar
      Fix font-lock of Makefile variables at the start of lines · a45906ac
      Lars Ingebrigtsen authored
      * lisp/progmodes/make-mode.el (makefile-var-use-regex): Match
      variables at the beginning of lines correctly (bug#23266).  Change
      suggested by Anders Lindgren <andlind@gmail.com>.
      a45906ac
    • N. Jackson's avatar
      Mention what happens with timers when the computer is asleep · 1ffc97a2
      N. Jackson authored
      * doc/lispref/os.texi (Timers): Explain what happens if the
      computer is a asleep when the timer is scheduled (bug#23929).
      1ffc97a2
  3. 07 Jul, 2021 7 commits
    • Lars Ingebrigtsen's avatar
      Make make_lock_file_name more robust · e762864b
      Lars Ingebrigtsen authored
      * src/filelock.c (make_lock_file_name): Protect against the
      make-lock-file-name not being defined.
      (lock_file, unlock_file_body, Ffile_locked_p): Return early if not
      defined.
      e762864b
    • Eli Zaretskii's avatar
      * lisp/faces.el: Fix a typo. · fadfc55d
      Eli Zaretskii authored
      fadfc55d
    • Eli Zaretskii's avatar
      Fix last change · 9034dd05
      Eli Zaretskii authored
      * lisp/faces.el (tty-menu-enabled-face, tty-menu-disabled-face):
      Define for monochrome displays.
      9034dd05
    • Lars Ingebrigtsen's avatar
      Add new user option lock-file-name-transforms · 2ad34bce
      Lars Ingebrigtsen authored
      * doc/emacs/files.texi (Interlocking): Mention
      lock-file-name-transforms.
      
      * doc/lispref/files.texi (File Locks): Document
      lock-file-name-transforms.
      
      * doc/misc/efaq.texi (Not writing files to the current directory):
      Mention all the three variables needed to not having Emacs writing
      files to the current directory in one place.
      
      * lisp/files.el (lock-file-name-transforms): New user option (bug#49261).
      (make-auto-save-file-name): Factor out the main logic...
      (auto-save--transform-file-name): ... to this new function.
      (make-lock-file-name): New function that also calls the
      factored-out function.
      
      * src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name.
      (make_lock_file_name): New utility function that calls out to Lisp
      to heed `lock-file-name-transforms'.
      (lock_file): Use it.  Also remove likely buggy call to
      dostounix_filename.
      (unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.
      2ad34bce
    • Eli Zaretskii's avatar
      Fix tty menus on monochrome displays · 6d594848
      Eli Zaretskii authored
      * lisp/faces.el (tty-menu-selected-face): Make sure the selected
      menu item stands out even without colors.
      6d594848
    • Michael Albinus's avatar
      Implement file locks for remote files (Bug#49261) · d35868be
      Michael Albinus authored
      * doc/lispref/files.texi (Magic File Names): Add file-locked-p,
      lock-file and unlock-file.
      
      * etc/NEWS: Tramp supports file locks now.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-adb-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      
      * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
      (tramp-crypt-handle-unlock-file): New defun.
      
      * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
      (tramp-fuse-unmount): New defun.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sh-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-smb-handle-copy-directory): Use `sleep-for'.
      (tramp-smb-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sshfs-handle-write-region): Handle LOCKNAME.
      (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sudoedit-maybe-open-connection):
      Set "lock-pid" connection property.
      
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
      (tramp-handle-file-locked-p, tramp-handle-lock-file)
      (tramp-handle-unlock-file): New defuns.
      (tramp-lock-file-contents-regexp): New regexp.
      (tramp-handle-write-region): Handle LOCKNAME.
      
      * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
      Call handler if exists.
      (Flock_file, Funlock_file): New defuns.
      (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
      (Slock_file, Sunlock_file): Declare subroutines.
      
      * test/lisp/net/tramp-archive-tests.el
      (tramp-archive-test40-make-nearby-temp-file)
      (tramp-archive-test43-file-system-info): Rename.
      
      * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
      (tramp--test-fuse-p): New defun.
      (tramp-test14-delete-directory): Use it.
      (tramp-test39-lock-file): New test.
      (tramp-test40-make-nearby-temp-file)
      (tramp-test41-special-characters)
      (tramp-test41-special-characters-with-stat)
      (tramp-test41-special-characters-with-perl)
      (tramp-test41-special-characters-with-ls, tramp-test42-utf8)
      (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
      (tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
      (tramp-test44-asynchronous-requests, tramp-test45-auto-load)
      (tramp-test45-delay-load, tramp-test45-recursive-load)
      (tramp-test45-remote-load-path, tramp-test46-unload): Rename.
      (tramp--test-special-characters, tramp--test-utf8)
      (tramp--test-asynchronous-requests-timeout): Modify docstring.
      d35868be
    • Glenn Morris's avatar
      Merge from origin/emacs-27 · 90c89e8b
      Glenn Morris authored
      fbf1cb2b (origin/emacs-27) Fix overfull hbox in Emacs manual
      fda60094 Minor copyedits of Emacs manual
      
      # Conflicts:
      #	doc/emacs/display.texi
      90c89e8b
  4. 06 Jul, 2021 13 commits
  5. 05 Jul, 2021 5 commits