Add warning if eldoc-box-hover-at-point-mode is enable too early
Early means eldoc-box-hover-mode is not enabled
This commit is contained in:
		
							parent
							
								
									b9a235b61c
								
							
						
					
					
						commit
						0649423e70
					
				
							
								
								
									
										24
									
								
								eldoc-box.el
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								eldoc-box.el
									
									
									
									
									
								
							| @ -145,17 +145,19 @@ It will be passes with two arguments: WIDTH and HEIGHT of the childframe.") | ||||
|   "A convenient minor mode to display doc at point. | ||||
| You can use C-g to hide the doc." | ||||
|   :lighter "" | ||||
|   (if eldoc-box-hover-at-point-mode | ||||
|       (progn (setq-local | ||||
|               eldoc-box-position-function | ||||
|               #'eldoc-box--default-at-point-position-function) | ||||
|              (setq-local eldoc-box-clear-with-C-g t) | ||||
|              (remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t) | ||||
|              (add-hook 'pre-command-hook #'eldoc-box-quit-frame t t)) | ||||
|     (add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t) | ||||
|     (remove-hook 'pre-command-hook #'eldoc-box-quit-frame t) | ||||
|     (kill-local-variable 'eldoc-box-position-function) | ||||
|     (kill-local-variable 'eldoc-box-clear-with-C-g))) | ||||
|   (if eldoc-box-hover-mode | ||||
|       (if eldoc-box-hover-at-point-mode | ||||
|           (progn (setq-local | ||||
|                   eldoc-box-position-function | ||||
|                   #'eldoc-box--default-at-point-position-function) | ||||
|                  (setq-local eldoc-box-clear-with-C-g t) | ||||
|                  (remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t) | ||||
|                  (add-hook 'pre-command-hook #'eldoc-box-quit-frame t t)) | ||||
|         (add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t) | ||||
|         (remove-hook 'pre-command-hook #'eldoc-box-quit-frame t) | ||||
|         (kill-local-variable 'eldoc-box-position-function) | ||||
|         (kill-local-variable 'eldoc-box-clear-with-C-g)) | ||||
|     (message "Enable eldoc-box-hover-mode first"))) | ||||
| 
 | ||||
| ;;;; Backstage | ||||
| ;;;;; Variable | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Yuan Fu
						Yuan Fu