@@ -119,8 +119,8 @@ listed in `.gitignore' in a Git repository) will not be added to the context."
119
119
; ; A region is selected.
120
120
((use-region-p )
121
121
(gptel-context--add-region (current-buffer )
122
- (region-beginning )
123
- (region-end ))
122
+ (region-beginning )
123
+ (region-end ))
124
124
(deactivate-mark )
125
125
(message " Current region added as context. " ))
126
126
; ; If in dired
@@ -145,9 +145,9 @@ listed in `.gitignore' in a Git repository) will not be added to the context."
145
145
(not (gptel-context--skip-p (buffer-file-name ))))
146
146
(gptel-context--ensure-project-files default-directory)
147
147
(funcall (if (and arg (< (prefix-numeric-value arg) 0 ))
148
- #'gptel-context-remove
149
- #'gptel-context-add-file )
150
- (buffer-file-name )))
148
+ #'gptel-context-remove
149
+ #'gptel-context-add-file )
150
+ (buffer-file-name )))
151
151
; ; No region is selected, and ARG is positive.
152
152
((and arg (> (prefix-numeric-value arg) 0 ))
153
153
(let* ((buffer-name (read-buffer " Choose buffer to add as context: "
@@ -162,17 +162,17 @@ listed in `.gitignore' in a Git repository) will not be added to the context."
162
162
(when (or (null confirm)
163
163
(y-or-n-p " Remove all contexts from this buffer? " ))
164
164
(let ((removed-contexts 0 ))
165
- (cl-loop for cov in
165
+ (cl-loop for cov in
166
166
(gptel-context--in-region (current-buffer ) (point-min ) (point-max ))
167
167
do (progn
168
168
(cl-incf removed-contexts)
169
169
(gptel-context-remove cov)))
170
- (message (format " %d context%s removed from current buffer."
170
+ (message (format " %d context%s removed from current buffer."
171
171
removed-contexts
172
172
(if (= removed-contexts 1 ) " " " s" ))))))
173
173
(t ; Default behavior
174
174
(if (gptel-context--at-point)
175
- (progn
175
+ (progn
176
176
(gptel-context-remove (car (gptel-context--in-region (current-buffer )
177
177
(max (point-min ) (1- (point )))
178
178
(point ))))
@@ -251,7 +251,7 @@ be readable as text."
251
251
(gptel-context--skip-p path)))
252
252
(gptel-context--message-skipped path))
253
253
((gptel--file-binary-p path)
254
- (gptel-context--add-binary-file path))
254
+ (gptel-context--add-binary-file path))
255
255
(t (gptel-context--add-text-file path))))
256
256
257
257
;;;### autoload (autoload 'gptel-add-file "gptel-context" "Add files to gptel's context." t)
@@ -318,8 +318,8 @@ If CONTEXT is a directory, recursively removes all files in it."
318
318
(message " File \" %s \" removed from context. " context)))
319
319
((region-active-p )
320
320
(when-let* ((contexts (gptel-context--in-region (current-buffer )
321
- (region-beginning )
322
- (region-end ))))
321
+ (region-beginning )
322
+ (region-end ))))
323
323
(cl-loop for ctx in contexts do (delete-overlay ctx))))
324
324
(t
325
325
(when-let* ((ctx (gptel-context--at-point)))
0 commit comments