[Bug: 21.4.15] skeleton-proxy-new fix

Alan Wehmann wehmann at fnal.gov
Tue Aug 24 22:34:36 EDT 2004


================================================================
Dear Bug Team!

Use of "html-href-anchor" on highlighted text does not work correctly.

An example of what happens is:

play with this<a href="http:"></a>

where "play with this" is highlighted text in a "play" buffer which
has been put into html mode with "M-x html-mode" and where this was
preceded by autoloading html-mode from sgml-mode.el.

> `html-href-anchor' is an interactive compiled Lisp function
>   -- loaded from "sgml-mode"
> (html-href-anchor &optional STR ARG)
> 
> Documentation:
> HTML anchor tag with href attribute.
> 
> This is a skeleton command (see `skeleton-insert').
> Normally the skeleton text is inserted at point, with nothing "inside".
> If there is a highlighted region, the skeleton text is wrapped
> around the region text.
> 
> A prefix argument ARG says to wrap the skeleton around the next ARG words.
> A prefix argument of zero says to wrap around zero words---that is, nothing.
> This is a way of overiding the use of a highlighted region.
> 

My investigation determined that the problem lies in the function
"skeleton-proxy-new", in
"xemacs214p/xemacs-packages/lisp/xemacs-base/".  It has near the end
the construct

			 (and skeleton-autowrap
			      (or (eq last-command 'mouse-drag-region)
				  (and (boundp 'transient-mark-mode)
				       (boundp 'mark-active)
				       transient-mark-mode mark-active))
			      -1)

modification of this to

			 (and skeleton-autowrap
			      (or (eq last-command 'mouse-drag-region)
				  (boundp 'zmacs-regions)
				  (and (boundp 'transient-mark-mode)
				       (boundp 'mark-active)
				       transient-mark-mode mark-active))
			      -1)

is a fix to the problem that works for me.



================================================================

System Info to help track down your bug:
---------------------------------------

uname -a: SunOS gax 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V250

./configure  '--cflags=-mr -Qn -xO2 -xtarget=generic -xarch=v8' '--compiler=cc' '--ldflags=-L/usr/openwin/lib -L/usr/dt/lib' '--dynamic=yes' '--with-pop' '--with-mule' '--with-database=berkdb' '--with-site-lisp=yes' '--with-menubars=lucid' '--with-scrollbars=lucid' '--error-checking=none' '--debug=no' '--memory-usage-stats=no' '--without-modules' '--with-sound=none' '--with-ncurses' '--infodir=/opt/TWWfsw/xemacs214/info' '--infopath=/opt/info:/opt/TWWfsw/info:/usr/local/info:/usr/info:/opt/TWWfsw/xemacs214p/packages/info:/opt/TWWfsw/xemacs214p/xemacs-packages/info' '--site-prefixes=/opt/TWWfsw/ncurses54 /opt/TWWfsw/xpm /opt/TWWfsw/jpeg /opt/TWWfsw/libtiff35 /opt/TWWfsw/libpng12 /opt/TWWfsw/zlib11 /opt/TWWfsw/libdb31' '--site-runtime-libraries=/opt/TWWfsw/ncurses54/lib /opt/TWWfsw/xpm/lib /opt/TWWfsw/jpeg/lib /opt/TWWfsw/libtiff35/lib /opt/TWWfsw/libpng12/lib /opt/TWWfsw/zlib11/lib /opt/TWWfsw/libdb31/lib /usr/dt/lib /usr/openwin/lib' '--package-path=~/.xemacs::/opt/TWWfsw/xemacs214/l


XEmacs 21.4.15 "Security Through Obscurity" configured for `sparc-sun-solaris2.8'.


Compilation / Installation:
  Source code location:              /opt/build/xemacs-21.4.15
  Installation prefix:               /opt/TWWfsw/xemacs214
  Additional header files:           /usr/dt/include
  Additional prefixes:               /opt/TWWfsw/ncurses54 /opt/TWWfsw/xpm /opt/TWWfsw/jpeg /opt/TWWfsw/libtiff35 /opt/TWWfsw/libpng12 /opt/TWWfsw/zlib11 /opt/TWWfsw/libdb31
  Runtime library search path:       /opt/TWWfsw/ncurses54/lib:/opt/TWWfsw/xpm/lib:/opt/TWWfsw/jpeg/lib:/opt/TWWfsw/libtiff35/lib:/opt/TWWfsw/libpng12/lib:/opt/TWWfsw/zlib11/lib:/opt/TWWfsw/libdb31/lib:/usr/dt/lib:/usr/openwin/lib
  Operating system description file: `s/sol2.h'
  Machine description file:          `m/sparc.h'
  Compiler:                          cc -mr -Qn -xO2 -xtarget=generic -xarch=v8
  Compiler version:                  cc: Sun C 5.5 Patch 112760-07 2004/02/03
  Relocating allocator for buffers:  yes
  GNU version of malloc:             yes
  libc:                              SUNWcsl 11.8.0,REV=2000.01.08.18.12

Window System:
  Compiling in support for the X window system:
    - X Windows headers location:                 /usr/openwin/include
    - X Windows libraries location:               /usr/openwin/lib
    - Handling WM_COMMAND properly.
  Compiling in support for Motif.
  *WARNING*  Many versions of Motif are buggy, requiring workarounds.
             You are likely to experience slow redisplay.
             You may need to install vendor patches to Motif.
             See PROBLEMS for more information.
  Using Lucid menubars.
  Using Lucid scrollbars.
  Using Motif dialog boxes.
  Compiling in support for Drag'n'Drop (EXPERIMENTAL).
    -  Drag'n'Drop prototype:                              CDE.

TTY:
  Compiling in support for ncurses.

Images:
  Compiling in support for GIF  images (builtin).
  Compiling in support for XPM  images.
  Compiling in support for PNG  images.
  Compiling in support for JPEG images.

Sound:

Databases:
  Compiling in support for Berkeley database.

Internationalization:
  Compiling in support for Mule (multi-lingual Emacs).
  Compiling in support for XIM (X11R5+ I18N input method).
    - Using Motif to provide XIM support.

Mail:
  Compiling in support for POP mail retrieval.
  Compiling in support for "dot-locking" mail spool file locking method.

Other Features:
  Inhibiting IPv6 canonicalization at startup.
  Compiling in support for ToolTalk.



Load-Path Lisp Shadows:
----------------------
(/opt/TWWfsw/xemacs214p/packages/lisp/auctex/texmathp
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/texmathp
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/tex-site
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/tex-site
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/tex-mik
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/tex-mik
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/tex-info
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/tex-info
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/tex-buf
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/tex-buf
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/multi-prompt
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/multi-prompt
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/latex
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/latex
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/font-latex
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/font-latex
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/auc-old
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/auc-old
/opt/TWWfsw/xemacs214p/packages/lisp/auctex/tex
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/auctex/tex
/opt/TWWfsw/xemacs214p/packages/lisp/clearcase/clearcase
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/clearcase/clearcase
/opt/TWWfsw/xemacs214p/packages/lisp/vhdl/vhdl-mode
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/vhdl/vhdl-mode
/opt/TWWfsw/xemacs214p/packages/lisp/clearcase/tq
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/xemacs-base/tq
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/build/build-report
/opt/TWWfsw/xemacs214/lib/xemacs-21.4.15/lisp/build-report
/opt/TWWfsw/xemacs214p/xemacs-packages/lisp/debug/gud
/afs/fnal.gov/files/home/room3/wehmann/emacs/xemacs/gud)


Installed XEmacs Packages:
-------------------------
(zenirc ver: 1.15 upstream: 2.112)
(xslt-process ver: 1.11 upstream: regular)
(xslide ver: 1.09 upstream: 0.2.2)
(xemacs-devel ver: 1.61 upstream: No-Upstream-Ver)
(xemacs-base ver: 1.84 upstream: No-Upstream-Ver)
(x-symbol ver: 1.09 upstream: 4.5.1)
(w3 ver: 1.29 upstream: 4.0pre47)
(vm ver: 7.18 upstream: 7.17)
(viper ver: 1.37 upstream: 3.09)
(view-process ver: 1.13 upstream: 2.4)
(vhdl ver: 1.18 upstream: 3.31.20)
(vc-cc ver: 1.22 upstream: No-Upstream-Ver)
(vc ver: 1.38 upstream: No-Upstream-Ver)
(tramp ver: 1.17 upstream: 2.0.35)
(tpu ver: 1.14 upstream: 4.2X)
(tooltalk ver: 1.15 upstream: No-Upstream-Ver)
(tm ver: 1.37 upstream: No-Upstream-Ver)
(time ver: 1.14 upstream: 1.17)
(textools ver: 1.15 upstream: No-Upstream-Ver)
(text-modes ver: 1.73 upstream: No-Upstream-Ver)
(texinfo ver: 1.25 upstream: No-Upstream-Ver)
(supercite ver: 1.2 upstream: 3.55x3)
(strokes ver: 1.1 upstream: No-Upstream-Ver)
(speedbar ver: 1.27 upstream: 0.14beta4)
(sounds-wav ver: 1.12 upstream: No-Upstream-Ver)
(sounds-au ver: 1.12 upstream: No-Upstream-Ver)
(sml-mode ver: 0.11 upstream: 3.9.5)
(slider ver: 1.15 upstream: 0.3x1)
(sieve ver: 1.15 upstream: No-Upstream-Ver)
(sh-script ver: 1.18 upstream: 2.0e)
(sgml ver: 1.11 upstream: No-Upstream-Ver)
(semantic ver: 1.18 upstream: 1.4.2)
(scheme ver: 1.14 upstream: No-Upstream-Ver)
(sasl ver: 1.14 upstream: 1.14.4)
(ruby-modes ver: 1.02 upstream: 1.6.8)
(rmail ver: 1.14 upstream: No-Upstream-Ver)
(riece ver: 1.14 upstream: 0.1.7)
(reftex ver: 1.33 upstream: 4.21)
(python-modes ver: 1.03 upstream: No-Upstream-Ver)
(psgml-dtds ver: 1.03 upstream: No-Upstream-Ver)
(psgml ver: 1.42 upstream: 1.3.1)
(ps-print ver: 1.09 upstream: 6.5.6)
(prog-modes ver: 1.94 upstream: No-Upstream-Ver)
(pgg ver: 1.04 upstream: 0.1)
(perl-modes ver: 1.05 upstream: No-Upstream-Ver)
(pcomplete ver: 1.03 upstream: 1.1.6)
(pcl-cvs ver: 1.65 upstream: R-2_9_9)
(pc ver: 1.26 upstream: No-Upstream-Ver)
(os-utils ver: 1.35 upstream: No-Upstream-Ver)
(oo-browser ver: 1.04 upstream: 4.08)
(ocaml ver: 0.05 upstream: 3.06)
(net-utils ver: 1.38 upstream: N/A)
(mmm-mode ver: 1.01 upstream: 0.4.7)
(misc-games ver: 1.18 upstream: No-Upstream-Ver)
(mine ver: 1.16 upstream: 1.9)
(mh-e ver: 1.28 upstream: 7.4.2)
(mew ver: 1.18 upstream: 1.94.2)
(mailcrypt ver: 2.14 upstream: 3.5.8)
(mail-lib ver: 1.64 upstream: No-Upstream-Ver)
(liece ver: 1.13 upstream: 1.4.9)
(jde ver: 1.46 upstream: regular)
(ispell ver: 1.29 upstream: 3.6)
(ilisp ver: 1.33 upstream: 5.12.0)
(igrep ver: 1.12 upstream: 2.95)
(idlwave ver: 1.31 upstream: 5.1)
(ibuffer ver: 1.09 upstream: No-Upstream-Ver)
(hyperbole ver: 1.15 upstream: 4.18)
(hm--html-menus ver: 1.23 upstream: 5.9)
(haskell-mode ver: 1.06 upstream: 1.44)
(gnus ver: 1.79 upstream: 5.10.6)
(gnats ver: 1.16 upstream: 3.101)
(games ver: 1.15 upstream: 1.04)
(fsf-compat ver: 1.14 upstream: No-Upstream-Ver)
(frame-icon ver: 1.11 upstream: No-Upstream-Ver)
(fortran-modes ver: 1.03 upstream: No-Upstream-Ver)
(forms ver: 1.15 upstream: 2.37)
(footnote ver: 1.16 upstream: 0.18x)
(eudc ver: 1.39 upstream: 1.32)
(eterm ver: 1.15 upstream: No-Upstream-Ver)
(ess ver: 1.07 upstream: 5.1.21)
(eshell ver: 1.06 upstream: 2.4.1)
(erc ver: 0.05 upstream: Version 4.0 Revision: 1.608)
(emerge ver: 1.11 upstream: No-Upstream-Ver)
(elib ver: 1.11 upstream: 1.0)
(eieio ver: 1.05 upstream: 0.17)
(efs ver: 1.32 upstream: 1.22)
(edt ver: 1.13 upstream: No-Upstream-Ver)
(edit-utils ver: 2.11 upstream: No-Upstream-Ver)
(ediff ver: 1.49 upstream: 2.75)
(edebug ver: 1.2 upstream: No-Upstream-Ver)
(ecrypto ver: 0.16 upstream: 2.0)
(ecb ver: 1.14 upstream: 2.11)
(docbookide ver: 0.07000000000000001 upstream: 0.1)
(dired ver: 1.15 upstream: 7.11)
(dictionary ver: 1.12 upstream: regular)
(debug ver: 1.17 upstream: No-Upstream-Ver)
(crisp ver: 1.14 upstream: 1.34)
(cookie ver: 1.15 upstream: No-Upstream-Ver)
(clearcase ver: 1.08 upstream: No-Upstream-Ver)
(cc-mode ver: 1.42 upstream: 5.30.8)
(calendar ver: 1.23 upstream: No-Upstream-Ver)
(calc ver: 1.24 upstream: 2.02fX3)
(c-support ver: 1.19 upstream: No-Upstream-Ver)
(build ver: 1.14 upstream: 2.02)
(bbdb ver: 1.24 upstream: 2.34)
(auctex ver: 1.36 upstream: 11.13)
(apel ver: 1.27 upstream: 10.2)
(ada ver: 1.14 upstream: 2.27)



Features:
--------

(mail-abbrevs xemacsbug shadow sendmail rfc822 skeleton sgml-mode
ebuff-menu electric advice advice-preload efs-cu zenirc-autoloads
xslt-process-autoloads xslide-autoloads xemacs-devel-autoloads
xemacs-base-autoloads x-symbol-autoloads w3-autoloads vm-autoloads
viper-autoloads view-process-autoloads vhdl-autoloads vc-cc-autoloads
vc-autoloads tramp-autoloads tpu-autoloads tooltalk-autoloads
tm-autoloads time-autoloads textools-autoloads text-modes-autoloads
texinfo-autoloads supercite-autoloads strokes-autoloads
speedbar-autoloads sounds-wav-autoloads sounds-au-autoloads
sml-mode-autoloads slider-autoloads sieve-autoloads
sh-script-autoloads sgml-autoloads semantic-autoloads scheme-autoloads
sasl-autoloads ruby-modes-autoloads rmail-autoloads riece-autoloads
reftex-autoloads python-modes-autoloads psgml-dtds-autoloads
psgml-autoloads ps-print-autoloads prog-modes-autoloads pgg-autoloads
perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads oo-browser-autoloads ocaml-autoloads
net-utils-autoloads mmm-mode-autoloads misc-games-autoloads
mine-autoloads mh-e-autoloads mew-autoloads mailcrypt-autoloads
mail-lib-autoloads liece-autoloads jde-autoloads ispell-autoloads
ilisp-autoloads igrep-autoloads idlwave-autoloads ibuffer-autoloads
hyperbole-autoloads hm--html-menus-autoloads haskell-mode-autoloads
gnus-autoloads gnats-autoloads games-autoloads fsf-compat-autoloads
frame-icon-autoloads fortran-modes-autoloads forms-autoloads
footnote-autoloads eudc-autoloads eterm-autoloads ess-autoloads
eshell-autoloads erc-autoloads emerge-autoloads elib-autoloads
eieio-autoloads efs-autoloads edt-autoloads edit-utils-autoloads
ediff-autoloads edebug-autoloads ecrypto-autoloads ecb-autoloads
docbookide-autoloads dired-autoloads dictionary-autoloads
debug-autoloads crisp-autoloads cookie-autoloads clearcase-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads ada-autoloads lisp-autoloads loadhist auto-show
fontl-hooks x-iso8859-1 slovenian czech romanian ccl mule-help
code-cmds gutter-items menubar-items x-menubar dragdrop mode-motion
mouse itimer auto-save lisp-mode easymenu iso8859-1 page buff-menu
lib-complete cus-file derived frame text-props obsolete cus-start
custom widget cl-extra mini-cl cl cl-19 packages backquote
very-early-lisp tooltalk file-coding mule lucid-scrollbars cut-buffer
lucid-menubars motif-dialogs x c-balloon-help tty-frames tty toolbar
scrollbar unix-processes multicast network-streams subprocesses
menu-accelerator-support menubar berkeley-db md5 xemacs xim gutter png
gif jpeg xpm xbm cde lisp-float-type usg-unix-v dragdrop-api dialog
devices window-system base64)


Recent keystrokes:
-----------------

ESC O B ; ; C-x C-s ESC x ESC p RET ESC p RET C-x b 
n e w RET ESC x BS BS BS C-g C-x C-f . x e TAB i n 
i TAB RET C-s s g m l C-s C-s ESC m ESC C-f C-x C-e 
C-x C-b n SPC ESC x h t m l - m o d e RET p l a y SPC 
w i t h SPC t h i s C-a C-@ C-e C-c C-c h ESC x r e 
p o r t TAB x e TAB RET


Recent messages (most recent first):
-----------------------------------

Parsing /afs/fnal.gov/files/home/room3/wehmann/mail_rmail/em_mail_addr... done
Parsing /afs/fnal.gov/files/home/room3/wehmann/mail_rmail/em_mail_addr...
Parsing /afs/fnal.gov/files/home/room3/wehmann/.mailrc...
Loading xemacsbug...done
Loading xemacsbug...
Loading skeleton...done
Loading skeleton...
Loading sgml-mode...done
Loading sgml-mode...
<<< Press Return to bury the buffer list >>>
Loading ebuff-menu...done
Loading ebuff-menu...
(autoload "sgml-mode" "Major mode based on SGML mode for editing HTML documents.
This allows inserting skeleton costructs used in hypertext documents with
completion.  See below for an introduction to HTML.  Use
\\[browse-url-of-buffer] to see how this comes out.  See also `sgml-mode' on
which this is based.

Do \\[describe-variable] html- SPC and \\[describe-variable] sgml- SPC to see available variables.

To write fairly well formatted pages you only need to know few things.  Most
browsers have a function to read the source code of the page being seen, so
you can imitate various tricks.  Here's a very short HTML primer which you
can also view with a browser to see what happens:

<title>A Title Describing Contents</title> should be on every page.  Pages can
have <h1>Very Major Headlines</h1> through <h6>Very Minor Headlines</h6>
<hr> Parts can be separated with horizontal rules.

<p>Paragraphs only need an opening tag.  Line breaks and multiple spaces are
ignored unless the text is <pre>preformatted.</pre>  Text can be marked as
<b>bold</b>, <i>italic</i> or <u>underlined</u> using the normal  M-g  or
Edit/Text Properties/Face commands.

Pages can have <a name=\"SOMENAME\">named points</a> and can link other points
to them with <a href=\"#SOMENAME\">see also somename</a>.  In the same way <a
href=\"URL\">see also URL</a> where URL is a filename relative to current
directory or something like http://www.cs.indiana.edu/elisp/w3/docs.html.

Images in many formats can be inlined with <img src=\"URL\">.

If you mainly create your own documents, `sgml-specials' might be interesting.
But note that some HTML 2 browsers can't handle &apos;.  To work around that
do:

(eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil))
\\{html-mode-map}" t nil)
Quit
Loading /afs/fnal.gov/files/home/room3/wehmann/.emacs-extracts...done
Loading advice...done
Loading advice...
Loading /afs/fnal.gov/files/home/room3/wehmann/.emacs-extracts...
Wrote /afs/fnal.gov/files/home/room3/wehmann/.emacs-extracts
Loading efs-cu...done




More information about the XEmacs-Beta mailing list