Mercurial > emacs
annotate lisp/nxml/nxml-maint.el @ 111429:249a1455856a
Use line-end-position rather than end-of-line, etc.
* textmodes/texnfo-upd.el (texinfo-start-menu-description)
(texinfo-update-menu-region-beginning, texinfo-menu-first-node)
(texinfo-delete-existing-pointers, texinfo-find-pointer)
(texinfo-clean-up-node-line, texinfo-insert-node-lines)
(texinfo-multiple-files-update):
* textmodes/table.el (table--probe-cell-left-up)
(table--probe-cell-right-bottom):
* textmodes/picture.el (picture-tab-search):
* textmodes/page-ext.el (pages-copy-header-and-position)
(pages-directory-for-addresses):
* progmodes/vera-mode.el (vera-get-offset):
* progmodes/simula.el (simula-calculate-indent):
* progmodes/python.el (python-pdbtrack-overlay-arrow):
* progmodes/prolog.el (end-of-prolog-clause):
* progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp):
* progmodes/icon.el (indent-icon-exp):
* progmodes/etags.el (tag-re-match-p):
* progmodes/ebrowse.el (ebrowse-show-file-name-at-point):
* progmodes/ebnf2ps.el (ebnf-begin-file):
* progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-save-local-variable):
* play/life.el (life-setup):
* play/gametree.el (gametree-looking-at-ply):
* nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* mail/sendmail.el (mail-mode-auto-fill):
* emacs-lisp/lisp-mode.el (calculate-lisp-indent):
* emacs-lisp/edebug.el (edebug-overlay-arrow):
* emacs-lisp/checkdoc.el (checkdoc-this-string-valid):
* woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH)
(woman-tab-to-tab-stop, WoMan-warn-ignored):
* type-break.el (type-break-file-keystroke-count):
* term.el (term-replace-by-expanded-history-before-point)
(term-skip-prompt, term-extract-string):
* speedbar.el (speedbar-edit-line, speedbar-expand-line)
(speedbar-contract-line, speedbar-toggle-line-expansion)
(speedbar-parse-c-or-c++tag, speedbar-parse-tex-string)
(speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line):
* sort.el (sort-skip-fields):
* skeleton.el (skeleton-internal-list):
* simple.el (line-move-finish, line-move-to-column):
* shell.el (shell-forward-command):
* misc.el (copy-from-above-command):
* makesum.el (double-column):
* ebuff-menu.el (electric-buffer-update-highlight):
* dired.el (dired-move-to-end-of-filename):
* dframe.el (dframe-popup-kludge):
* bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames):
* arc-mode.el (archive-get-lineno):
Use line-end-position and line-beginning-position.
* net/ange-ftp.el, progmodes/hideif.el, reposition.el:
Same, but only in comments.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 06 Nov 2010 13:23:42 -0700 |
parents | 1d1d5d9bd884 |
children | 417b1e4d63cd |
rev | line source |
---|---|
86361 | 1 ;;; nxml-maint.el --- commands for maintainers of nxml-*.el |
2 | |
111429
249a1455856a
Use line-end-position rather than end-of-line, etc.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
3 ;; Copyright (C) 2003, 2007, 2008, 2009, 2010 |
249a1455856a
Use line-end-position rather than end-of-line, etc.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
86361 | 5 |
6 ;; Author: James Clark | |
7 ;; Keywords: XML | |
8 | |
86537 | 9 ;; This file is part of GNU Emacs. |
10 | |
94666
d495d4d5452f
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87665
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
86537 | 12 ;; it under the terms of the GNU General Public License as published by |
94666
d495d4d5452f
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87665
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
d495d4d5452f
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87665
diff
changeset
|
14 ;; (at your option) any later version. |
86361 | 15 |
86537 | 16 ;; GNU Emacs is distributed in the hope that it will be useful, |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
86361 | 20 |
86537 | 21 ;; You should have received a copy of the GNU General Public License |
94666
d495d4d5452f
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87665
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
86361 | 23 |
24 ;;; Commentary: | |
25 | |
26 ;;; Code: | |
27 | |
28 ;;; Generating files with Unicode char names. | |
29 | |
30 (require 'nxml-uchnm) | |
31 | |
32 (defun nxml-create-unicode-char-name-sets (file) | |
33 "Generate files containing char names from Unicode standard." | |
34 (interactive "fUnicodeData file: ") | |
86537 | 35 (mapc (lambda (block) |
36 (let ((nameset (nxml-unicode-block-char-name-set (nth 0 block)))) | |
37 (save-excursion | |
38 (find-file (concat (get nameset 'nxml-char-name-set-file) | |
39 ".el")) | |
40 (erase-buffer) | |
41 (insert "(nxml-define-char-name-set '") | |
42 (prin1 nameset (current-buffer)) | |
43 (insert "\n '())\n") | |
44 (goto-char (- (point) 3))))) | |
45 nxml-unicode-blocks) | |
86361 | 46 (save-excursion |
47 (find-file file) | |
48 (goto-char (point-min)) | |
49 (let ((blocks nxml-unicode-blocks) | |
50 code name) | |
51 (while (re-search-forward "^\\([0-9A-F]+\\);\\([^<;][^;]*\\);" | |
52 nil | |
53 t) | |
54 (setq code (string-to-number (match-string 1) 16)) | |
55 (setq name (match-string 2)) | |
56 (while (and blocks | |
57 (> code (nth 2 (car blocks)))) | |
58 (setq blocks (cdr blocks))) | |
59 (when (and (<= (nth 1 (car blocks)) code) | |
60 (<= code (nth 2 (car blocks)))) | |
61 (save-excursion | |
62 (find-file (concat (get (nxml-unicode-block-char-name-set | |
63 (nth 0 (car blocks))) | |
64 'nxml-char-name-set-file) | |
65 ".el")) | |
66 (insert "(") | |
67 (prin1 name (current-buffer)) | |
68 (insert (format " #x%04X)\n " code)))))))) | |
69 | |
70 ;;; Parsing target repertoire files from ucs-fonts. | |
71 ;; This is for converting the TARGET? files in | |
72 ;; http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz | |
73 ;; into a glyph set. | |
74 | |
75 (defun nxml-insert-target-repertoire-glyph-set (file var) | |
76 (interactive "fTarget file: \nSVariable name: ") | |
77 (let (lst head) | |
105866
3367f0022cf2
* nxml/xsd-regexp.el (xsdre-gen-categories):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
78 (with-current-buffer (find-file-noselect file) |
86361 | 79 (goto-char (point-min)) |
80 (while (re-search-forward "^ *\\([a-FA-F0-9]\\{2\\}\\)[ \t]+" nil t) | |
81 (let ((row (match-string 1)) | |
111429
249a1455856a
Use line-end-position rather than end-of-line, etc.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
82 (eol (line-end-position))) |
86361 | 83 (while (re-search-forward "\\([a-FA-F0-9]\\{2\\}\\)-\\([a-FA-F0-9]\\{2\\}\\)\\|\\([a-FA-F0-9]\\{2\\}\\)" eol t) |
84 (setq lst | |
85 (cons (if (match-beginning 3) | |
86 (concat "#x" row (match-string 3)) | |
87 (concat "(#x" row (match-string 1) | |
88 " . #x" row (match-string 2) ")")) | |
89 lst)))))) | |
90 (setq lst (nreverse lst)) | |
91 (insert (format "(defconst %s\n [" var)) | |
92 (while lst | |
93 (setq head (car lst)) | |
94 (setq lst (cdr lst)) | |
95 (insert head) | |
96 (when (= (length head) 6) | |
97 (while (and lst (= (length (car lst)) 6)) | |
98 (insert " ") | |
99 (insert (car lst)) | |
100 (setq lst (cdr lst)))) | |
101 (when lst (insert "\n "))) | |
102 (insert "])\n"))) | |
103 | |
104 (provide 'nxml-maint) | |
105 | |
106 ;;; nxml-maint.el ends here |