branch: elpa/crux commit 2b71eea8c3828700d1f3161e45a65bcf0d15b001 Author: Brad Howes <bradho...@mac.com> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
Add crux-find-current-directory-dir-locals-file --- CHANGELOG.md | 2 ++ README.md | 1 + crux.el | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8ac308a53..da7fa50522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +* [#101](https://github.com/bbatsov/crux/pull/101): Add `crux-find-current-directory-dir-locals-file`. + ### Bugs fixed * Create nonexistent parent directories in `crux-copy-file-preserve-attributes`. diff --git a/README.md b/README.md index 7429a9ca98..787dc35fb1 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ Command | Suggested Keybinding(s) `crux-find-user-init-file` | <kbd>C-c I</kbd> | Open user's init file. `crux-find-user-custom-file` | <kbd>C-c ,</kbd> | Open user's custom file. `crux-find-shell-init-file` | <kbd>C-c S</kbd> | Open shell's init file. +`crux-find-current-directory-dir-locals-file` | <kbd>C-c D</kbd> | Open current directory's `.dir-locals.el` file. `crux-top-join-line` | <kbd>Super-j</kbd> or <kbd>C-^</kbd> | Join lines `crux-kill-whole-line` | <kbd>Super-k</kbd> | Kill whole line `crux-kill-line-backwards` | <kbd>C-Backspace</kbd> | Kill line backwards diff --git a/crux.el b/crux.el index 63e4e58ab1..b7e0b0b6d9 100644 --- a/crux.el +++ b/crux.el @@ -731,6 +731,13 @@ Doesn't mess with special buffers." (find-file-other-window (completing-read "Choose shell init file: " candidates)) (find-file-other-window (car candidates))))) +;;;###autoload +(defun crux-find-current-directory-dir-locals-file () + "Edit the current directory's `.dir-locals.el' file in another window." + (interactive) + (find-file-other-window + (expand-file-name ".dir-locals.el"))) + ;;;###autoload (defun crux-upcase-region (beg end) "`upcase-region' when `transient-mark-mode' is on and region is active."