Lines Matching +defs:comment +defs:start

473     (defun po-highlight (overlay start end &optional buffer)
476 (move-overlay overlay start end (or buffer (current-buffer))))
499 (defun po-highlight (extent start end &optional buffer)
502 (set-extent-endpoints extent start end (or buffer (current-buffer))))
519 (defun po-highlight (overlay start end &optional buffer)
529 (text (buffer-substring start end)))
530 (goto-char start)
531 (delete-region start end)
532 (insert-char ? (- end start))
535 (delete-region start end)
540 (set-marker (car overlay) start (or buffer (current-buffer)))
546 (start (marker-position (car overlay)))
550 (po-highlight overlay start end buffer))))
555 (start (marker-position (car overlay)))
564 (let ((text (buffer-substring start end)))
565 (goto-char start)
566 (delete-region start end)
567 (insert-char ? (- end start))
569 (delete-region start end)
595 ;; start of keyword lines are START-OF-MSGID and START-OF-MSGSTR.
597 (defvar po-start-of-entry)
598 (defvar po-start-of-msgid)
599 (defvar po-start-of-msgstr)
614 ;; To allow simultaneous edition of the comment and the msgstr of an entry,
615 ;; ENTRY-MARKER points to the msgid line if a comment is being edited, or to
651 (defvar po-string-start)
782 ["Edit comment" po-edit-comment
784 '(:help "Edit current comment"))]
785 ["Ediff and merge comment" po-edit-comment-and-ediff
787 '(:help "Call `ediff' on current comment for merging"))]
788 ["Cut comment" po-kill-comment
790 '(:help "Cut (kill) current comment"))]
791 ["Copy comment" po-kill-ring-save-comment
794 ["Paste comment" po-yank-comment
910 "Function to start composing an electronic message.")
938 ("^# .*\\|^#[:,]?" . font-lock-comment-face)
954 ;; '(("^# .*\\|^#$" nil comment)
980 (define-key po-mode-map "#" 'po-edit-comment)
1008 (define-key po-mode-map "K" 'po-kill-comment)
1017 (define-key po-mode-map "W" 'po-kill-ring-save-comment)
1018 (define-key po-mode-map "Y" 'po-yank-comment)
1024 (define-key po-mode-map [?\C-c?\C-#] 'po-edit-comment-and-ediff)
1025 (define-key po-mode-map "\C-c\C-C" 'po-edit-comment-and-ediff)
1059 (make-local-variable 'po-start-of-entry)
1060 (make-local-variable 'po-start-of-msgid)
1061 (make-local-variable 'po-start-of-msgstr)
1088 (set (make-local-variable 'po-string-start) nil)
1171 (setq current po-start-of-msgstr)
1217 ;; possible, should try to fit the comment and the msgid. Otherwise,
1220 (goto-char po-start-of-msgid))
1316 (setq po-start-of-entry (match-end 0))
1320 (setq po-start-of-msgstr (match-beginning 0)
1325 (setq po-start-of-msgstr (match-beginning 0)
1327 ;; We were in the crumb. The start of the last PO
1330 (goto-char po-start-of-msgstr)
1331 (setq po-start-of-entry
1336 (setq po-start-of-msgstr (match-beginning 0)
1338 ;; The start of this entry is the end of the previous
1340 (goto-char po-start-of-msgstr)
1341 (setq po-start-of-entry
1346 (setq po-start-of-entry (point-min))
1347 (goto-char po-start-of-entry)
1350 (setq po-start-of-msgstr (match-beginning 0)
1352 ;; Find start of msgid.
1353 (goto-char po-start-of-entry)
1355 (setq po-start-of-msgid (match-beginning 0))
1360 (goto-char po-start-of-entry)
1361 (if (re-search-forward po-fuzzy-regexp po-start-of-msgid t)
1363 (goto-char po-start-of-msgstr)
1374 (goto-char po-start-of-entry)
1375 (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
1392 (goto-char po-start-of-entry)
1393 (if (re-search-forward "\n#[,!] .*" po-start-of-msgid t)
1417 (goto-char po-start-of-msgid)
1438 (goto-char po-start-of-msgid)
1485 (re-search-forward regexp po-start-of-entry t)))
1498 (goto-char po-start-of-entry)
1690 (defun po-extract-unquoted (buffer start end)
1694 (goto-char start)
1696 (setq start (point))
1700 (po-extract-part-unquoted buffer start end))
1702 (defun po-extract-part-unquoted (buffer start end)
1706 (insert-buffer-substring buffer start end)
1735 If PREFIX, precede the result with its contents. If OBSOLETE, comment all
1778 po-start-of-msgid po-start-of-msgstr)))
1786 po-start-of-msgstr po-end-of-entry)))
1800 (goto-char po-start-of-entry)
1801 (re-search-forward po-any-msgid-regexp po-start-of-msgstr)
1805 (goto-char po-start-of-msgid)
1820 (goto-char po-start-of-entry)
1837 (goto-char po-start-of-msgid)
1880 (narrow-to-region po-start-of-entry po-end-of-entry)
1892 (po-check-for-pending-edit po-start-of-msgid)
1893 (po-check-for-pending-edit po-start-of-msgstr))
1898 (delete-region po-start-of-entry po-end-of-entry))
1899 (goto-char po-start-of-entry)
1909 (defvar po-active-comment-regexp
1911 "Regexp matching the whole editable comment part of an active entry.")
1913 (defvar po-obsolete-comment-regexp
1915 "Regexp matching the whole editable comment part of an obsolete entry.")
1917 (defun po-get-comment (kill-flag)
1918 "Extract and return the editable comment string, uncommented.
1919 If KILL-FLAG, then add the unquoted comment to the kill ring."
1923 (goto-char po-start-of-entry)
1924 (if (re-search-forward (if obsolete po-obsolete-comment-regexp
1925 po-active-comment-regexp)
1938 (defun po-set-comment (form)
1939 "Using FORM to get a string, replace the current editable comment.
1959 (goto-char po-start-of-entry)
1961 (if obsolete po-obsolete-comment-regexp po-active-comment-regexp)
1971 (defun po-kill-ring-save-comment ()
1975 (po-get-comment t))
1977 (defun po-kill-comment ()
1980 (po-kill-ring-save-comment)
1981 (po-set-comment "")
1984 (defun po-yank-comment ()
1985 "Replace the current comment string by the top of the kill ring."
1988 (po-set-comment (if (eq last-command 'yank) '(yank-pop 1) '(yank)))
2093 buf2 start-1 end-1 start-2 end-2
2101 (setq start-1 (point))
2112 (insert-buffer-substring oldbuf start-1 end-1)
2115 (setq start-2 (point))
2125 (insert-buffer-substring oldbuf start-2 end-2))
2127 (if (not (string-equal (buffer-substring-no-properties start-1 end-1)
2128 (buffer-substring-no-properties start-2 end-2)))
2162 (cond ((= (point) po-start-of-msgid)
2163 (po-set-comment string)
2165 ((= (point) po-start-of-msgstr)
2179 TYPE may be 'comment or 'msgstr. If EXPAND-TABS, expand tabs to spaces.
2182 (set-marker marker (cond ((eq type 'comment) po-start-of-msgid)
2183 ((eq type 'msgstr) po-start-of-msgstr)))
2192 ;; (goto-char (1- po-start-of-msgstr))
2195 (goto-char po-start-of-entry)
2224 (defun po-edit-comment ()
2225 "Use another window to edit the current translator comment."
2228 (po-edit-string (po-get-comment nil) 'comment nil))
2230 (defun po-edit-comment-and-ediff ()
2231 "Use `ediff' to edit the current translator comment.
2235 (po-edit-comment)
2353 possibly highlighted, the cursor at start of msgid, then return 't'.
2358 (let ((start (point))
2368 (buffer-substring po-start-of-msgstr po-end-of-entry)
2377 (goto-char po-start-of-entry)
2384 (goto-char po-start-of-msgid))
2385 (goto-char start)
2395 (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
2433 (let ((string (buffer-substring po-start-of-msgid po-start-of-msgstr))
2478 (if (= po-start-of-entry po-reference-check)
2482 (goto-char po-start-of-entry)
2483 (if (re-search-forward "^#:" po-start-of-msgid t)
2505 po-reference-check po-start-of-entry)))
2589 (start po-string-start)
2593 (goto-char start)
2594 (or (pos-visible-in-window-p start)
2603 (po-highlight po-marking-overlay start end buffer)))))
2648 po-string-start (nth 1 data)
2661 (start po-string-start)
2667 (setq line (count-lines (point-min) start))
2668 (apply po-mark-string-function start end keyword nil))
2729 (defun po-mark-unknown-string (start end keyword)
2739 (let (start end)
2740 (while (and (not start)
2753 (t (setq start (1- (point)))
2762 (goto-char start)
2765 (setq start nil
2775 (setq start nil
2777 (and start end
2778 (list (po-extract-unquoted (current-buffer) start end) start end))))
2780 (defun po-mark-awk-string (start end keyword)
2785 (goto-char start)
2791 (goto-char start)
2800 (let (start end)
2801 (while (and (not start)
2814 (t (setq start (1- (point)))
2822 (goto-char start)
2825 (setq start nil
2827 (and start end
2828 (list (po-extract-unquoted (current-buffer) start end) start end))))
2830 (defun po-mark-bash-string (start end keyword)
2833 (goto-char start)
2861 (let (start end)
2862 (while (and (not start)
2880 (t (setq start (1- (point))
2891 (goto-char start)
2905 (setq start nil
2912 (and start end
2913 (list (po-extract-unquoted (current-buffer) start end) start end))))
2915 (defun po-mark-c-string (start end keyword)
2921 (goto-char start)
2932 (let (start end)
2933 (while (and (not start)
2942 (t (setq start (1- (point)))
2949 (goto-char start)
2960 (setq start nil
2963 (and start end
2964 (list (po-extract-unquoted (current-buffer) start end) start end))))
2966 (defun po-mark-emacs-lisp-string (start end keyword)
2972 (goto-char start)
2983 (let (contents start end)
3000 (setq start (point)
3003 (goto-char start)
3021 (and contents (list contents start end))))
3028 raw start end resume)
3031 (cond ((= (following-char) ?#) ; comment
3032 (setq start nil)
3035 (setq start nil)
3039 start (match-end 0))
3040 (goto-char start)
3046 start (match-end 0))
3047 (goto-char start)
3053 start (match-end 0))
3054 (goto-char start)
3060 start nil)
3066 start (match-end 0))
3067 (goto-char start)
3073 start nil)
3078 (setq start nil
3080 (if start
3083 (buffer-substring start end)
3085 start end))))))
3089 (defun po-mark-python-string (start end keyword)
3096 (goto-char start)
3103 (goto-char start)
3192 start-of-header end-of-header package version team)
3197 (setq start-of-header (match-beginning 0)
3200 (goto-char start-of-header)
3223 (goto-char start-of-header)