diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-01 01:10:47 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-01 01:10:47 -0800 |
commit | bcf244ef9be0fe61f4b9a48d3412b2c8a9f1edb9 (patch) | |
tree | dc5dde303bce1fbe4f04300c3691cc1ee5874f43 /lisp/obsolete | |
parent | 772ca5db3eccdc0439d7bd18f98b7fdd38eb6397 (diff) | |
parent | 2e2a8068031b79a6cc5502b8d4c9d849ebb1dae0 (diff) | |
download | emacs-bcf244ef9be0fe61f4b9a48d3412b2c8a9f1edb9.tar.gz |
Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
Diffstat (limited to 'lisp/obsolete')
56 files changed, 2462 insertions, 47 deletions
diff --git a/lisp/obsolete/abbrevlist.el b/lisp/obsolete/abbrevlist.el index 39aac999ce3..ebef215fcc0 100644 --- a/lisp/obsolete/abbrevlist.el +++ b/lisp/obsolete/abbrevlist.el @@ -1,6 +1,6 @@ ;;; abbrevlist.el --- list one abbrev table alphabetically ordered -;; Copyright (C) 1986, 1992, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992, 2001-2017 Free Software Foundation, Inc. ;; Suggested by a previous version by Gildea. ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/assoc.el b/lisp/obsolete/assoc.el index ae6e4a2f0bc..eab8d13a81e 100644 --- a/lisp/obsolete/assoc.el +++ b/lisp/obsolete/assoc.el @@ -1,6 +1,6 @@ ;;; assoc.el --- insert/delete functions on association lists -*- lexical-binding: t -*- -;; Copyright (C) 1996, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2017 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw <bwarsaw@cen.com> ;; Keywords: extensions diff --git a/lisp/obsolete/awk-mode.el b/lisp/obsolete/awk-mode.el new file mode 100644 index 00000000000..f42043b8fb2 --- /dev/null +++ b/lisp/obsolete/awk-mode.el @@ -0,0 +1,124 @@ +;;; awk-mode.el --- AWK code editing commands for Emacs + +;; Copyright (C) 1988, 1994, 1996, 2000-2017 Free Software Foundation, +;; Inc. + +;; Maintainer: emacs-devel@gnu.org +;; Keywords: unix, languages +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Sets up C-mode with support for awk-style #-comments and a lightly +;; hacked syntax table. + +;;; Code: + +(defvar awk-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\\ "\\" st) + (modify-syntax-entry ?\n "> " st) + (modify-syntax-entry ?\f "> " st) + (modify-syntax-entry ?\# "< " st) + ;; / can delimit regexes or be a division operator. We assume that it is + ;; more commonly used for regexes and fix the remaining cases with + ;; `font-lock-syntactic-keywords'. + (modify-syntax-entry ?/ "\"" st) + (modify-syntax-entry ?* "." st) + (modify-syntax-entry ?+ "." st) + (modify-syntax-entry ?- "." st) + (modify-syntax-entry ?= "." st) + (modify-syntax-entry ?% "." st) + (modify-syntax-entry ?< "." st) + (modify-syntax-entry ?> "." st) + (modify-syntax-entry ?& "." st) + (modify-syntax-entry ?| "." st) + (modify-syntax-entry ?_ "_" st) + (modify-syntax-entry ?\' "\"" st) + st) + "Syntax table in use in `awk-mode' buffers.") + +;; Regexps written with help from Peter Galbraith <galbraith@mixing.qc.dfo.ca>. +(defconst awk-font-lock-keywords + (eval-when-compile + (list + ;; + ;; Function names. + '("^[ \t]*\\(function\\)\\>[ \t]*\\(\\sw+\\)?" + (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) + ;; + ;; Variable names. + (cons (regexp-opt + '("ARGC" "ARGIND" "ARGV" "CONVFMT" "ENVIRON" "ERRNO" + "FIELDWIDTHS" "FILENAME" "FNR" "FS" "IGNORECASE" "NF" "NR" + "OFMT" "OFS" "ORS" "RLENGTH" "RS" "RSTART" "SUBSEP") 'words) + 'font-lock-variable-name-face) + ;; + ;; Keywords. + (regexp-opt + '("BEGIN" "END" "break" "continue" "delete" "do" "exit" "else" "for" + "getline" "if" "next" "print" "printf" "return" "while") 'words) + ;; + ;; Builtins. + (list (regexp-opt + '("atan2" "close" "cos" "ctime" "exp" "gsub" "index" "int" + "length" "log" "match" "rand" "sin" "split" "sprintf" + "sqrt" "srand" "sub" "substr" "system" "time" + "tolower" "toupper") 'words) + 1 'font-lock-builtin-face) + ;; + ;; Operators. Is this too much? + (cons (regexp-opt '("&&" "||" "<=" "<" ">=" ">" "==" "!=" "!~" "~")) + 'font-lock-constant-face) + )) + "Default expressions to highlight in AWK mode.") + +(require 'syntax) + +(defconst awk-font-lock-syntactic-keywords + ;; `/' is mostly used for /.../ regular expressions, but is also + ;; used as a division operator. Distinguishing between the two is + ;; a pain in the youknowwhat. + ;; '(("\\(^\\|[<=>-+*%/!^,~(?:|&]\\)\\s-*\\(/\\)\\([^/\n\\]\\|\\\\.\\)*\\(/\\)" + ;; (2 "\"") (4 "\""))) + '(("[^<=>-+*%/!^,~(?:|& \t\n\f]\\s-*\\(/\\)" + (1 (unless (nth 3 (syntax-ppss (match-beginning 1))) ".")))) + "Syntactic keywords for `awk-mode'.") + +;; No longer autoloaded since it might clobber the autoload directive in CC Mode. +(define-derived-mode awk-mode c-mode "AWK" + "Major mode for editing AWK code. +This is much like C mode except for the syntax of comments. Its keymap +inherits from C mode's and it has the same variables for customizing +indentation. It has its own abbrev table and its own syntax table. + +Turning on AWK mode runs `awk-mode-hook'." + (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter)) + (set (make-local-variable 'paragraph-separate) paragraph-start) + (set (make-local-variable 'comment-start) "# ") + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-start-skip) "#+ *") + (setq font-lock-defaults '(awk-font-lock-keywords + nil nil ((?_ . "w")) nil + (parse-sexp-lookup-properties . t) + (font-lock-syntactic-keywords + . awk-font-lock-syntactic-keywords)))) + +(provide 'awk-mode) + +;;; awk-mode.el ends here diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el index 6a4f2096d16..6af597d9fe5 100644 --- a/lisp/obsolete/bruce.el +++ b/lisp/obsolete/bruce.el @@ -1,7 +1,7 @@ ;;; bruce.el --- bruce phrase utility for overloading the Communications ;;; Decency Act snoops, if any. -;; Copyright (C) 1988, 1993, 1997, 2001-2016 Free Software Foundation, +;; Copyright (C) 1988, 1993, 1997, 2001-2017 Free Software Foundation, ;; Inc. ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/cc-compat.el b/lisp/obsolete/cc-compat.el index d761e3e9eae..c9fdf739f1d 100644 --- a/lisp/obsolete/cc-compat.el +++ b/lisp/obsolete/cc-compat.el @@ -1,6 +1,6 @@ ;;; cc-compat.el --- cc-mode compatibility with c-mode.el confusion -;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2017 Free Software Foundation, Inc. ;; Authors: 1998- Martin Stjernholm ;; 1994-1999 Barry A. Warsaw diff --git a/lisp/obsolete/cl-compat.el b/lisp/obsolete/cl-compat.el index 3d282d3e21a..930b59e89d3 100644 --- a/lisp/obsolete/cl-compat.el +++ b/lisp/obsolete/cl-compat.el @@ -1,6 +1,6 @@ ;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility) -;; Copyright (C) 1993, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2017 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Version: 2.02 diff --git a/lisp/obsolete/complete.el b/lisp/obsolete/complete.el index 27ba10f6265..a6c21bce87c 100644 --- a/lisp/obsolete/complete.el +++ b/lisp/obsolete/complete.el @@ -1,6 +1,6 @@ ;;; complete.el --- partial completion mechanism plus other goodies -;; Copyright (C) 1990-1993, 1999-2016 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 1999-2017 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Keywords: abbrev convenience diff --git a/lisp/obsolete/crisp.el b/lisp/obsolete/crisp.el index 2f157b246d1..aa13be1bc6d 100644 --- a/lisp/obsolete/crisp.el +++ b/lisp/obsolete/crisp.el @@ -1,6 +1,6 @@ ;;; crisp.el --- CRiSP/Brief Emacs emulator -;; Copyright (C) 1997-1999, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2017 Free Software Foundation, Inc. ;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM> ;; Keywords: emulations brief crisp diff --git a/lisp/obsolete/cust-print.el b/lisp/obsolete/cust-print.el index dc1f5d2e26b..b9aef43e0ba 100644 --- a/lisp/obsolete/cust-print.el +++ b/lisp/obsolete/cust-print.el @@ -1,6 +1,6 @@ ;;; cust-print.el --- handles print-level and print-circle -;; Copyright (C) 1992, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2017 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@holonexus.org> ;; Adapted-By: ESR diff --git a/lisp/obsolete/erc-hecomplete.el b/lisp/obsolete/erc-hecomplete.el index 5c3e7247f2e..4b0b8efa6a3 100644 --- a/lisp/obsolete/erc-hecomplete.el +++ b/lisp/obsolete/erc-hecomplete.el @@ -1,6 +1,6 @@ ;;; erc-hecomplete.el --- Provides Nick name completion for ERC -;; Copyright (C) 2001-2002, 2004, 2006-2016 Free Software Foundation, +;; Copyright (C) 2001-2002, 2004, 2006-2017 Free Software Foundation, ;; Inc. ;; Author: Alex Schroeder <alex@gnu.org> diff --git a/lisp/obsolete/eudcb-ph.el b/lisp/obsolete/eudcb-ph.el index eda9814c606..06d6f52f5b4 100644 --- a/lisp/obsolete/eudcb-ph.el +++ b/lisp/obsolete/eudcb-ph.el @@ -1,6 +1,6 @@ ;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -;; Copyright (C) 1998-2016 Free Software Foundation, Inc. +;; Copyright (C) 1998-2017 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 10ab2e9335f..d1e2c24febc 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -1,6 +1,6 @@ ;;; fast-lock.el --- automagic text properties caching for fast Font Lock mode -;; Copyright (C) 1994-1998, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2001-2017 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.org> ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/gs.el b/lisp/obsolete/gs.el index c4cdcebff8e..5bc77d8c349 100644 --- a/lisp/obsolete/gs.el +++ b/lisp/obsolete/gs.el @@ -1,6 +1,6 @@ ;;; gs.el --- interface to Ghostscript -;; Copyright (C) 1998, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: internal diff --git a/lisp/obsolete/gulp.el b/lisp/obsolete/gulp.el index 4db091495ca..11a7e02ab96 100644 --- a/lisp/obsolete/gulp.el +++ b/lisp/obsolete/gulp.el @@ -1,6 +1,6 @@ ;;; gulp.el --- ask for updates for Lisp packages -;; Copyright (C) 1996, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2017 Free Software Foundation, Inc. ;; Author: Sam Shteingold <shteingd@math.ucla.edu> ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/iso-acc.el b/lisp/obsolete/iso-acc.el new file mode 100644 index 00000000000..a18d4e543f6 --- /dev/null +++ b/lisp/obsolete/iso-acc.el @@ -0,0 +1,489 @@ +;;; iso-acc.el --- minor mode providing electric accent keys + +;; Copyright (C) 1993-1994, 1996, 2001-2017 Free Software Foundation, +;; Inc. + +;; Author: Johan Vromans +;; Maintainer: emacs-devel@gnu.org +;; Keywords: i18n +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Function `iso-accents-mode' activates a minor mode in which +;; typewriter "dead keys" are emulated. The purpose of this emulation +;; is to provide a simple means for inserting accented characters +;; according to the ISO-8859-1...3 character sets. +;; +;; In `iso-accents-mode', pseudo accent characters are used to +;; introduce accented keys. The pseudo-accent characters are: +;; +;; ' (minute) -> acute accent +;; ` (backtick) -> grave accent +;; " (second) -> diaeresis +;; ^ (caret) -> circumflex +;; ~ (tilde) -> tilde over the character +;; / (slash) -> slash through the character. +;; Also: /A is A-with-ring and /E is AE ligature. +;; These two are enabled only if you set iso-accents-enable +;; to include them: +;; . (period) -> dot over the character (some languages only) +;; , (cedilla) -> cedilla under the character (some languages only) +;; +;; The action taken depends on the key that follows the pseudo accent. +;; In general: +;; +;; pseudo-accent + appropriate letter -> accented letter +;; pseudo-accent + space -> pseudo-accent (except comma and period) +;; pseudo-accent + pseudo-accent -> accent (if available) +;; pseudo-accent + other -> pseudo-accent + other +;; +;; If the pseudo-accent is followed by anything else than a +;; self-insert-command, the dead-key code is terminated, the +;; pseudo-accent inserted ‘as is’ and the bell is rung to signal this. +;; +;; Function `iso-accents-mode' can be used to enable the iso accents +;; minor mode, or disable it. + +;; If you want only some of these characters to serve as accents, +;; add a language to `iso-languages' which specifies the accent characters +;; that you want, then select the language with `iso-accents-customize'. + +;;; Code: + +(provide 'iso-acc) + +(defgroup iso-acc nil + "Minor mode providing electric accent keys." + :prefix "iso-accents-" + :group 'i18n) + +(defcustom iso-accents-insert-offset nonascii-insert-offset + "Offset added by ISO Accents mode to character codes 0200 and above." + :type 'integer + :group 'iso-acc) + +(defvar iso-languages + '(("catalan" + ;; Note this includes some extra characters used in Spanish, + ;; on the idea that someone who uses Catalan is likely to use Spanish + ;; as well. + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) + (?\ . ?')) + (?` (?A . ?\300) (?E . ?\310) (?O . ?\322) + (?a . ?\340) (?e . ?\350) (?o . ?\362) + (?\ . ?`)) + (?\" (?I . ?\317) (?U . ?\334) (?i . ?\357) (?u . ?\374) + (?\ . ?\")) + (?~ (?C . ?\307) (?N . ?\321) (?c . ?\347) (?n . ?\361) + (?> . ?\273) (?< . ?\253) (?! . ?\241) (?? . ?\277) + (?\ . ?\~))) + + ("esperanto" + (?^ (?H . ?\246) (?J . ?\254) (?h . ?\266) (?j . ?\274) (?C . ?\306) + (?G . ?\330) (?S . ?\336) (?c . ?\346) (?g . ?\370) (?s . ?\376) + (?^ . ?^) (?\ . ?^)) + (?~ (?U . ?\335) (?u . ?\375) (?\ . ?~))) + + ("french" + (?' (?E . ?\311) (?C . ?\307) (?e . ?\351) (?c . ?\347) + (?\ . ?')) + (?` (?A . ?\300) (?E . ?\310) (?U . ?\331) + (?a . ?\340) (?e . ?\350) (?u . ?\371) + (?\ . ?`)) + (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333) + (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373) + (?\ . ?^)) + (?\" (?E . ?\313) (?I . ?\317) + (?e . ?\353) (?i . ?\357) + (?\ . ?\")) + (?~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) + (?\ . ?~)) + (?, (?C . ?\307) (?c . ?\347) (?\ . ?\,))) + + ("german" + (?\" (?A . ?\304) (?O . ?\326) (?U . ?\334) + (?a . ?\344) (?o . ?\366) (?u . ?\374) (?s . ?\337) (?\ . ?\"))) + + ("irish" + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) + (?\ . ?'))) + + ("portuguese" + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?C . ?\307) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) + (?u . ?\372) (?c . ?\347) + (?\ . ?')) + (?` (?A . ?\300) (?a . ?\340) + (?\ . ?`)) + (?^ (?A . ?\302) (?E . ?\312) (?O . ?\324) + (?a . ?\342) (?e . ?\352) (?o . ?\364) + (?\ . ?^)) + (?\" (?U . ?\334) (?u . ?\374) + (?\ . ?\")) + (?~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) + (?C . ?\307) (?N . ?\321) (?c . ?\347) (?n . ?\361) + (?\ . ?~)) + (?, (?c . ?\347) (?C . ?\307) (?, . ?,))) + + ("spanish" + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) + (?\ . ?')) + (?\" (?U . ?\334) (?u . ?\374) (?\ . ?\")) + (?\~ (?N . ?\321) (?n . ?\361) (?> . ?\273) (?< . ?\253) (?! . ?\241) + (?? . ?\277) (?\ . ?\~))) + + ("latin-1" + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) + (?u . ?\372) (?y . ?\375) (?' . ?\264) + (?\ . ?')) + (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) + (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) + (?` . ?`) (?\ . ?`)) + (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333) + (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373) + (?^ . ?^) (?\ . ?^)) + (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334) + (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?s . ?\337) + (?u . ?\374) (?y . ?\377) + (?\" . ?\250) (?\ . ?\")) + (?~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325) + (?T . ?\336) (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361) + (?o . ?\365) (?t . ?\376) + (?> . ?\273) (?< . ?\253) (?! . ?\241) (?? . ?\277) + (?\~ . ?\270) (?\ . ?~)) + (?/ (?A . ?\305) (?E . ?\306) (?O . ?\330) (?a . ?\345) (?e . ?\346) + (?o . ?\370) + (?/ . ?\260) (?\ . ?/))) + + ("latin-2" latin-iso8859-2 + (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315) + (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246) + (?U . ?\332) (?Y . ?\335) (?Z . ?\254) + (?a . ?\341) (?c . ?\346) (?d . ?\360) (?e . ?\351) (?i . ?\355) + (?l . ?\345) (?n . ?\361) (?o . ?\363) (?r . ?\340) (?s . ?\266) + (?u . ?\372) (?y . ?\375) (?z . ?\274) + (?' . ?\264) (?\ . ?')) + (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252) + (?T . ?\336) (?Z . ?\257) + (?a . ?\261) (?l . ?\263) (?c . ?\347) (?e . ?\352) (?s . ?\272) + (?t . ?\376) (?z . ?\277) + (?` . ?\252) + (?. . ?\377) (?\ . ?`)) + (?^ (?A . ?\302) (?I . ?\316) (?O . ?\324) + (?a . ?\342) (?i . ?\356) (?o . ?\364) + (?^ . ?^) ; no special code? + (?\ . ?^)) + (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) + (?a . ?\344) (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) + (?\" . ?\250) + (?\ . ?\")) + (?~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322) + (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333) + (?Z . ?\256) + (?a . ?\343) (?c . ?\350) (?d . ?\357) (?l . ?\265) (?n . ?\362) + (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273) (?u . ?\373) + (?z . ?\276) + (?v . ?\242) ; v accent + (?\~ . ?\242) ; v accent + (?\. . ?\270) ; cedilla accent + (?\ . ?~))) + + ("latin-3" latin-iso8859-3 + (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) + (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) + (?' . ?\264) (?\ . ?')) + (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) + (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) + (?` . ?`) (?\ . ?`)) + (?^ (?A . ?\302) (?C . ?\306) (?E . ?\312) (?G . ?\330) (?H . ?\246) + (?I . ?\316) (?J . ?\254) (?O . ?\324) (?S . ?\336) (?U . ?\333) + (?a . ?\342) (?c . ?\346) (?e . ?\352) (?g . ?\370) (?h . ?\266) + (?i . ?\356) (?j . ?\274) (?o . ?\364) (?s . ?\376) (?u . ?\373) + (?^ . ?^) (?\ . ?^)) + (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334) + (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?u . ?\374) + (?s . ?\337) + (?\" . ?\250) (?\ . ?\")) + (?~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325) + (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361) (?o . ?\365) + (?$ . ?\245) (?S . ?\252) (?s . ?\272) (?G . ?\253) (?g . ?\273) + (?U . ?\335) (?u . ?\375) (?` . ?\242) + (?~ . ?\270) (?\ . ?~)) + (?/ (?C . ?\305) (?G . ?\325) (?H . ?\241) (?I . ?\251) (?Z . ?\257) + (?c . ?\345) (?g . ?\365) (?h . ?\261) (?i . ?\271) (?z . ?\277) + (?r . ?\256) + (?. . ?\377) (?# . ?\243) (?$ . ?\244) + (?/ . ?\260) (?\ . ?/)) + (?. (?C . ?\305) (?G . ?\325) (?I . ?\251) (?Z . ?\257) + (?c . ?\345) (?g . ?\365) (?z . ?\277)))) + "List of language-specific customizations for the ISO Accents mode. + +Each element of the list is of the form + + (LANGUAGE [CHARSET] + (PSEUDO-ACCENT MAPPINGS) + (PSEUDO-ACCENT MAPPINGS) + ...) + +LANGUAGE is a string naming the language. +CHARSET (which may be omitted) is the symbol name + of the character set used in this language. + If CHARSET is omitted, latin-iso8859-1 is the default. +PSEUDO-ACCENT is a char specifying an accent key. +MAPPINGS are cons cells of the form (CHAR . ISO-CHAR). + +The net effect is that the key sequence PSEUDO-ACCENT CHAR is mapped +to ISO-CHAR on input.") + +(defvar iso-language nil + "Language for which ISO Accents mode is currently customized. +Change it with the `iso-accents-customize' function.") + +(defvar iso-accents-list nil + "Association list for ISO accent combinations, for the chosen language.") + +(defcustom iso-accents-mode nil + "Non-nil enables ISO Accents mode. +Setting this variable makes it local to the current buffer. +See the function `iso-accents-mode'." + :type 'boolean + :group 'iso-acc) +(make-variable-buffer-local 'iso-accents-mode) + +(defcustom iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/) + "List of accent keys that become prefixes in ISO Accents mode. +The default is (?\\=' ?\\=` ?^ ?\" ?~ ?/), which contains all the supported +accent keys. If you set this variable to a list in which some of those +characters are missing, the missing ones do not act as accents. + +Note that if you specify a language with `iso-accents-customize', +that can also turn off certain prefixes (whichever ones are not needed in +the language you choose)." + :type '(repeat character) + :group 'iso-acc) + +(defun iso-accents-accent-key (prompt) + "Modify the following character by adding an accent to it." + ;; Pick up the accent character. + (if (and iso-accents-mode + (memq last-input-event iso-accents-enable)) + (iso-accents-compose prompt) + (vector last-input-event))) + + +;; The iso-accents-compose function is called deep inside Emacs' read +;; key sequence machinery, so the call to read-event below actually +;; recurses into that machinery. Doing that does not cause any +;; problem on its own, but read-event will have marked the window's +;; display matrix to be accurate -- which is broken by the subsequent +;; call to delete-region. Therefore, we must call force-window-update +;; after delete-region to explicitly clear the accurate state of the +;; window's display matrix. + +(defun iso-accents-compose (prompt) + (let* ((first-char last-input-event) + (list (assq first-char iso-accents-list)) + ;; Wait for the second key and look up the combination. + (second-char (if (or prompt + (not (eq (key-binding "a") + 'self-insert-command)) + ;; Not at start of a key sequence. + (> (length (this-single-command-keys)) 1) + ;; Called from anything but the command loop. + this-command) + (progn + (message "%s%c" + (or prompt "Compose with ") + first-char) + (read-event)) + (insert first-char) + (prog1 (read-event) + (delete-region (1- (point)) (point)) + ;; Display is no longer up-to-date. + (force-window-update (selected-window))))) + (entry (cdr (assq second-char list)))) + (if entry + ;; Found it: return the mapped char + (vector + (if (and enable-multibyte-characters + (>= entry ?\200)) + (+ iso-accents-insert-offset entry) + entry)) + ;; Otherwise, advance and schedule the second key for execution. + (push second-char unread-command-events) + (vector first-char)))) + +;; It is a matter of taste if you want the minor mode indicated +;; in the mode line... +;; If so, uncomment the next four lines. +;; (or (assq 'iso-accents-mode minor-mode-alist) +;; (setq minor-mode-alist +;; (append minor-mode-alist +;; '((iso-accents-mode " ISO-Acc"))))) + +;;;###autoload +(defun iso-accents-mode (&optional arg) + "Toggle ISO Accents mode, in which accents modify the following letter. +This permits easy insertion of accented characters according to ISO-8859-1. +When Iso-accents mode is enabled, accent character keys +\(\\=`, \\=', \", ^, / and ~) do not self-insert; instead, they modify the following +letter key so that it inserts an ISO accented letter. + +You can customize ISO Accents mode to a particular language +with the command `iso-accents-customize'. + +Special combinations: ~c gives a c with cedilla, +~d gives an Icelandic eth (d with dash). +~t gives an Icelandic thorn. +\"s gives German sharp s. +/a gives a with ring. +/e gives an a-e ligature. +~< and ~> give guillemots. +~! gives an inverted exclamation mark. +~? gives an inverted question mark. + +With an argument, a positive argument enables ISO Accents mode, +and a negative argument disables it." + + (interactive "P") + + (if (if arg + ;; Negative arg means switch it off. + (<= (prefix-numeric-value arg) 0) + ;; No arg means toggle. + iso-accents-mode) + (setq iso-accents-mode nil) + + ;; Enable electric accents. + (setq iso-accents-mode t))) + +(defun iso-accents-customize (language) + "Customize the ISO accents machinery for a particular language. +It selects the customization based on the specifications in the +`iso-languages' variable." + (interactive (list (completing-read "Language: " iso-languages nil t))) + (let ((table (cdr (assoc language iso-languages))) + all-accents tail) + (if (not table) + (error "Unknown language `%s'" language) + (setq iso-accents-insert-offset (- (make-char (if (symbolp (car table)) + (car table) + 'latin-iso8859-1)) + 128)) + (if (symbolp (car table)) + (setq table (cdr table))) + (setq iso-language language + iso-accents-list table) + (if key-translation-map + (substitute-key-definition + 'iso-accents-accent-key nil key-translation-map) + (setq key-translation-map (make-sparse-keymap))) + ;; Set up translations for all the characters that are used as + ;; accent prefixes in this language. + (setq tail iso-accents-list) + (while tail + (define-key key-translation-map (vector (car (car tail))) + 'iso-accents-accent-key) + (setq tail (cdr tail)))))) + +(defun iso-accentuate (start end) + "Convert two-character sequences in region into accented characters. +Noninteractively, this operates on text from START to END. +This uses the same conversion that ISO Accents mode uses for type-in." + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region start end) + (goto-char start) + (forward-char 1) + (let (entry) + (while (< (point) end) + (if (and (memq (preceding-char) iso-accents-enable) + (setq entry (cdr (assq (following-char) (assq (preceding-char) iso-accents-list))))) + (progn + (forward-char -1) + (delete-char 2) + (insert entry) + (setq end (1- end))) + (forward-char 1))))))) + +(defun iso-accent-rassoc-unit (value alist) + (let (elt acc) + (while (and alist (not elt)) + (setq acc (car (car alist)) + elt (car (rassq value (cdr (car alist)))) + alist (cdr alist))) + (if elt + (cons acc elt)))) + +(defun iso-unaccentuate (start end) + "Convert accented characters in the region into two-character sequences. +Noninteractively, this operates on text from START to END. +This uses the opposite of the conversion done by ISO Accents mode for type-in." + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region start end) + (goto-char start) + (let (entry) + (while (< (point) end) + (if (and (> (following-char) 127) + (setq entry (iso-accent-rassoc-unit (following-char) + iso-accents-list))) + (progn + (delete-char 1) + (insert (car entry) (cdr entry)) + (setq end (1+ end))) + (forward-char 1))))))) + +(defun iso-deaccentuate (start end) + "Convert accented characters in the region into unaccented characters. +Noninteractively, this operates on text from START to END." + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region start end) + (goto-char start) + (let (entry) + (while (< (point) end) + (if (and (> (following-char) 127) + (setq entry (iso-accent-rassoc-unit (following-char) + iso-accents-list))) + (progn + (delete-char 1) + (insert (cdr entry))) + (forward-char 1))))))) + +;; Set up the default settings. +(iso-accents-customize "latin-1") + +;; Use Iso-Accents mode in the minibuffer +;; if it was in use in the previous buffer. +(defun iso-acc-minibuf-setup () + (setq iso-accents-mode + (with-current-buffer (window-buffer minibuffer-scroll-window) + iso-accents-mode))) + +(add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup) + +;;; iso-acc.el ends here diff --git a/lisp/obsolete/iso-insert.el b/lisp/obsolete/iso-insert.el new file mode 100644 index 00000000000..1075ae03e0c --- /dev/null +++ b/lisp/obsolete/iso-insert.el @@ -0,0 +1,630 @@ +;;; iso-insert.el --- insert functions for ISO 8859/1 + +;; Copyright (C) 1987, 1994, 2001-2017 Free Software Foundation, Inc. + +;; Author: Howard Gayle +;; Maintainer: emacs-devel@gnu.org +;; Keywords: i18n +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Provides keys for inserting ISO Latin-1 characters. They use the +;; prefix key C-x 8. Type C-x 8 C-h for a list. + +;;; Code: + +(defun insert-no-break-space () + (interactive "*") + (insert ?\ ) +) + +(defun insert-inverted-exclamation-mark () + (interactive "*") + (insert ?\¡) +) + +(defun insert-cent-sign () + (interactive "*") + (insert ?\¢) +) + +(defun insert-pound-sign () + (interactive "*") + (insert ?\£) +) + +(defun insert-general-currency-sign () + (interactive "*") + (insert ?\¤) +) + +(defun insert-yen-sign () + (interactive "*") + (insert ?\¥) +) + +(defun insert-broken-vertical-line () + (interactive "*") + (insert ?\¦) +) + +(defun insert-section-sign () + (interactive "*") + (insert ?\§) +) + +(defun insert-diaeresis () + (interactive "*") + (insert ?\¨) +) + +(defun insert-copyright-sign () + (interactive "*") + (insert ?\©) +) + +(defun insert-ordinal-indicator-feminine () + (interactive "*") + (insert ?\ª) +) + +(defun insert-angle-quotation-mark-left () + (interactive "*") + (insert ?\«) +) + +(defun insert-not-sign () + (interactive "*") + (insert ?\¬) +) + +(defun insert-soft-hyphen () + (interactive "*") + (insert ?\) +) + +(defun insert-registered-sign () + (interactive "*") + (insert ?\®) +) + +(defun insert-macron () + (interactive "*") + (insert ?\¯) +) + +(defun insert-degree-sign () + (interactive "*") + (insert ?\°) +) + +(defun insert-plus-or-minus-sign () + (interactive "*") + (insert ?\±) +) + +(defun insert-superscript-two () + (interactive "*") + (insert ?\²) +) + +(defun insert-superscript-three () + (interactive "*") + (insert ?\³) +) + +(defun insert-acute-accent () + (interactive "*") + (insert ?\´) +) + +(defun insert-micro-sign () + (interactive "*") + (insert ?\µ) +) + +(defun insert-pilcrow () + (interactive "*") + (insert ?\¶) +) + +(defun insert-middle-dot () + (interactive "*") + (insert ?\·) +) + +(defun insert-cedilla () + (interactive "*") + (insert ?\¸) +) + +(defun insert-superscript-one () + (interactive "*") + (insert ?\¹) +) + +(defun insert-ordinal-indicator-masculine () + (interactive "*") + (insert ?\º) +) + +(defun insert-angle-quotation-mark-right () + (interactive "*") + (insert ?\») +) + +(defun insert-fraction-one-quarter () + (interactive "*") + (insert ?\¼) +) + +(defun insert-fraction-one-half () + (interactive "*") + (insert ?\½) +) + +(defun insert-fraction-three-quarters () + (interactive "*") + (insert ?\¾) +) + +(defun insert-inverted-question-mark () + (interactive "*") + (insert ?\¿) +) + +(defun insert-A-grave () + (interactive "*") + (insert ?\À) +) + +(defun insert-A-acute () + (interactive "*") + (insert ?\Á) +) + +(defun insert-A-circumflex () + (interactive "*") + (insert ?\Â) +) + +(defun insert-A-tilde () + (interactive "*") + (insert ?\Ã) +) + +(defun insert-A-umlaut () + (interactive "*") + (insert ?\Ä) +) + +(defun insert-A-ring () + (interactive "*") + (insert ?\Å) +) + +(defun insert-AE () + (interactive "*") + (insert ?\Æ) +) + +(defun insert-C-cedilla () + (interactive "*") + (insert ?\Ç) +) + +(defun insert-E-grave () + (interactive "*") + (insert ?\È) +) + +(defun insert-E-acute () + (interactive "*") + (insert ?\É) +) + +(defun insert-E-circumflex () + (interactive "*") + (insert ?\Ê) +) + +(defun insert-E-umlaut () + (interactive "*") + (insert ?\Ë) +) + +(defun insert-I-grave () + (interactive "*") + (insert ?\Ì) +) + +(defun insert-I-acute () + (interactive "*") + (insert ?\Í) +) + +(defun insert-I-circumflex () + (interactive "*") + (insert ?\Î) +) + +(defun insert-I-umlaut () + (interactive "*") + (insert ?\Ï) +) + +(defun insert-D-stroke () + (interactive "*") + (insert ?\Ð) +) + +(defun insert-N-tilde () + (interactive "*") + (insert ?\Ñ) +) + +(defun insert-O-grave () + (interactive "*") + (insert ?\Ò) +) + +(defun insert-O-acute () + (interactive "*") + (insert ?\Ó) +) + +(defun insert-O-circumflex () + (interactive "*") + (insert ?\Ô) +) + +(defun insert-O-tilde () + (interactive "*") + (insert ?\Õ) +) + +(defun insert-O-umlaut () + (interactive "*") + (insert ?\Ö) +) + +(defun insert-multiplication-sign () + (interactive "*") + (insert ?\×) +) + +(defun insert-O-slash () + (interactive "*") + (insert ?\Ø) +) + +(defun insert-U-grave () + (interactive "*") + (insert ?\Ù) +) + +(defun insert-U-acute () + (interactive "*") + (insert ?\Ú) +) + +(defun insert-U-circumflex () + (interactive "*") + (insert ?\Û) +) + +(defun insert-U-umlaut () + (interactive "*") + (insert ?\Ü) +) + +(defun insert-Y-acute () + (interactive "*") + (insert ?\Ý) +) + +(defun insert-THORN () + (interactive "*") + (insert ?\Þ) +) + +(defun insert-ss () + (interactive "*") + (insert ?\ß) +) + +(defun insert-a-grave () + (interactive "*") + (insert ?\à) +) + +(defun insert-a-acute () + (interactive "*") + (insert ?\á) +) + +(defun insert-a-circumflex () + (interactive "*") + (insert ?\â) +) + +(defun insert-a-tilde () + (interactive "*") + (insert ?\ã) +) + +(defun insert-a-umlaut () + (interactive "*") + (insert ?\ä) +) + +(defun insert-a-ring () + (interactive "*") + (insert ?\å) +) + +(defun insert-ae () + (interactive "*") + (insert ?\æ) +) + +(defun insert-c-cedilla () + (interactive "*") + (insert ?\ç) +) + +(defun insert-e-grave () + (interactive "*") + (insert ?\è) +) + +(defun insert-e-acute () + (interactive "*") + (insert ?\é) +) + +(defun insert-e-circumflex () + (interactive "*") + (insert ?\ê) +) + +(defun insert-e-umlaut () + (interactive "*") + (insert ?\ë) +) + +(defun insert-i-grave () + (interactive "*") + (insert ?\ì) +) + +(defun insert-i-acute () + (interactive "*") + (insert ?\í) +) + +(defun insert-i-circumflex () + (interactive "*") + (insert ?\î) +) + +(defun insert-i-umlaut () + (interactive "*") + (insert ?\ï) +) + +(defun insert-d-stroke () + (interactive "*") + (insert ?\ð) +) + +(defun insert-n-tilde () + (interactive "*") + (insert ?\ñ) +) + +(defun insert-o-grave () + (interactive "*") + (insert ?\ò) +) + +(defun insert-o-acute () + (interactive "*") + (insert ?\ó) +) + +(defun insert-o-circumflex () + (interactive "*") + (insert ?\ô) +) + +(defun insert-o-tilde () + (interactive "*") + (insert ?\õ) +) + +(defun insert-o-umlaut () + (interactive "*") + (insert ?\ö) +) + +(defun insert-division-sign () + (interactive "*") + (insert ?\÷) +) + +(defun insert-o-slash () + (interactive "*") + (insert ?\ø) +) + +(defun insert-u-grave () + (interactive "*") + (insert ?\ù) +) + +(defun insert-u-acute () + (interactive "*") + (insert ?\ú) +) + +(defun insert-u-circumflex () + (interactive "*") + (insert ?\û) +) + +(defun insert-u-umlaut () + (interactive "*") + (insert ?\ü) +) + +(defun insert-y-acute () + (interactive "*") + (insert ?\ý) +) + +(defun insert-thorn () + (interactive "*") + (insert ?\þ) +) + +(defun insert-y-umlaut () + (interactive "*") + (insert ?\ÿ) +) + +(defvar 8859-1-map nil "Keymap for ISO 8859/1 character insertion.") +(if 8859-1-map nil + (setq 8859-1-map (make-keymap)) + (define-key 8859-1-map " " 'insert-no-break-space) + (define-key 8859-1-map "!" 'insert-inverted-exclamation-mark) + (define-key 8859-1-map "\"" (make-sparse-keymap)) + (define-key 8859-1-map "\"\"" 'insert-diaeresis) + (define-key 8859-1-map "\"A" 'insert-A-umlaut) + (define-key 8859-1-map "\"E" 'insert-E-umlaut) + (define-key 8859-1-map "\"I" 'insert-I-umlaut) + (define-key 8859-1-map "\"O" 'insert-O-umlaut) + (define-key 8859-1-map "\"U" 'insert-U-umlaut) + (define-key 8859-1-map "\"a" 'insert-a-umlaut) + (define-key 8859-1-map "\"e" 'insert-e-umlaut) + (define-key 8859-1-map "\"i" 'insert-i-umlaut) + (define-key 8859-1-map "\"o" 'insert-o-umlaut) + (define-key 8859-1-map "\"u" 'insert-u-umlaut) + (define-key 8859-1-map "\"y" 'insert-y-umlaut) + (define-key 8859-1-map "'" (make-sparse-keymap)) + (define-key 8859-1-map "''" 'insert-acute-accent) + (define-key 8859-1-map "'A" 'insert-A-acute) + (define-key 8859-1-map "'E" 'insert-E-acute) + (define-key 8859-1-map "'I" 'insert-I-acute) + (define-key 8859-1-map "'O" 'insert-O-acute) + (define-key 8859-1-map "'U" 'insert-U-acute) + (define-key 8859-1-map "'Y" 'insert-Y-acute) + (define-key 8859-1-map "'a" 'insert-a-acute) + (define-key 8859-1-map "'e" 'insert-e-acute) + (define-key 8859-1-map "'i" 'insert-i-acute) + (define-key 8859-1-map "'o" 'insert-o-acute) + (define-key 8859-1-map "'u" 'insert-u-acute) + (define-key 8859-1-map "'y" 'insert-y-acute) + (define-key 8859-1-map "$" 'insert-general-currency-sign) + (define-key 8859-1-map "+" 'insert-plus-or-minus-sign) + (define-key 8859-1-map "," (make-sparse-keymap)) + (define-key 8859-1-map ",," 'insert-cedilla) + (define-key 8859-1-map ",C" 'insert-C-cedilla) + (define-key 8859-1-map ",c" 'insert-c-cedilla) + (define-key 8859-1-map "-" 'insert-soft-hyphen) + (define-key 8859-1-map "." 'insert-middle-dot) + (define-key 8859-1-map "/" (make-sparse-keymap)) + (define-key 8859-1-map "//" 'insert-division-sign) + (define-key 8859-1-map "/O" 'insert-O-slash) + (define-key 8859-1-map "/o" 'insert-o-slash) + (define-key 8859-1-map "1" (make-sparse-keymap)) + (define-key 8859-1-map "1/" (make-sparse-keymap)) + (define-key 8859-1-map "1/2" 'insert-fraction-one-half) + (define-key 8859-1-map "1/4" 'insert-fraction-one-quarter) + (define-key 8859-1-map "3" (make-sparse-keymap)) + (define-key 8859-1-map "3/" (make-sparse-keymap)) + (define-key 8859-1-map "3/4" 'insert-fraction-three-quarters) + (define-key 8859-1-map "<" 'insert-angle-quotation-mark-left) + (define-key 8859-1-map "=" 'insert-macron) + (define-key 8859-1-map ">" 'insert-angle-quotation-mark-right) + (define-key 8859-1-map "?" 'insert-inverted-question-mark) + (define-key 8859-1-map "A" 'insert-A-ring) + (define-key 8859-1-map "E" 'insert-AE) + (define-key 8859-1-map "C" 'insert-copyright-sign) + (define-key 8859-1-map "D" 'insert-D-stroke) + (define-key 8859-1-map "L" 'insert-pound-sign) + (define-key 8859-1-map "P" 'insert-pilcrow) + (define-key 8859-1-map "R" 'insert-registered-sign) + (define-key 8859-1-map "S" 'insert-section-sign) + (define-key 8859-1-map "T" 'insert-THORN) + (define-key 8859-1-map "Y" 'insert-yen-sign) + (define-key 8859-1-map "^" (make-sparse-keymap)) + (define-key 8859-1-map "^1" 'insert-superscript-one) + (define-key 8859-1-map "^2" 'insert-superscript-two) + (define-key 8859-1-map "^3" 'insert-superscript-three) + (define-key 8859-1-map "^A" 'insert-A-circumflex) + (define-key 8859-1-map "^E" 'insert-E-circumflex) + (define-key 8859-1-map "^I" 'insert-I-circumflex) + (define-key 8859-1-map "^O" 'insert-O-circumflex) + (define-key 8859-1-map "^U" 'insert-U-circumflex) + (define-key 8859-1-map "^a" 'insert-a-circumflex) + (define-key 8859-1-map "^e" 'insert-e-circumflex) + (define-key 8859-1-map "^i" 'insert-i-circumflex) + (define-key 8859-1-map "^o" 'insert-o-circumflex) + (define-key 8859-1-map "^u" 'insert-u-circumflex) + (define-key 8859-1-map "_" (make-sparse-keymap)) + (define-key 8859-1-map "_a" 'insert-ordinal-indicator-feminine) + (define-key 8859-1-map "_o" 'insert-ordinal-indicator-masculine) + (define-key 8859-1-map "`" (make-sparse-keymap)) + (define-key 8859-1-map "`A" 'insert-A-grave) + (define-key 8859-1-map "`E" 'insert-E-grave) + (define-key 8859-1-map "`I" 'insert-I-grave) + (define-key 8859-1-map "`O" 'insert-O-grave) + (define-key 8859-1-map "`U" 'insert-U-grave) + (define-key 8859-1-map "`a" 'insert-a-grave) + (define-key 8859-1-map "`e" 'insert-e-grave) + (define-key 8859-1-map "`i" 'insert-i-grave) + (define-key 8859-1-map "`o" 'insert-o-grave) + (define-key 8859-1-map "`u" 'insert-u-grave) + (define-key 8859-1-map "a" 'insert-a-ring) + (define-key 8859-1-map "e" 'insert-ae) + (define-key 8859-1-map "c" 'insert-cent-sign) + (define-key 8859-1-map "d" 'insert-d-stroke) + (define-key 8859-1-map "o" 'insert-degree-sign) + (define-key 8859-1-map "s" 'insert-ss) + (define-key 8859-1-map "t" 'insert-thorn) + (define-key 8859-1-map "u" 'insert-micro-sign) + (define-key 8859-1-map "x" 'insert-multiplication-sign) + (define-key 8859-1-map "|" 'insert-broken-vertical-line) + (define-key 8859-1-map "~" (make-sparse-keymap)) + (define-key 8859-1-map "~A" 'insert-A-tilde) + (define-key 8859-1-map "~N" 'insert-N-tilde) + (define-key 8859-1-map "~O" 'insert-O-tilde) + (define-key 8859-1-map "~a" 'insert-a-tilde) + (define-key 8859-1-map "~n" 'insert-n-tilde) + (define-key 8859-1-map "~o" 'insert-o-tilde) + (define-key 8859-1-map "~~" 'insert-not-sign) + (if (not (lookup-key global-map "\C-x8")) + (define-key global-map "\C-x8" 8859-1-map)) +) +(defalias '8859-1-map 8859-1-map) + +(provide 'iso-insert) + +;;; iso-insert.el ends here diff --git a/lisp/obsolete/iso-swed.el b/lisp/obsolete/iso-swed.el new file mode 100644 index 00000000000..e3231be20e9 --- /dev/null +++ b/lisp/obsolete/iso-swed.el @@ -0,0 +1,150 @@ +;;; iso-swed.el --- set up char tables for ISO 8859/1 for Swedish/Finnish ttys + +;; Copyright (C) 1987, 2001-2017 Free Software Foundation, Inc. + +;; Author: Howard Gayle +;; Maintainer: emacs-devel@gnu.org +;; Keywords: i18n +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Written by Howard Gayle. See case-table.el for details. + +;;; Code: + +;; This code sets up to display ISO 8859/1 characters on +;; terminals that have ASCII in the G0 set and a Swedish/Finnish +;; version of ISO 646 in the G1 set. The G1 set differs from +;; ASCII as follows: +;; +;; ASCII G1 +;; $ general currency sign +;; @ capital E with acute accent +;; [ capital A with diaeresis or umlaut mark +;; \ capital O with diaeresis or umlaut mark +;; ] capital A with ring +;; ^ capital U with diaeresis or umlaut mark +;; ` small e with acute accent +;; { small a with diaeresis or umlaut mark +;; | small o with diaeresis or umlaut mark +;; } small a with ring +;; ~ small u with diaeresis or umlaut mark + +(require 'disp-table) + +(standard-display-ascii 160 "{_}") ; NBSP (no-break space) +(standard-display-ascii 161 "{!}") ; inverted exclamation mark +(standard-display-ascii 162 "{c}") ; cent sign +(standard-display-ascii 163 "{GBP}") ; pound sign +(standard-display-g1 164 ?$) ; general currency sign +(standard-display-ascii 165 "{JPY}") ; yen sign +(standard-display-ascii 166 "{|}") ; broken vertical line +(standard-display-ascii 167 "{S}") ; section sign +(standard-display-ascii 168 "{\"}") ; diaeresis +(standard-display-ascii 169 "{C}") ; copyright sign +(standard-display-ascii 170 "{_a}") ; ordinal indicator, feminine +(standard-display-ascii 171 "{<<}") ; left angle quotation mark +(standard-display-ascii 172 "{~}") ; not sign +(standard-display-ascii 173 "{-}") ; soft hyphen +(standard-display-ascii 174 "{R}") ; registered sign +(standard-display-ascii 175 "{=}") ; macron +(standard-display-ascii 176 "{o}") ; degree sign +(standard-display-ascii 177 "{+-}") ; plus or minus sign +(standard-display-ascii 178 "{2}") ; superscript two +(standard-display-ascii 179 "{3}") ; superscript three +(standard-display-ascii 180 "{'}") ; acute accent +(standard-display-ascii 181 "{u}") ; micro sign +(standard-display-ascii 182 "{P}") ; pilcrow +(standard-display-ascii 183 "{.}") ; middle dot +(standard-display-ascii 184 "{,}") ; cedilla +(standard-display-ascii 185 "{1}") ; superscript one +(standard-display-ascii 186 "{_o}") ; ordinal indicator, masculine +(standard-display-ascii 187 "{>>}") ; right angle quotation mark +(standard-display-ascii 188 "{1/4}") ; fraction one-quarter +(standard-display-ascii 189 "{1/2}") ; fraction one-half +(standard-display-ascii 190 "{3/4}") ; fraction three-quarters +(standard-display-ascii 191 "{?}") ; inverted question mark +(standard-display-ascii 192 "{`A}") ; A with grave accent +(standard-display-ascii 193 "{'A}") ; A with acute accent +(standard-display-ascii 194 "{^A}") ; A with circumflex accent +(standard-display-ascii 195 "{~A}") ; A with tilde +(standard-display-g1 196 ?[) ; A with diaeresis or umlaut mark +(standard-display-g1 197 ?]) ; A with ring +(standard-display-ascii 198 "{AE}") ; AE diphthong +(standard-display-ascii 199 "{,C}") ; C with cedilla +(standard-display-ascii 200 "{`E}") ; E with grave accent +(standard-display-g1 201 ?@) ; E with acute accent +(standard-display-ascii 202 "{^E}") ; E with circumflex accent +(standard-display-ascii 203 "{\"E}") ; E with diaeresis or umlaut mark +(standard-display-ascii 204 "{`I}") ; I with grave accent +(standard-display-ascii 205 "{'I}") ; I with acute accent +(standard-display-ascii 206 "{^I}") ; I with circumflex accent +(standard-display-ascii 207 "{\"I}") ; I with diaeresis or umlaut mark +(standard-display-ascii 208 "{-D}") ; D with stroke, Icelandic eth +(standard-display-ascii 209 "{~N}") ; N with tilde +(standard-display-ascii 210 "{`O}") ; O with grave accent +(standard-display-ascii 211 "{'O}") ; O with acute accent +(standard-display-ascii 212 "{^O}") ; O with circumflex accent +(standard-display-ascii 213 "{~O}") ; O with tilde +(standard-display-g1 214 ?\\) ; O with diaeresis or umlaut mark +(standard-display-ascii 215 "{x}") ; multiplication sign +(standard-display-ascii 216 "{/O}") ; O with slash +(standard-display-ascii 217 "{`U}") ; U with grave accent +(standard-display-ascii 218 "{'U}") ; U with acute accent +(standard-display-ascii 219 "{^U}") ; U with circumflex accent +(standard-display-g1 220 ?^) ; U with diaeresis or umlaut mark +(standard-display-ascii 221 "{'Y}") ; Y with acute accent +(standard-display-ascii 222 "{TH}") ; capital thorn, Icelandic +(standard-display-ascii 223 "{ss}") ; small sharp s, German +(standard-display-ascii 224 "{`a}") ; a with grave accent +(standard-display-ascii 225 "{'a}") ; a with acute accent +(standard-display-ascii 226 "{^a}") ; a with circumflex accent +(standard-display-ascii 227 "{~a}") ; a with tilde +(standard-display-g1 228 ?{) ; a with diaeresis or umlaut mark +(standard-display-g1 229 ?}) ; a with ring +(standard-display-ascii 230 "{ae}") ; ae diphthong +(standard-display-ascii 231 "{,c}") ; c with cedilla +(standard-display-ascii 232 "{`e}") ; e with grave accent +(standard-display-g1 233 ?`) ; e with acute accent +(standard-display-ascii 234 "{^e}") ; e with circumflex accent +(standard-display-ascii 235 "{\"e}") ; e with diaeresis or umlaut mark +(standard-display-ascii 236 "{`i}") ; i with grave accent +(standard-display-ascii 237 "{'i}") ; i with acute accent +(standard-display-ascii 238 "{^i}") ; i with circumflex accent +(standard-display-ascii 239 "{\"i}") ; i with diaeresis or umlaut mark +(standard-display-ascii 240 "{-d}") ; d with stroke, Icelandic eth +(standard-display-ascii 241 "{~n}") ; n with tilde +(standard-display-ascii 242 "{`o}") ; o with grave accent +(standard-display-ascii 243 "{'o}") ; o with acute accent +(standard-display-ascii 244 "{^o}") ; o with circumflex accent +(standard-display-ascii 245 "{~o}") ; o with tilde +(standard-display-g1 246 ?|) ; o with diaeresis or umlaut mark +(standard-display-ascii 247 "{/}") ; division sign +(standard-display-ascii 248 "{/o}") ; o with slash +(standard-display-ascii 249 "{`u}") ; u with grave accent +(standard-display-ascii 250 "{'u}") ; u with acute accent +(standard-display-ascii 251 "{^u}") ; u with circumflex accent +(standard-display-g1 252 ?~) ; u with diaeresis or umlaut mark +(standard-display-ascii 253 "{'y}") ; y with acute accent +(standard-display-ascii 254 "{th}") ; small thorn, Icelandic +(standard-display-ascii 255 "{\"y}") ; small y with diaeresis or umlaut mark + +(provide 'iso-swed) + +;;; iso-swed.el ends here diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 1af6c1631b4..71cc917938d 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -1,6 +1,6 @@ ;;; iswitchb.el --- switch between buffers using substrings -;; Copyright (C) 1996-1997, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2000-2017 Free Software Foundation, Inc. ;; Author: Stephen Eglen <stephen@gnu.org> ;; Maintainer: Stephen Eglen <stephen@gnu.org> diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el index 12dadd272d1..b6bbca44801 100644 --- a/lisp/obsolete/landmark.el +++ b/lisp/obsolete/landmark.el @@ -1,6 +1,6 @@ ;;; landmark.el --- Neural-network robot that learns landmarks -*- lexical-binding:t -*- -;; Copyright (C) 1996-1997, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2000-2017 Free Software Foundation, Inc. ;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>) ;; Created: December 16, 1996 - first release to usenet diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el index 21ceda29387..5fa8fa48fa8 100644 --- a/lisp/obsolete/lazy-lock.el +++ b/lisp/obsolete/lazy-lock.el @@ -1,6 +1,6 @@ ;;; lazy-lock.el --- lazy demand-driven fontification for fast Font Lock mode -;; Copyright (C) 1994-1998, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2001-2017 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.org> ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/ledit.el b/lisp/obsolete/ledit.el index 49cda24e642..3dde96c3bb7 100644 --- a/lisp/obsolete/ledit.el +++ b/lisp/obsolete/ledit.el @@ -1,6 +1,6 @@ ;;; ledit.el --- Emacs side of ledit interface -;; Copyright (C) 1985, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: languages diff --git a/lisp/obsolete/levents.el b/lisp/obsolete/levents.el index 0211b6a44d3..e445b1ac553 100644 --- a/lisp/obsolete/levents.el +++ b/lisp/obsolete/levents.el @@ -1,6 +1,6 @@ ;;; levents.el --- emulate the Lucid event data type and associated functions -;; Copyright (C) 1993, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: emulations diff --git a/lisp/obsolete/lmenu.el b/lisp/obsolete/lmenu.el index be1be87099c..a790d211485 100644 --- a/lisp/obsolete/lmenu.el +++ b/lisp/obsolete/lmenu.el @@ -1,6 +1,6 @@ ;;; lmenu.el --- emulate Lucid's menubar support -;; Copyright (C) 1992-1994, 1997, 2001-2016 Free Software Foundation, +;; Copyright (C) 1992-1994, 1997, 2001-2017 Free Software Foundation, ;; Inc. ;; Keywords: emulations obsolete diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index ff194de8c0c..a6c6a0c9fcf 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el @@ -1,6 +1,6 @@ ;;; longlines.el --- automatically wrap long lines -*- coding:utf-8 -*- -;; Copyright (C) 2000-2001, 2004-2016 Free Software Foundation, Inc. +;; Copyright (C) 2000-2001, 2004-2017 Free Software Foundation, Inc. ;; Authors: Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> ;; Alex Schroeder <alex@gnu.org> diff --git a/lisp/obsolete/lucid.el b/lisp/obsolete/lucid.el index 1a25b0db0e9..bf8347bf9e6 100644 --- a/lisp/obsolete/lucid.el +++ b/lisp/obsolete/lucid.el @@ -1,6 +1,6 @@ ;;; lucid.el --- emulate some Lucid Emacs functions -;; Copyright (C) 1993, 1995, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: emulations diff --git a/lisp/obsolete/mouse-sel.el b/lisp/obsolete/mouse-sel.el index b4fd7615e18..3e673725aea 100644 --- a/lisp/obsolete/mouse-sel.el +++ b/lisp/obsolete/mouse-sel.el @@ -1,6 +1,6 @@ ;;; mouse-sel.el --- multi-click selection support -;; Copyright (C) 1993-1995, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2001-2017 Free Software Foundation, Inc. ;; Author: Mike Williams <mdub@bigfoot.com> ;; Keywords: mouse diff --git a/lisp/obsolete/old-emacs-lock.el b/lisp/obsolete/old-emacs-lock.el index fa6aed0aa7d..233c105dc0d 100644 --- a/lisp/obsolete/old-emacs-lock.el +++ b/lisp/obsolete/old-emacs-lock.el @@ -1,6 +1,6 @@ ;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -;; Copyright (C) 1994, 1997, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1997, 2001-2017 Free Software Foundation, Inc. ;; Author: Tom Wurgler <twurgler@goodyear.com> ;; Created: 12/8/94 diff --git a/lisp/obsolete/old-whitespace.el b/lisp/obsolete/old-whitespace.el index 5119fb003d8..defd18b35aa 100644 --- a/lisp/obsolete/old-whitespace.el +++ b/lisp/obsolete/old-whitespace.el @@ -1,6 +1,6 @@ ;;; whitespace.el --- warn about and clean bogus whitespaces in the file -;; Copyright (C) 1999-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999-2017 Free Software Foundation, Inc. ;; Author: Rajesh Vaidheeswarran <rv@gnu.org> ;; Keywords: convenience diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index a8b131611a6..2a61dc01ca3 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el @@ -1,6 +1,6 @@ ;;; options.el --- edit Options command for Emacs -;; Copyright (C) 1985, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Obsolete-since: 22.1 diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el index e5a49f9e24b..5784601674c 100644 --- a/lisp/obsolete/otodo-mode.el +++ b/lisp/obsolete/otodo-mode.el @@ -1,6 +1,6 @@ ;;; todo-mode.el --- major mode for editing TODO list files -;; Copyright (C) 1997, 1999, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2017 Free Software Foundation, Inc. ;; Author: Oliver Seidel <privat@os10000.net> ;; Maintainer: Stephen Berman <stephen.berman@gmx.net> diff --git a/lisp/obsolete/pc-mode.el b/lisp/obsolete/pc-mode.el index c76280d09b5..c1b7ff92c70 100644 --- a/lisp/obsolete/pc-mode.el +++ b/lisp/obsolete/pc-mode.el @@ -1,6 +1,6 @@ ;;; pc-mode.el --- emulate certain key bindings used on PCs -;; Copyright (C) 1995, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: emulations diff --git a/lisp/obsolete/pc-select.el b/lisp/obsolete/pc-select.el index 9fa573cb5f1..59da29391d7 100644 --- a/lisp/obsolete/pc-select.el +++ b/lisp/obsolete/pc-select.el @@ -2,7 +2,7 @@ ;;; (or MAC GUI or MS-windoze (bah)) look-and-feel ;;; including key bindings. -;; Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2000-2017 Free Software Foundation, Inc. ;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE> ;; Keywords: convenience emulations diff --git a/lisp/obsolete/pgg-def.el b/lisp/obsolete/pgg-def.el index d8c7cb6eceb..8d59c688b9d 100644 --- a/lisp/obsolete/pgg-def.el +++ b/lisp/obsolete/pgg-def.el @@ -1,6 +1,6 @@ ;;; pgg-def.el --- functions/macros for defining PGG functions -;; Copyright (C) 1999, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 diff --git a/lisp/obsolete/pgg-gpg.el b/lisp/obsolete/pgg-gpg.el index 77de1bbfd5f..189b119bfae 100644 --- a/lisp/obsolete/pgg-gpg.el +++ b/lisp/obsolete/pgg-gpg.el @@ -1,6 +1,6 @@ ;;; pgg-gpg.el --- GnuPG support for PGG. -;; Copyright (C) 1999-2000, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Symmetric encryption and gpg-agent support added by: diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el index 884974c90c4..b44117773d9 100644 --- a/lisp/obsolete/pgg-parse.el +++ b/lisp/obsolete/pgg-parse.el @@ -1,6 +1,6 @@ ;;; pgg-parse.el --- OpenPGP packet parsing -;; Copyright (C) 1999, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/10/28 diff --git a/lisp/obsolete/pgg-pgp.el b/lisp/obsolete/pgg-pgp.el index 702364f72bf..507fbbb9136 100644 --- a/lisp/obsolete/pgg-pgp.el +++ b/lisp/obsolete/pgg-pgp.el @@ -1,6 +1,6 @@ ;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG. -;; Copyright (C) 1999-2000, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 diff --git a/lisp/obsolete/pgg-pgp5.el b/lisp/obsolete/pgg-pgp5.el index b8d2ac74ada..8fd976fc23f 100644 --- a/lisp/obsolete/pgg-pgp5.el +++ b/lisp/obsolete/pgg-pgp5.el @@ -1,6 +1,6 @@ ;;; pgg-pgp5.el --- PGP 5.* support for PGG. -;; Copyright (C) 1999-2000, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el index 90efac72114..f99d759ec45 100644 --- a/lisp/obsolete/pgg.el +++ b/lisp/obsolete/pgg.el @@ -1,6 +1,6 @@ ;;; pgg.el --- glue for the various PGP implementations. -;; Copyright (C) 1999-2000, 2002-2016 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2017 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Symmetric encryption added by: Sascha Wilde <wilde@sha-bang.de> diff --git a/lisp/obsolete/rcompile.el b/lisp/obsolete/rcompile.el index bd23b8cc92a..dd2506841fd 100644 --- a/lisp/obsolete/rcompile.el +++ b/lisp/obsolete/rcompile.el @@ -1,6 +1,6 @@ ;;; rcompile.el --- run a compilation on a remote machine -;; Copyright (C) 1993-1994, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2017 Free Software Foundation, Inc. ;; Author: Alon Albert <alon@milcse.rtsg.mot.com> ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/resume.el b/lisp/obsolete/resume.el new file mode 100644 index 00000000000..b4dfab29479 --- /dev/null +++ b/lisp/obsolete/resume.el @@ -0,0 +1,125 @@ +;;; resume.el --- process command line args from within a suspended Emacs job + +;; Copyright (C) 1992, 2001-2017 Free Software Foundation, Inc. + +;; Author: Joe Wells <jbw@bucsf.bu.edu> +;; Adapted-By: ESR +;; Keywords: processes +;; Obsolete-since: 23.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; The purpose of this library is to handle command line arguments +;; when you resume an existing Emacs job. + +;; In order to use it, you must put this code in your .emacs file. + +;; (add-hook 'suspend-hook 'resume-suspend-hook) +;; (add-hook 'suspend-resume-hook 'resume-process-args) + +;; You can't get the benefit of this library by using the `emacs' command, +;; since that always starts a new Emacs job. Instead you must use a +;; command called `edit' which knows how to resume an existing Emacs job +;; if you have one, or start a new Emacs job if you don't have one. + +;; To define the `edit' command, run the script etc/emacs.csh (if you use CSH), +;; or etc/emacs.bash if you use BASH. You would normally do this in your +;; login script. + +;; Stephan Gildea suggested bug fix (gildea@bbn.com). +;; Ideas from Michael DeCorte and other people. + +;;; Code: + +(defvar resume-emacs-args-file (expand-file-name "~/.emacs_args") + "This file is where arguments are placed for a suspended Emacs job.") + +(defvar resume-emacs-args-buffer " *Command Line Args*" + "Buffer that is used by `resume-process-args'.") + +(defun resume-process-args () + "Handler for command line args given when Emacs is resumed." + (let ((start-buffer (current-buffer)) + (args-buffer (get-buffer-create resume-emacs-args-buffer)) + length args + (command-line-default-directory default-directory)) + (unwind-protect + (progn + (set-buffer args-buffer) + (erase-buffer) + ;; get the contents of resume-emacs-args-file + (condition-case () + (let ((result (insert-file-contents resume-emacs-args-file))) + (setq length (car (cdr result)))) + ;; the file doesn't exist, ergo no arguments + (file-error + (erase-buffer) + (setq length 0))) + (if (<= length 0) + (setq args nil) + ;; get the arguments from the buffer + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t\n") + (let ((begin (point))) + (skip-chars-forward "^ \t\n") + (setq args (cons (buffer-substring begin (point)) args))) + (skip-chars-forward " \t\n")) + ;; arguments are now in reverse order + (setq args (nreverse args)) + ;; make sure they're not read again + (erase-buffer)) + (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file) + ;; if nothing was in buffer, args will be null + (or (null args) + (setq command-line-default-directory + (file-name-as-directory (car args)) + args (cdr args))) + ;; actually process the arguments + (command-line-1 args)) + ;; If the command line args don't result in a find-file, the + ;; buffer will be left in args-buffer. So we change back to the + ;; original buffer. The reason I don't just use + ;; (let ((default-directory foo)) + ;; (command-line-1 args)) + ;; in the context of the original buffer is because let does not + ;; work properly with buffer-local variables. + (if (eq (current-buffer) args-buffer) + (set-buffer start-buffer))))) + +;;;###autoload +(defun resume-suspend-hook () + "Clear out the file used for transmitting args when Emacs resumes." + (with-current-buffer (get-buffer-create resume-emacs-args-buffer) + (erase-buffer) + (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file))) + +(defun resume-write-buffer-to-file (buffer file) + "Writes the contents of BUFFER into FILE, if permissions allow." + (if (not (file-writable-p file)) + (error "No permission to write file %s" file)) + (with-current-buffer buffer + (clear-visited-file-modtime) + (save-restriction + (widen) + (write-region (point-min) (point-max) file nil 'quiet)) + (set-buffer-modified-p nil))) + +(provide 'resume) + +;;; resume.el ends here diff --git a/lisp/obsolete/s-region.el b/lisp/obsolete/s-region.el index 27054c12dfa..8a85f3c7961 100644 --- a/lisp/obsolete/s-region.el +++ b/lisp/obsolete/s-region.el @@ -1,6 +1,6 @@ ;;; s-region.el --- set region using shift key -;; Copyright (C) 1994-1995, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2017 Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> ;; Keywords: terminals diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el new file mode 100644 index 00000000000..f9ec9c953c0 --- /dev/null +++ b/lisp/obsolete/scribe.el @@ -0,0 +1,329 @@ +;;; scribe.el --- scribe mode, and its idiosyncratic commands + +;; Copyright (C) 1985, 2001-2017 Free Software Foundation, Inc. + +;; Author: William Sommerfeld +;; (according to ack.texi) +;; Maintainer: emacs-devel@gnu.org +;; Keywords: wp +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; A major mode for editing source in written for the Scribe text formatter. +;; Knows about Scribe syntax and standard layout rules. The command to +;; run Scribe on a buffer is bogus; someone interested should fix it. + +;;; Code: + +(defvar compile-command) + +(defgroup scribe nil + "Scribe mode." + :prefix "scribe-" + :group 'wp) + +(defvar scribe-mode-syntax-table nil + "Syntax table used while in scribe mode.") + +(defvar scribe-mode-abbrev-table nil + "Abbrev table used while in scribe mode.") + +(defcustom scribe-fancy-paragraphs nil + "Non-nil makes Scribe mode use a different style of paragraph separation." + :type 'boolean + :group 'scribe) + +(defcustom scribe-electric-quote nil + "Non-nil makes insert of double quote use \\=`\\=` or \\='\\=' depending on context." + :type 'boolean + :group 'scribe) + +(defcustom scribe-electric-parenthesis nil + "Non-nil makes parenthesis char ( (]}> ) automatically insert its close +if typed after an @Command form." + :type 'boolean + :group 'scribe) + +(defconst scribe-open-parentheses "[({<" + "Open parenthesis characters for Scribe.") + +(defconst scribe-close-parentheses "])}>" + "Close parenthesis characters for Scribe. +These should match up with `scribe-open-parenthesis'.") + +(if (null scribe-mode-syntax-table) + (let ((st (syntax-table))) + (unwind-protect + (progn + (setq scribe-mode-syntax-table (copy-syntax-table + text-mode-syntax-table)) + (set-syntax-table scribe-mode-syntax-table) + (modify-syntax-entry ?\" " ") + (modify-syntax-entry ?\\ " ") + (modify-syntax-entry ?@ "w ") + (modify-syntax-entry ?< "(> ") + (modify-syntax-entry ?> ")< ") + (modify-syntax-entry ?[ "(] ") + (modify-syntax-entry ?] ")[ ") + (modify-syntax-entry ?{ "(} ") + (modify-syntax-entry ?} "){ ") + (modify-syntax-entry ?' "w ")) + (set-syntax-table st)))) + +(defvar scribe-mode-map nil) + +(if scribe-mode-map + nil + (setq scribe-mode-map (make-sparse-keymap)) + (define-key scribe-mode-map "\t" 'scribe-tab) + (define-key scribe-mode-map "\e\t" 'tab-to-tab-stop) + (define-key scribe-mode-map "\es" 'center-line) + (define-key scribe-mode-map "\e}" 'up-list) + (define-key scribe-mode-map "\eS" 'center-paragraph) + (define-key scribe-mode-map "\"" 'scribe-insert-quote) + (define-key scribe-mode-map "(" 'scribe-parenthesis) + (define-key scribe-mode-map "[" 'scribe-parenthesis) + (define-key scribe-mode-map "{" 'scribe-parenthesis) + (define-key scribe-mode-map "<" 'scribe-parenthesis) + (define-key scribe-mode-map "\C-c\C-c" 'scribe-chapter) + (define-key scribe-mode-map "\C-c\C-t" 'scribe-section) + (define-key scribe-mode-map "\C-c\C-s" 'scribe-subsection) + (define-key scribe-mode-map "\C-c\C-v" 'scribe-insert-environment) + (define-key scribe-mode-map "\C-c\C-e" 'scribe-bracket-region-be) + (define-key scribe-mode-map "\C-c[" 'scribe-begin) + (define-key scribe-mode-map "\C-c]" 'scribe-end) + (define-key scribe-mode-map "\C-c\C-i" 'scribe-italicize-word) + (define-key scribe-mode-map "\C-c\C-b" 'scribe-bold-word) + (define-key scribe-mode-map "\C-c\C-u" 'scribe-underline-word)) + +;;;###autoload +(define-derived-mode scribe-mode text-mode "Scribe" + "Major mode for editing files of Scribe (a text formatter) source. +Scribe-mode is similar to text-mode, with a few extra commands added. +\\{scribe-mode-map} + +Interesting variables: + +`scribe-fancy-paragraphs' + Non-nil makes Scribe mode use a different style of paragraph separation. + +`scribe-electric-quote' + Non-nil makes insert of double quote use \\=`\\=` or \\='\\=' depending on context. + +`scribe-electric-parenthesis' + Non-nil makes an open-parenthesis char (one of `([<{') + automatically insert its close if typed after an @Command form." + (set (make-local-variable 'comment-start) "@Comment[") + (set (make-local-variable 'comment-start-skip) (concat "@Comment[" scribe-open-parentheses "]")) + (set (make-local-variable 'comment-column) 0) + (set (make-local-variable 'comment-end) "]") + (set (make-local-variable 'paragraph-start) + (concat "\\([\n\f]\\)\\|\\(@\\w+[" + scribe-open-parentheses + "].*[" + scribe-close-parentheses + "]$\\)")) + (set (make-local-variable 'paragraph-separate) + (if scribe-fancy-paragraphs paragraph-start "$")) + (set (make-local-variable 'sentence-end) + "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") + (set (make-local-variable 'compile-command) + (concat "scribe " + (if buffer-file-name + (shell-quote-argument (buffer-file-name)))))) + +(defun scribe-tab () + (interactive) + (insert "@\\")) + +;; This algorithm could probably be improved somewhat. +;; Right now, it loses seriously... + +(defun scribe () + "Run Scribe on the current buffer." + (interactive) + (call-interactively 'compile)) + +(defun scribe-envelop-word (string count) + "Surround current word with Scribe construct @STRING[...]. +COUNT specifies how many words to surround. A negative count means +to skip backward." + (let ((spos (point)) (epos (point)) (ccoun 0) noparens) + (if (not (zerop count)) + (progn (if (= (char-syntax (preceding-char)) ?w) + (forward-sexp (min -1 count))) + (setq spos (point)) + (if (looking-at (concat "@\\w[" scribe-open-parentheses "]")) + (forward-char 2) + (goto-char epos) + (skip-chars-backward "\\W") + (forward-char -1)) + (forward-sexp (max count 1)) + (setq epos (point)))) + (goto-char spos) + (while (and (< ccoun (length scribe-open-parentheses)) + (save-excursion + (or (search-forward (char-to-string + (aref scribe-open-parentheses ccoun)) + epos t) + (search-forward (char-to-string + (aref scribe-close-parentheses ccoun)) + epos t))) + (setq ccoun (1+ ccoun)))) + (if (>= ccoun (length scribe-open-parentheses)) + (progn (goto-char epos) + (insert "@end(" string ")") + (goto-char spos) + (insert "@begin(" string ")")) + (goto-char epos) + (insert (aref scribe-close-parentheses ccoun)) + (goto-char spos) + (insert "@" string (aref scribe-open-parentheses ccoun)) + (goto-char epos) + (forward-char 3) + (skip-chars-forward scribe-close-parentheses)))) + +(defun scribe-underline-word (count) + "Underline COUNT words around point by means of Scribe constructs." + (interactive "p") + (scribe-envelop-word "u" count)) + +(defun scribe-bold-word (count) + "Boldface COUNT words around point by means of Scribe constructs." + (interactive "p") + (scribe-envelop-word "b" count)) + +(defun scribe-italicize-word (count) + "Italicize COUNT words around point by means of Scribe constructs." + (interactive "p") + (scribe-envelop-word "i" count)) + +(defun scribe-begin () + (interactive) + (insert "\n") + (forward-char -1) + (scribe-envelop-word "Begin" 0) + (re-search-forward (concat "[" scribe-open-parentheses "]"))) + +(defun scribe-end () + (interactive) + (insert "\n") + (forward-char -1) + (scribe-envelop-word "End" 0) + (re-search-forward (concat "[" scribe-open-parentheses "]"))) + +(defun scribe-chapter () + (interactive) + (insert "\n") + (forward-char -1) + (scribe-envelop-word "Chapter" 0) + (re-search-forward (concat "[" scribe-open-parentheses "]"))) + +(defun scribe-section () + (interactive) + (insert "\n") + (forward-char -1) + (scribe-envelop-word "Section" 0) + (re-search-forward (concat "[" scribe-open-parentheses "]"))) + +(defun scribe-subsection () + (interactive) + (insert "\n") + (forward-char -1) + (scribe-envelop-word "SubSection" 0) + (re-search-forward (concat "[" scribe-open-parentheses "]"))) + +(defun scribe-bracket-region-be (env min max) + (interactive "sEnvironment: \nr") + (save-excursion + (goto-char max) + (insert "@end(" env ")\n") + (goto-char min) + (insert "@begin(" env ")\n"))) + +(defun scribe-insert-environment (env) + (interactive "sEnvironment: ") + (scribe-bracket-region-be env (point) (point)) + (forward-line 1) + (insert ?\n) + (forward-char -1)) + +(defun scribe-insert-quote (count) + "Insert \\=`\\=`, \\='\\=' or \" according to preceding character. +If `scribe-electric-quote' is non-nil, insert \\=`\\=`, \\='\\=' or \" according +to preceding character. With numeric arg N, always insert N \" characters. +Else just insert \"." + (interactive "P") + (if (or count (not scribe-electric-quote)) + (self-insert-command (prefix-numeric-value count)) + (let (lastfore lastback lastquote) + (insert + (cond + ((= (preceding-char) ?\\) ?\") + ((bobp) "``") + (t + (setq lastfore (save-excursion (and (search-backward + "``" (- (point) 1000) t) + (point))) + lastback (save-excursion (and (search-backward + "''" (- (point) 1000) t) + (point))) + lastquote (save-excursion (and (search-backward + "\"" (- (point) 100) t) + (point)))) + (if (not lastquote) + (cond ((not lastfore) "``") + ((not lastback) "''") + ((> lastfore lastback) "''") + (t "``")) + (cond ((and (not lastback) (not lastfore)) "\"") + ((and lastback (not lastfore) (> lastquote lastback)) "\"") + ((and lastback (not lastfore) (> lastback lastquote)) "``") + ((and lastfore (not lastback) (> lastquote lastfore)) "\"") + ((and lastfore (not lastback) (> lastfore lastquote)) "''") + ((and (> lastquote lastfore) (> lastquote lastback)) "\"") + ((> lastfore lastback) "''") + (t "``"))))))))) + +(defun scribe-parenthesis (count) + "If scribe-electric-parenthesis is non-nil, insertion of an open-parenthesis +character inserts the following close parenthesis character if the +preceding text is of the form @Command." + (interactive "P") + (self-insert-command (prefix-numeric-value count)) + (let (at-command paren-char point-save) + (if (or count (not scribe-electric-parenthesis)) + nil + (save-excursion + (forward-char -1) + (setq point-save (point)) + (skip-chars-backward (concat "^ \n\t\f" scribe-open-parentheses)) + (setq at-command (and (equal (following-char) ?@) + (/= (point) (1- point-save))))) + (if (and at-command + (setq paren-char + (string-match (regexp-quote + (char-to-string (preceding-char))) + scribe-open-parentheses))) + (save-excursion + (insert (aref scribe-close-parentheses paren-char))))))) + +(provide 'scribe) + +;;; scribe.el ends here diff --git a/lisp/obsolete/spell.el b/lisp/obsolete/spell.el new file mode 100644 index 00000000000..5f8ad13b515 --- /dev/null +++ b/lisp/obsolete/spell.el @@ -0,0 +1,171 @@ +;;; spell.el --- spelling correction interface for Emacs + +;; Copyright (C) 1985, 2001-2017 Free Software Foundation, Inc. + +;; Maintainer: emacs-devel@gnu.org +;; Keywords: wp, unix +;; Obsolete-since: 23.1 +;; (not in obsolete/ directory then, but all functions marked obsolete) + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This mode provides an Emacs interface to the UNIX spell(1) program. +;; Entry points are `spell-buffer', `spell-word', `spell-region' and +;; `spell-string'. + +;; See also ispell.el for an interface to the ispell program. + +;;; Code: + +(defgroup spell nil + "Interface to the UNIX spell(1) program." + :prefix "spell-" + :group 'applications) + +(defcustom spell-command "spell" + "Command to run the spell program." + :type 'string + :group 'spell) + +(defcustom spell-filter nil + "Filter function to process text before passing it to spell program. +This function might remove text-processor commands. +nil means don't alter the text before checking it." + :type '(choice (const nil) function) + :group 'spell) + +;;;###autoload +(put 'spell-filter 'risky-local-variable t) + +;;;###autoload +(defun spell-buffer () + "Check spelling of every word in the buffer. +For each incorrect word, you are asked for the correct spelling +and then put into a query-replace to fix some or all occurrences. +If you do not want to change a word, just give the same word +as its \"correct\" spelling; then the query replace is skipped." + (interactive) + ;; Don't warn about spell-region being obsolete. + (with-no-warnings + (spell-region (point-min) (point-max) "buffer"))) +;;;###autoload +(make-obsolete 'spell-buffer 'ispell-buffer "23.1") + +;;;###autoload +(defun spell-word () + "Check spelling of word at or before point. +If it is not correct, ask user for the correct spelling +and `query-replace' the entire buffer to substitute it." + (interactive) + (let (beg end spell-filter) + (save-excursion + (if (not (looking-at "\\<")) + (forward-word -1)) + (setq beg (point)) + (forward-word 1) + (setq end (point))) + ;; Don't warn about spell-region being obsolete. + (with-no-warnings + (spell-region beg end (buffer-substring beg end))))) +;;;###autoload +(make-obsolete 'spell-word 'ispell-word "23.1") + +;;;###autoload +(defun spell-region (start end &optional description) + "Like `spell-buffer' but applies only to region. +Used in a program, applies from START to END. +DESCRIPTION is an optional string naming the unit being checked: +for example, \"word\"." + (interactive "r") + (let ((filter spell-filter) + (buf (get-buffer-create " *temp*"))) + (with-current-buffer buf + (widen) + (erase-buffer)) + (message "Checking spelling of %s..." (or description "region")) + (if (and (null filter) (= ?\n (char-after (1- end)))) + (if (string= "spell" spell-command) + (call-process-region start end "spell" nil buf) + (call-process-region start end shell-file-name + nil buf nil "-c" spell-command)) + (let ((oldbuf (current-buffer))) + (with-current-buffer buf + (insert-buffer-substring oldbuf start end) + (or (bolp) (insert ?\n)) + (if filter (funcall filter)) + (if (string= "spell" spell-command) + (call-process-region (point-min) (point-max) "spell" t buf) + (call-process-region (point-min) (point-max) shell-file-name + t buf nil "-c" spell-command))))) + (message "Checking spelling of %s...%s" + (or description "region") + (if (with-current-buffer buf + (> (buffer-size) 0)) + "not correct" + "correct")) + (let (word newword + (case-fold-search t) + (case-replace t)) + (while (with-current-buffer buf + (> (buffer-size) 0)) + (with-current-buffer buf + (goto-char (point-min)) + (setq word (downcase + (buffer-substring (point) + (progn (end-of-line) (point))))) + (forward-char 1) + (delete-region (point-min) (point)) + (setq newword + (read-string (concat "`" word + "' not recognized; edit a replacement: ") + word)) + (flush-lines (concat "^" (regexp-quote word) "$"))) + (if (not (equal word newword)) + (progn + (goto-char (point-min)) + (query-replace-regexp (concat "\\b" (regexp-quote word) "\\b") + newword))))))) +;;;###autoload +(make-obsolete 'spell-region 'ispell-region "23.1") + +;;;###autoload +(defun spell-string (string) + "Check spelling of string supplied as argument." + (interactive "sSpell string: ") + (with-temp-buffer + (widen) + (erase-buffer) + (insert string "\n") + (if (string= "spell" spell-command) + (call-process-region (point-min) (point-max) "spell" + t t) + (call-process-region (point-min) (point-max) shell-file-name + t t nil "-c" spell-command)) + (if (= 0 (buffer-size)) + (message "%s is correct" string) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (replace-match " ")) + (message "%sincorrect" (buffer-substring 1 (point-max)))))) +;;;###autoload +(make-obsolete 'spell-string "The `spell' package is obsolete - use `ispell'." + "23.1") + +(provide 'spell) + +;;; spell.el ends here diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el index cac73c9fde7..beca41cadbf 100644 --- a/lisp/obsolete/sregex.el +++ b/lisp/obsolete/sregex.el @@ -1,6 +1,6 @@ ;;; sregex.el --- symbolic regular expressions -;; Copyright (C) 1997-1998, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2017 Free Software Foundation, Inc. ;; Author: Bob Glickstein <bobg+sregex@zanshin.com> ;; Maintainer: Bob Glickstein <bobg+sregex@zanshin.com> diff --git a/lisp/obsolete/sup-mouse.el b/lisp/obsolete/sup-mouse.el index 7b33d9deb02..4aabe41951d 100644 --- a/lisp/obsolete/sup-mouse.el +++ b/lisp/obsolete/sup-mouse.el @@ -1,6 +1,6 @@ ;;; sup-mouse.el --- supdup mouse support for lisp machines -;; Copyright (C) 1985-1986, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 2001-2017 Free Software Foundation, Inc. ;; Author: Wolfgang Rupprecht ;; Maintainer: emacs-devel@gnu.org diff --git a/lisp/obsolete/swedish.el b/lisp/obsolete/swedish.el new file mode 100644 index 00000000000..2254441071c --- /dev/null +++ b/lisp/obsolete/swedish.el @@ -0,0 +1,160 @@ +;;; swedish.el --- miscellaneous functions for dealing with Swedish + +;; Copyright (C) 1988, 2001-2017 Free Software Foundation, Inc. + +;; Author: Howard Gayle +;; Maintainer: emacs-devel@gnu.org +;; Keywords: i18n +;; Obsolete-since: 22.1 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Fixme: Is this actually used? if so, it should be in language, +;; possibly as a feature property of Swedish, probably defining a +;; `swascii' coding system. + +;;; Code: + +;; Written by Howard Gayle. See case-table.el for details. + +;; See iso-swed.el for a description of the character set. + +(defvar mail-send-hook) +(defvar news-group-hook-alist) +(defvar news-inews-hook) + +(defvar swedish-re + "[ \t\n]\\(och\\|att\\|en\\|{r\\|\\[R\\|p}\\|P\\]\\|som\\|det\\|av\\|den\\|f|r\\|F\\\\R\\)[ \t\n.,?!:;'\")}]" + "Regular expression for common Swedish words.") + +(defvar swascii-to-8859-trans + (let ((string (make-string 256 ? )) + (i 0)) + (while (< i 256) + (aset string i i) + (setq i (1+ i))) + (aset string ?\[ 196) + (aset string ?\] 197) + (aset string ?\\ 214) + (aset string ?^ 220) + (aset string ?\{ 228) + (aset string ?\} 229) + (aset string ?\` 233) + (aset string ?\| 246) + (aset string ?~ 252) + string) + "Trans table from SWASCII to 8859.") + +; $ is not converted because it almost always means US +; dollars, not general currency sign. @ is not converted +; because it is more likely to be an at sign in a mail address +; than an E with acute accent. + +(defun swascii-to-8859-buffer () + "Convert characters in buffer from Swedish/Finnish-ascii to ISO 8859/1. +Works even on read-only buffers. `$' and `@' are not converted." + (interactive) + (let ((buffer-read-only nil)) + (translate-region (point-min) (point-max) swascii-to-8859-trans))) + +(defun swascii-to-8859-buffer-maybe () + "Call swascii-to-8859-buffer if the buffer looks like Swedish-ascii. +Leaves point just after the word that looks Swedish." + (interactive) + (let ((case-fold-search t)) + (if (re-search-forward swedish-re nil t) + (swascii-to-8859-buffer)))) + +(setq rmail-show-message-hook 'swascii-to-8859-buffer-maybe) + +(setq news-group-hook-alist + (append '(("^swnet." . swascii-to-8859-buffer-maybe)) + (bound-and-true-p news-group-hook-alist))) + +(defvar 8859-to-swascii-trans + (let ((string (make-string 256 ? )) + (i 0)) + (while (< i 256) + (aset string i i) + (setq i (1+ i))) + (aset string 164 ?$) + (aset string 196 ?\[) + (aset string 197 ?\]) + (aset string 201 ?@) + (aset string 214 ?\\) + (aset string 220 ?^) + (aset string 228 ?\{) + (aset string 229 ?\}) + (aset string 233 ?\`) + (aset string 246 ?\|) + (aset string 252 ?~) + string) + "8859 to SWASCII trans table.") + +(defun 8859-to-swascii-buffer () + "Convert characters in buffer from ISO 8859/1 to Swedish/Finnish-ascii." + (interactive "*") + (translate-region (point-min) (point-max) 8859-to-swascii-trans)) + +(setq mail-send-hook '8859-to-swascii-buffer) +(setq news-inews-hook '8859-to-swascii-buffer) + +;; It's not clear what purpose is served by a separate +;; Swedish mode that differs from Text mode only in having +;; a separate abbrev table. Nothing says that the abbrevs you +;; define in Text mode have to be English! + +;(defvar swedish-mode-abbrev-table nil +; "Abbrev table used while in swedish mode.") +;(define-abbrev-table 'swedish-mode-abbrev-table ()) + +;(defun swedish-mode () +; "Major mode for editing Swedish text intended for humans to +;read. Special commands:\\{text-mode-map} +;Turning on swedish-mode calls the value of the variable +;text-mode-hook, if that value is non-nil." +; (interactive) +; (kill-all-local-variables) +; (use-local-map text-mode-map) +; (setq mode-name "Swedish") +; (setq major-mode 'swedish-mode) +; (setq local-abbrev-table swedish-mode-abbrev-table) +; (set-syntax-table text-mode-syntax-table) +; (run-mode-hooks 'text-mode-hook)) + +;(defun indented-swedish-mode () +; "Major mode for editing indented Swedish text intended for +;humans to read.\\{indented-text-mode-map} +;Turning on indented-swedish-mode calls the value of the +;variable text-mode-hook, if that value is non-nil." +; (interactive) +; (kill-all-local-variables) +; (use-local-map text-mode-map) +; (define-abbrev-table 'swedish-mode-abbrev-table ()) +; (setq local-abbrev-table swedish-mode-abbrev-table) +; (set-syntax-table text-mode-syntax-table) +; (make-local-variable 'indent-line-function) +; (setq indent-line-function 'indent-relative-maybe) +; (use-local-map indented-text-mode-map) +; (setq mode-name "Indented Swedish") +; (setq major-mode 'indented-swedish-mode) +; (run-mode-hooks 'text-mode-hook)) + +(provide 'swedish) + +;;; swedish.el ends here diff --git a/lisp/obsolete/sym-comp.el b/lisp/obsolete/sym-comp.el new file mode 100644 index 00000000000..4418450fe4a --- /dev/null +++ b/lisp/obsolete/sym-comp.el @@ -0,0 +1,237 @@ +;;; sym-comp.el --- mode-dependent symbol completion + +;; Copyright (C) 2004, 2008-2017 Free Software Foundation, Inc. + +;; Author: Dave Love <fx@gnu.org> +;; Keywords: extensions +;; URL: http://www.loveshack.ukfsn.org/emacs +;; Obsolete-since: 23.2 + +;; 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This defines `symbol-complete', which is a generalization of the +;; old `lisp-complete-symbol'. It provides the following hooks to +;; allow major modes to set up completion appropriate for the mode: +;; `symbol-completion-symbol-function', +;; `symbol-completion-completions-function', +;; `symbol-completion-predicate-function', +;; `symbol-completion-transform-function'. Typically it is only +;; necessary for a mode to set +;; `symbol-completion-completions-function' locally and to bind +;; `symbol-complete' appropriately. + +;; It's unfortunate that there doesn't seem to be a good way of +;; combining this with `complete-symbol'. + +;; There is also `symbol-completion-try-complete', for use with +;; Hippie-exp. + +;;; Code: + +;;;; Mode-dependent symbol completion. + +(defun symbol-completion-symbol () + "Default `symbol-completion-symbol-function'. +Uses `current-word' with the buffer narrowed to the part before +point." + (save-restriction + ;; Narrow in case point is in the middle of a symbol -- we want + ;; just the preceding part. + (narrow-to-region (point-min) (point)) + (current-word))) + +(defvar symbol-completion-symbol-function 'symbol-completion-symbol + "Function to return a partial symbol before point for completion. +The value it returns should be a string (or nil). +Major modes may set this locally if the default isn't appropriate. + +Beware: the length of the string STR returned need to be equal to the length +of text before point that's subject to completion. Typically, this amounts +to saying that STR is equal to +\(buffer-substring (- (point) (length STR)) (point)).") + +(defvar symbol-completion-completions-function nil + "Function to return possible symbol completions. +It takes an argument which is the string to be completed and +returns a value suitable for the second argument of +`try-completion'. This value need not use the argument, i.e. it +may be all possible completions, such as `obarray' in the case of +Emacs Lisp. + +Major modes may set this locally to allow them to support +`symbol-complete'. See also `symbol-completion-symbol-function', +`symbol-completion-predicate-function' and +`symbol-completion-transform-function'.") + +(defvar symbol-completion-predicate-function nil + "If non-nil, function to return a predicate for selecting symbol completions. +The function gets two args, the positions of the beginning and +end of the symbol to be completed. + +Major modes may set this locally if the default isn't +appropriate. This is a function returning a predicate so that +the predicate can be context-dependent, e.g. to select only +function names if point is at a function call position. The +function's args may be useful for determining the context.") + +(defvar symbol-completion-transform-function nil + "If non-nil, function to transform symbols in the symbol-completion buffer. +E.g., for Lisp, it may annotate the symbol as being a function, +not a variable. + +The function takes the symbol name as argument. If it needs to +annotate this, it should return a value suitable as an element of +the list passed to `display-completion-list'. + +The predicate being used for selecting completions (from +`symbol-completion-predicate-function') is available +dynamically-bound as `symbol-completion-predicate' in case the +transform needs it.") + +(defvar symbol-completion-predicate) + +;;;###autoload +(defun symbol-complete (&optional predicate) + "Perform completion of the symbol preceding point. +This is done in a way appropriate to the current major mode, +perhaps by interrogating an inferior interpreter. Compare +`complete-symbol'. +If no characters can be completed, display a list of possible completions. +Repeating the command at that point scrolls the list. + +When called from a program, optional arg PREDICATE is a predicate +determining which symbols are considered. + +This function requires `symbol-completion-completions-function' +to be set buffer-locally. Variables `symbol-completion-symbol-function', +`symbol-completion-predicate-function' and +`symbol-completion-transform-function' are also consulted." + (interactive) + ;; Fixme: Punt to `complete-symbol' in this case? + (unless (functionp symbol-completion-completions-function) + (error "symbol-completion-completions-function not defined")) + (let* ((pattern (or (funcall symbol-completion-symbol-function) + (error "No preceding symbol to complete"))) + ;; FIXME: We assume below that `pattern' holds the text just + ;; before point. This is a problem in the way + ;; symbol-completion-symbol-function was defined. + (predicate (or predicate + (if symbol-completion-predicate-function + (funcall symbol-completion-predicate-function + (- (point) (length pattern)) + (point))))) + (completions (funcall symbol-completion-completions-function + pattern)) + ;; In case the transform needs to access it. + (symbol-completion-predicate predicate) + (completion-extra-properties + (if (functionp symbol-completion-transform-function) + '(:annotation-function + (lambda (str) + (car-safe (cdr-safe + (funcall symbol-completion-transform-function + str)))))))) + (completion-in-region (- (point) (length pattern)) (point) + completions predicate))) + +(defvar he-search-string) +(defvar he-tried-table) +(defvar he-expand-list) +(declare-function he-init-string "hippie-exp" (beg end)) +(declare-function he-string-member "hippie-exp" (str lst &optional trans-case)) +(declare-function he-substitute-string "hippie-exp" (str &optional trans-case)) +(declare-function he-reset-string "hippie-exp" ()) + +;;;###autoload +(defun symbol-completion-try-complete (old) + "Completion function for use with `hippie-expand'. +Uses `symbol-completion-symbol-function' and +`symbol-completion-completions-function'. It is intended to be +used something like this in a major mode which provides symbol +completion: + + (if (featurep \\='hippie-exp) + (set (make-local-variable \\='hippie-expand-try-functions-list) + (cons \\='symbol-completion-try-complete + hippie-expand-try-functions-list)))" + (when (and symbol-completion-symbol-function + symbol-completion-completions-function) + (unless old + (let ((symbol (funcall symbol-completion-symbol-function))) + (he-init-string (- (point) (length symbol)) (point)) + (if (not (he-string-member he-search-string he-tried-table)) + (push he-search-string he-tried-table)) + (setq he-expand-list + (and symbol + (funcall symbol-completion-completions-function symbol))))) + (while (and he-expand-list + (he-string-member (car he-expand-list) he-tried-table)) + (pop he-expand-list)) + (if he-expand-list + (progn + (he-substitute-string (pop he-expand-list)) + t) + (if old (he-reset-string)) + nil))) + +;;; Emacs Lisp symbol completion. + +(defun lisp-completion-symbol () + "`symbol-completion-symbol-function' for Lisp." + (let ((end (point)) + (beg (with-syntax-table emacs-lisp-mode-syntax-table + (save-excursion + (backward-sexp 1) + (while (= (char-syntax (following-char)) ?\') + (forward-char 1)) + (point))))) + (buffer-substring-no-properties beg end))) + +(defun lisp-completion-predicate (beg end) + "`symbol-completion-predicate-function' for Lisp." + (save-excursion + (goto-char beg) + (if (not (eq (char-before) ?\()) + (lambda (sym) ;why not just nil ? -sm + ;To avoid interned symbols with + ;no slots. -- fx + (or (boundp sym) (fboundp sym) + (symbol-plist sym))) + ;; Looks like a funcall position. Let's double check. + (if (condition-case nil + (progn (up-list -2) (forward-char 1) + (eq (char-after) ?\()) + (error nil)) + ;; If the first element of the parent list is an open + ;; parenthesis we are probably not in a funcall position. + ;; Maybe a `let' varlist or something. + nil + ;; Else, we assume that a function name is expected. + 'fboundp)))) + +(defun lisp-symbol-completion-transform () + "`symbol-completion-transform-function' for Lisp." + (lambda (elt) + (if (and (not (eq 'fboundp symbol-completion-predicate)) + (fboundp (intern elt))) + (list elt " <f>") + elt))) + +(provide 'sym-comp) + +;;; sym-comp.el ends here diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el index 94ea968a0fb..e5d85e69a3b 100644 --- a/lisp/obsolete/terminal.el +++ b/lisp/obsolete/terminal.el @@ -1,6 +1,6 @@ ;;; terminal.el --- terminal emulator for GNU Emacs -;; Copyright (C) 1986-1989, 1993-1994, 2001-2016 Free Software +;; Copyright (C) 1986-1989, 1993-1994, 2001-2017 Free Software ;; Foundation, Inc. ;; Author: Richard Mlynarik <mly@eddie.mit.edu> diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el index 8733a9b52c1..ee1c2771640 100644 --- a/lisp/obsolete/tpu-edt.el +++ b/lisp/obsolete/tpu-edt.el @@ -1,6 +1,6 @@ ;;; tpu-edt.el --- Emacs emulating TPU emulating EDT -;; Copyright (C) 1993-1995, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2017 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> diff --git a/lisp/obsolete/tpu-extras.el b/lisp/obsolete/tpu-extras.el index c1b8fc288af..06291ce5734 100644 --- a/lisp/obsolete/tpu-extras.el +++ b/lisp/obsolete/tpu-extras.el @@ -1,6 +1,6 @@ ;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt -;; Copyright (C) 1993-1995, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2017 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el index 28462238d9a..bb7e28b03c4 100644 --- a/lisp/obsolete/tpu-mapper.el +++ b/lisp/obsolete/tpu-mapper.el @@ -1,6 +1,6 @@ ;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file -;; Copyright (C) 1993-1995, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2001-2017 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el index 3b54b654197..92eaa62be85 100644 --- a/lisp/obsolete/vc-arch.el +++ b/lisp/obsolete/vc-arch.el @@ -1,6 +1,6 @@ ;;; vc-arch.el --- VC backend for the Arch version-control system -*- lexical-binding: t -*- -;; Copyright (C) 2004-2016 Free Software Foundation, Inc. +;; Copyright (C) 2004-2017 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier <monnier@gnu.org> diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el index ad6364e3bea..ca0bfe712cb 100644 --- a/lisp/obsolete/vip.el +++ b/lisp/obsolete/vip.el @@ -1,6 +1,6 @@ ;;; vip.el --- a VI Package for GNU Emacs -;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2016 Free Software +;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2017 Free Software ;; Foundation, Inc. ;; Author: Masahiko Sato <ms@sail.stanford.edu> diff --git a/lisp/obsolete/ws-mode.el b/lisp/obsolete/ws-mode.el index 029ce7a342c..62cccf725af 100644 --- a/lisp/obsolete/ws-mode.el +++ b/lisp/obsolete/ws-mode.el @@ -1,6 +1,6 @@ ;;; ws-mode.el --- WordStar emulation mode for GNU Emacs -;; Copyright (C) 1991, 2001-2016 Free Software Foundation, Inc. +;; Copyright (C) 1991, 2001-2017 Free Software Foundation, Inc. ;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de> ;; Version: 0.7 diff --git a/lisp/obsolete/xesam.el b/lisp/obsolete/xesam.el index 62a6e10caf9..c553d0023b5 100644 --- a/lisp/obsolete/xesam.el +++ b/lisp/obsolete/xesam.el @@ -1,6 +1,6 @@ ;;; xesam.el --- Xesam interface to search engines. -;; Copyright (C) 2008-2016 Free Software Foundation, Inc. +;; Copyright (C) 2008-2017 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: tools, hypermedia diff --git a/lisp/obsolete/yow.el b/lisp/obsolete/yow.el index 517af55cb4c..55f19a80e5f 100644 --- a/lisp/obsolete/yow.el +++ b/lisp/obsolete/yow.el @@ -1,6 +1,6 @@ ;;; yow.el --- quote random zippyisms -;; Copyright (C) 1993-1995, 2000-2016 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2017 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Author: Richard Mlynarik |