[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/idlwave 58078a3f5a 006/360: Cleaned ec-hook formulation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/idlwave 58078a3f5a 006/360: Cleaned ec-hook formulation in idlwave-surround. |
Date: |
Sun, 28 Apr 2024 00:59:02 -0400 (EDT) |
branch: externals/idlwave
commit 58078a3f5a096d909a4a80007c7b450290089f95
Author: jdsmith <jdsmith>
Commit: jdsmith <jdsmith>
Cleaned ec-hook formulation in idlwave-surround.
---
idlwave.el | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/idlwave.el b/idlwave.el
index 54f1f69da9..0e3cb7fc3d 100644
--- a/idlwave.el
+++ b/idlwave.el
@@ -5,7 +5,7 @@
;; Chris Chase <chase@att.com>
;; Maintainer: J.D. Smith <jdsmith@alum.mit.edu>
;; Version: VERSIONTAG
-;; Date: $Date: 2001/12/07 00:09:32 $
+;; Date: $Date: 2001/12/10 16:28:51 $
;; Keywords: languages
;; This file is part of GNU Emacs.
@@ -2155,8 +2155,8 @@ Also checks if the correct end statement has been used."
(defun idlwave-gtr-pad-hook (char)
"Let the > symbol expand around -> if present.
-The variable `length' is dynamically scoped from `idlwave-surround'"
- (setq length 2))
+A new length is returned."
+ 2)
(defun idlwave-surround (&optional before after escape-chars length ec-hook)
"Surround the LENGTH characters before point with blanks.
@@ -2179,18 +2179,14 @@ The function does nothing if any of the following
conditions is true:
If a function is passed in EC-HOOK, and an ESCAPE-CHARS match occurs,
the named function will be called with a single argument of the
preceeding character. Then idlwave-surround will run as usual if
-EC-HOOK returns non-nil. EC-HOOK should not move the point, and can
-change the let-bound `length' variable to change the length of the
-token to be padded."
+EC-HOOK returns non-nil, and a new length will be taken from the
+return value."
(when (and idlwave-surround-by-blank (not (idlwave-quoted)))
(let* ((length (or length 1)) ; establish a default for LENGTH
- (prev-char (char-after (- (point) (1+ length))))
- (ec-halt nil))
- (if (memq prev-char escape-chars)
- (if (fboundp ec-hook)
- (setq ec-halt (null (funcall ec-hook prev-char)))
- (setq ec-halt t)))
- (unless ec-halt
+ (prev-char (char-after (- (point) (1+ length)))))
+ (unless (and (memq prev-char escape-chars) (fboundp ec-hook)
+ (not (setq length
+ (save-excursion (funcall ec-hook prev-char)))))
(backward-char length)
(save-restriction
(let ((here (point)))
- [elpa] externals/idlwave 985427dd6a 274/360: Calculate beginning/end of commented paragraphs., (continued)
- [elpa] externals/idlwave 985427dd6a 274/360: Calculate beginning/end of commented paragraphs., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave ed1c40082b 264/360: Finish defun (was not)., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 5d7b645a67 262/360: Comments, whitespace, and typos. Boring., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave bc3cbb8b06 288/360: Avoid using cl macros., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 3932828c57 285/360: Don't use integers as anchors anymore., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 50c75e98ca 266/360: Use custom face for debug stop line, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave cc80618cbe 348/360: port from README, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 90b181e64e 297/360: Update XML scanning for more recent IDL versions:, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 6c9137c2da 324/360: Run hooks later and wait for initial commands., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 462aa84be4 004/360: (idlwave-surround): Added callback hook for when the previous character, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 58078a3f5a 006/360: Cleaned ec-hook formulation in idlwave-surround.,
ELPA Syncer <=
- [elpa] externals/idlwave 177b0e4547 042/360: minor doc updates., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 6cd69cfb75 054/360: XEmacs Package bundling code included., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave e079639d57 073/360: *** empty log message ***, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1a8845034c 070/360:, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 40b446a90e 078/360: - Slight update for XEmacs, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 00f3758733 083/360: - Initial check-in., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1ecae9e4c5 080/360: - Fixed non-edebug entering when stepping to new routines after a, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave cbc2128b09 081/360: - Follow savannah fix, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 629d2ce5ae 085/360: - Make beg- and end- unit-reg use definitions starting on a line., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 95e6d9030e 087/360: *** empty log message ***, ELPA Syncer, 2024/04/28