contrib/mercurial.el
changeset 8370 45ed015b524e
parent 6390 67784cb38d58
child 10263 25e572394f5c
equal deleted inserted replaced
8369:93a811ef3ac0 8370:45ed015b524e
   835 (defun hg-commit-toggle-file (pos)
   835 (defun hg-commit-toggle-file (pos)
   836   "Toggle whether or not the file at POS will be committed."
   836   "Toggle whether or not the file at POS will be committed."
   837   (interactive "d")
   837   (interactive "d")
   838   (save-excursion
   838   (save-excursion
   839     (goto-char pos)
   839     (goto-char pos)
   840     (let ((face (get-text-property pos 'face))
   840     (let (face
   841 	  (inhibit-read-only t)
   841 	  (inhibit-read-only t)
   842 	  bol)
   842 	  bol)
   843       (beginning-of-line)
   843       (beginning-of-line)
   844       (setq bol (+ (point) 4))
   844       (setq bol (+ (point) 4))
       
   845       (setq face (get-text-property bol 'face))
   845       (end-of-line)
   846       (end-of-line)
   846       (if (eq face 'bold)
   847       (if (eq face 'bold)
   847 	  (progn
   848 	  (progn
   848 	    (remove-text-properties bol (point) '(face nil))
   849 	    (remove-text-properties bol (point) '(face nil))
   849 	    (message "%s will not be committed"
   850 	    (message "%s will not be committed"