[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/idlwave 51392dcc6f 069/360: Initial import
From: |
ELPA Syncer |
Subject: |
[elpa] externals/idlwave 51392dcc6f 069/360: Initial import |
Date: |
Sun, 28 Apr 2024 00:59:09 -0400 (EDT) |
branch: externals/idlwave
commit 51392dcc6fd3d02d7c087e4b436bea9fceb870d3
Author: jdsmith <jdsmith>
Commit: jdsmith <jdsmith>
Initial import
---
idlw-roprompt.el | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)
diff --git a/idlw-roprompt.el b/idlw-roprompt.el
new file mode 100644
index 0000000000..82d2407839
--- /dev/null
+++ b/idlw-roprompt.el
@@ -0,0 +1,126 @@
+;; idlw-shell.el --- run IDL as an inferior process of Emacs.
+;; Copyright (c) 2002 Free Software Foundation
+
+;; Author: J.D. Smith <jdsmith@as.arizona.edu>
+;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
+;; Version: 1.0
+;; Date: $Date: 2002/10/11 23:20:44 $
+;; Keywords: processes
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; Advises the appropriate comint function to make the IDL> prompt
+;; read-only. This functionality may be available in future versions
+;; of comint directy, in which case this file will be obviated.
+;;
+;; New versions of IDLWAVE, documentation, and more information
+;; available from:
+;; http://idlwave.org
+;;
+;; INSTALLATION:
+;; =============
+;;
+;; Follow the instructions in the INSTALL file of the distribution.
+;; In short, put this file on your load path and add the following
+;; lines to your .emacs file:
+;;
+;; (add-hook 'idlwave-shell-mode-hook
+;; (lambda () (require 'idlw-roprompt)))
+;;
+;;
+;; SOURCE
+;; ======
+;;
+;; The newest version of this file can be found on the maintainers
+;; web site.
+;;
+;; http://idlwave.org
+;;
+;; DOCUMENTATION
+;; =============
+;;
+;; IDLWAVE is documented online in info format.
+;; A printable version of the documentation is available from the
+;; maintainers webpage (see under SOURCE)
+;;
+;;
+;; KNOWN PROBLEMS
+;; ==============
+;;
+;; This functionality will probably fail for some future version of
+;; comint.
+;;
+;;--------------------------------------------------------------------------
+;;
+
+;;; Code:
+(when (fboundp 'comint-snapshot-last-prompt)
+ (defvar idlwave-shell-save-comint-last-prompt-overlay nil)
+ (defun idlwave-shell-comint-signal-read-only (overlay after start end
+ &optional len)
+ (if (and (not after)
+ (or (< (overlay-start overlay) start)
+ (> (overlay-end overlay) end)))
+ (error "")))
+
+ ;; Caution: in Emacs <~21.2, a new overlay gets created for each
+ ;; prompt... in later versions, text-properties for old prompts
+ ;; are used instead, and the original overlay is recycled. In
+ ;; this case, we can advise snapshot-prompt to remove the
+ ;; read-only text properties (not the overlay properties), and
+ ;; here we test to ensure the prompt isn't in the same position as
+ ;; the process-mark before removing the read-only stuff.
+ (defadvice idlwave-shell-comint-filter (around swap-read-only activate)
+ "Add a read-only equivalency to the last prompt overlay."
+ (when (and idlwave-shell-save-comint-last-prompt-overlay
+ (not (equal
+ (marker-position (process-mark
+ (get-buffer-process
+ (get-buffer (idlwave-shell-buffer)))))
+ (overlay-end
+ idlwave-shell-save-comint-last-prompt-overlay))))
+ (overlay-put idlwave-shell-save-comint-last-prompt-overlay
+ 'modification-hooks nil)
+ (overlay-put idlwave-shell-save-comint-last-prompt-overlay
+ 'insert-in-front-hooks nil))
+ ad-do-it
+ (save-current-buffer
+ (set-buffer (idlwave-shell-buffer))
+ (when comint-last-prompt-overlay
+ (setq idlwave-shell-save-comint-last-prompt-overlay
+ comint-last-prompt-overlay)
+; (overlay-put comint-last-prompt-overlay 'intangible t)
+ (overlay-put comint-last-prompt-overlay 'modification-hooks
+ '(idlwave-shell-comint-signal-read-only))
+ (overlay-put comint-last-prompt-overlay 'insert-in-front-hooks
+ '(idlwave-shell-comint-signal-read-only)))))
+
+ (defadvice comint-snapshot-last-prompt (after remove-text-read-only activate)
+ "Remove the read-only text properties potentially set by snapshot"
+ (save-current-buffer
+ (set-buffer (idlwave-shell-buffer))
+ (when comint-last-prompt-overlay
+ (remove-text-properties
+ (overlay-start comint-last-prompt-overlay)
+ (overlay-end comint-last-prompt-overlay)
+ '(modification-hooks nil insert-in-front-hooks nil))))))
+
+(provide 'idlw-roprompt)
+;;; idlw-roprompt.el ends here
\ No newline at end of file
- [elpa] externals/idlwave c832c9bead 223/360: Take care for skipping substatements at end of buffer., (continued)
- [elpa] externals/idlwave c832c9bead 223/360: Take care for skipping substatements at end of buffer., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1641fe1ba1 227/360: Erase the full hidden output buffer., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 8a9197e18d 243/360: Remove defcustom kludge from Emacs 19., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave c64d75106e 180/360: Careful with batch emacs invocation name, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 76b0f42584 250/360: Avoid duplicating windows for target buffers., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave db085a71f5 184/360: Multi-line command support, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 5bb5ae7322 220/360: Correctly skip multiple statements, avoiding && and strings., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 5f64a4f926 307/360: Create sintern type on idlwave load, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave b17518f621 272/360: Acknowledge Nathaniel, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 755532e9f8 058/360: idlwave-shell-send-command): Added test for, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 51392dcc6f 069/360: Initial import,
ELPA Syncer <=
- [elpa] externals/idlwave 0711ef4c1b 072/360: (idlwave-display-buffer): Wrapped in save-excursion to avoid ending up, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 9a2ffd6bb6 084/360: - Load HTML files in current directory., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave fa95cc9c6b 075/360: - Update for IDL v5.6., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1a1c6123d5 077/360: - Updated to IDLWAVE v5.0, including electric-debug mode, HTML help,, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 476da8e5a8 086/360: - Skip directories which can't be written to, don't die., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave acdc76b2a5 094/360: - Use the VERSION directly from the xemacs package Makefile, since it, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 79a81533e0 120/360: *** empty log message ***, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 26db2a7ad3 096/360: - Silence errors relating to missing help package or xemacs distrib., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave b5d83af899 106/360: - Updating to IDLWAVE 5.3, with Kernighan parenthetical and much updated, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave d5a980a812 130/360: - Check for 'timer for XEmacs., ELPA Syncer, 2024/04/28