• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/textmodes/

Lines Matching +defs:decode +defs:coding +defs:region

65 ;;   ispell-region
75 ;; ispell-skip-region-alist
77 ;; Commands in ispell-region:
115 ;; spell check in `ispell-skip-region-alist'. Mode-dependent features can
136 ;; Fixed bug where message-text-end is inside a mime skipped region.
146 ;; Bug fix: retain comment syntax on lines with region skipping. (TeX $ bug...)
157 ;; HTML region skipping greatly improved. (Chuck D. Phillips)
175 ;; fine tuned latex region skipping. Fixed bug in ispell-word that did not
183 ;; A coding system is now required for all languages.
193 ;; Multibyte character coding support added for process interactions.
256 `region', and `underline'.
273 "*Corrections made throughout region when non-nil.
310 "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
514 (coding-system :tag "Coding System")))
637 ;; include Russian iso coding system too?
836 (defun ispell-call-process-region (&rest args)
837 "Like `call-process-region' but defend against bad `default-directory'."
842 (apply 'call-process-region args)))
952 (let* ((lang ;; Strip out region, variant, etc.
1087 :enable (and (boundp 'ispell-region-end)
1088 (marker-position ispell-region-end)
1089 (equal (marker-buffer ispell-region-end)
1091 :help "Continue spell checking last region"))
1102 (define-key ispell-menu-map [ispell-region]
1103 '(menu-item "Spell-Check Region" ispell-region
1105 :help "Spell-check text in marked region"))
1113 ;;(put 'ispell-region 'menu-enable 'mark-active)
1131 ["Check Region" ispell-region (or (not zmacs-regions) (mark))]
1189 (defun ispell-decode-string (str)
1195 (fboundp 'decode-coding-string)
1196 (ispell-get-coding-system))
1197 (decode-coding-string str (ispell-get-coding-system))
1229 (setq str (ispell-decode-string str))
1259 (defun ispell-get-coding-system ()
1333 (defvar ispell-skip-region-alist
1364 (KEY FUNCTION ARGS) - FUNCTION called with ARGS returns end of region.")
1365 (put 'ispell-skip-region-alist 'risky-local-variable t)
1409 Same format as `ispell-skip-region-alist'
1440 (defvar ispell-region-end (make-marker)
1508 (let (coding-system-for-read coding-system-for-write status)
1511 (setq coding-system-for-read (ispell-get-coding-system)
1512 coding-system-for-write (ispell-get-coding-system)))
1517 (apply 'ispell-call-process-region
1536 (delete-region (point-min) (point))))
1543 (delete-region prev-pos (point))
1555 (delete-region start (point)))
1560 ;; characters that is supported by buffer-file-coding-system.
1566 (translate-region pos (point) translation-table-for-input))))
1581 resume interrupted spell-checking of a buffer or region.
1587 or \\[ispell-region] to update the Ispell process.
1672 (delete-region (point) end)
1684 (setq ispell-quit (not (ispell-region start end)))
1690 ;; NB: Cancels ispell-quit incorrectly if called from ispell-region
2026 ;;(set-marker ispell-region-end reg-end)
2301 (text (buffer-substring-no-properties start end)) ; Save hilight region
2305 (delete-region start end)
2309 (delete-region start end) ; delete whitespace
2552 (fboundp 'set-process-coding-system))
2553 (set-process-coding-system ispell-process (ispell-get-coding-system)
2554 (ispell-get-coding-system)))
2674 (defun ispell-region (reg-start reg-end &optional recheckp shift)
2675 "Interactively check a region for spelling errors.
2682 (let ((skip-region-start (make-marker))
2688 (buffer-name) "region")
2700 (if (re-search-forward (ispell-begin-skip-region-regexp) reg-end t)
2704 (set-marker skip-region-start (- (point) (length key)))
2711 (set-marker ispell-region-end reg-end)
2713 (< (point) ispell-region-end))
2714 ;; spell-check region with skipping
2715 (if (and (marker-position skip-region-start)
2716 (<= skip-region-start (point)))
2718 ;; If region inside line comment, must keep comment start.
2728 (ispell-skip-region key) ; moves pt past region.
2732 (ispell-ignore-fcc skip-region-start
2734 (if (and (< rstart ispell-region-end)
2736 (ispell-begin-skip-region-regexp)
2737 ispell-region-end t))
2740 (set-marker skip-region-start
2743 (set-marker skip-region-start nil))))
2745 (if (marker-position skip-region-start)
2746 (min skip-region-start ispell-region-end)
2747 (marker-position ispell-region-end))))
2754 (setq end (point)) ; "end" tracks region retrieved.
2767 (set-marker skip-region-start nil)
2771 ;; preserve or clear the region for ispell-continue.
2773 (set-marker ispell-region-end nil)
2774 ;; Ispell-continue enabled - ispell-region-end is set.
2782 (if (not recheckp) (set-marker ispell-region-end nil))
2790 (defun ispell-begin-skip-region-regexp ()
2791 "Returns a regexp of the search keys for region skipping.
2792 Includes `ispell-skip-region-alist' plus tex, tib, html, and comment keys.
2795 (let ((skip-regexp (ispell-begin-skip-region ispell-skip-region-alist)))
2811 (ispell-begin-skip-region ispell-html-skip-alists)
2832 (defun ispell-begin-skip-region (skip-alist)
2859 (defun ispell-skip-region-list ()
2861 Includes regions defined by `ispell-skip-region-alist', tex mode,
2864 The list is of the form described by variable `ispell-skip-region-alist'.
2866 (let ((skip-alist ispell-skip-region-alist))
2867 ;; only additional explicit region definition is tex.
2920 (defun ispell-skip-region (key)
2921 "Skips across KEY and then to end of region.
2922 Key lookup determines region to skip.
2923 Point is placed at end of skipped region."
2927 ;; Regenerate each call... This function can change region definition.
2928 (alist (ispell-skip-region-list))
2936 (search-forward comment-end ispell-region-end t)))
2939 (search-forward comment-start ispell-region-end :end))
2941 (re-search-forward ispell-tib-ref-end ispell-region-end t))
2952 ;; Search past end of spell region to find this region end.
2966 (message "Matching region end for `%s' point %d not found"
2993 (let ((coding (ispell-get-coding-system))
2996 (equal (encode-coding-string string coding)
2997 (encode-coding-string (buffer-substring-no-properties
2999 coding)))))
3031 ;; end of region markers line-end and ispell-region-end
3037 recheck-region replace)
3079 recheck-region t)))
3090 (delete-region (point) (+ word-len (point)))
3111 (let ((region-end (copy-marker ispell-region-end)))
3112 (setq recheck-region ispell-filter
3115 shift (ispell-region
3121 (set-marker ispell-region-end region-end)
3122 (set-marker region-end nil)
3123 (setq ispell-filter recheck-region
3124 recheck-region nil
3143 ;; Adjust markers when end of region lost from highlighting.
3144 (if (and (not recheck-region) (< end (+ word-start word-len)))
3146 (if (= word-start ispell-region-end)
3147 (set-marker ispell-region-end (+ word-start word-len)))
3174 (setq done (not (ispell-region start (point))))))))))
3181 (ispell-region (point-min) (point-max)))
3188 (if (not (marker-position ispell-region-end))
3190 (if (not (equal (marker-buffer ispell-region-end) (current-buffer)))
3192 (buffer-name (marker-buffer ispell-region-end)))
3193 (ispell-region
3196 (marker-position ispell-region-end)))))
3259 (delete-region start end)
3283 "Interactively check a region or buffer for spelling errors.
3284 If `transient-mark-mode' is on, and a region is active, spell-check
3285 that region. Otherwise spell-check the buffer.
3294 (ispell-region (region-beginning) (region-end))
3416 for operation with the generic region-skipping code.
3483 To abort spell checking of a message region and send the message anyway,
3501 (ispell-skip-region-alist-save ispell-skip-region-alist)
3512 (limit (copy-marker ; End of region we will spell check.
3553 (ispell-skip-region-alist
3556 ispell-skip-region-alist))
3585 (ispell-region (point)
3603 ;; Point moved to end of buffer if region is encoded.
3610 ;; if message-text-end region, limit may be less than point.
3620 (ispell-region (point) limit))
3623 (setq ispell-skip-region-alist ispell-skip-region-alist-save
3760 ;;; returns optionally adjusted region-end-point.