Commits

adrian  committed 02d021d

[PATCH] packages: Usability enhancements and more documentation for <1x5ps5d9.fsf@smtprelay.t-online.de>

  • Participants
  • Parent commits 5ad142b

Comments (0)

Files changed (3)

+2005-07-23  Adrian Aichner  <adrian@xemacs.org>
+
+	* re-builder.texi (Usage): Document display of copied RE in echo
+	area.
+	* re-builder.texi (Regex Types): Document `reb-toggle-case' and
+	display of current syntax in modeline.
+	* re-builder.texi (Questions): Typo fix.
+
+2005-06-12  Adrian Aichner  <adrian@xemacs.org>
+
+	* re-builder.el: Typo fix.
+	* re-builder.el (reb-copy): Kill reb-re-syntax 'string without
+	quoting to make it directly usable in interactive search.  Print
+	message in echo area, indicating the syntax and text being killed.
+	* re-builder.el (reb-update-modestring): Show setting of
+	reb-re-syntax in modeline.
+
 2005-03-14  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.02 released.

File re-builder.el

   (defalias 'reb-make-overlay 'make-overlay)
   (defalias 'reb-overlay-put 'overlay-put))
 
-;; User costomizable variables
+;; User customizable variables
 (defgroup re-builder nil
   "Options for the RE Builder."
   :group 'lisp
   (interactive)
 
   (reb-update-regexp)
-  (let ((re (with-output-to-string
-	      (print (reb-target-binding reb-regexp)))))
-    (kill-new (substring re 1 (1- (length re))))
-    (message "Regexp copied to kill-ring")))
+  (let* ((kill (reb-target-binding reb-regexp)))
+    (unless (eq reb-re-syntax 'string)
+      (setq kill (with-output-to-string (prin1 kill))))
+    (kill-new kill)
+    (message "%s regexp %s copied to kill-ring"
+	     (symbol-name reb-re-syntax) kill)))
 
 ;; The subexpression mode is not electric because the number of
 ;; matches should be seen rather than a prompt.
 	   "")
 	 (if (not (reb-target-binding case-fold-search))
 	     " Case"
-	   "")))
+	   "")
+	 " "
+	 (symbol-name reb-re-syntax)))
   (force-mode-line-update))
 
 (defun reb-display-subexp (&optional subexp)

File re-builder.texi

 @c %**end of header
 
 @c Version values, for easy modification
-@set VERSION 1.1
-@set UPDATED Friday, March 4, 2005
+@set VERSION 1.2
+@set UPDATED Sunday, July 24, 2005
 
 @c ** Many people seem to prefer this footenote style
 @footnotestyle end
 target window.
 
 @pkgname{} keeps the focus while updating the matches in the target
-buffer so corrections are easy to incorporate.  If you are satisfied
+buffer so corrections are easily incorporated.  If you are satisfied
 with the result you can paste the RE to the kill-ring with
-@code{reb-copy} (@kbd{C-c C-w}), quit @pkgname{} (@kbd{C-c C-q}) and use
+@code{reb-copy} (@kbd{C-c C-w}) (the copied RE and current syntax is
+displayed in the echo area), quit @pkgname{} (@kbd{C-c C-q}) and use
 it wherever you need it.
 
 As the automatic updates can take some time on large buffers, they can
 from @code{emacs-lisp-mode} so you'll get all the good stuff like
 automatic indentation and font-locking etc.
 
-When editing a symbolic regular expression, only the first expression in
-the RE Builder buffer is considered, which helps limiting the extent of
-the expression like the @code{"}s do for the text modes.  For the
-@code{sregex} syntax the function @code{sregex} is applied to the
-evaluated expression read.  So you can use quoted arguments with
-something like '("findme") or you can construct arguments to your hearts
-delight with a valid ELisp expression.  (The compiled string form will
-be copied by @code{reb-copy}) If you want to take a glance at the
-corresponding string you can temporarily change the input syntax.
+When editing a symbolic regular expression, only the first expression
+in the RE Builder buffer is considered, which helps limiting the
+extent of the expression like the @code{"}s do for the text modes.
+For the @code{sregex} syntax the function @code{sregex} is applied to
+the evaluated expression read.  So you can use quoted arguments with
+something like '("findme") or you can construct arguments to your
+heart's content with a valid ELisp expression.  The compiled string
+form will be copied by @code{reb-copy}.  If you want to take a glance
+at the corresponding string you can temporarily change the input
+syntax using @code{reb-change-syntax} (@kbd{C-c C-i}).  The current RE
+syntax is also displayed in the modeline.
 
 Changing the input syntax is transparent (for the obvious exception
 non-symbolic -> symbolic) so you can change your mind as often as you
 like.
 
-There is also a shortcut function for toggling the
-@code{case-fold-search} variable in the target buffer with an immediate
-update.
+There is also a shortcut function, @code{reb-toggle-case} (@kbd{C-c
+C-c}), for toggling the @code{case-fold-search} variable in the target
+buffer with an immediate update.
 
 @node Questions, , Regex Types, Top
 @chapter Questions
 
 Q: But what if my display cannot show colored overlays?
 
-A: Then the cursor will flash around the matched text making it stand out.
+A: Then the cursor will flash around the matched text making it stand
+out.
 
 Q: But how can I then make out the sub-expressions?
 
-A: Thats where the `sub-expression mode' comes in.  In it only the digit
-keys are assigned to perform an update that will flash the corresponding
-subexp only.
+A: That's where the `sub-expression mode' comes in.  In it only the
+digit keys are assigned to perform an update that will flash the
+corresponding subexp only.