mirror of
				https://github.com/larstvei/Focus.git
				synced 2025-11-04 02:00:11 +00:00 
			
		
		
		
	Fixed some flycheck warnings.
This commit is contained in:
		
							parent
							
								
									aa5ea31118
								
							
						
					
					
						commit
						0f2a9945e9
					
				
							
								
								
									
										17
									
								
								focus.el
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								focus.el
									
									
									
									
									
								
							@ -133,7 +133,7 @@ argument."
 | 
				
			|||||||
                   (make-list foregrounds foreground)))))
 | 
					                   (make-list foregrounds foreground)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-move-focus ()
 | 
					(defun focus-move-focus ()
 | 
				
			||||||
  "Moves the focused section according to `focus-bounds'.
 | 
					  "Move the focused section according to `focus-bounds'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If `focus-mode' is enabled, this command fires after each
 | 
					If `focus-mode' is enabled, this command fires after each
 | 
				
			||||||
command."
 | 
					command."
 | 
				
			||||||
@ -195,8 +195,7 @@ default is overwritten. This function simply helps set the
 | 
				
			|||||||
    (setq focus-current-thing (intern thing))))
 | 
					    (setq focus-current-thing (intern thing))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-pin ()
 | 
					(defun focus-pin ()
 | 
				
			||||||
  "Pin the focused section to its current location or the region,
 | 
					  "Pin the focused section to its current location or the region, if active."
 | 
				
			||||||
if active."
 | 
					 | 
				
			||||||
  (interactive)
 | 
					  (interactive)
 | 
				
			||||||
  (when (bound-and-true-p focus-mode)
 | 
					  (when (bound-and-true-p focus-mode)
 | 
				
			||||||
    (when (region-active-p)
 | 
					    (when (region-active-p)
 | 
				
			||||||
@ -210,7 +209,7 @@ if active."
 | 
				
			|||||||
    (add-hook 'post-command-hook 'focus-move-focus nil t)))
 | 
					    (add-hook 'post-command-hook 'focus-move-focus nil t)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-next-thing (&optional n)
 | 
					(defun focus-next-thing (&optional n)
 | 
				
			||||||
  "Moves the point to the middle of the Nth next thing."
 | 
					  "Move the point to the middle of the Nth next thing."
 | 
				
			||||||
  (interactive "p")
 | 
					  (interactive "p")
 | 
				
			||||||
  (let ((current-bounds (focus-bounds))
 | 
					  (let ((current-bounds (focus-bounds))
 | 
				
			||||||
        (thing (focus-get-thing)))
 | 
					        (thing (focus-get-thing)))
 | 
				
			||||||
@ -220,7 +219,7 @@ if active."
 | 
				
			|||||||
    (focus-goto-thing (focus-bounds))))
 | 
					    (focus-goto-thing (focus-bounds))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-prev-thing (&optional n)
 | 
					(defun focus-prev-thing (&optional n)
 | 
				
			||||||
  "Moves the point to the middle of the Nth previous thing."
 | 
					  "Move the point to the middle of the Nth previous thing."
 | 
				
			||||||
  (interactive "p")
 | 
					  (interactive "p")
 | 
				
			||||||
  (focus-next-thing (- n)))
 | 
					  (focus-next-thing (- n)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -250,8 +249,8 @@ This is added to the `pre-command-hook' when
 | 
				
			|||||||
(defun focus-read-only-init ()
 | 
					(defun focus-read-only-init ()
 | 
				
			||||||
  "Run when `focus-read-only-mode' is activated.
 | 
					  "Run when `focus-read-only-mode' is activated.
 | 
				
			||||||
Enables `read-only-mode', hides the cursor and adds
 | 
					Enables `read-only-mode', hides the cursor and adds
 | 
				
			||||||
`focus-read-only-cursor-blink' to `pre-command-hook'. Also
 | 
					`focus-read-only-cursor-blink' to `pre-command-hook'.
 | 
				
			||||||
`focus-read-only-terminate' is added to the `kill-buffer-hook'."
 | 
					Also `focus-read-only-terminate' is added to the `kill-buffer-hook'."
 | 
				
			||||||
  (read-only-mode 1)
 | 
					  (read-only-mode 1)
 | 
				
			||||||
  (setq cursor-type nil
 | 
					  (setq cursor-type nil
 | 
				
			||||||
        focus-buffer (current-buffer))
 | 
					        focus-buffer (current-buffer))
 | 
				
			||||||
@ -260,8 +259,8 @@ Enables `read-only-mode', hides the cursor and adds
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
(defun focus-read-only-terminate ()
 | 
					(defun focus-read-only-terminate ()
 | 
				
			||||||
  "Run when `focus-read-only-mode' is deactivated.
 | 
					  "Run when `focus-read-only-mode' is deactivated.
 | 
				
			||||||
Disables `read-only-mode' and shows the cursor again. It cleans
 | 
					Disables `read-only-mode' and shows the cursor again.
 | 
				
			||||||
up the `focus-read-only-blink-timer' and hooks."
 | 
					It cleans up the `focus-read-only-blink-timer' and hooks."
 | 
				
			||||||
  (read-only-mode -1)
 | 
					  (read-only-mode -1)
 | 
				
			||||||
  (setq cursor-type focus-cursor-type)
 | 
					  (setq cursor-type focus-cursor-type)
 | 
				
			||||||
  (when focus-read-only-blink-timer
 | 
					  (when focus-read-only-blink-timer
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user