emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master ad24c9d 275/433: * mmm-noweb.el (mmm-syntax-region-list)


From: Dmitry Gutov
Subject: [elpa] master ad24c9d 275/433: * mmm-noweb.el (mmm-syntax-region-list)
Date: Thu, 15 Mar 2018 19:44:20 -0400 (EDT)

branch: master
commit ad24c9da7494c80e31f6dad703afc2eacb452230
Author: alanshutko <alanshutko>
Commit: alanshutko <alanshutko>

    * mmm-noweb.el (mmm-syntax-region-list)
    (mmm-syntax-other-regions, mmm-word-other-regions)
    (mmm-space-other-regions, mmm-undo-syntax-other-regions): Added
    from Joe's email.  They're here right now, until a better place
    can be found.
    
    * configure.in: Incr version for release.
---
 .cvsignore   |  2 ++
 ChangeLog    | 10 ++++++++++
 NEWS         |  9 ++-------
 configure.in |  2 +-
 mmm-noweb.el | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 version.texi |  4 ++--
 6 files changed, 61 insertions(+), 11 deletions(-)

diff --git a/.cvsignore b/.cvsignore
index 82fbbef..837122e 100755
--- a/.cvsignore
+++ b/.cvsignore
@@ -2,11 +2,13 @@
 Makefile
 Makefile.in
 aclocal.m4
+autom4te.cache
 confdefs.h
 config.cache
 config.log
 config.status
 configure
+elc-stamp
 mmm.info*
 script
 semantic.cache
diff --git a/ChangeLog b/ChangeLog
index 517f49d..499f606 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-06-16  Alan Shutko  <address@hidden>
+
+       * mmm-noweb.el (mmm-syntax-region-list)
+       (mmm-syntax-other-regions, mmm-word-other-regions)
+       (mmm-space-other-regions, mmm-undo-syntax-other-regions): Added
+       from Joe's email.  They're here right now, until a better place
+       can be found.
+
+       * configure.in: Incr version for release.
+
 2004-06-10  Alan Shutko  <address@hidden>
 
        * mmm-class.el (mmm-ify): Change defaults for front-delim and
diff --git a/NEWS b/NEWS
index 34a0335..41a1512 100644
--- a/NEWS
+++ b/NEWS
@@ -1,15 +1,11 @@
 MMM Mode NEWS -- history of user-visible changes.  -*-outline-*-
-Copyright (C) 2003 Michael Abraham Shulman
+Copyright (C) 2003, 2004 Michael Abraham Shulman
 See the file COPYING for copying conditions.
 
 Please submit bug reports at http://sourceforge.net/projects/mmm-mode/
 
 * Changes in MMM Mode 0.4.8
 
-** Improved Syntax Handling
-
-(Not actually added yet, but it will be by the time 0.4.8 is released)
-
 ** Delimiter Regions
 
 The delimiters which mark off submode regions now have their own
@@ -30,8 +26,7 @@ included for people who wish to build their own SRPM to 
install from.
 
 Many thanks to Joe Kelsey for writing a very intelligent class for
 editing Noweb files, and to Alan Shutko for one for CWeb files.  We
-also have a mode for SGML DTD definitions from Yann Dirson, and (at
-long last) a PHP mode.
+also have a mode for SGML DTD definitions from Yann Dirson.
 
 ** Numerous bugfixes and small improvements
 
diff --git a/configure.in b/configure.in
index a7fdcc6..9663648 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT()
 
-AM_INIT_AUTOMAKE(mmm-mode, 0.4.7)
+AM_INIT_AUTOMAKE(mmm-mode, 0.4.8)
 
 dnl
 dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
diff --git a/mmm-noweb.el b/mmm-noweb.el
index f860dc1..ec0e5d3 100644
--- a/mmm-noweb.el
+++ b/mmm-noweb.el
@@ -1,6 +1,6 @@
 ;;; mmm-noweb.el --- MMM submode class for Noweb programs
 ;;
-;; Copyright 2003 Joe Kelsey <address@hidden>
+;; Copyright 2003, 2004 Joe Kelsey <address@hidden>
 ;;
 ;; The filling, completion and chunk motion commands either taken
 ;; directly from or inspired by code in:
@@ -362,6 +362,49 @@ chunks."
 
 ;;}}}
 
+;; These functions below living here temporarily until a real place is
+;; found.
+
+(defun mmm-syntax-region-list (syntax regions)
+  "Apply SYNTAX to a list of REGIONS of the form (BEG END).
+If SYNTAX is not nil, set the syntax-table property of each region.
+If SYNTAX is nil, remove the region syntax-table property.
+See `mmm-syntax-region'."
+  (mapcar #'(lambda (reg)
+             (mmm-syntax-region (car reg) (cadr reg) syntax))
+         regions))
+
+(defun mmm-syntax-other-regions (syntax &optional name)
+  "Apply SYNTAX cell to other regions.
+Regions are separated by name, using either `mmm-name-at' or the
+optional NAME to determine the current region name."
+  (if (null name)
+      (setq name (or (mmm-name-at)
+                    (symbol-name mmm-primary-mode))))
+  (mapcar #'(lambda (reg)
+             (if (not (string= (car reg) name))
+                 (mmm-syntax-region-list syntax (cdr reg))))
+         (mmm-names-alist (point-min) (point-max))))
+
+(defun mmm-word-other-regions ()
+  "Give all other regions word syntax."
+  (interactive)
+  (mmm-syntax-other-regions '(2 . 0))
+  (setq parse-sexp-lookup-properties t))
+
+(defun mmm-space-other-regions ()
+  "Give all other regions space syntax."
+  (interactive)
+  (mmm-syntax-other-regions '(0 . 0))
+  (setq parse-sexp-lookup-properties t))
+
+(defun mmm-undo-syntax-other-regions ()
+  "Remove syntax-table property from other regions."
+  (interactive)
+  (mmm-syntax-other-regions nil)
+  (setq parse-sexp-lookup-properties nil))
+
+
 (provide 'mmm-noweb)
 
 ;;; mmm-noweb.el ends here
\ No newline at end of file
diff --git a/version.texi b/version.texi
index a171c5d..659389c 100644
--- a/version.texi
+++ b/version.texi
@@ -1,4 +1,4 @@
address@hidden UPDATED 21 February 2003
address@hidden UPDATED-MONTH February 2003
address@hidden UPDATED 9 March 2003
address@hidden UPDATED-MONTH March 2003
 @set EDITION 0.4.7
 @set VERSION 0.4.7



reply via email to

[Prev in Thread] Current Thread [Next in Thread]