diff options
| author | Mattias EngdegÄrd | 2023-04-07 16:29:32 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-04-07 19:08:33 +0200 |
| commit | 7c0c2b1bb539424af1bb72bd9caefedd66cfd3da (patch) | |
| tree | d17e18d4bf8407c818985e29f22c5bb8b3d1717a /lisp/textmodes | |
| parent | 211618293d9fd620f9f8971090e049d98c05f546 (diff) | |
| download | emacs-7c0c2b1bb539424af1bb72bd9caefedd66cfd3da.tar.gz emacs-7c0c2b1bb539424af1bb72bd9caefedd66cfd3da.zip | |
Remove useless unwind-protect forms, or make them useful as intended
* lisp/imenu.el (imenu--generic-function):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/textmodes/table.el (table-recognize-region):
* test/lisp/dired-tests.el (dired-test-directory-files):
* test/lisp/hl-line-tests.el (hl-line-tests-sticky):
Fix unwind-protect bracketing mistakes that caused the unwind code to
be misplaced.
* lisp/strokes.el (strokes-read-stroke): Fix a bracketing mistake that
misplaced the unwind code, and another one that misplaced the
else-clause of an `if` form.
* test/lisp/gnus/mml-sec-tests.el (mml-secure-test-fixture): Fix a
bracketing mistake that misplaced the unwind code, and remove
superfluous condition-case.
* lisp/mwheel.el (mouse-wheel-global-text-scale):
* lisp/speedbar.el (speedbar-stealthy-updates)
(speedbar-fetch-dynamic-etags):
* lisp/emacs-lisp/edebug.el (edebug--recursive-edit):
* lisp/emacs-lisp/package.el (package--read-pkg-desc):
* lisp/cedet/semantic.el (semantic-refresh-tags-safe):
* lisp/emulation/viper-cmd.el (viper-escape-to-state):
* lisp/emulation/viper-cmd.el (viper-file-add-suffix):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/mail/feedmail.el (feedmail-send-it-immediately)
(feedmail-deduce-address-list):
* lisp/mail/mailclient.el (mailclient-send-it):
* lisp/mail/smtpmail.el (smtpmail-deduce-address-list):
* lisp/mh-e/mh-print.el (mh-ps-print-range):
* lisp/textmodes/reftex-index.el (reftex-index-this-phrase):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-run-tests-batch):
(ert-test-run-tests-batch-expensive):
Remove unwind-protect forms that are apparently useless, some since a
prior edit that removed their purpose, some since their first
appearance.
* test/lisp/subr-tests.el (subr-test--frames-2):
Insert dummy unwind form in backtrace test code.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/reftex-index.el | 27 | ||||
| -rw-r--r-- | lisp/textmodes/table.el | 4 |
2 files changed, 15 insertions, 16 deletions
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 778591a8069..c7a297d5dac 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el | |||
| @@ -1445,20 +1445,19 @@ match, the user will be asked to confirm the replacement." | |||
| 1445 | (as-words reftex-index-phrases-search-whole-words)) | 1445 | (as-words reftex-index-phrases-search-whole-words)) |
| 1446 | (unless macro-data | 1446 | (unless macro-data |
| 1447 | (error "No macro associated with key %c" char)) | 1447 | (error "No macro associated with key %c" char)) |
| 1448 | (unwind-protect | 1448 | (let ((overlay-arrow-string "=>") |
| 1449 | (let ((overlay-arrow-string "=>") | 1449 | (overlay-arrow-position |
| 1450 | (overlay-arrow-position | 1450 | reftex-index-phrases-marker) |
| 1451 | reftex-index-phrases-marker) | 1451 | (replace-count 0)) |
| 1452 | (replace-count 0)) | 1452 | ;; Show the overlay arrow |
| 1453 | ;; Show the overlay arrow | 1453 | (move-marker reftex-index-phrases-marker |
| 1454 | (move-marker reftex-index-phrases-marker | 1454 | (match-beginning 0) (current-buffer)) |
| 1455 | (match-beginning 0) (current-buffer)) | 1455 | ;; Start the query-replace |
| 1456 | ;; Start the query-replace | 1456 | (reftex-query-index-phrase-globally |
| 1457 | (reftex-query-index-phrase-globally | 1457 | files phrase macro-fmt |
| 1458 | files phrase macro-fmt | 1458 | index-key repeat as-words) |
| 1459 | index-key repeat as-words) | 1459 | (message "%s replaced" |
| 1460 | (message "%s replaced" | 1460 | (reftex-number replace-count "occurrence"))))) |
| 1461 | (reftex-number replace-count "occurrence")))))) | ||
| 1462 | (t (error "Cannot parse this line"))))) | 1461 | (t (error "Cannot parse this line"))))) |
| 1463 | 1462 | ||
| 1464 | (defun reftex-index-all-phrases () | 1463 | (defun reftex-index-all-phrases () |
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2271d83eff5..50c3f461bcc 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el | |||
| @@ -1935,8 +1935,8 @@ specific features." | |||
| 1935 | (if (and cell table-detect-cell-alignment) | 1935 | (if (and cell table-detect-cell-alignment) |
| 1936 | (table--detect-cell-alignment cell))) | 1936 | (table--detect-cell-alignment cell))) |
| 1937 | (unless (re-search-forward border end t) | 1937 | (unless (re-search-forward border end t) |
| 1938 | (goto-char end)))))))))) | 1938 | (goto-char end)))))) |
| 1939 | (restore-buffer-modified-p modified-flag))) | 1939 | (restore-buffer-modified-p modified-flag))))))) |
| 1940 | 1940 | ||
| 1941 | ;;;###autoload | 1941 | ;;;###autoload |
| 1942 | (defun table-unrecognize-region (beg end) | 1942 | (defun table-unrecognize-region (beg end) |