--- dictem-1.0.4.orig/TODO +++ dictem-1.0.4/TODO @@ -1,6 +1 @@ -- "er" dictionary + geek -- antonym for "l". "n" and "p"? -- keep p/n history in buffers with numbers. -- does dictem-use-existing-buffer work properly? - Do you have ideas, want new features, see bugs? Let me know ;-) --- dictem-1.0.4.orig/debian/changelog +++ dictem-1.0.4/debian/changelog @@ -0,0 +1,153 @@ +dictem (1.0.4-4.1) unstable; urgency=medium + + * Non maintainer upload by the Reproducible Builds team. + * No source change upload to rebuild on buildd with .buildinfo files. + + -- Holger Levsen Mon, 04 Jan 2021 15:38:18 +0100 + +dictem (1.0.4-4) unstable; urgency=low + + * Update Vcs-Git to own repository. Closes: #847714. + + -- Yauheni Kaliuta Thu, 22 Dec 2016 15:49:57 +0200 + +dictem (1.0.4-3) unstable; urgency=low + + * Update Standartds-Version to 3.9.8 just to make an upload + to show "we are alive". + + -- Yauheni Kaliuta Sat, 03 Sep 2016 09:22:13 +0300 + +dictem (1.0.4-2) unstable; urgency=low + + * Remove no more needed 'DM-Upload-Alllowed' and 'Uploaders' + * Update Standards-Version + * Adopt to the new policy: + - Conflicts of old emacsen-common, Depends of the new. + - add emacsen-compat + debhelper takes care of the rest of the job. + + -- Yauheni Kaliuta Thu, 06 Mar 2014 14:39:28 +0200 + +dictem (1.0.4-1) unstable; urgency=low + + * New upstream release 1.0.4: + - Flag (interactive) was removed from the following functions: + dictem-select-strategy, dictem-select-database, dictem-read-query + and dictem-run. Closes: #564251 + + -- Yauheni Kaliuta Mon, 27 Aug 2012 20:19:02 +0300 + +dictem (1.0.3-1) unstable; urgency=low + + * New upstream release, see NEWS. Closes: #681943 + * Add autoloads to the site-start file. Closes: #541283 + * Update packaging: + - upstream ChangeLog has been removed, adopting; + - depends on current emacs24 first; + - Standards-Version: 3.9.3; + - debhelper version 9; + - change dh_clean -k to dh_prep; + - added dummy build-indep and build-arch targets; + - added debian/source/format. Source version is 1.0; + - added ${misc:Depends} + + -- Yauheni Kaliuta Tue, 07 Aug 2012 01:52:51 +0300 + +dictem (1.0.2-1) unstable; urgency=low + + * New upstream release, see NEWS. Closes: #541281 + * Install symlink in the flavour directory. Closes: #541287 + * Update packaging: + - Homepage is a regular field; + - depends on current emacs23 first; + - copyright points to GPL-2. + - Standards-Version: 3.8.3 + + -- Yauheni Kaliuta Sun, 16 Aug 2009 14:16:41 +0300 + +dictem (0.8-1) unstable; urgency=low + + * New upstream release, see NEWS. + * Fixed maintainer's name. + * Updated Standards-Version to 3.7.2 -- no changes to package. + * Updated debhelper dependency to version 5. + + -- Yauheni Kaliuta Tue, 7 Nov 2006 23:07:07 +0200 + +dictem (0.0.5-3) unstable; urgency=low + + * Added debian-pkg-add-load-path-item check + to startup file to conform to emacs-policy (point 9). + + -- Zhenja Kaluta Sat, 24 Sep 2005 00:27:10 +0300 + +dictem (0.0.5-2) unstable; urgency=low + + * Fixed startup file to use debian-pkg-add-load-path-item. + Closes: #328714 + * Fixed FSF address in the debian/copyright. + + -- Zhenja Kaluta Thu, 22 Sep 2005 19:26:23 +0300 + +dictem (0.0.5-1) unstable; urgency=low + + * New upstream release (0.0.5). + * Updated Standards-Version to 3.6.2 - no changes to package. + + -- Zhenja Kaluta Tue, 9 Aug 2005 17:36:20 +0300 + +dictem (0.0.4-1) unstable; urgency=low + + * New upstream release (0.0.4). + + -- Zhenja Kaluta Mon, 25 Apr 2005 17:06:49 +0300 + +dictem (0.0.3-1) unstable; urgency=low + + * New upstream release (0.0.3). Closes: #285704 + * Added NEWS and AUTHORS files to documentation. + + -- Zhenja Kaluta Wed, 15 Dec 2004 18:20:41 +0200 + +dictem (0.0.2-1) unstable; urgency=low + + * New upstream release (0.0.2). + Closes: #283897 + + -- Zhenja Kaluta Wed, 1 Dec 2004 14:34:29 +0200 + +dictem (0.0.1-4) unstable; urgency=low + + * Fixed description. + * Removed maintainer's scripts. + * Upload sponsored by Dmitry Borodaenko . + Closes: #275149 (ITP) + + -- Zhenja Kaluta Fri, 8 Oct 2004 18:51:08 +0300 + +dictem (0.0.1-3) unstable; urgency=low + + * Fixed upstream's e-mail and url. + * Removed README.Debian. + * Minor fixes in debian/rules. + * Fixed dependences. + * Fixed lintian warnings. + * Fixed description. + + -- Zhenja Kaluta Thu, 30 Sep 2004 12:35:27 +0300 + +dictem (0.0.1-2) unstable; urgency=low + + * Fixed architecture. + * Updated description. + * Removed executable from dictem.el. + + -- Zhenja Kaluta Tue, 28 Sep 2004 17:00:47 +0300 + +dictem (0.0.1-1) unstable; urgency=low + + * Initial Release. + + -- Zhenja Kaluta Fri, 24 Sep 2004 12:38:21 +0300 + --- dictem-1.0.4.orig/debian/compat +++ dictem-1.0.4/debian/compat @@ -0,0 +1,2 @@ +9 + --- dictem-1.0.4.orig/debian/control +++ dictem-1.0.4/debian/control @@ -0,0 +1,25 @@ +Source: dictem +Section: text +Priority: optional +Maintainer: Yauheni Kaliuta +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.8 +Homepage: http://www.mova.org/~cheusov/pub/dictem +Vcs-Git: https://github.com/ykaliuta/dictem.git -b packaging + +Package: dictem +Architecture: all +Depends: ${misc:Depends}, dict (>> 1.9.14), emacsen-common (>= 2.0.0) +Conflicts: emacsen-common (< 2.0.0) +Provides: dict-client +Description: Dict client for emacs + DictEm implements all functions of the client part of Dictionary + Server Protocol(DICT) protocol (RFC-2229, www.dict.org), i.e looking + up words and definitions, obtaining information about available + strategies, provided databases, information about DICT server etc. + . + It uses autocompletion that is used for selecting dictionary and + search strategy. Moreover, DictEm provides several hooks which + may be used for buffer postprocessing. + . + --- dictem-1.0.4.orig/debian/copyright +++ dictem-1.0.4/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Zhenja Kaluta on +Fri, 24 Sep 2004 12:38:21 +0300. + +Downloaded From: http://www.mova.org/~cheusov/pub/dictem/ + +Upstream Author: Aleksey Cheusov + +Copyright (c) 2003, 2004 Aleksey Cheusov + + DictEm is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DictEm is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + --- dictem-1.0.4.orig/debian/dirs +++ dictem-1.0.4/debian/dirs @@ -0,0 +1,2 @@ +usr/share/emacs/site-lisp/dictem +usr/lib/emacsen-common/packages --- dictem-1.0.4.orig/debian/docs +++ dictem-1.0.4/debian/docs @@ -0,0 +1,4 @@ +README +NEWS +AUTHORS + --- dictem-1.0.4.orig/debian/dotemacs.el +++ dictem-1.0.4/debian/dotemacs.el @@ -0,0 +1,9 @@ +(require 'dictem) +(setq dictem-server "server") +(dictem-initialize) +(global-set-key "\C-cs" 'dictem-run-search) +(global-set-key "\C-cm" 'dictem-run-match) +(global-set-key "\C-cd" 'dictem-run-define) +(global-set-key "\C-c\M-r" 'dictem-run-show-server) +(global-set-key "\C-c\M-i" 'dictem-run-show-info) +(global-set-key "\C-c\M-b" 'dictem-run-show-databases) --- dictem-1.0.4.orig/debian/emacsen-compat +++ dictem-1.0.4/debian/emacsen-compat @@ -0,0 +1 @@ +0 --- dictem-1.0.4.orig/debian/emacsen-install +++ dictem-1.0.4/debian/emacsen-install @@ -0,0 +1,51 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/dictem + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=dictem + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +LOG=`tempfile -pelc_ -s.log -m644` +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +echo install/${PACKAGE}: Handling ${FLAVOR}, logged in ${LOG} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cd ${ELCDIR} +for i in $FILES; do + ln -fs /usr/share/emacs/site-lisp/${PACKAGE}/$i +done + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +echo ${FLAVOR} ${FLAGS} ${FILES} >> ${LOG} +${FLAVOR} ${FLAGS} ${FILES} >> ${LOG} 2>&1 +egrep -s -e "While compiling|\*\*" ${LOG} || /bin/true +echo install/${PACKAGE}: Deleting ${LOG} +rm -f path.el ${LOG} + +exit 0 --- dictem-1.0.4.orig/debian/emacsen-remove +++ dictem-1.0.4/debian/emacsen-remove @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/dictem + +FLAVOR=$1 +PACKAGE=dictem + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/dictem.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi --- dictem-1.0.4.orig/debian/emacsen-startup +++ dictem-1.0.4/debian/emacsen-startup @@ -0,0 +1,13 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian dictem package +;; + +(when (fboundp 'debian-pkg-add-load-path-item) + (debian-pkg-add-load-path-item + (concat "/usr/share/" + (symbol-name debian-emacs-flavor) + "/site-lisp/dictem"))) + +(autoload 'dictem "dictem" nil t) +(autoload 'dictem-run-search "dictem" nil t) --- dictem-1.0.4.orig/debian/rules +++ dictem-1.0.4/debian/rules @@ -0,0 +1,46 @@ +#!/usr/bin/make -f +# -*- makefile -*- +#export DH_VERBOSE=1 + +build: build-stamp + +build-stamp: + dh_testdir + touch build-stamp + +build-indep: build +build-arch: build + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + for i in *.el; do \ + install -m644 $$i \ + $(CURDIR)/debian/dictem/usr/share/emacs/site-lisp/dictem/ ; \ + done + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installemacsen + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install +binary: binary-indep binary-arch +.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install --- dictem-1.0.4.orig/debian/source/format +++ dictem-1.0.4/debian/source/format @@ -0,0 +1 @@ +1.0 --- dictem-1.0.4.orig/dictem.el +++ dictem-1.0.4/dictem.el @@ -476,62 +476,82 @@ (defun dictem-local-dict-basic-option (host port option-mime) (let ((server-host (if host host (dictem-get-server)))) (append - (list "-P" "-") + (list "-P" "-" + "--client" (dictem-client-text)) (if server-host (list "-h" server-host "-p" (dictem-get-port port))) (if option-mime '("-M")) dictem-client-prog-args-list ))) -(defun dictem-call-process (buffer host port args) - (let (coding-system - coding-system-for-read - coding-system-for-write) - (if (and (functionp 'coding-system-list) - (member 'utf-8 (coding-system-list))) - (setq coding-system 'utf-8)) - (setq coding-system-for-read coding-system) - (setq coding-system-for-write coding-system) - (apply 'call-process - `(,dictem-client-prog - nil - ,(dictem-get-buffer buffer) - nil - ,@(dictem-local-dict-basic-option host port nil) - ,@args - )))) - (defun dictem-call-process-SHOW-SERVER (buffer host port) - (dictem-call-process buffer host port '("-I"))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port nil) + "-I"))) (defun dictem-call-process-SHOW-INFO (buffer db host port) - (dictem-call-process buffer host port (list "-i" db))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port nil) + "-i" ,db))) (defun dictem-call-process-SHOW-STRAT (buffer host port) - (dictem-call-process buffer host port '("-S"))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port nil) + "-S"))) (defun dictem-call-process-SHOW-DB (buffer host port) - (dictem-call-process buffer host port '("-D"))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port nil) + "-D"))) (defun dictem-call-process-MATCH (buffer db query strat host port) - (dictem-call-process - buffer host port - (list "-m" - "-d" (if db db "*") - "-s" (if strat strat ".") - query))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port nil) + "-m" + "-d" ,(if db db "*") + "-s" ,(if strat strat ".") + ,query))) (defun dictem-call-process-DEFINE (buffer db query host port) - (dictem-call-process - buffer host port - (list "-d" (if db db "*") query))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port dictem-option-mime) + "-d" ,(if db db "*") + ,query))) (defun dictem-call-process-SEARCH (buffer db query strat host port) - (dictem-call-process - buffer host port - (list "-d" (if db db "*") - "-s" (if strat strat ".") - query))) + (apply 'call-process + `(,dictem-client-prog + nil + ,(dictem-get-buffer buffer) + nil + ,@(dictem-local-dict-basic-option host port dictem-option-mime) + "-d" ,(if db db "*") + "-s" ,(if strat strat ".") + ,query))) ;;;;; GET Functions ;;;;; @@ -1136,58 +1156,59 @@ ) ex_status) - (let ((selected-window (frame-selected-window)) + (let ((coding-system nil)) + (if (and (functionp 'coding-system-list) + (member 'utf-8 (coding-system-list))) + (setq coding-system 'utf-8)) + (let ((selected-window (frame-selected-window)) + (coding-system-for-read coding-system) + (coding-system-for-write coding-system) ; here we remember values of variables local to buffer - (server dictem-server) - (port dictem-port) - (dbs dictem-database-alist) - (strats dictem-strategy-alist) - (user-dbs dictem-user-databases-alist) - (user-only dictem-use-user-databases-only) - (use-existing-buf dictem-use-existing-buffer) + (server dictem-server) + (port dictem-port) + (dbs dictem-database-alist) + (strats dictem-strategy-alist) + (user-dbs dictem-user-databases-alist) + (user-only dictem-use-user-databases-only) + (use-existing-buf dictem-use-existing-buffer) ; (option-mime dictem-option-mime) - (dict-buf nil) - ) - (cond - ((eq dictem-use-existing-buffer 'always) - (dictem-ensure-buffer)) - ((eq dictem-use-existing-buffer t) - (dictem-ensure-buffer)) - (t - (dictem)) - 0) - (setq dict-buf (buffer-name)) + (dict-buf nil) + ) + (if dictem-use-existing-buffer + (dictem-ensure-buffer) + (dictem)) + (setq dict-buf (buffer-name)) ; (set-buffer-file-coding-system coding-system) - (make-local-variable 'dictem-default-strategy) - (make-local-variable 'dictem-default-database) - (make-local-variable 'case-replace) - (make-local-variable 'case-fold-search) + (make-local-variable 'dictem-default-strategy) + (make-local-variable 'dictem-default-database) + (make-local-variable 'case-replace) + (make-local-variable 'case-fold-search) ; the following lines are to inherit values local to buffer - (set (make-local-variable 'dictem-server) server) - (set (make-local-variable 'dictem-port) port) - (set (make-local-variable 'dictem-database-alist) dbs) - (set (make-local-variable 'dictem-strategy-alist) strats) - (set (make-local-variable 'dictem-user-databases-alist) user-dbs) - (set (make-local-variable 'dictem-use-user-databases-only) user-only) - (set (make-local-variable 'dictem-use-existing-buffer) use-existing-buf) + (set (make-local-variable 'dictem-server) server) + (set (make-local-variable 'dictem-port) port) + (set (make-local-variable 'dictem-database-alist) dbs) + (set (make-local-variable 'dictem-strategy-alist) strats) + (set (make-local-variable 'dictem-user-databases-alist) user-dbs) + (set (make-local-variable 'dictem-use-user-databases-only) user-only) + (set (make-local-variable 'dictem-use-existing-buffer) use-existing-buf) ; (set (make-local-variable 'dictem-option-mime) option-mime) - (set (make-local-variable 'dictem-hyperlinks-alist) nil) + (set (make-local-variable 'dictem-hyperlinks-alist) nil) ;;;;;;;;;;;;;; - (setq case-replace nil) - (setq case-fold-search nil) - (setq dictem-error-messages nil) - (dictem-local-run-functions search-fun database query strategy) - (switch-to-buffer dict-buf) - (if (and (not (equal ex_status 0)) (= (point-min) (point-max))) - (insert (dictem-generate-full-error-message ex_status))) - (goto-char (point-min)) - (setq buffer-read-only t) - ex_status - ))) + (setq case-replace nil) + (setq case-fold-search nil) + (setq dictem-error-messages nil) + (dictem-local-run-functions search-fun database query strategy) + (switch-to-buffer dict-buf) + (if (and (not (equal ex_status 0)) (= (point-min) (point-max))) + (insert (dictem-generate-full-error-message ex_status))) + (goto-char (point-min)) + (setq buffer-read-only t) + ex_status + )))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun dictem-next-section () @@ -1709,70 +1730,55 @@ ))))) )) -(defun dictem-find-brackets (re-beg re-end) - (let ((beg-beg (make-marker)) - (beg-end (make-marker)) - (end-beg (make-marker)) - (end-end (make-marker))) - (if (search-forward-regexp re-beg nil t) - (progn - (set-marker beg-beg (match-beginning 0)) - (set-marker beg-end (match-end 0)) - (if (search-forward-regexp re-end nil t) - (progn - (set-marker end-beg (match-beginning 0)) - (set-marker end-end (match-end 0)) - (list beg-beg beg-end end-beg end-end)) - nil)) - nil))) - -(defun dictem-postprocess-definition-hyperlinks-cyrlybr1 () - (save-excursion - (goto-char (point-min)) - (let ((regexp) (pos) (beg1) (beg2) (beg3) (end) (word)) - - (while (setq pos (dictem-find-brackets dictem-hyperlink-beginning - dictem-hyperlink-end)) - (delete-region (nth 0 pos) (nth 1 pos)) - (delete-region (nth 2 pos) (nth 3 pos)) - (setq word (buffer-substring-no-properties (nth 1 pos) (nth 2 pos))) - (dictem-create-link - (nth 1 pos) (nth 2 pos) - 'dictem-reference-definition-face - dictem-hyperlink-define-func - (list (cons 'word (dictem-replace-spaces word)) - (cons 'dbname dictem-current-dbname)) - '(link t)))))) - -(defun dictem-postprocess-definition-hyperlinks-curlybr2 () +(defun dictem-postprocess-definition-hyperlinks () (save-excursion (goto-char (point-min)) (let ((regexp - (concat dictem-hyperlink-beginning "\\([^{}|\n]+\\)|\\([^{}|\n]+\\)" - dictem-hyperlink-end))) + (concat dictem-hyperlink-beginning "\\([^{}|]+\\)" dictem-hyperlink-end + "\\|" + "^From [^\n]+\\[\\([^\n]+\\)\\]" + "\\|" + "\\(" dictem-hyperlink-beginning "\\([^{}|\n]+\\)|\\([^{}|\n]+\\)" + dictem-hyperlink-end "\\)"))) (while (search-forward-regexp regexp nil t) - (let* ((beg (match-beginning 5)) - (end (match-end 5)) - (match-beg (match-beginning 3)) - (repl-beg (match-beginning 4)) - (repl-end (match-end 4)) - (repl (buffer-substring-no-properties repl-beg repl-end)) - (word (buffer-substring-no-properties beg end))) - (replace-match repl t t) - (dictem-create-link - match-beg (+ match-beg (length repl)) - 'dictem-reference-definition-face - dictem-hyperlink-define-func - (list (cons 'word (dictem-replace-spaces word)) - (cons 'dbname dictem-current-dbname)) - '(link t))))))) - -(defun dictem-postprocess-definition-hyperlinks () - (dictem-postprocess-definition-hyperlinks-cyrlybr1) - (dictem-postprocess-definition-hyperlinks-curlybr2) -; (dictem-postprocess-definition-hyperlinks-curlybr2) - ) + (cond ((match-beginning 1) + (let* ((beg (match-beginning 1)) + (end (match-end 1)) + (match-beg (match-beginning 0)) + (word (buffer-substring-no-properties beg end))) + (replace-match word t t) + (dictem-create-link + match-beg (+ match-beg (length word)) + 'dictem-reference-definition-face + dictem-hyperlink-define-func + (list (cons 'word (dictem-replace-spaces word)) + (cons 'dbname dictem-current-dbname)) + '(link t)) + )) + ((match-beginning 2) + (if (null dictem-current-dbname) + (setq dictem-current-dbname + (dictem-replace-spaces + (buffer-substring-no-properties (match-beginning 2) + (match-end 2)))))) + ((match-beginning 3) + (let* ((beg (match-beginning 5)) + (end (match-end 5)) + (match-beg (match-beginning 3)) + (repl-beg (match-beginning 4)) + (repl-end (match-end 4)) + (repl (buffer-substring-no-properties repl-beg repl-end)) + (word (buffer-substring-no-properties beg end))) + (replace-match repl t t) + (dictem-create-link + match-beg (+ match-beg (length repl)) + 'dictem-reference-definition-face + dictem-hyperlink-define-func + (list (cons 'word (dictem-replace-spaces word)) + (cons 'dbname dictem-current-dbname)) + '(link t)))) + ))))) (defun dictem-postprocess-match () (save-excursion @@ -1826,113 +1832,6 @@ (kill-line 1)) ))))) -(defun dictem-add-text-face-properties (start end face-add-props - &optional object) - (let (face-props) - (while (<= start end) - (progn - (setq face-props (get-text-property start 'face object)) - (if (facep face-props) - (progn - (setq face-props nil) - (add-text-properties - start (+ 1 start) - (list 'face nil) - object))) - (add-text-properties - start (+ 1 start) - (list 'face (append face-props face-add-props)) - object) - (setq start (+ start 1)))))) - -(defun dictem-add-begendre-face-propertires (re-beg re-end face-properties) - (let ((bold-beg-beg (make-marker)) - (bold-beg-end (make-marker)) - (bold-end-beg (make-marker)) - (bold-end-end (make-marker))) - (while (search-forward-regexp re-beg nil t) - (progn - (set-marker bold-beg-beg (match-beginning 0)) - (set-marker bold-beg-end (match-end 0)) - (if (search-forward-regexp re-end nil t) - (progn - (set-marker bold-end-beg (match-beginning 0)) - (set-marker bold-end-end (match-end 0)) - (dictem-add-text-face-properties - bold-beg-end (- bold-end-beg 1) face-properties) - (delete-region bold-beg-beg bold-beg-end) - (delete-region bold-end-beg bold-end-end) - )))))) - -(defun dictem-postprocess-stardict-definition () - (interactive) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:weight bold)) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:height 1.2 :foreground "white" :weight bold)) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:weight bold :foreground "green")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '()) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:foreground "green")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:foreground "brown")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:foreground "green")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:foreground "BurlyWood")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:slant "oblique")) - - (goto-char (point-min)) - (dictem-add-begendre-face-propertires - "" "" '(:foreground "lightblue")) - - ; replaceing with [ - (goto-char (point-min)) - (while (search-forward-regexp "" nil t) - (replace-match "[" t t)) - - ; replaceing with ] - (goto-char (point-min)) - (while (search-forward-regexp "" nil t) - (replace-match "]" t t)) - - ; replaceing with ( - (goto-char (point-min)) - (while (search-forward-regexp "" nil t) - (replace-match "" t t)) - - ; replaceing with ( - (goto-char (point-min)) - (while (search-forward-regexp "" nil t) - (replace-match "" t t)) - - (let ((dictem-hyperlink-beginning "") - (dictem-hyperlink-end "")) - (dictem-postprocess-definition-hyperlinks-cyrlybr1)) - - ) - ;;;;; On-Click Functions ;;;;; (defun dictem-define-on-press () "Is called upon pressing Enter."