~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/textmodes/sgml-mode.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; sgml-mode.el --- SGML- and HTML-editing modes -*- coding: iso-2022-7bit -*-
2
2
 
3
3
;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004,
4
 
;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
4
;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
5
 
6
6
;; Author: James Clark <jjc@jclark.com>
7
7
;; Maintainer: FSF
595
595
(defun sgml-name-self ()
596
596
  "Insert a symbolic character name according to `sgml-char-names'."
597
597
  (interactive "*")
598
 
  (sgml-name-char last-command-char))
 
598
  (sgml-name-char last-command-event))
599
599
 
600
600
(defun sgml-maybe-name-self ()
601
601
  "Insert a symbolic character name according to `sgml-char-names'."
602
602
  (interactive "*")
603
603
  (if sgml-name-8bit-mode
604
 
      (let ((mc last-command-char))
 
604
      (let ((mc last-command-event))
605
605
        (if (< mc 256)
606
606
            (setq mc (unibyte-char-to-multibyte mc)))
607
 
        (or mc (setq mc last-command-char))
 
607
        (or mc (setq mc last-command-event))
608
608
        (sgml-name-char mc))
609
609
    (self-insert-command 1)))
610
610
 
714
714
            (eq (aref tag 0) ?/))
715
715
        (self-insert-command (prefix-numeric-value arg))
716
716
      (sgml-attributes tag)
717
 
      (setq last-command-char ?\s)
 
717
      (setq last-command-event ?\s)
718
718
      (or (> (point) point)
719
719
          (self-insert-command 1)))))
720
720