don't display mismatched whitespace, bad in cpp mode with formatting
This commit is contained in:
		
							parent
							
								
									ad09b481ac
								
							
						
					
					
						commit
						25a87839f3
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		
							
								
								
									
										16
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
					@ -66,14 +66,14 @@
 | 
				
			||||||
(setq tab-always-indent nil) ;; tab key inserts tabs after hitting indent point
 | 
					(setq tab-always-indent nil) ;; tab key inserts tabs after hitting indent point
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; display mismatched whitespace at the beginning or end of lines
 | 
					;; display mismatched whitespace at the beginning or end of lines
 | 
				
			||||||
(add-hook 'after-change-major-mode-hook
 | 
					;; (add-hook 'after-change-major-mode-hook
 | 
				
			||||||
          (lambda ()
 | 
					;;           (lambda ()
 | 
				
			||||||
            (if (derived-mode-p 'prog-mode)
 | 
					;;             (if (derived-mode-p 'prog-mode)
 | 
				
			||||||
                (progn
 | 
					;;                 (progn
 | 
				
			||||||
                  (if (eq indent-tabs-mode t)
 | 
					;;                   (if (eq indent-tabs-mode t)
 | 
				
			||||||
                      (setq whitespace-style '(face indentation::tab trailing missing-newline-at-eof))
 | 
					;;                       (setq whitespace-style '(face indentation::tab trailing missing-newline-at-eof))
 | 
				
			||||||
                    (setq whitespace-style '(face indentation::space trailing missing-newline-at-eof)))
 | 
					;;                     (setq whitespace-style '(face indentation::space trailing missing-newline-at-eof)))
 | 
				
			||||||
                  (whitespace-mode t)))))
 | 
					;;                   (whitespace-mode t)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-hook 'prog-mode-hook 'enable-tabs)
 | 
					(add-hook 'prog-mode-hook 'enable-tabs)
 | 
				
			||||||
(add-hook 'lisp-mode-hook 'disable-tabs)
 | 
					(add-hook 'lisp-mode-hook 'disable-tabs)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue