Skip to content

Commit

Permalink
[Compatibility] Disable context-menu-mode warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Miller committed Aug 30, 2023
1 parent 66d0eab commit 7a36a3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/elisp/treemacs-compatibility.el
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ width of the new window when the treemacs window is visible."
(when (fboundp 'context-menu-mode)
(defun treemacs--disable-context-menu-mode ()
(treemacs-run-in-all-derived-buffers
(setq-local context-menu-functions nil)))
(with-no-warnings
(setq-local context-menu-functions nil))))
(add-hook 'context-menu-mode-hook 'treemacs--disable-context-menu-mode))

(defun treemacs-load-all-the-icons-with-workaround-font (font)
Expand Down
3 changes: 2 additions & 1 deletion src/elisp/treemacs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ Will simply return `treemacs--eldoc-msg'."
(setq-local eldoc-documentation-function #'treemacs--eldoc-function)
(setq-local eldoc-message-commands treemacs--eldoc-obarray)
(setq-local imenu-create-index-function #'treemacs--create-imenu-index-function)
(setq-local context-menu-functions nil)
(when (boundp 'context-menu-functions)
(setq-local context-menu-functions nil))

;; integrate with bookmark.el
(setq-local bookmark-make-record-function #'treemacs--make-bookmark-record)
Expand Down

0 comments on commit 7a36a3c

Please sign in to comment.