• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:the +defs:face

12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
30 ;; to the corresponding source file.
45 ;; - Try `diff <file> <hunk>' to try and fuzzily discover the source location
46 ;; of a hunk. Show then the changes between <file> and <hunk> and make it
75 "*Non-nil means `diff-goto-source' jumps to the old file.
76 Else, it jumps to the new file."
80 (defcustom diff-update-on-the-fly t
81 "*Non-nil means hunk headers are kept up-to-date on-the-fly.
82 When editing a diff file, the line numbers in the hunk headers
83 need to be kept consistent with the actual diff. This can
84 either be done on the fly (but this sometimes interacts poorly with the
85 undo mechanism) or whenever the file is written (can be slow
91 "*Non-nil means `diff-apply-hunk' will move to the next hunk after applying."
97 "Run after setting up the `diff-mode' major mode."
156 ;; `d' because it duplicates the context :-( --Stef
199 "`diff-mode' face inherited by hunk and index header faces."
202 (put 'diff-header-face 'face-alias 'diff-header)
203 (defvar diff-header-face 'diff-header)
215 "`diff-mode' face used to highlight file header lines."
218 (put 'diff-file-header-face 'face-alias 'diff-file-header)
219 (defvar diff-file-header-face 'diff-file-header)
223 "`diff-mode' face used to highlight index header lines."
226 (put 'diff-index-face 'face-alias 'diff-index)
227 (defvar diff-index-face 'diff-index)
231 "`diff-mode' face used to highlight hunk header lines."
234 (put 'diff-hunk-header-face 'face-alias 'diff-hunk-header)
235 (defvar diff-hunk-header-face 'diff-hunk-header)
239 "`diff-mode' face used to highlight removed lines."
242 (put 'diff-removed-face 'face-alias 'diff-removed)
243 (defvar diff-removed-face 'diff-removed)
247 "`diff-mode' face used to highlight added lines."
250 (put 'diff-added-face 'face-alias 'diff-added)
251 (defvar diff-added-face 'diff-added)
258 "`diff-mode' face used to highlight changed lines."
261 (put 'diff-changed-face 'face-alias 'diff-changed)
262 (defvar diff-changed-face 'diff-changed)
266 "`diff-mode' face used to highlight indicator of removed lines (-, <)."
269 (defvar diff-indicator-removed-face 'diff-indicator-removed)
273 "`diff-mode' face used to highlight indicator of added lines (+, >)."
276 (defvar diff-indicator-added-face 'diff-indicator-added)
280 "`diff-mode' face used to highlight indicator of changed lines."
283 (defvar diff-indicator-changed-face 'diff-indicator-changed)
287 "`diff-mode' face used to highlight function names produced by \"diff -p\"."
290 (put 'diff-function-face 'face-alias 'diff-function)
291 (defvar diff-function-face 'diff-function)
295 "`diff-mode' face used to highlight context and other side-information."
298 (put 'diff-context-face 'face-alias 'diff-context)
299 (defvar diff-context-face 'diff-context)
303 "`diff-mode' face used to highlight nonexistent files in recursive diffs."
306 (put 'diff-nonexistent-face 'face-alias 'diff-nonexistent)
307 (defvar diff-nonexistent-face 'diff-nonexistent)
311 ;; FIXME: the yank-handler is now called separately on each piece of text
312 ;; with a yank-handler property, so the next-single-property-change call
316 ;; First insert the text.
318 ;; If the text does not include any diff markers and if we're not
319 ;; yanking back into a diff-mode buffer, get rid of the prefixes.
321 (undo-boundary) ; Just in case the user wanted the prefixes.
334 (1 diff-hunk-header-face) (2 diff-function-face))
336 (1 diff-hunk-header-face) (2 diff-function-face))
337 ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context
338 ("^--- .+ ----$" . diff-hunk-header-face) ;context
339 ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal
340 ("^---$" . diff-hunk-header-face) ;normal
342 (0 diff-header-face) (2 diff-file-header-face prepend))
344 (1 diff-indicator-removed-face) (2 diff-removed-face))
346 (1 diff-indicator-added-face) (2 diff-added-face))
348 (1 diff-indicator-changed-face) (2 diff-changed-face))
350 (0 diff-header-face) (1 diff-index-face prepend))
351 ("^Only in .*\n" . diff-nonexistent-face)
353 (1 font-lock-comment-delimiter-face)
354 (2 font-lock-comment-face))
355 ("^[^-=+*!<>#].*\n" (0 diff-context-face))))
362 ;; version-control name. The [\t\n] at the end of the unidiff pattern
363 ;; catches Debian source diff files (which lack the trailing date).
399 (error (error "Can't find the beginning of the hunk")))))
407 (error (error "Can't find the beginning of the file")))))
424 "Restrict the view to the current hunk.
425 If the prefix ARG is given, restrict the view to the current file instead."
451 ;; It's the only hunk for this file, so kill the file.
495 "Split the current (unified diff) hunk at point into two hunks."
509 ;; Hopefully the after-change-function will not screw us over.
512 ;; Fix the original hunk-header.
526 "Merge the diff between ANCESTOR and FROM into TO.
527 Returns the merged string if successful or nil otherwise.
548 "Tell Emacs where the find the source file of the current hunk.
549 If the OLD prefix arg is passed, tell the file NAME of the old file."
561 "Give the list of file names textually mentioned for the current hunk."
589 "Return the file corresponding to the current patch.
590 Non-nil OLD means that we want the old file.
606 ;; ignoring the first level of directory, ...
619 ;; If we haven't found the file, maybe it's because we haven't paid
620 ;; attention to the PCL-CVS hint.
626 ;; if all else fails, ask the user
635 "Call `ediff-patch-file' on the current buffer."
650 START and END are either taken from the region (if a prefix arg is given) or
651 else cover the whole bufer."
666 ;; use reverse order to make sure the indices are kept valid
737 START and END are either taken from the region
738 \(when it is highlighted) or else cover the whole buffer.
756 ;; use reverse order to make sure the indices are kept valid
778 (?\s ;merge with the other half of the chunk
811 "Reverse the direction of the diffs.
812 START and END are either taken from the region (if a prefix arg is given) or
813 else cover the whole bufer."
873 "Fixup the hunk headers (in case the buffer was modified).
874 START and END are either taken from the region (if a prefix arg is given) or
875 else cover the whole bufer."
928 ;; It turns out that making changes in the buffer from within an
933 "Remember to fixup the hunk header.
934 See `after-change-functions' for the meaning of BEG, END and LEN."
937 ;; inside editing commands, while it tends to be set when the buffer gets
953 ;; Maybe we've cut the end of the hunk before point.
955 ;; We used to fixup modifs on all the changes, but it turns out
976 ;; Select a window that displays the current buffer so that point
977 ;; movements are reflected in that window. Otherwise, the user might
978 ;; never see the hunk corresponding to the source she's jumping to.
990 When the buffer is read-only, the ESC prefix is not necessary.
991 If you edit the buffer manually, diff-mode will try to update the hunk
992 headers for you on-the-fly.
995 or vice versa with \\[diff-unified->context] and you can also reverse the direction of
1018 (if (not diff-update-on-the-fly)
1026 ;; Turn off this little trick in case the buffer is put in view-mode.
1045 (if (not diff-update-on-the-fly)
1055 ;; can just remove the file altogether. Very handy for .rej files if we
1080 "Jump to the next \"complex\" hunk.
1081 \"Complex\" is approximated by \"the hunk changes the number of lines\".
1167 "Return the literal source text from HUNK as (TEXT . OFFSET).
1168 If DESTP is nil, TEXT is the source, otherwise the destination text.
1169 CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding
1178 ;; Set the following variables:
1179 ;; SRC-POS buffer pos of the source part of the hunk or nil if none
1180 ;; DST-POS buffer pos of the destination part of the hunk or nil
1181 ;; DIVIDER-POS buffer pos of any divider line separating the src & dst
1222 ;; added or only removed text). We should then use the other side.
1228 ;; Get rid of anything except the desired text.
1249 "Return the buffer position (BEG . END) of the nearest occurrence of TEXT.
1257 ;; Choose the closest match.
1263 "Return the buffer position (BEG . END) of the nearest occurrence of TEXT.
1277 ;; Choose the closest match.
1286 BUF is the buffer corresponding to the source file.
1287 LINE-OFFSET is the offset between the expected and actual positions
1288 of the text of the hunk or nil if the text was not found.
1289 POS is a pair (BEG . END) indicating the position of the text in the buffer.
1290 SRC and DST are the two variants of text as returned by `diff-hunk-text'.
1291 SRC is the variant that was found in the buffer.
1292 SWITCHED is non-nil if the patch is already applied."
1296 ;; Check that the hunk is well-formed. Otherwise diff-mode and
1297 ;; the user may disagree on what constitutes the hunk
1298 ;; (e.g. because an empty line truncates the hunk mid-course),
1299 ;; leading to potentially nasty surprises for the user.
1305 ;; Find the location specification.
1307 (error "Can't find the hunk header")
1311 (error "Can't find the hunk separator"))
1313 (file (or (diff-find-file-name other) (error "Can't find the file")))
1315 ;; Update the user preference if he so wished.
1355 "Apply the current hunk to the source file and go to the next.
1356 By default, the new source file is patched, but if the variable
1357 `diff-jump-to-old-file' is non-nil, then the old source file is
1359 the value of this variable when given an appropriate prefix argument).
1361 With a prefix argument, REVERSE the hunk."
1364 ;; If REVERSE go to the new file, otherwise go to the old.
1368 (error "Can't find the text to patch"))
1379 (format "Use %s\\[diff-apply-hunk] to apply it to the other file"
1392 ;; Apply the hunk
1405 "See whether it's possible to apply the current hunk.
1406 With a prefix argument, try to REVERSE the hunk."
1409 ;; If REVERSE go to the new file, otherwise go to the old.
1418 "Jump to the corresponding source line.
1419 `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg
1420 is given) determines whether to jump to the old or the new file.
1421 If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument])
1422 then `diff-jump-to-old-file' is also set, for the next invocations."
1425 ;; the old location, and else to the new (i.e. as if reverting).
1437 "Find the name of function at point.
1448 ;; function, in which case, going to the source buffer will
1449 ;; not help since the function is now removed. Instead,
1450 ;; try to figure out the function name just from the code-fragment.
1462 "Refine the current hunk by ignoring space differences."
1490 ;; Remove the file-header.
1499 ;; Whatever happens, put back some equivalent text: either the new
1500 ;; one or the original one in case some error happened.
1505 ;; provide the package
1512 ;; (diff-find-file-name, diff-mode): add smarts to find the right file
1520 ;; - have diff-kill-hunk call diff-kill-file if it's the only hunk.
1521 ;; - diff-kill-file now tries to kill the leading garbage as well.
1524 ;; - don't use CL in the autoloaded code
1534 ;; diff-fixup-modifs): only use the region if a prefix arg is given.
1540 ;; use `combine-after-change-calls' to minimize the slowdown of font-lock.