comparison lisp/textmodes/ispell.el @ 12277:e03c2446f198

Reinstalled autoloads from ispell-dictionary-alist, ispell-menu-map, ispell-menu-lucid, and ispell-menu-map-needed.
author Richard M. Stallman <rms@gnu.org>
date Fri, 16 Jun 1995 16:25:07 +0000
parents 5b8203bdfd6a
children 6b853a17f397
comparison
equal deleted inserted replaced
12276:2e376a4397bc 12277:e03c2446f198
135 ;;; HISTORY 135 ;;; HISTORY
136 ;;; 136 ;;;
137 ;;; Revision 2.37 1995/6/13 12:05:28 stevens 137 ;;; Revision 2.37 1995/6/13 12:05:28 stevens
138 ;;; Removed autoload from ispell-dictionary-alist. *choices* mode-line shows 138 ;;; Removed autoload from ispell-dictionary-alist. *choices* mode-line shows
139 ;;; misspelled word. Block skip for pgp & forwarded messages added. 139 ;;; misspelled word. Block skip for pgp & forwarded messages added.
140 ;;; RMS: the autoload changes had problems and I removed them.
140 ;;; 141 ;;;
141 ;;; Revision 2.36 1995/2/6 17:39:38 stevens 142 ;;; Revision 2.36 1995/2/6 17:39:38 stevens
142 ;;; Properly adjust screen with different ispell-choices-win-default-height 143 ;;; Properly adjust screen with different ispell-choices-win-default-height
143 ;;; settings. Skips SGML entity references. 144 ;;; settings. Skips SGML entity references.
144 ;;; 145 ;;;
414 415
415 (defvar ispell-format-word (function upcase) 416 (defvar ispell-format-word (function upcase)
416 "*Formatting function for displaying word being spell checked. 417 "*Formatting function for displaying word being spell checked.
417 The function must take one string argument and return a string.") 418 The function must take one string argument and return a string.")
418 419
420 ;;;###autoload
419 (defvar ispell-personal-dictionary nil 421 (defvar ispell-personal-dictionary nil
420 "*File name of your personal spelling dictionary, or nil. 422 "*File name of your personal spelling dictionary, or nil.
421 If nil, the default personal dictionary, \"~/.ispell_DICTNAME\" is used, 423 If nil, the default personal dictionary, \"~/.ispell_DICTNAME\" is used,
422 where DICTNAME is the name of your default dictionary.") 424 where DICTNAME is the name of your default dictionary.")
423 425
440 "*If non-nil, a list of extra switches to pass to the Ispell program. 442 "*If non-nil, a list of extra switches to pass to the Ispell program.
441 For example, '(\"-W\" \"3\") to cause it to accept all 1-3 character 443 For example, '(\"-W\" \"3\") to cause it to accept all 1-3 character
442 words as correct. See also `ispell-dictionary-alist', which may be used 444 words as correct. See also `ispell-dictionary-alist', which may be used
443 for language-specific arguments.") 445 for language-specific arguments.")
444 446
445 ;;; ispell-dictionary-alist is set up from two subvariables above 447 ;;; The preparation of the menu bar menu must be autoloaded
446 ;;; to avoid having very long lines in loaddefs.el. 448 ;;; because otherwise this file gets autoloaded every time Emacs starts
447 (defvar ispell-dictionary-alist 449 ;;; so that it can set up the menus and determine keyboard equivalents.
448 450
451 ;;;###autoload
452 (defvar ispell-dictionary-alist-1 ; sk 9-Aug-1991 18:28
449 '((nil ; default (english.aff) 453 '((nil ; default (english.aff)
450 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) 454 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil)
451 ("english" ; make english explicitly selectable 455 ("english" ; make english explicitly selectable
452 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) 456 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil)
453 ("british" ; british version 457 ("british" ; british version
463 "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" 467 "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]"
464 "[']" t ("-C") nil) 468 "[']" t ("-C") nil)
465 ("nederlands8" ; dutch8.aff 469 ("nederlands8" ; dutch8.aff
466 "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" 470 "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]"
467 "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" 471 "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]"
468 "[']" t ("-C") nil) 472 "[']" t ("-C") nil)))
469 ("svenska" ;7 bit swedish mode 473
474 ;;;###autoload
475 (defvar ispell-dictionary-alist-2
476 '(("svenska" ;7 bit swedish mode
470 "[A-Za-z}{|\\133\\135\\\\]" "[^A-Za-z}{|\\133\\135\\\\]" 477 "[A-Za-z}{|\\133\\135\\\\]" "[^A-Za-z}{|\\133\\135\\\\]"
471 "[']" nil ("-C") nil) 478 "[']" nil ("-C") nil)
472 ("svenska8" ;8 bit swedish mode 479 ("svenska8" ;8 bit swedish mode
473 "[A-Za-z\345\344\366\305\304\366]" "[^A-Za-z\345\344\366\305\304\366]" 480 "[A-Za-z\345\344\366\305\304\366]" "[^A-Za-z\345\344\366\305\304\366]"
474 "[']" nil ("-C" "-d" "svenska") "~list") ; Add `"-T" "list"' instead? 481 "[']" nil ("-C" "-d" "svenska") "~list") ; Add `"-T" "list"' instead?
483 "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" 490 "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]"
484 "[---'^`\"]" t nil "~tex") 491 "[---'^`\"]" t nil "~tex")
485 ("dansk" ; dansk.aff 492 ("dansk" ; dansk.aff
486 "[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]" 493 "[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]"
487 "" nil ("-C") nil) 494 "" nil ("-C") nil)
488 ) 495 ))
489 496
497
498 ;;; ispell-dictionary-alist is set up from two subvariables above
499 ;;; to avoid having very long lines in loaddefs.el.
500 ;;;###autoload
501 (defvar ispell-dictionary-alist
502 (append ispell-dictionary-alist-1 ispell-dictionary-alist-2)
490 "An alist of dictionaries and their associated parameters. 503 "An alist of dictionaries and their associated parameters.
491 504
492 Each element of this list is also a list: 505 Each element of this list is also a list:
493 506
494 \(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P 507 \(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
526 539
527 Note that the CASECHARS and OTHERCHARS slots of the alist should 540 Note that the CASECHARS and OTHERCHARS slots of the alist should
528 contain the same character set as casechars and otherchars in the 541 contain the same character set as casechars and otherchars in the
529 language.aff file \(e.g., english.aff\).") 542 language.aff file \(e.g., english.aff\).")
530 543
531 544 ;;;###autoload
532 (defvar ispell-menu-map nil "Key map for ispell menu") 545 (defvar ispell-menu-map nil "Key map for ispell menu")
533 546
547 ;;;###autoload
534 (defvar ispell-menu-lucid nil "Spelling menu for Lucid Emacs.") 548 (defvar ispell-menu-lucid nil "Spelling menu for Lucid Emacs.")
535 549
536 ;;; Break out lucid menu and split into several calls to avoid having 550 ;;; Break out lucid menu and split into several calls to avoid having
537 ;;; long lines in loaddefs.el. Detect need off following constant. 551 ;;; long lines in loaddefs.el. Detect need off following constant.
538 552
553 ;;;###autoload
539 (defconst ispell-menu-map-needed ; make sure this is not Lucid Emacs 554 (defconst ispell-menu-map-needed ; make sure this is not Lucid Emacs
540 (and (not ispell-menu-map) 555 (and (not ispell-menu-map)
541 (string-lessp "19" emacs-version) 556 ;;; This is commented out because it fails in Emacs.
542 ;; make sure this isn't Lucid Emacs 557 ;;; due to the fact that menu-bar is loaded much later than loaddefs.
558 ;;; ;; make sure this isn't Lucid Emacs
559 ;;; (featurep 'menu-bar)
543 (not (string-match "Lucid" emacs-version)))) 560 (not (string-match "Lucid" emacs-version))))
544 561
545 562 ;;; Set up dictionary
546 ;;; setup dictionary 563 ;;;###autoload
547 (if ispell-menu-map-needed 564 (if ispell-menu-map-needed
548 (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) 565 (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist)))
549 name) 566 name)
550 (setq ispell-menu-map (make-sparse-keymap "Spell")) 567 (setq ispell-menu-map (make-sparse-keymap "Spell"))
551 ;; add the dictionaries to the bottom of the list. 568 ;; add the dictionaries to the bottom of the list.
557 (cons (concat "Select " (capitalize name)) 574 (cons (concat "Select " (capitalize name))
558 (list 'lambda () '(interactive) 575 (list 'lambda () '(interactive)
559 (list 'ispell-change-dictionary name)))))))) 576 (list 'ispell-change-dictionary name))))))))
560 577
561 ;;; define commands in menu in opposite order you want them to appear. 578 ;;; define commands in menu in opposite order you want them to appear.
579 ;;;###autoload
562 (if ispell-menu-map-needed 580 (if ispell-menu-map-needed
563 (progn 581 (progn
564 (define-key ispell-menu-map [ispell-change-dictionary] 582 (define-key ispell-menu-map [ispell-change-dictionary]
565 '("Change Dictionary" . ispell-change-dictionary)) 583 '("Change Dictionary" . ispell-change-dictionary))
566 (define-key ispell-menu-map [ispell-kill-ispell] 584 (define-key ispell-menu-map [ispell-kill-ispell]
570 (define-key ispell-menu-map [ispell-complete-word] 588 (define-key ispell-menu-map [ispell-complete-word]
571 '("Complete Word" . ispell-complete-word)) 589 '("Complete Word" . ispell-complete-word))
572 (define-key ispell-menu-map [ispell-complete-word-interior-frag] 590 (define-key ispell-menu-map [ispell-complete-word-interior-frag]
573 '("Complete Word Frag" . ispell-complete-word-interior-frag)))) 591 '("Complete Word Frag" . ispell-complete-word-interior-frag))))
574 592
593 ;;;###autoload
575 (if ispell-menu-map-needed 594 (if ispell-menu-map-needed
576 (progn 595 (progn
577 (define-key ispell-menu-map [ispell-continue] 596 (define-key ispell-menu-map [ispell-continue]
578 '("Continue Check" . ispell-continue)) 597 '("Continue Check" . ispell-continue))
579 (define-key ispell-menu-map [ispell-word] 598 (define-key ispell-menu-map [ispell-word]
581 (define-key ispell-menu-map [ispell-region] 600 (define-key ispell-menu-map [ispell-region]
582 '("Check Region" . ispell-region)) 601 '("Check Region" . ispell-region))
583 (define-key ispell-menu-map [ispell-buffer] 602 (define-key ispell-menu-map [ispell-buffer]
584 '("Check Buffer" . ispell-buffer)))) 603 '("Check Buffer" . ispell-buffer))))
585 604
605 ;;;###autoload
586 (if ispell-menu-map-needed 606 (if ispell-menu-map-needed
587 (progn 607 (progn
588 (define-key ispell-menu-map [ispell-message] 608 (define-key ispell-menu-map [ispell-message]
589 '("Check Message" . ispell-message)) 609 '("Check Message" . ispell-message))
590 (define-key ispell-menu-map [ispell-help] 610 (define-key ispell-menu-map [ispell-help]