diff options
| author | Reuben Thomas | 2016-12-04 13:59:59 +0000 |
|---|---|---|
| committer | Reuben Thomas | 2016-12-13 19:43:48 +0000 |
| commit | 3ac94b992c15cd4f45c470d6bd5a978d1bb9565f (patch) | |
| tree | b32063e378bd18c3e20b67e3f53c63a847ea24f0 | |
| parent | 028249ebcd0287026c61b41b82eb489eec7e0097 (diff) | |
| download | emacs-3ac94b992c15cd4f45c470d6bd5a978d1bb9565f.tar.gz emacs-3ac94b992c15cd4f45c470d6bd5a978d1bb9565f.zip | |
Remove some XEmacs-specific code from ispell.el
* lisp/textmodes/ispell.el: Remove XEmacs menubar setup.
(ispell-int-char): Remove.
| -rw-r--r-- | lisp/textmodes/ispell.el | 69 |
1 files changed, 6 insertions, 63 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 5ad7d05e2cd..5670bcd5ff9 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1466,62 +1466,6 @@ The variable `ispell-library-directory' defines their location." | |||
| 1466 | ;;(put 'ispell-region 'menu-enable 'mark-active) | 1466 | ;;(put 'ispell-region 'menu-enable 'mark-active) |
| 1467 | (fset 'ispell-menu-map (symbol-value 'ispell-menu-map)))) | 1467 | (fset 'ispell-menu-map (symbol-value 'ispell-menu-map)))) |
| 1468 | 1468 | ||
| 1469 | ;;; XEmacs versions 19 & 20 | ||
| 1470 | (if (and (featurep 'xemacs) | ||
| 1471 | (featurep 'menubar) | ||
| 1472 | ;;(null ispell-menu-xemacs) | ||
| 1473 | (not (and (boundp 'infodock-version) infodock-version))) | ||
| 1474 | (let ((dicts (if (fboundp 'ispell-valid-dictionary-list) | ||
| 1475 | (reverse (ispell-valid-dictionary-list)))) | ||
| 1476 | (current-menubar (or current-menubar default-menubar)) | ||
| 1477 | (menu | ||
| 1478 | '(["Help" (describe-function 'ispell-help) t] | ||
| 1479 | ;;["Help" (popup-menu ispell-help-list) t] | ||
| 1480 | ["Check Message" ispell-message t] | ||
| 1481 | ["Check Buffer" ispell-buffer t] | ||
| 1482 | ["Check Comments" ispell-comments-and-strings t] | ||
| 1483 | ["Check Word" ispell-word t] | ||
| 1484 | ["Check Region" ispell-region (or (not zmacs-regions) (mark))] | ||
| 1485 | ["Continue Check" ispell-continue t] | ||
| 1486 | ["Complete Word Frag"ispell-complete-word-interior-frag t] | ||
| 1487 | ["Complete Word" ispell-complete-word t] | ||
| 1488 | ["Kill Process" (ispell-kill-ispell nil 'clear) t] | ||
| 1489 | ["Customize..." (customize-group 'ispell) t] | ||
| 1490 | ;; flyspell-mode may not be bound... | ||
| 1491 | ;;["flyspell" flyspell-mode | ||
| 1492 | ;; :style toggle :selected flyspell-mode ] | ||
| 1493 | "-" | ||
| 1494 | ["Save Personal Dict"(ispell-pdict-save t t) t] | ||
| 1495 | ["Change Dictionary" ispell-change-dictionary t]))) | ||
| 1496 | (if (null dicts) | ||
| 1497 | (setq dicts (cons "default" nil))) | ||
| 1498 | (dolist (name dicts) | ||
| 1499 | (setq menu (append menu | ||
| 1500 | (list | ||
| 1501 | (vector | ||
| 1502 | (concat "Select " (capitalize name)) | ||
| 1503 | (list 'ispell-change-dictionary name) | ||
| 1504 | t))))) | ||
| 1505 | (setq ispell-menu-xemacs menu) | ||
| 1506 | (if current-menubar | ||
| 1507 | (progn | ||
| 1508 | (if (car (find-menu-item current-menubar '("Cmds"))) | ||
| 1509 | (progn | ||
| 1510 | ;; XEmacs 21.2 | ||
| 1511 | (delete-menu-item '("Cmds" "Spell-Check")) | ||
| 1512 | (add-menu '("Cmds") "Spell-Check" ispell-menu-xemacs)) | ||
| 1513 | ;; previous | ||
| 1514 | (delete-menu-item '("Edit" "Spell")) ; in case already defined | ||
| 1515 | (add-menu '("Edit") "Spell" ispell-menu-xemacs)))))) | ||
| 1516 | |||
| 1517 | (defalias 'ispell-int-char | ||
| 1518 | ;; Allow incrementing characters as integers in XEmacs 20 | ||
| 1519 | (if (and (featurep 'xemacs) | ||
| 1520 | (fboundp 'int-char)) | ||
| 1521 | 'int-char | ||
| 1522 | ;; Emacs and XEmacs 19 or earlier | ||
| 1523 | 'identity)) | ||
| 1524 | |||
| 1525 | 1469 | ||
| 1526 | ;;; ********************************************************************** | 1470 | ;;; ********************************************************************** |
| 1527 | 1471 | ||
| @@ -2230,12 +2174,12 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2230 | ;; not so good if there are over 20 or 30 options, but then, if | 2174 | ;; not so good if there are over 20 or 30 options, but then, if |
| 2231 | ;; there are that many you don't want to scan them all anyway... | 2175 | ;; there are that many you don't want to scan them all anyway... |
| 2232 | (while (memq count command-characters) ; skip command characters. | 2176 | (while (memq count command-characters) ; skip command characters. |
| 2233 | (setq count (ispell-int-char (1+ count)) | 2177 | (setq count (1+ count) |
| 2234 | skipped (1+ skipped))) | 2178 | skipped (1+ skipped))) |
| 2235 | (insert "(" count ") " (car choices) " ") | 2179 | (insert "(" count ") " (car choices) " ") |
| 2236 | (setq choices (cdr choices) | 2180 | (setq choices (cdr choices) |
| 2237 | count (ispell-int-char (1+ count)))) | 2181 | count (1+ count))) |
| 2238 | (setq count (ispell-int-char (- count ?0 skipped)))) | 2182 | (setq count (- count ?0 skipped))) |
| 2239 | 2183 | ||
| 2240 | (run-hooks 'ispell-update-post-hook) | 2184 | (run-hooks 'ispell-update-post-hook) |
| 2241 | 2185 | ||
| @@ -2382,13 +2326,12 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2382 | (window-width)) | 2326 | (window-width)) |
| 2383 | (insert "\n")) | 2327 | (insert "\n")) |
| 2384 | (while (memq count command-characters) | 2328 | (while (memq count command-characters) |
| 2385 | (setq count (ispell-int-char (1+ count)) | 2329 | (setq count (1+ count) |
| 2386 | skipped (1+ skipped))) | 2330 | skipped (1+ skipped))) |
| 2387 | (insert "(" count ") " (car choices) " ") | 2331 | (insert "(" count ") " (car choices) " ") |
| 2388 | (setq choices (cdr choices) | 2332 | (setq choices (cdr choices) |
| 2389 | count (ispell-int-char (1+ count)))) | 2333 | count (1+ count))) |
| 2390 | (setq count (ispell-int-char | 2334 | (setq count (- count ?0 skipped))) |
| 2391 | (- count ?0 skipped)))) | ||
| 2392 | (setq textwin (selected-window)) | 2335 | (setq textwin (selected-window)) |
| 2393 | (ispell-show-choices) | 2336 | (ispell-show-choices) |
| 2394 | (select-window textwin)))) | 2337 | (select-window textwin)))) |