Ar an seachtú lá déag de mí Márta, scríobh Stefan Holst:
Thanks for your help. Actually these lines at the end of the file did
not work out. Let's see if with a little more documentation we can get
the clue!
Loading the below displays okay for me, except that the proportions of the
font you directed me to,
http://www.vector.org.uk/resource/, mean things
line up very badly.
The long-standing Mule x-symbol bug, that’s been biting Uwe Brauer for
years, remains; when files are saved to disk, the x-symbol characters are
written, not the TeX source that they were generated from. That’ll probably
make it unusable for you in general :-( . Still, I’ve a much better idea at
this point why it’s breaking.
;; x-symbol-startup.el
(define-specifier-tag 'mule-fonts)
(require 'x-symbol)
(require 'x-symbol-sgml)
(require 'x-symbol-tex)
(dolist (sgml-info x-symbol-sgml-xsymb0-table)
(let* ((base-info (assoc (car sgml-info) x-symbol-xsymb0-table))
(charset-code (second base-info))
(charset-to-use (if (> charset-code 126)
'xsymb0-right
'xsymb0-left)))
(set-unicode-conversion (make-char charset-to-use charset-code)
(third sgml-info))))
(dolist (sgml-info x-symbol-sgml-xsymb1-table)
(let* ((base-info (assoc (car sgml-info) x-symbol-xsymb1-table))
(charset-code (second base-info))
(charset-to-use (if (> charset-code 126)
'xsymb1-right
'xsymb1-left)))
(set-unicode-conversion (make-char charset-to-use charset-code)
(third sgml-info))))
;;;===========================================================================
;;; General Insertion
;;;===========================================================================
(copy-face 'default 'our-x-symbol-face)
(set-face-font 'our-x-symbol-face "SImPL-14")
;; We redefine this function to make it apply a face to its inserted
;; string, since XEmacs Mule won't let you specify the font for a given
;; character set.
(defun x-symbol-replace-from (from cstring &optional ignore)
"Replace buffer contents between FROM and `point' by CSTRING.
If IGNORE is non-nil, the current command, which should be a
self-inserting character, is ignored by providing a zero prefix
argument. Also prepare the use of `undo' and `unexpand-abbrev'."
(or (stringp cstring)
(setq cstring (gethash cstring x-symbol-cstring-table)))
(when cstring
(and ignore
(null prefix-arg)
(self-insert-command 1))
(undo-boundary)
(let ((pos (point))
(this-string-extent (make-extent nil nil)))
(if (listp buffer-undo-list) ; put point position on undo-list...
(push pos buffer-undo-list)) ; ...necessary for aggressive CONTEXT
(setq x-symbol-last-abbrev cstring ; allow use of `unexpand-abbrev'
last-abbrev-location from
last-abbrev 'x-symbol-last-abbrev
last-abbrev-text (buffer-substring from pos))
;; `replace-region': first insert, then delete (reason: markers)
(insert-before-markers cstring)
;; Aidan's change.
(set-extent-face this-string-extent 'our-x-symbol-face)
(set-extent-property this-string-extent 'duplicable t)
(insert-extent this-string-extent (- (point) (length cstring))
(point))
(delete-region from pos)
(if ignore (setq prefix-arg 0))
(setq abbrev-start-location pos ; this hack stops expand-abbrev
abbrev-start-location-buffer (current-buffer)))
(undo-boundary)
t))
;; (x-symbol-initialize)
;; x-symbol-startup.el ends here.
--
“I, for instance, am gung-ho about open source because my family is being
held hostage in Rob Malda’s basement. But who fact-checks me, or Enderle,
when we say something in public? No-one!” -- Danny O’Brien