diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/gnus/gnus-setup.el | 191 | ||||
| -rw-r--r-- | lisp/progmodes/cap-words.el | 98 | ||||
| -rw-r--r-- | lisp/w32-common-fns.el | 134 |
3 files changed, 423 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-setup.el b/lisp/gnus/gnus-setup.el new file mode 100644 index 00000000000..86b3bffcd4a --- /dev/null +++ b/lisp/gnus/gnus-setup.el | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | ;;; gnus-setup.el --- Initialization & Setup for Gnus 5 | ||
| 2 | |||
| 3 | ;; Copyright (C) 1995-1996, 2000-2015 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Steven L. Baur <steve@miranova.com> | ||
| 6 | ;; Keywords: news | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | ;; My head is starting to spin with all the different mail/news packages. | ||
| 25 | ;; Stop The Madness! | ||
| 26 | |||
| 27 | ;; Given that Emacs Lisp byte codes may be diverging, it is probably best | ||
| 28 | ;; not to byte compile this, and just arrange to have the .el loaded out | ||
| 29 | ;; of .emacs. | ||
| 30 | |||
| 31 | ;;; Code: | ||
| 32 | |||
| 33 | (eval-when-compile (require 'cl)) | ||
| 34 | |||
| 35 | (defvar gnus-use-installed-gnus t | ||
| 36 | "*If non-nil use installed version of Gnus.") | ||
| 37 | |||
| 38 | (defvar gnus-use-installed-mailcrypt (featurep 'xemacs) | ||
| 39 | "*If non-nil use installed version of mailcrypt.") | ||
| 40 | |||
| 41 | (defvar gnus-emacs-lisp-directory (if (featurep 'xemacs) | ||
| 42 | "/usr/local/lib/xemacs/" | ||
| 43 | "/usr/local/share/emacs/") | ||
| 44 | "Directory where Emacs site lisp is located.") | ||
| 45 | |||
| 46 | (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory | ||
| 47 | "gnus/lisp/") | ||
| 48 | "Directory where Gnus Emacs lisp is found.") | ||
| 49 | |||
| 50 | (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory | ||
| 51 | "site-lisp/mailcrypt/") | ||
| 52 | "Directory where Mailcrypt Emacs Lisp is found.") | ||
| 53 | |||
| 54 | (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory | ||
| 55 | "site-lisp/bbdb/") | ||
| 56 | "Directory where Big Brother Database is found.") | ||
| 57 | |||
| 58 | (defvar gnus-use-mhe nil | ||
| 59 | "Set this if you want to use MH-E for mail reading.") | ||
| 60 | (defvar gnus-use-rmail nil | ||
| 61 | "Set this if you want to use RMAIL for mail reading.") | ||
| 62 | (defvar gnus-use-sendmail nil | ||
| 63 | "Set this if you want to use SENDMAIL for mail reading.") | ||
| 64 | (defvar gnus-use-vm nil | ||
| 65 | "Set this if you want to use the VM package for mail reading.") | ||
| 66 | (defvar gnus-use-sc nil | ||
| 67 | "Set this if you want to use Supercite.") | ||
| 68 | (defvar gnus-use-mailcrypt t | ||
| 69 | "Set this if you want to use Mailcrypt for dealing with PGP messages.") | ||
| 70 | (defvar gnus-use-bbdb nil | ||
| 71 | "Set this if you want to use the Big Brother DataBase.") | ||
| 72 | |||
| 73 | (when (and (not gnus-use-installed-gnus) | ||
| 74 | (null (member gnus-gnus-lisp-directory load-path))) | ||
| 75 | (push gnus-gnus-lisp-directory load-path)) | ||
| 76 | |||
| 77 | ;;; We can't do this until we know where Gnus is. | ||
| 78 | (require 'message) | ||
| 79 | |||
| 80 | ;;; Mailcrypt by | ||
| 81 | ;;; Jin Choi <jin@atype.com> | ||
| 82 | ;;; Patrick LoPresti <patl@lcs.mit.edu> | ||
| 83 | |||
| 84 | (when gnus-use-mailcrypt | ||
| 85 | (when (and (not gnus-use-installed-mailcrypt) | ||
| 86 | (null (member gnus-mailcrypt-lisp-directory load-path))) | ||
| 87 | (setq load-path (cons gnus-mailcrypt-lisp-directory load-path))) | ||
| 88 | (autoload 'mc-install-write-mode "mailcrypt" nil t) | ||
| 89 | (autoload 'mc-install-read-mode "mailcrypt" nil t) | ||
| 90 | ;;; (add-hook 'message-mode-hook 'mc-install-write-mode) | ||
| 91 | ;;; (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) | ||
| 92 | (when gnus-use-mhe | ||
| 93 | (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) | ||
| 94 | (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))) | ||
| 95 | |||
| 96 | ;;; BBDB by | ||
| 97 | ;;; Jamie Zawinski <jwz@lucid.com> | ||
| 98 | |||
| 99 | (when gnus-use-bbdb | ||
| 100 | ;; bbdb will never be installed with emacs. | ||
| 101 | (when (null (member gnus-bbdb-lisp-directory load-path)) | ||
| 102 | (setq load-path (cons gnus-bbdb-lisp-directory load-path))) | ||
| 103 | (autoload 'bbdb "bbdb-com" | ||
| 104 | "Insidious Big Brother Database" t) | ||
| 105 | (autoload 'bbdb-name "bbdb-com" | ||
| 106 | "Insidious Big Brother Database" t) | ||
| 107 | (autoload 'bbdb-company "bbdb-com" | ||
| 108 | "Insidious Big Brother Database" t) | ||
| 109 | (autoload 'bbdb-net "bbdb-com" | ||
| 110 | "Insidious Big Brother Database" t) | ||
| 111 | (autoload 'bbdb-notes "bbdb-com" | ||
| 112 | "Insidious Big Brother Database" t) | ||
| 113 | |||
| 114 | (when gnus-use-vm | ||
| 115 | (autoload 'bbdb-insinuate-vm "bbdb-vm" | ||
| 116 | "Hook BBDB into VM" t)) | ||
| 117 | |||
| 118 | (when gnus-use-rmail | ||
| 119 | (autoload 'bbdb-insinuate-rmail "bbdb-rmail" | ||
| 120 | "Hook BBDB into RMAIL" t) | ||
| 121 | (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)) | ||
| 122 | |||
| 123 | (when gnus-use-mhe | ||
| 124 | (autoload 'bbdb-insinuate-mh "bbdb-mh" | ||
| 125 | "Hook BBDB into MH-E" t) | ||
| 126 | (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh)) | ||
| 127 | |||
| 128 | (autoload 'bbdb-insinuate-gnus "bbdb-gnus" | ||
| 129 | "Hook BBDB into Gnus" t) | ||
| 130 | (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) | ||
| 131 | |||
| 132 | (when gnus-use-sendmail | ||
| 133 | (autoload 'bbdb-insinuate-sendmail "bbdb" | ||
| 134 | "Insidious Big Brother Database" t) | ||
| 135 | (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) | ||
| 136 | (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail))) | ||
| 137 | |||
| 138 | (when gnus-use-sc | ||
| 139 | (add-hook 'mail-citation-hook 'sc-cite-original) | ||
| 140 | (setq message-cite-function 'sc-cite-original)) | ||
| 141 | |||
| 142 | ;;;### (autoloads (gnus gnus-slave gnus-no-server) "gnus" "lisp/gnus.el" (12473 2137)) | ||
| 143 | ;;; Generated autoloads from lisp/gnus.el | ||
| 144 | |||
| 145 | ;; Don't redo this if autoloads already exist | ||
| 146 | (unless (fboundp 'gnus) | ||
| 147 | (autoload 'gnus-slave-no-server "gnus" "\ | ||
| 148 | Read network news as a slave without connecting to local server." t nil) | ||
| 149 | |||
| 150 | (autoload 'gnus-no-server "gnus" "\ | ||
| 151 | Read network news. | ||
| 152 | If ARG is a positive number, Gnus will use that as the | ||
| 153 | startup level. If ARG is nil, Gnus will be started at level 2. | ||
| 154 | If ARG is non-nil and not a positive number, Gnus will | ||
| 155 | prompt the user for the name of an NNTP server to use. | ||
| 156 | As opposed to `gnus', this command will not connect to the local server." t nil) | ||
| 157 | |||
| 158 | (autoload 'gnus-slave "gnus" "\ | ||
| 159 | Read news as a slave." t nil) | ||
| 160 | |||
| 161 | (autoload 'gnus "gnus" "\ | ||
| 162 | Read network news. | ||
| 163 | If ARG is non-nil and a positive number, Gnus will use that as the | ||
| 164 | startup level. If ARG is non-nil and not a positive number, Gnus will | ||
| 165 | prompt the user for the name of an NNTP server to use." t nil) | ||
| 166 | |||
| 167 | ;;;*** | ||
| 168 | |||
| 169 | ;;; These have moved out of gnus.el into other files. | ||
| 170 | ;;; FIX FIX FIX: should other things be in gnus-setup? or these not in it? | ||
| 171 | (autoload 'gnus-update-format "gnus-spec" "\ | ||
| 172 | Update the format specification near point." t nil) | ||
| 173 | |||
| 174 | (autoload 'gnus-fetch-group "gnus-group" "\ | ||
| 175 | Start Gnus if necessary and enter GROUP. | ||
| 176 | Returns whether the fetching was successful or not." t nil) | ||
| 177 | |||
| 178 | (defalias 'gnus-batch-kill 'gnus-batch-score) | ||
| 179 | |||
| 180 | (autoload 'gnus-batch-score "gnus-kill" "\ | ||
| 181 | Run batched scoring. | ||
| 182 | Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ... | ||
| 183 | Newsgroups is a list of strings in Bnews format. If you want to score | ||
| 184 | the comp hierarchy, you'd say \"comp.all\". If you would not like to | ||
| 185 | score the alt hierarchy, you'd say \"!alt.all\"." t nil)) | ||
| 186 | |||
| 187 | (provide 'gnus-setup) | ||
| 188 | |||
| 189 | (run-hooks 'gnus-setup-load-hook) | ||
| 190 | |||
| 191 | ;;; gnus-setup.el ends here | ||
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el new file mode 100644 index 00000000000..94e865db62b --- /dev/null +++ b/lisp/progmodes/cap-words.el | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | ;;; cap-words.el --- minor mode for motion in CapitalizedWordIdentifiers | ||
| 2 | |||
| 3 | ;; Copyright (C) 2002-2015 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Dave Love <fx@gnu.org> | ||
| 6 | ;; Keywords: languages | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;; Provides Capitalized Words minor mode for word movement in | ||
| 26 | ;; identifiers CapitalizedLikeThis. | ||
| 27 | |||
| 28 | ;; Note that the same effect could be obtained by frobbing the | ||
| 29 | ;; category of upper case characters to produce word boundaries, but | ||
| 30 | ;; the necessary processing isn't done for ASCII characters. | ||
| 31 | |||
| 32 | ;; Fixme: This doesn't work properly for mouse double clicks. | ||
| 33 | |||
| 34 | ;;; Code: | ||
| 35 | |||
| 36 | (defun capitalized-find-word-boundary (pos limit) | ||
| 37 | "Function for use in `find-word-boundary-function-table'. | ||
| 38 | Looks for word boundaries before capitals." | ||
| 39 | (save-excursion | ||
| 40 | (goto-char pos) | ||
| 41 | (let (case-fold-search) | ||
| 42 | (if (<= pos limit) | ||
| 43 | ;; Fixme: Are these regexps the best? | ||
| 44 | (or (and (re-search-forward "\\=.\\w*[[:upper:]]" | ||
| 45 | limit t) | ||
| 46 | (progn (backward-char) | ||
| 47 | t)) | ||
| 48 | (re-search-forward "\\>" limit t)) | ||
| 49 | (or (re-search-backward "[[:upper:]]\\w*\\=" limit t) | ||
| 50 | (re-search-backward "\\<" limit t)))) | ||
| 51 | (point))) | ||
| 52 | |||
| 53 | |||
| 54 | (defconst capitalized-find-word-boundary-function-table | ||
| 55 | (let ((tab (make-char-table nil))) | ||
| 56 | (set-char-table-range tab t #'capitalized-find-word-boundary) | ||
| 57 | tab) | ||
| 58 | "Assigned to `find-word-boundary-function-table' in Capitalized Words mode.") | ||
| 59 | |||
| 60 | ;;;###autoload | ||
| 61 | (define-minor-mode capitalized-words-mode | ||
| 62 | "Toggle Capitalized Words mode. | ||
| 63 | With a prefix argument ARG, enable Capitalized Words mode if ARG | ||
| 64 | is positive, and disable it otherwise. If called from Lisp, | ||
| 65 | enable the mode if ARG is omitted or nil. | ||
| 66 | |||
| 67 | Capitalized Words mode is a buffer-local minor mode. When | ||
| 68 | enabled, a word boundary occurs immediately before an uppercase | ||
| 69 | letter in a symbol. This is in addition to all the normal | ||
| 70 | boundaries given by the syntax and category tables. There is no | ||
| 71 | restriction to ASCII. | ||
| 72 | |||
| 73 | E.g. the beginning of words in the following identifier are as marked: | ||
| 74 | |||
| 75 | capitalizedWorDD | ||
| 76 | ^ ^ ^^ | ||
| 77 | |||
| 78 | Note that these word boundaries only apply for word motion and | ||
| 79 | marking commands such as \\[forward-word]. This mode does not affect word | ||
| 80 | boundaries found by regexp matching (`\\>', `\\w' &c). | ||
| 81 | |||
| 82 | This style of identifiers is common in environments like Java ones, | ||
| 83 | where underscores aren't trendy enough. Capitalization rules are | ||
| 84 | sometimes part of the language, e.g. Haskell, which may thus encourage | ||
| 85 | such a style. It is appropriate to add `capitalized-words-mode' to | ||
| 86 | the mode hook for programming language modes in which you encounter | ||
| 87 | variables like this, e.g. `java-mode-hook'. It's unlikely to cause | ||
| 88 | trouble if such identifiers aren't used. | ||
| 89 | |||
| 90 | See also `glasses-mode' and `studlify-word'. | ||
| 91 | Obsoletes `c-forward-into-nomenclature'." | ||
| 92 | nil " Caps" nil :group 'programming | ||
| 93 | (set (make-local-variable 'find-word-boundary-function-table) | ||
| 94 | capitalized-find-word-boundary-function-table)) | ||
| 95 | |||
| 96 | (provide 'cap-words) | ||
| 97 | |||
| 98 | ;;; cap-words.el ends here | ||
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el new file mode 100644 index 00000000000..1e4e9fe5bb1 --- /dev/null +++ b/lisp/w32-common-fns.el | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | ;;; w32-common-fns.el --- Lisp routines for Windows and Cygwin-w32 | ||
| 2 | |||
| 3 | ;; Copyright (C) 1994, 2001-2015 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | ;;; | ||
| 22 | ;;; This file contains functions that are used by both native NT Emacs | ||
| 23 | ;;; and Cygwin Emacs compiled to use the native Windows widget | ||
| 24 | ;;; library. | ||
| 25 | |||
| 26 | (declare-function x-server-version "w32fns.c" (&optional terminal)) | ||
| 27 | |||
| 28 | (defun w32-version () | ||
| 29 | "Return the MS-Windows version numbers. | ||
| 30 | The value is a list of three integers: the major and minor version | ||
| 31 | numbers, and the build number." | ||
| 32 | (x-server-version)) | ||
| 33 | |||
| 34 | (defun w32-using-nt () | ||
| 35 | "Return non-nil if running on a Windows NT descendant. | ||
| 36 | That includes all Windows systems except for 9X/Me." | ||
| 37 | (getenv "SystemRoot")) | ||
| 38 | |||
| 39 | (declare-function w32-get-clipboard-data "w32select.c") | ||
| 40 | (declare-function w32-set-clipboard-data "w32select.c") | ||
| 41 | (declare-function x-server-version "w32fns.c" (&optional display)) | ||
| 42 | |||
| 43 | ;;; Fix interface to (X-specific) mouse.el | ||
| 44 | (defun x-set-selection (type data) | ||
| 45 | "Make an X selection of type TYPE and value DATA. | ||
| 46 | The argument TYPE (nil means `PRIMARY') says which selection, and | ||
| 47 | DATA specifies the contents. TYPE must be a symbol. \(It can also | ||
| 48 | be a string, which stands for the symbol with that name, but this | ||
| 49 | is considered obsolete.) DATA may be a string, a symbol, an | ||
| 50 | integer (or a cons of two integers or list of two integers). | ||
| 51 | |||
| 52 | The selection may also be a cons of two markers pointing to the same buffer, | ||
| 53 | or an overlay. In these cases, the selection is considered to be the text | ||
| 54 | between the markers *at whatever time the selection is examined*. | ||
| 55 | Thus, editing done in the buffer after you specify the selection | ||
| 56 | can alter the effective value of the selection. | ||
| 57 | |||
| 58 | The data may also be a vector of valid non-vector selection values. | ||
| 59 | |||
| 60 | The return value is DATA. | ||
| 61 | |||
| 62 | Interactively, this command sets the primary selection. Without | ||
| 63 | prefix argument, it reads the selection in the minibuffer. With | ||
| 64 | prefix argument, it uses the text of the region as the selection value. | ||
| 65 | |||
| 66 | Note that on MS-Windows, primary and secondary selections set by Emacs | ||
| 67 | are not available to other programs." | ||
| 68 | (put 'x-selections (or type 'PRIMARY) data)) | ||
| 69 | |||
| 70 | (defun x-get-selection (&optional type _data-type) | ||
| 71 | "Return the value of an X Windows selection. | ||
| 72 | The argument TYPE (default `PRIMARY') says which selection, | ||
| 73 | and the argument DATA-TYPE (default `STRING') says | ||
| 74 | how to convert the data. | ||
| 75 | |||
| 76 | TYPE may be any symbol \(but nil stands for `PRIMARY'). However, | ||
| 77 | only a few symbols are commonly used. They conventionally have | ||
| 78 | all upper-case names. The most often used ones, in addition to | ||
| 79 | `PRIMARY', are `SECONDARY' and `CLIPBOARD'. | ||
| 80 | |||
| 81 | DATA-TYPE is usually `STRING', but can also be one of the symbols | ||
| 82 | in `selection-converter-alist', which see. This argument is | ||
| 83 | ignored on MS-Windows and MS-DOS." | ||
| 84 | (get 'x-selections (or type 'PRIMARY))) | ||
| 85 | |||
| 86 | ;; x-selection-owner-p is used in simple.el | ||
| 87 | (defun x-selection-owner-p (&optional selection _terminal) | ||
| 88 | "" ; placeholder for doc.c | ||
| 89 | (and (memq selection '(nil PRIMARY SECONDARY)) | ||
| 90 | (get 'x-selections (or selection 'PRIMARY)))) | ||
| 91 | |||
| 92 | ;; The "Windows" keys on newer keyboards bring up the Start menu | ||
| 93 | ;; whether you want it or not - make Emacs ignore these keystrokes | ||
| 94 | ;; rather than beep. | ||
| 95 | (global-set-key [lwindow] 'ignore) | ||
| 96 | (global-set-key [rwindow] 'ignore) | ||
| 97 | |||
| 98 | (defvar w32-charset-info-alist) ; w32font.c | ||
| 99 | |||
| 100 | |||
| 101 | ;;;; Selections | ||
| 102 | |||
| 103 | ;; We keep track of the last text selected here, so we can check the | ||
| 104 | ;; current selection against it, and avoid passing back our own text | ||
| 105 | ;; from x-selection-value. | ||
| 106 | (defvar x-last-selected-text nil) | ||
| 107 | (defvar x-select-enable-clipboard) | ||
| 108 | |||
| 109 | (defun x-get-selection-value () | ||
| 110 | "Return the value of the current selection. | ||
| 111 | Consult the selection. Treat empty strings as if they were unset." | ||
| 112 | (if x-select-enable-clipboard | ||
| 113 | (let (text) | ||
| 114 | ;; Don't die if x-get-selection signals an error. | ||
| 115 | (with-demoted-errors "w32-get-clipboard-data:%s" | ||
| 116 | (setq text (w32-get-clipboard-data))) | ||
| 117 | (if (string= text "") (setq text nil)) | ||
| 118 | (cond | ||
| 119 | ((not text) nil) | ||
| 120 | ((eq text x-last-selected-text) nil) | ||
| 121 | ((string= text x-last-selected-text) | ||
| 122 | ;; Record the newer string, so subsequent calls can use the 'eq' test. | ||
| 123 | (setq x-last-selected-text text) | ||
| 124 | nil) | ||
| 125 | (t | ||
| 126 | (setq x-last-selected-text text)))))) | ||
| 127 | |||
| 128 | (defalias 'x-selection-value 'x-get-selection-value) | ||
| 129 | |||
| 130 | ;; Arrange for the kill and yank functions to set and check the clipboard. | ||
| 131 | (setq interprogram-cut-function 'x-select-text) | ||
| 132 | (setq interprogram-paste-function 'x-get-selection-value) | ||
| 133 | |||
| 134 | (provide 'w32-common-fns) | ||