~siretart/ubuntu/utopic/emacs-goodies-el/bug.1369333

« back to all changes in this revision

Viewing changes to debian/patches/56_make_local_hook.diff

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-05-07 13:25:53 UTC
  • mfrom: (4.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130507132553-4r1n5iwu2dl5wuub
Tags: 35.4ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian-changelog-mode.el: Teach about Ubuntu releases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/elisp/emacs-goodies-el/ascii.el
 
2
+++ b/elisp/emacs-goodies-el/ascii.el
 
3
@@ -392,9 +392,11 @@
 
4
     (setq ascii-display         t
 
5
          ascii-reference-count (1+ ascii-reference-count))
 
6
     ;; local hooks
 
7
-    (make-local-hook 'post-command-hook)
 
8
+    (if (fboundp 'make-local-hook)
 
9
+        (make-local-hook 'post-command-hook))
 
10
     (add-hook 'post-command-hook 'ascii-post-command)
 
11
-    (make-local-hook 'kill-buffer-hook)
 
12
+    (if (fboundp 'make-local-hook)
 
13
+        (make-local-hook 'kill-buffer-hook))
 
14
     (add-hook 'kill-buffer-hook 'ascii-off nil t)
 
15
     ;; own hook
 
16
     (run-hooks 'ascii-hook)
 
17
@@ -428,7 +430,8 @@
 
18
 ;; Internal variables
 
19
 
 
20
 
 
21
-(make-local-hook 'ascii-hook)
 
22
+(if (fboundp 'make-local-hook)
 
23
+    (make-local-hook 'ascii-hook))
 
24
 
 
25
 
 
26
 (defconst ascii-table
 
27
--- a/elisp/emacs-goodies-el/egocentric.el
 
28
+++ b/elisp/emacs-goodies-el/egocentric.el
 
29
@@ -101,7 +101,8 @@
 
30
 
 
31
 (defvar egocentric-overlay-list nil
 
32
   "List of overlays used to highlight occurences of your name in `egocentric-mode'.")
 
33
-(make-local-variable 'egocentric-overlay-list)
 
34
+(if (fboundp 'make-local-hook)
 
35
+    (make-local-variable 'egocentric-overlay-list))
 
36
 
 
37
 (defvar egocentric-regexp-list nil
 
38
   "Regexp used to check whether a word has to be highlighted.
 
39
@@ -141,7 +142,8 @@
 
40
 (defun egocentric-mode-on ()
 
41
   "Turn Egocentric mode on."
 
42
   (interactive)
 
43
-  (make-local-hook 'post-command-hook)
 
44
+  (if (fboundp 'make-local-hook)
 
45
+      (make-local-hook 'post-command-hook))
 
46
   (add-hook 'post-command-hook (function egocentric-post-command-hook) t t)
 
47
   (egocentric-update-regexp-list)
 
48
   (egocentric-insinuate egocentric-regexp-list)
 
49
--- a/elisp/emacs-goodies-el/maplev.el
 
50
+++ b/elisp/emacs-goodies-el/maplev.el
 
51
@@ -1853,13 +1853,15 @@
 
52
   ;; the file's local variables specs might change maplev-release
 
53
   ;; xemacs version of make-local-hook returns t, not the hook. (JR)
 
54
   ;; make-local-hook is obsolete in GNU emacs 21.1
 
55
-  (make-local-hook 'hack-local-variables-hook)
 
56
+  (if (fboundp 'make-local-hook)
 
57
+      (make-local-hook 'hack-local-variables-hook))
 
58
   (add-hook 'hack-local-variables-hook 'maplev-mode-name nil t)
 
59
 
 
60
   ;; Set hooks
 
61
   (if maplev-clean-buffer-before-saving-flag
 
62
       (add-hook 'local-write-file-hooks 'maplev-remove-trailing-spaces))
 
63
-  (make-local-hook 'before-change-functions)
 
64
+  (if (fboundp 'make-local-hook)
 
65
+      (make-local-hook 'before-change-functions))
 
66
   (add-hook 'before-change-functions 'maplev--before-change-function nil t)
 
67
   (run-hooks 'maplev-mode-hook))
 
68