diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/cedet/semantic/dep.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/cedet/semantic/dep.el')
-rw-r--r-- | lisp/cedet/semantic/dep.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index db8be5ecf47..efebe21a945 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -1,4 +1,4 @@ -;;; semantic/dep.el --- Methods for tracking dependencies (include files) +;;; semantic/dep.el --- Methods for tracking dependencies (include files) -*- lexical-binding: t; -*- ;; Copyright (C) 2006-2021 Free Software Foundation, Inc. @@ -123,12 +123,12 @@ Changes made by this function are not persistent." (if (not mode) (setq mode major-mode)) (let ((dirtmp (file-name-as-directory dir)) (value - (mode-local-value mode 'semantic-dependency-system-include-path)) - ) - (add-to-list 'value dirtmp t) + (mode-local-value mode 'semantic-dependency-system-include-path))) (eval `(setq-mode-local ,mode - semantic-dependency-system-include-path value)) - )) + semantic-dependency-system-include-path + ',(if (member dirtmp value) value + (append value (list dirtmp)))) + t))) ;;;###autoload (defun semantic-remove-system-include (dir &optional mode) @@ -146,10 +146,10 @@ Changes made by this function are not persistent." (value (mode-local-value mode 'semantic-dependency-system-include-path)) ) - (setq value (delete dirtmp value)) + (setq value (remove dirtmp value)) (eval `(setq-mode-local ,mode semantic-dependency-system-include-path - value)) - )) + ',value) + t))) ;;;###autoload (defun semantic-reset-system-include (&optional mode) @@ -157,10 +157,10 @@ Changes made by this function are not persistent." Modifies a mode-local version of `semantic-dependency-system-include-path'." (interactive) - (if (not mode) (setq mode major-mode)) - (eval `(setq-mode-local ,mode semantic-dependency-system-include-path - nil)) - ) + (eval `(setq-mode-local ,(or mode major-mode) + semantic-dependency-system-include-path + nil) + t)) ;;;###autoload (defun semantic-customize-system-include-path (&optional mode) |