changeset 79550:7f3b93a179a2

* progmodes/verilog-mode.el (verilog-mode-map) (verilog-template-map, verilog-mode-mouse-map): Fix typos. (verilog-colorize-include-files): Use only overlay functions so that it can work on both emacs and XEmacs. (set-extent-keymap): Remove unused defun.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 08 Dec 2007 20:43:01 +0000
parents d9595ed9b084
children ae0b1b4444b5
files lisp/ChangeLog lisp/progmodes/verilog-mode.el
diffstat 2 files changed, 20 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Dec 08 19:59:24 2007 +0000
+++ b/lisp/ChangeLog	Sat Dec 08 20:43:01 2007 +0000
@@ -1,7 +1,11 @@
 2007-12-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
-	* progmodes/verilog-mode.el (verilog-mode-map): Fix typo.
-	
+	* progmodes/verilog-mode.el (verilog-mode-map)
+	(verilog-template-map, verilog-mode-mouse-map): Fix typos.
+	(verilog-colorize-include-files): Use only overlay functions so
+	that it can work on both emacs and XEmacs.
+	(set-extent-keymap): Remove unused defun.
+
 	* files.el (auto-mode-alist): Recognize verilog files.
 
 	* progmodes/verilog-mode.el (verilog-string-replace-matches)
--- a/lisp/progmodes/verilog-mode.el	Sat Dec 08 19:59:24 2007 +0000
+++ b/lisp/progmodes/verilog-mode.el	Sat Dec 08 20:43:01 2007 +0000
@@ -909,7 +909,8 @@
     (define-key map "\C-c\C-s" 'verilog-auto-save-compile)
     (define-key map "\C-c\C-z" 'verilog-inject-auto)
     (define-key map "\C-c\C-e" 'verilog-expand-vector)
-    (define-key map "\C-c\C-h" 'verilog-header))
+    (define-key map "\C-c\C-h" 'verilog-header)
+    map)
   "Keymap used in Verilog mode.")
 
 ;; menus
@@ -9746,7 +9747,8 @@
     (define-key map "=" 'verilog-sk-inout)
     (define-key map "W" 'verilog-sk-wire)
     (define-key map "R" 'verilog-sk-reg)
-    (define-key map "D" 'verilog-sk-define-signal))
+    (define-key map "D" 'verilog-sk-define-signal)
+    map)
   "Keymap used in Verilog mode for smart template operations.")
 
 
@@ -10119,17 +10121,11 @@
       (define-key map [mouse-2]     'verilog-load-file-at-mouse))
     (if (featurep 'xemacs)
 	(define-key map 'Sh-button2 'mouse-yank) ; you wanna paste don't you ?
-      (define-key map [S-mouse-2]   'mouse-yank-at-click)))
+      (define-key map [S-mouse-2]   'mouse-yank-at-click))
+    map)
   "Map containing mouse bindings for `verilog-mode'.")
 
 
-;; create set-extent-keymap procedure when it does not exist
-(eval-and-compile
-  (unless (fboundp 'set-extent-keymap)
-    (defun set-extent-keymap (extent keymap)
-      "fallback version of set-extent-keymap (for emacs 2[01])"
-      (set-extent-property extent 'local-map keymap))))
-
 (defun verilog-colorize-include-files (beg end old-len)
   "This function colorizes included files when the mouse passes over them.
 Clicking on the middle-mouse button loads them in a buffer (as in dired)."
@@ -10150,17 +10146,15 @@
 	    (setq overlays (cdr overlays)))) ; let
 	;; make new ones, could reuse deleted one ?
 	(while (search-forward-regexp verilog-include-file-regexp end-point t)
-	  (let (extent)
+	  (let (ov)
 	    (goto-char (match-beginning 1))
-	    (or (extent-at (point) (buffer-name) 'mouse-face) ;; not yet extended
-		(progn
-		  (setq extent (make-extent (match-beginning 1) (match-end 1)))
-		  (set-extent-property extent 'start-closed 't)
-		  (set-extent-property extent 'end-closed 't)
-		  (set-extent-property extent 'detachable 't)
-		  (set-extent-property extent 'verilog-include-file 't)
-		  (set-extent-property extent 'mouse-face 'highlight)
-		  (set-extent-keymap extent verilog-mode-mouse-map)))))))))
+	    (setq ov (make-overlay (match-beginning 1) (match-end 1)))
+	    (overlay-put ov 'start-closed 't)
+	    (overlay-put ov 'end-closed 't)
+	    (overlay-put ov 'evaporate 't)
+	    (overlay-put ov 'verilog-include-file 't)
+	    (overlay-put ov 'mouse-face 'highlight)
+	    (overlay-put ov 'local-map verilog-mode-mouse-map)))))))
 
 
 (defun verilog-colorize-include-files-buffer ()