mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Remove duplicated save-restriction
This commit is contained in:
parent
689d18ce54
commit
ffd680fa95
1 changed files with 7 additions and 9 deletions
|
@ -170,15 +170,13 @@ in a buffer whose contents contain TRACEBACK."
|
||||||
Search up to LIMIT from `point' for any text to add the keymap
|
Search up to LIMIT from `point' for any text to add the keymap
|
||||||
to."
|
to."
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(save-restriction
|
(narrow-to-region (point) limit)
|
||||||
(narrow-to-region (point) limit)
|
(let ((pos (point)) end)
|
||||||
(goto-char (point-min))
|
(while (setq pos (next-single-property-change pos 'jupyter-error-loc))
|
||||||
(let ((pos (point)) end)
|
(when (get-text-property pos 'jupyter-error-loc)
|
||||||
(while (setq pos (next-single-property-change pos 'jupyter-error-loc))
|
(setq end (next-single-property-change pos 'jupyter-error-loc))
|
||||||
(when (get-text-property pos 'jupyter-error-loc)
|
(put-text-property pos end 'keymap jupyter-org-goto-error-map)
|
||||||
(setq end (next-single-property-change pos 'jupyter-error-loc))
|
(setq pos end))))))
|
||||||
(put-text-property pos end 'keymap jupyter-org-goto-error-map)
|
|
||||||
(setq pos end)))))))
|
|
||||||
|
|
||||||
;;;;; Handler
|
;;;;; Handler
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue