Skip to content

Commit

Permalink
remove which-func from mode-line, show when asked instead
Browse files Browse the repository at this point in the history
  • Loading branch information
JJPandari committed Sep 7, 2021
1 parent 1b571a5 commit 28a84ed
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ site-lisp/package/
/.DS_Store
/places
/games
/eaf
1 change: 1 addition & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
(require 'init-edit-server)
(require 'init-browser)
(require 'init-player)
(require 'init-time)
(require 'init-misc)

;; Extra packages which don't require any configuration
Expand Down
11 changes: 11 additions & 0 deletions modes/init-editing-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -601,5 +601,16 @@ If use-indirect-buffer is not nil, use `indirect-buffer' to hold the widen conte
(jester/with-leader
"SPC" 'jester/just-do-what-i-mean)

;;----------------------------------------------------------------------------
;; show which function
;;----------------------------------------------------------------------------
(defun jester/show-which-function ()
"Show which function in minibuffer."
(interactive)
(message (which-function)))

(jester/with-leader
"f w" 'jester/show-which-function)


(provide 'init-editing-utils)
8 changes: 0 additions & 8 deletions modes/init-mode-line.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,9 @@
(`interrupted ".")
(`suspicious '(propertize "?" 'face 'warning))))))

(defvar jester/which-function-mode-line-off-modes '(web-mode scss-mode css-mode))

(defvar jester/number-unicode-char-list
'("" "" "" "" "" "" "" "" "" "" ""))

(add-hook 'prog-mode-hook (lambda () (which-function-mode 1)))

(setq-default mode-line-format
(list

Expand Down Expand Up @@ -90,10 +86,6 @@
" %1"
jester/flycheck-mode-line

" %1"
'(:eval (when (and (featurep 'which-func) (not (member major-mode jester/which-function-mode-line-off-modes)))
which-func-format))

"%1"
;; git info
'(:eval (when vc-mode
Expand Down
6 changes: 6 additions & 0 deletions modes/init-time.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(setq zoneinfo-style-world-list '(("Asia/Shanghai" "Shanghai")
("America/Los_Angeles" "Seattle, San Francisco")
("Europe/Paris" "Paris, Waldorf")
("Asia/Calcutta" "Bangalore")))

(provide 'init-time)
3 changes: 2 additions & 1 deletion modes/init-windows.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
'Man-mode
'woman-mode
'process-menu-mode
'snippet-mode)
'snippet-mode
'display-time-world-mode)
"cars for shackle rule, representing conditions using same-window rule")

(defvar jester-shackle-same-window-rule
Expand Down

0 comments on commit 28a84ed

Please sign in to comment.