Mercurial > emacs
view lisp/play/yow.el @ 51151:fe11e703042b
Summary: MIME support added for e-mail processing that
skips encoded regions. Allow user to skip saving Fcc messages with
large attachments. Fixed region skipping bug with multi-line
comments - e.g. tex $ regions spanning multiple lines.
Added support for postscript and uuencoded regions.
Redundant dictionary file names purged.
Dictionary definition field name changed from "Character Set"
to "Coding System". Fixed bug in reloading dictionaries.
Modified headers to reflect new version. XEmacs menu now adds
customize item.
(ispell-check-version): No longer an aliased function.
Returns library path if not called interactively.
Variable `temporary-file-directory' protected if not loaded.
(check-ispell-version): Now the alias for `ispell-check-version'.
(ispell-message-fcc-skip): New variable that determines if and when
to query about saving Fcc copy of message if an attachment is large.
(ispell-skip-html): Declared buffer-local.
(ispell-local-dictionary-alist): Docstring expanded.
Tag name changed from "Character Set" to "Coding System".
(ispell-dictionary-alist-1): Removed redundant command-line option to
load brasileiro, british, and castellano dictionary files.
(ispell-dictionary-alist-2): Removed redundant command-line option to
load czech dictionary file.
(ispell-dictionary-alist-3): Moved francais-tex here.
(ispell-dictionary-alist-4): Removed german and german8 dictionaries.
The deutsch ones are the correct definitions. `nederlands'
and `nederlands8' dictionaries moved here.
(ispell-dictionary-alist-5): `polish' and `portugues' dictionaries
moved here. Removed redundant command-line option to `norsk'
and `portugues'.
(ispell-dictionary-alist-6): Removed redundant command-line option to
load `russian' and `slovak' dictionary files.
(ispell-dictionary-alist): Tag name changed from "Character Set" to
"Coding System".
(ispell-version): Updated to 3.6.
(ispell-library-directory): Calls non-deprecated function.
(ispell-valid-dictionary-list): New function returning all valid
dictionaries on machine.
(ispell-checking-message): Documentation string improved.
(ispell-skip-region-alist): Added uuencoded and postscript region
skipping. Improved http/e-mail/file regexp to not match `/.\w'.
(ispell-html-skip-alists): New variable for html region support.
(ispell-send-string): Removed redundant xemacs check.
(ispell-word): Fix spelling error in documentation string, added
extent information to support highlighting in ispell-minor-mode.
(ispell-command-loop): Disable horizontal scrollbar in XEmacs
choices buffer.
(ispell-show-choices): Directly select `choices-window'.
(ispell-help): Use default buffer size for electric help.
(ispell-adjusted-window-height): Correct for xemacs detection.
(ispell-start-process): Don't double specify dictionary file name.
(ispell-init-process): Set `ispell-library-path' each call.
(ispell-change-dictionary): Now only completes valid dictionaries.
(ispell-region): Add support for MIME region skipping and Fcc
message query for large attachments.
(ispell-begin-skip-region-regexp): Add documentation string.
Added message support and cleaned up code for generic and html regions.
(ispell-begin-skip-region): Function is now requires alist argument.
(ispell-begin-tex-skip-regexp): Added comments and support
improved html and message regions.
(ispell-skip-region-list): New function for MIME and region skipping.
(ispell-tex-arg-end): Add documentation string.
(ispell-ignore-fcc): New function to query saving Fcc message.
(ispell-skip-region): Calculate alist for key match dynamically,
html skipping pushed to alists.
(ispell-get-line): Add support for multi-line comment regions.
(ispell): Check that variables to continue spelling are bound.
(ispell-message-text-end): Postscript and uuencoded regions now
supported as MIME regions, rather than as end-of-message region.
(ispell-mime-multipartp): New function supporting MIME.
(ispell-mime-skip-part): New function supporting MIME.
(ispell-message): Add MIME support.
(ispell-buffer-local-parsing): Variable `ispell-skip-html' now local.
(ispell-buffer-local-dict): Fixed bug for detecting and reloading
new dictionary.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 22 May 2003 21:34:00 +0000 |
parents | c04b89996164 |
children | 695cf19ef79e d7ddb3e565de |
line wrap: on
line source
;;; yow.el --- quote random zippyisms ;; Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Author: Richard Mlynarik ;; Keywords: games ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; Important pinheadery for GNU Emacs. ;; ;; See cookie1.el for implementation. Note --- the `n' argument of yow ;; from the 18.xx implementation is no longer; we only support *random* ;; random access now. ;;; Code: (require 'cookie1) (defgroup yow nil "Quote random zippyisms." :prefix "yow-" :group 'games) (defcustom yow-file (concat data-directory "yow.lines") "File containing pertinent pinhead phrases." :type 'file :group 'yow) (defconst yow-load-message "Am I CONSING yet?...") (defconst yow-after-load-message "I have SEEN the CONSING!!") ;;;###autoload (defun yow (&optional insert display) "Return or display a random Zippy quotation. With prefix arg, insert it." (interactive "P\np") (let ((yow (cookie yow-file yow-load-message yow-after-load-message))) (cond (insert (insert yow)) ((not display) yow) (t (message "%s" yow))))) (defsubst read-zippyism (prompt &optional require-match) "Read a Zippyism from the minibuffer with completion, prompting with PROMPT. If optional second arg is non-nil, require input to match a completion." (read-cookie prompt yow-file yow-load-message yow-after-load-message require-match)) ;;;###autoload (defun insert-zippyism (&optional zippyism) "Prompt with completion for a known Zippy quotation, and insert it at point." (interactive (list (read-zippyism "Pinhead wisdom: " t))) (insert zippyism)) ;;;###autoload (defun apropos-zippy (regexp) "Return a list of all Zippy quotes matching REGEXP. If called interactively, display a list of matches." (interactive "sApropos Zippy (regexp): ") ;; Make sure yows are loaded (cookie yow-file yow-load-message yow-after-load-message) (let* ((case-fold-search t) (cookie-table-symbol (intern yow-file cookie-cache)) (string-table (symbol-value cookie-table-symbol)) (matches nil) (len (length string-table)) (i 0)) (save-match-data (while (< i len) (and (string-match regexp (aref string-table i)) (setq matches (cons (aref string-table i) matches))) (setq i (1+ i)))) (and matches (setq matches (sort matches 'string-lessp))) (and (interactive-p) (cond ((null matches) (message "No matches found.")) (t (let ((l matches)) (with-output-to-temp-buffer "*Zippy Apropos*" (while l (princ (car l)) (setq l (cdr l)) (and l (princ "\n\n")))))))) matches)) ;; Yowza!! Feed zippy quotes to the doctor. Watch results. ;; fun, fun, fun. Entertainment for hours... ;; ;; written by Kayvan Aghaiepour ;;;###autoload (defun psychoanalyze-pinhead () "Zippy goes to the analyst." (interactive) (doctor) ; start the psychotherapy (message "") (switch-to-buffer "*doctor*") (sit-for 0) (while (not (input-pending-p)) (insert (yow)) (sit-for 0) (doctor-ret-or-read 1) (doctor-ret-or-read 1))) (provide 'yow) ;;; yow.el ends here