mirror of
				https://github.com/larstvei/Focus.git
				synced 2025-11-04 02:00:11 +00:00 
			
		
		
		
	Split focus-bounds into two functions
This commit is contained in:
		
							parent
							
								
									284a1240ce
								
							
						
					
					
						commit
						58a91b29aa
					
				
							
								
								
									
										13
									
								
								focus.el
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								focus.el
									
									
									
									
									
								
							@ -88,12 +88,15 @@ Things that are defined include `symbol', `list', `sexp',
 | 
				
			|||||||
    (let ((v (funcall f (car lst))))
 | 
					    (let ((v (funcall f (car lst))))
 | 
				
			||||||
      (if v v (focus-any f (cdr lst))))))
 | 
					      (if v v (focus-any f (cdr lst))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-bounds ()
 | 
					(defun focus-get-thing ()
 | 
				
			||||||
  "Return the current bounds, based on `focus-mode-to-thing'."
 | 
					  "Return the current thing, based on `focus-mode-to-thing'."
 | 
				
			||||||
  (let* ((modes (mapcar 'car focus-mode-to-thing))
 | 
					  (let* ((modes (mapcar 'car focus-mode-to-thing))
 | 
				
			||||||
         (mode  (focus-any 'derived-mode-p modes))
 | 
					         (mode  (focus-any 'derived-mode-p modes)))
 | 
				
			||||||
         (thing (if mode (cdr (assoc mode focus-mode-to-thing)) 'sentence)))
 | 
					    (if mode (cdr (assoc mode focus-mode-to-thing)) 'sentence)))
 | 
				
			||||||
    (bounds-of-thing-at-point thing)))
 | 
					
 | 
				
			||||||
 | 
					(defun focus-bounds ()
 | 
				
			||||||
 | 
					  "Return the current bounds, based on `focus-get-thing'."
 | 
				
			||||||
 | 
					  (bounds-of-thing-at-point (focus-get-thing)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-average-colors (color &rest colors)
 | 
					(defun focus-average-colors (color &rest colors)
 | 
				
			||||||
  "Takes an average of the colors given by argument.
 | 
					  "Takes an average of the colors given by argument.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user