diff options
| author | Simen Heggestøyl | 2020-05-17 13:54:32 +0200 |
|---|---|---|
| committer | Simen Heggestøyl | 2020-05-26 17:41:24 +0200 |
| commit | 70824683fd996a78d417e2d12b9f6bf162c364d6 (patch) | |
| tree | 8a228373febe81ae217a92459172dac08a7cf7c9 | |
| parent | c6e80fdb65ca425d4826f48c348cfd9e30f8eb9b (diff) | |
| download | emacs-70824683fd996a78d417e2d12b9f6bf162c364d6.tar.gz emacs-70824683fd996a78d417e2d12b9f6bf162c364d6.zip | |
Rename 'project-switch-menu' to 'project-switch-commands'
* lisp/progmodes/project.el (project-switch-commands): Rename from
'project-switch-menu'.
(project--keymap-prompt, project-switch-project): Update after the
renaming.
| -rw-r--r-- | lisp/progmodes/project.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 7f765e628eb..956a4b8a345 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -792,7 +792,7 @@ It's also possible to enter an arbitrary directory." | |||
| 792 | ;;; Project switching | 792 | ;;; Project switching |
| 793 | 793 | ||
| 794 | ;;;###autoload | 794 | ;;;###autoload |
| 795 | (defvar project-switch-menu | 795 | (defvar project-switch-commands |
| 796 | '(("f" "Find file" project-find-file) | 796 | '(("f" "Find file" project-find-file) |
| 797 | ("s" "Find regexp" project-find-regexp) | 797 | ("s" "Find regexp" project-find-regexp) |
| 798 | ("d" "Dired" project-dired) | 798 | ("d" "Dired" project-dired) |
| @@ -812,26 +812,26 @@ the choice in the dispatch menu.") | |||
| 812 | (format "[%s] %s" | 812 | (format "[%s] %s" |
| 813 | (propertize (key-description `(,key)) 'face 'bold) | 813 | (propertize (key-description `(,key)) 'face 'bold) |
| 814 | label)) | 814 | label)) |
| 815 | project-switch-menu | 815 | project-switch-commands |
| 816 | " ")) | 816 | " ")) |
| 817 | 817 | ||
| 818 | ;;;###autoload | 818 | ;;;###autoload |
| 819 | (defun project-switch-project () | 819 | (defun project-switch-project () |
| 820 | "\"Switch\" to another project by running a chosen command. | 820 | "\"Switch\" to another project by running a chosen command. |
| 821 | The available commands are picked from `project-switch-menu' and | 821 | The available commands are picked from `project-switch-commands' |
| 822 | presented in a dispatch menu." | 822 | and presented in a dispatch menu." |
| 823 | (interactive) | 823 | (interactive) |
| 824 | (let ((dir (project-prompt-project-dir)) | 824 | (let ((dir (project-prompt-project-dir)) |
| 825 | (choice nil)) | 825 | (choice nil)) |
| 826 | (while (not (and choice | 826 | (while (not (and choice |
| 827 | (or (equal choice (kbd "C-g")) | 827 | (or (equal choice (kbd "C-g")) |
| 828 | (assoc choice project-switch-menu)))) | 828 | (assoc choice project-switch-commands)))) |
| 829 | (setq choice (read-key-sequence (project--keymap-prompt)))) | 829 | (setq choice (read-key-sequence (project--keymap-prompt)))) |
| 830 | (if (equal choice (kbd "C-g")) | 830 | (if (equal choice (kbd "C-g")) |
| 831 | (message "Quit") | 831 | (message "Quit") |
| 832 | (let ((default-directory dir)) | 832 | (let ((default-directory dir)) |
| 833 | (call-interactively | 833 | (call-interactively |
| 834 | (nth 2 (assoc choice project-switch-menu))))))) | 834 | (nth 2 (assoc choice project-switch-commands))))))) |
| 835 | 835 | ||
| 836 | (provide 'project) | 836 | (provide 'project) |
| 837 | ;;; project.el ends here | 837 | ;;; project.el ends here |