Remove duplicated save-restriction

This commit is contained in:
Nathaniel Nicandro 2018-12-09 23:07:47 -06:00
parent 689d18ce54
commit ffd680fa95
No known key found for this signature in database
GPG key ID: C34814B309DD06B8

View file

@ -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