[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14134: closed (24.3; Delphi Mode Doesn't Work With

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14134: closed (24.3; Delphi Mode Doesn't Work With Highlight Changes Mode)
Date: Thu, 25 Apr 2013 16:24:02 +0000

Your message dated Thu, 25 Apr 2013 12:17:49 -0400
with message-id <address@hidden>
and subject line Re: bug#14134: 24.3; Delphi Mode Doesn't Work With Highlight 
Changes Mode
has caused the debbugs.gnu.org bug report #14134,
regarding 24.3; Delphi Mode Doesn't Work With Highlight Changes Mode
to be marked as done.

(If you believe you have received this mail in error, please contact

14134: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14134
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3; Delphi Mode Doesn't Work With Highlight Changes Mode Date: Wed, 3 Apr 2013 14:03:36 -0600
Delphi mode's fontification code erases all existing text properties, including 
those used by highlight
changes mode to mark modified text sections. 

To duplicate:

emacs -Q
<emacs responds with the scratch buffer>
M-x delphi-mode
M-x highlight-changes-mode
<type some text -- the text will be shown with the highlight-changes face>
M-x highlight-changes-visible-mode
<text is shown in the default face>
M-x highlight-changes-visible-mode
<At this point the text will still be shown in the default face instead of the
highlight-changes face>

I've not included a proper patch (intuitively, the "correct" fix would be to 
rewrite Delphi mode's
fontification code to use overlays) because I'm not experienced enough with 
Elisp to do a
proper job; however, I've personally worked around the problem by monkey 
as follows:


;; Delphi-mode marks literals with special text properties, in the process 
borking *all*
;; existing properties including the properties used by hilit-chg mode for 
;; changes even when the "changes visible" flag is off. To avoid this, the 
;; "delphi-set-text-properties" function is replaced here with a version that 
;; removes the specific text properties used by the font lock while leaving all 
;; other properties alone.
;; To do this delphi-set-text-properties simply tracks which faces are used by 
the Delphi
;; font lock code and only removes those faces
(setq delphi-used-faces (list))
(defun delphi-set-text-properties (from to properties)
  ;; Like `set-text-properties', except we do not consider this to be a buffer
  ;; modification.
    (dolist (prop delphi-used-faces) (remove-text-properties from to prop))
    (when properties
      (add-text-properties from to properties)
      (add-to-list 'delphi-used-faces properties) 


In GNU Emacs 24.3.1 (i686-pc-cygwin)
 of 2013-03-11 on fiona
Configured using:
 `configure '--srcdir=/home/kbrown/src/cygemacs/emacs-24.3-1/src/emacs-24.3'
 '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
 '--libexecdir=/usr/lib' '--datadir=/usr/share' '--localstatedir=/var' 
 '--datarootdir=/usr/share' '--docdir=/usr/share/doc/emacs' '-C' '--with-x=no' 
 'CFLAGS=-ggdb -O2 -pipe
 'LDFLAGS=-L/usr/lib/ncursesw' 'LIBS=' 'CPPFLAGS=-I/usr/include/ncursesw''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  flyspell-mode: t
  shell-dirtrack-mode: t
  mouse-wheel-mode: t
  xterm-mouse-mode: t
  global-subword-mode: t
  subword-mode: t
  cua-mode: t
  desktop-save-mode: t
  show-paren-mode: t
  global-highlight-changes-mode: t
  highlight-changes-mode: t
  which-function-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Load-path shadows:
/home/Erik/.emacs.d/indent hides /usr/share/emacs/24.3/lisp/indent

(shadow gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec 
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail 
rfc2045 ietf-drums mm-util mail-prsvr mail-utils server flyspell ispell ido 
grep-a-lot grep bash-completion shell pcomplete init-terminal-fix saveplace 
tabbar mwheel
xt-mouse backup-dir backup-each-save pascal-mode+ delphi pascal subword 
xterm-title xterm-frobs goto-last-change cua-base sunrise-commander easy-mmode 
term ehelp
electric sort find-dired esh-var esh-io esh-cmd esh-opt esh-ext esh-proc 
esh-arg eldoc
esh-groups eshell esh-util esh-module esh-mode disp-table enriched dired-x 
dired-aux dired desktop paren hl-line+ advice help-fns cl-lib advice-preload 
hl-line hilit-chg wid-edit which-func imenu edmacro kmacro warnings byte-opt 
comint regexp-opt ansi-color ring tool-bar bytecomp byte-compile cconv
bash-completion-autoloads cygwin-mount-autoloads dired+-autoloads 
flymake-python-pyflakes-autoloads flymake-easy-autoloads grep-a-lot-autoloads
hl-line+-autoloads icicles-autoloads pager-autoloads tabbar-autoloads 
package ediff-hook vc-hooks lisp-float-type tabulated-list newcomment lisp-mode 
page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu 
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao 
japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic 
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button 
cus-face macroexp files text-properties overlay sha1 md5 base64 format env 
code-pages mule
custom widget hashtable-print-readable backquote make-network-process dbusbind 

- Erik R. Knowles

--- End Message ---
--- Begin Message --- Subject: Re: bug#14134: 24.3; Delphi Mode Doesn't Work With Highlight Changes Mode Date: Thu, 25 Apr 2013 12:17:49 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
This should be all fixed now: I changed opascal-mode to use
syntax-propertize and font-lock "in the normal way".


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]