Remove vc-pijul-find-file-hook
Dependencies
- [2]
VBTAFJFKSwitch from DARCS to Pijul - [3]
MAGPFPZBinit - [4]
ITWH4477reindentation - [5]
CJQZS55Xworking annotation - [6]
PQKTNYVZheader + reindentation
Change contents
- replacement in vc-pijul.el at line 46
;; your .emacs:;; your emacs init file: - edit in vc-pijul.el at line 49
;; (autoload 'vc-pijul-find-file-hook "vc-pijul");; (add-hook 'find-file-hooks 'vc-pijul-find-file-hook) - edit in vc-pijul.el at line 600[2.12101]→[3.21229:21231](∅→∅),[3.21229]→[3.21229:21231](∅→∅),[3.21231]→[2.12102:12152](∅→∅),[2.12152]→[3.21281:21323](∅→∅),[3.21281]→[3.21281:21323](∅→∅),[3.21323]→[2.12153:12187](∅→∅),[2.12187]→[3.21357:21406](∅→∅),[3.21357]→[3.21357:21406](∅→∅),[3.21406]→[2.12188:12227](∅→∅),[2.12227]→[3.21445:21613](∅→∅),[3.21445]→[3.21445:21613](∅→∅),[3.21613]→[2.12228:12303](∅→∅),[2.12303]→[3.21688:21983](∅→∅),[3.21688]→[3.21688:21983](∅→∅),[3.21983]→[2.12304:12385](∅→∅),[2.12385]→[3.22064:22081](∅→∅),[3.22064]→[3.22064:22081](∅→∅),[3.22081]→[3.6985:7111](∅→∅),[3.7111]→[2.12386:12463](∅→∅),[2.12463]→[3.7188:7246](∅→∅),[3.7188]→[3.7188:7246](∅→∅)
;;; protection against editing files under .pijul;;; adapted from an idea by Rob Giardine(defun vc-pijul-find-file-hook ()(let ((f (buffer-file-name (current-buffer))))(and f (vc-pijul-special-file-p f)(let* ((candidate(let* ((f (buffer-file-name (current-buffer)))(match(and f (string-match"/.pijul/\\(current\\|pristine\\)/" f))))(and match(concat (substring f 0 (match-beginning 0))"/"(substring f (match-end 0))))))(open-instead(and candidate(yes-or-no-p"This is a .pijul file, open the real file instead? "))))(cond(open-instead(find-alternate-file candidate))(t(setq buffer-read-only t)(push '(:propertize ".PIJUL-FILE:" face font-lock-warning-face)mode-line-buffer-identification)))))))